rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwoodb5fa357d8bc44ce258bcdf588a76059ac983edce
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "e22fde65824ac57f69c9721f60b366a2c686338b",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"title": "Remove COB entries from evaluation",
"state": {
"status": "draft",
"conflicts": []
},
"before": "f30760d6bb86d2978a5ed4df8ee45b9aa97778b4",
"after": "b5fa357d8bc44ce258bcdf588a76059ac983edce",
"commits": [
"b5fa357d8bc44ce258bcdf588a76059ac983edce",
"e5c1940089426790a6a528a88910adb497684c3e"
],
"target": "3fc92f83fe089263c470b328414d923227cf0e4a",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "e22fde65824ac57f69c9721f60b366a2c686338b",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Allow COB evaluation to ignore entries while evaluating the change graph. This\nwould then be wired up to use the node's block list to ignore the entries for\nthose specific peers.\n\nOpen questions:\n- Need to test what happens when replies from non-blocked peers occur\n- This currently just hides data, rather than deleting it\n- Possibly more questions to be had...",
"base": "f30760d6bb86d2978a5ed4df8ee45b9aa97778b4",
"oid": "b5fa357d8bc44ce258bcdf588a76059ac983edce",
"timestamp": 1745936612
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "446944b2-20d0-4ac8-bb78-8addb74857ac"
},
"info_url": "https://cci.rad.levitte.org//446944b2-20d0-4ac8-bb78-8addb74857ac.html"
}
Started at: 2026-09-08 04:40:30.980078+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/446944b2-20d0-4ac8-bb78-8addb74857ac/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 189 issues · 38 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout e22fde65824ac57f69c9721f60b366a2c686338b
✓ Switched to branch patch/e22fde6 at revision e22fde6
✓ Branch patch/e22fde6 setup to track rad/patches/e22fde65824ac57f69c9721f60b366a2c686338b
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout b5fa357d8bc44ce258bcdf588a76059ac983edce
HEAD is now at b5fa357d (WIP) radicle: block specified keys from COB evaluation
Exit code: 0
$ rad patch show e22fde65824ac57f69c9721f60b366a2c686338b -p
╭────────────────────────────────────────────────────────────────────────────────╮
│ Title Remove COB entries from evaluation │
│ Patch e22fde65824ac57f69c9721f60b366a2c686338b │
│ Author fintohaps z6Mkire…SQZ3voM │
│ Head b5fa357d8bc44ce258bcdf588a76059ac983edce │
│ Base f30760d6bb86d2978a5ed4df8ee45b9aa97778b4 │
│ Target master │
│ Branches patch/e22fde6 │
│ Commits ahead 2, behind 1078 │
│ Status draft │
│ │
│ Allow COB evaluation to ignore entries while evaluating the change graph. This │
│ would then be wired up to use the node's block list to ignore the entries for │
│ those specific peers. │
│ │
│ Open questions: │
│ - Need to test what happens when replies from non-blocked peers occur │
│ - This currently just hides data, rather than deleting it │
│ - Possibly more questions to be had... │
├────────────────────────────────────────────────────────────────────────────────┤
│ b5fa357 (WIP) radicle: block specified keys from COB evaluation │
│ e5c1940 cob: introduce Filter for filtering entries │
├────────────────────────────────────────────────────────────────────────────────┤
│ ● Revision e22fde6 @ f30760d..b5fa357 by fintohaps z6Mkire…SQZ3voM 1 year ago │
╰────────────────────────────────────────────────────────────────────────────────╯
commit b5fa357d8bc44ce258bcdf588a76059ac983edce
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 29 16:19:41 2025 +0200
(WIP) radicle: block specified keys from COB evaluation
diff --git a/radicle/src/cob.rs b/radicle/src/cob.rs
index 4c79ec3be..8746097ea 100644
--- a/radicle/src/cob.rs
+++ b/radicle/src/cob.rs
@@ -18,8 +18,8 @@ pub use common::*;
pub use op::{ActorId, Op};
pub use radicle_cob::{
change, history::EntryId, object, object::collaboration::error, type_name::TypeNameParse,
- CollaborativeObject, Contents, Create, Embed, Entry, Evaluate, History, Manifest, ObjectId,
- Store, TypeName, Update, Updated, Version,
+ CollaborativeObject, Contents, Create, Embed, Entry, Evaluate, Filter, History, Manifest,
+ ObjectId, Store, TypeName, Update, Updated, Version,
};
pub use radicle_cob::{create, get, git, list, remove, update};
diff --git a/radicle/src/cob/identity.rs b/radicle/src/cob/identity.rs
index 73dc74e3a..2db0e1fda 100644
--- a/radicle/src/cob/identity.rs
+++ b/radicle/src/cob/identity.rs
@@ -218,7 +218,7 @@ impl Identity {
) -> Result<Identity, store::Error> {
use cob::store::CobWithType;
- cob::get::<Self, _>(repo, Self::type_name(), object)
+ cob::get::<Self, _>(repo, Self::type_name(), object, &cob::Filter::default())
.map(|r| r.map(|cob| cob.object))?
.ok_or_else(move || store::Error::NotFound(TYPENAME.clone(), *object))
}
diff --git a/radicle/src/cob/issue.rs b/radicle/src/cob/issue.rs
index a53d20c67..e096760c6 100644
--- a/radicle/src/cob/issue.rs
+++ b/radicle/src/cob/issue.rs
@@ -770,12 +770,23 @@ where
R: ReadRepository + cob::Store,
{
/// Open an issues store.
- pub fn open(repository: &'a R) -> Result<Self, RepositoryError> {
+ pub fn open(
+ repository: &'a R,
+ blocked: BTreeSet<crypto::PublicKey>,
+ ) -> Result<Self, RepositoryError> {
let identity = repository.identity_head()?;
- let raw = store::Store::open(repository)?.identity(identity);
+ let raw = store::Store::open(repository)?
+ .identity(identity)
+ .block(blocked);
Ok(Self { raw })
}
+
+ pub fn with_blocked(self, blocked: BTreeSet<crypto::PublicKey>) -> Self {
+ Self {
+ raw: self.raw.block(blocked),
+ }
+ }
}
impl<'a, R> Issues<'a, R>
@@ -1654,9 +1665,14 @@ mod test {
issue.reload().unwrap();
assert_eq!(issue.comments().count(), 1);
- let cob = cob::get::<Issue, _>(&*repo, Issue::type_name(), issue.id())
- .unwrap()
- .unwrap();
+ let cob = cob::get::<Issue, _>(
+ &*repo,
+ Issue::type_name(),
+ issue.id(),
+ &cob::Filter::default(),
+ )
+ .unwrap()
+ .unwrap();
assert_eq!(cob.history().len(), 1);
assert_eq!(
@@ -1740,9 +1756,14 @@ mod test {
.unwrap();
// Initially, there is one node in the DAG.
- let cob = cob::get::<NonEmpty<cob::Entry>, _>(&*repo, &type_name, issue.id())
- .unwrap()
- .unwrap();
+ let cob = cob::get::<NonEmpty<cob::Entry>, _>(
+ &*repo,
+ &type_name,
+ issue.id(),
+ &cob::Filter::default(),
+ )
+ .unwrap()
+ .unwrap();
assert_eq!(cob.history.len(), 1);
assert_eq!(cob.object.len(), 1);
@@ -1774,16 +1795,21 @@ mod test {
// If we fetch the COB with its history, *without* trying to interpret it as an issue,
// we'll see that all entries, including the invalid one are there.
- let cob = cob::get::<NonEmpty<cob::Entry>, _>(&*repo, &type_name, issue.id())
- .unwrap()
- .unwrap();
+ let cob = cob::get::<NonEmpty<cob::Entry>, _>(
+ &*repo,
+ &type_name,
+ issue.id(),
+ &cob::Filter::default(),
+ )
+ .unwrap()
+ .unwrap();
assert_eq!(cob.history.len(), 2);
assert_eq!(cob.object.len(), 2);
assert_eq!(cob.object.last().contents(), &contents);
// However, if we try to fetch it as an *issue*, the invalid comment is pruned.
- let cob = cob::get::<Issue, _>(&*repo, &type_name, issue.id())
+ let cob = cob::get::<Issue, _>(&*repo, &type_name, issue.id(), &cob::Filter::default())
.unwrap()
.unwrap();
assert_eq!(cob.history.len(), 1);
@@ -1801,9 +1827,14 @@ mod test {
assert_eq!(issue.comments().last().unwrap().1.body(), "Valid comment");
// The actual DAG contains 3 nodes, but only 2 were loaded as an issue.
- let cob = cob::get::<NonEmpty<cob::Entry>, _>(&*repo, &type_name, issue.id())
- .unwrap()
- .unwrap();
+ let cob = cob::get::<NonEmpty<cob::Entry>, _>(
+ &*repo,
+ &type_name,
+ issue.id(),
+ &cob::Filter::default(),
+ )
+ .unwrap()
+ .unwrap();
assert_eq!(cob.history.len(), 3);
assert_eq!(cob.object.len(), 3);
@@ -1814,9 +1845,14 @@ mod test {
.comment("Eve's comment", *issue.id, vec![], &eve)
.unwrap();
- let cob = cob::get::<NonEmpty<cob::Entry>, _>(&*repo, &type_name, issue.id())
- .unwrap()
- .unwrap();
+ let cob = cob::get::<NonEmpty<cob::Entry>, _>(
+ &*repo,
+ &type_name,
+ issue.id(),
+ &cob::Filter::default(),
+ )
+ .unwrap()
+ .unwrap();
// There are three nodes still, but they are all valid comments.
// The invalid comment of Eve was replaced with a valid one.
@@ -1824,4 +1860,42 @@ mod test {
assert_eq!(cob.history.len(), 3);
assert_eq!(cob.object.len(), 3);
}
+
+ #[test]
+ fn test_blocked_user_comments() {
+ let t = test::setup::Network::default();
+ let mut issues_alice = Cache::no_cache(&*t.alice.repo).unwrap();
+ let mut bob_issues = Cache::no_cache(&*t.bob.repo).unwrap();
+ let mut issue_alice = issues_alice
+ .create(
+ "Alice Issue",
+ "Alice's comment",
+ &[],
+ &[],
+ [],
+ &t.alice.signer,
+ )
+ .unwrap();
+ let id = *issue_alice.id();
+
+ t.bob.repo.fetch(&t.alice);
+
+ let mut issue_bob = bob_issues.get_mut(&id).unwrap();
+
+ issue_bob
+ .comment("Illicit", *id, vec![], &t.bob.signer)
+ .unwrap();
+ issue_bob.comment("Ok", *id, vec![], &t.bob.signer).unwrap();
+
+ t.alice.repo.fetch(&t.bob);
+ issue_alice.reload().unwrap();
+ assert_eq!(issue_alice.comments().count(), 3);
+
+ // Block `bob`'s comments and reload the issue
+ let issues_alice =
+ issues_alice.with_blocked([*t.bob.signer.public_key()].into_iter().collect());
+ let issue_alice = issues_alice.get(&id).unwrap().unwrap();
+
+ assert_eq!(issue_alice.comments().count(), 1);
+ }
}
diff --git a/radicle/src/cob/issue/cache.rs b/radicle/src/cob/issue/cache.rs
index 915d42a1a..2ea5cb9c8 100644
--- a/radicle/src/cob/issue/cache.rs
+++ b/radicle/src/cob/issue/cache.rs
@@ -1,3 +1,4 @@
+use std::collections::BTreeSet;
use std::ops::ControlFlow;
use std::str::FromStr;
@@ -204,13 +205,21 @@ where
/// Get a `Cache` that does no write-through modifications and
/// uses the [`super::Issues`] store for all reads and writes.
pub fn no_cache(repository: &'a R) -> Result<Self, RepositoryError> {
- let store = super::Issues::open(repository)?;
+ // TODO(finto): might need to thread through the blocked list
+ let store = super::Issues::open(repository, BTreeSet::new())?;
Ok(Self {
store,
cache: cache::NoCache,
})
}
+ pub fn with_blocked(self, blocked: BTreeSet<crypto::PublicKey>) -> Self {
+ Self {
+ store: self.store.with_blocked(blocked),
+ ..self
+ }
+ }
+
/// Get the [`IssueMut`], identified by `id`.
pub fn get_mut<'g>(
&'g mut self,
diff --git a/radicle/src/cob/store.rs b/radicle/src/cob/store.rs
index bd67b2d3d..c37d29b35 100644
--- a/radicle/src/cob/store.rs
+++ b/radicle/src/cob/store.rs
@@ -1,11 +1,12 @@
//! Generic COB storage.
#![allow(clippy::large_enum_variant)]
#![allow(clippy::type_complexity)]
+use std::collections::BTreeSet;
use std::fmt::Debug;
use std::marker::PhantomData;
use nonempty::NonEmpty;
-use radicle_cob::CollaborativeObject;
+use radicle_cob::{CollaborativeObject, Filter};
use serde::{Deserialize, Serialize};
use crate::cob::op::Op;
@@ -138,6 +139,7 @@ pub struct Store<'a, T, R> {
repo: &'a R,
witness: PhantomData<T>,
type_name: &'a TypeName,
+ filter: Filter,
}
impl<T, R> AsRef<R> for Store<'_, T, R> {
@@ -146,6 +148,14 @@ impl<T, R> AsRef<R> for Store<'_, T, R> {
}
}
+impl<T, R> Store<'_, T, R> {
+ /// Block the set of keys provided, when evaluating the value for `T`.
+ pub fn block(self, keys: BTreeSet<crypto::PublicKey>) -> Self {
+ let filter = self.filter.block(keys);
+ Self { filter, ..self }
+ }
+}
+
impl<'a, T, R> Store<'a, T, R>
where
R: ReadRepository + cob::Store,
@@ -157,6 +167,7 @@ where
identity: None,
witness: PhantomData,
type_name,
+ filter: Filter::default(),
})
}
@@ -167,6 +178,7 @@ where
witness: self.witness,
identity: Some(identity),
type_name: self.type_name,
+ filter: Filter::default(),
}
}
}
@@ -183,6 +195,7 @@ where
identity: None,
witness: PhantomData,
type_name: T::type_name(),
+ filter: Filter::default(),
})
}
}
@@ -326,7 +339,7 @@ where
{
/// Get an object.
pub fn get(&self, id: &ObjectId) -> Result<Option<T>, Error> {
- cob::get::<T, _>(self.repo, self.type_name, id)
+ cob::get::<T, _>(self.repo, self.type_name, id, &self.filter)
.map(|r| r.map(|cob| cob.object))
.map_err(Error::from)
}
@@ -497,8 +510,9 @@ pub fn ops<R: cob::Store>(
id: &ObjectId,
type_name: &TypeName,
repo: &R,
+ filter: &Filter,
) -> Result<NonEmpty<Op<Vec<u8>>>, Error> {
- let cob = cob::get::<NonEmpty<cob::Entry>, _>(repo, type_name, id)?;
+ let cob = cob::get::<NonEmpty<cob::Entry>, _>(repo, type_name, id, filter)?;
if let Some(cob) = cob {
Ok(cob.object.map(Op::from))
diff --git a/radicle/src/profile.rs b/radicle/src/profile.rs
index a854abaed..5c0fa59e7 100644
--- a/radicle/src/profile.rs
+++ b/radicle/src/profile.rs
@@ -607,7 +607,15 @@ impl Home {
R: ReadRepository + cob::Store,
{
let db = self.cobs_db()?;
- let store = cob::issue::Issues::open(repository)?;
+ let policy_store = self.policies()?;
+ let blocked = policy_store
+ .follow_policies()?
+ .filter_map(|entry| match entry.policy {
+ policy::Policy::Allow => None,
+ policy::Policy::Block => Some(entry.nid),
+ })
+ .collect();
+ let store = cob::issue::Issues::open(repository, blocked)?;
db.check_version()?;
@@ -623,7 +631,16 @@ impl Home {
R: ReadRepository + cob::Store,
{
let db = self.cobs_db_mut()?;
- let store = cob::issue::Issues::open(repository)?;
+ // TODO(finto): add a helper
+ let policy_store = self.policies()?;
+ let blocked = policy_store
+ .follow_policies()?
+ .filter_map(|entry| match entry.policy {
+ policy::Policy::Allow => None,
+ policy::Policy::Block => Some(entry.nid),
+ })
+ .collect();
+ let store = cob::issue::Issues::open(repository, blocked)?;
db.check_version()?;
commit e5c1940089426790a6a528a88910adb497684c3e
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 29 12:48:27 2025 +0200
cob: introduce Filter for filtering entries
The aim of this change is to introduce filtering of entries by taking advantage
of the `prune_by` method during the evaluation via `ChangeGraph::evaluate`.
This is the minimal change to introduce a `Filter` struct that can be passed
into the `evaluate` method. It has a `Default` instance, and this is used to
introduce the change without any change to the semantics to start off with.
diff --git a/radicle-cob/src/change/store.rs b/radicle-cob/src/change/store.rs
index 3a5c24c6e..8151ada5c 100644
--- a/radicle-cob/src/change/store.rs
+++ b/radicle-cob/src/change/store.rs
@@ -1,6 +1,6 @@
// Copyright © 2022 The Radicle Link Contributors
-use std::{error::Error, fmt, num::NonZeroUsize};
+use std::{collections::BTreeSet, error::Error, fmt, num::NonZeroUsize};
use nonempty::NonEmpty;
use radicle_git_ext::Oid;
@@ -49,6 +49,26 @@ pub struct Template<Id> {
pub contents: NonEmpty<Vec<u8>>,
}
+#[derive(Clone, Debug, Default)]
+pub struct Filter {
+ /// Filter out a blocked set of keys.
+ blocked: BTreeSet<crypto::PublicKey>,
+ // TODO(finto): we could also add filters for the `Contents`
+}
+
+impl Filter {
+ /// Add the set of `keys` to the blocked list.
+ pub fn block(mut self, keys: BTreeSet<crypto::PublicKey>) -> Self {
+ self.blocked.extend(keys);
+ self
+ }
+
+ /// Check if the given `key` is blocked.
+ pub fn is_blocked(&self, key: &crypto::PublicKey) -> bool {
+ self.blocked.contains(key)
+ }
+}
+
/// Entry contents.
/// This is the change payload.
pub type Contents = NonEmpty<Vec<u8>>;
diff --git a/radicle-cob/src/change_graph.rs b/radicle-cob/src/change_graph.rs
index 8cfcd2b12..7f3a452aa 100644
--- a/radicle-cob/src/change_graph.rs
+++ b/radicle-cob/src/change_graph.rs
@@ -6,6 +6,7 @@ use std::{cmp::Ordering, collections::BTreeSet};
use git_ext::Oid;
use radicle_dag::Dag;
+use crate::change::store::Filter;
use crate::{
change, object, object::collaboration::Evaluate, signatures::ExtendedSignature,
CollaborativeObject, Entry, EntryId, History, ObjectId, TypeName,
@@ -95,6 +96,7 @@ impl ChangeGraph {
pub(crate) fn evaluate<S, T: Evaluate<S>>(
mut self,
store: &S,
+ filter: &Filter,
) -> Result<CollaborativeObject<T>, EvaluateError> {
let root = *self.object_id;
let root = self
@@ -116,6 +118,12 @@ impl ChangeGraph {
self.graph.prune_by(
&children,
|_, entry, siblings| {
+ // Ignore author entries that are blocked, but still try to
+ // process the other entries.
+ if filter.is_blocked(entry.value.author()) {
+ return ControlFlow::Continue(());
+ }
+
// Check the entry signatures are valid.
if !entry.valid_signatures() {
return ControlFlow::Break(());
diff --git a/radicle-cob/src/lib.rs b/radicle-cob/src/lib.rs
index 198b0977e..0c1a2c819 100644
--- a/radicle-cob/src/lib.rs
+++ b/radicle-cob/src/lib.rs
@@ -69,7 +69,7 @@ mod change_graph;
mod trailers;
pub mod change;
-pub use change::store::{Contents, Embed, EntryId, Manifest, Version};
+pub use change::store::{Contents, Embed, EntryId, Filter, Manifest, Version};
pub use change::Entry;
pub mod history;
diff --git a/radicle-cob/src/object/collaboration/get.rs b/radicle-cob/src/object/collaboration/get.rs
index 281f86c99..ae42bb231 100644
--- a/radicle-cob/src/object/collaboration/get.rs
+++ b/radicle-cob/src/object/collaboration/get.rs
@@ -1,6 +1,9 @@
// Copyright © 2022 The Radicle Link Contributors
-use crate::{change_graph::ChangeGraph, CollaborativeObject, Evaluate, ObjectId, Store, TypeName};
+use crate::{
+ change::store::Filter, change_graph::ChangeGraph, CollaborativeObject, Evaluate, ObjectId,
+ Store, TypeName,
+};
use super::error;
@@ -17,6 +20,7 @@ pub fn get<T, S>(
storage: &S,
typename: &TypeName,
oid: &ObjectId,
+ filter: &Filter,
) -> Result<Option<CollaborativeObject<T>>, error::Retrieve>
where
T: Evaluate<S>,
@@ -27,6 +31,10 @@ where
.map_err(|err| error::Retrieve::Refs { err: Box::new(err) })?;
ChangeGraph::load(storage, tip_refs.iter(), typename, oid)
- .map(|graph| graph.evaluate(storage).map_err(error::Retrieve::evaluate))
+ .map(|graph| {
+ graph
+ .evaluate(storage, filter)
+ .map_err(error::Retrieve::evaluate)
+ })
.transpose()
}
diff --git a/radicle-cob/src/object/collaboration/list.rs b/radicle-cob/src/object/collaboration/list.rs
index 5f3a0ccae..3f608e819 100644
--- a/radicle-cob/src/object/collaboration/list.rs
+++ b/radicle-cob/src/object/collaboration/list.rs
@@ -1,6 +1,9 @@
// Copyright © 2022 The Radicle Link Contributors
-use crate::{change_graph::ChangeGraph, CollaborativeObject, Evaluate, Store, TypeName};
+use crate::{
+ change::store::Filter, change_graph::ChangeGraph, CollaborativeObject, Evaluate, Store,
+ TypeName,
+};
use super::error;
@@ -26,8 +29,11 @@ where
let mut result = Vec::new();
for (oid, tip_refs) in references {
log::trace!(target: "cob", "Loading object '{oid}'");
- let loaded = ChangeGraph::load(storage, tip_refs.iter(), typename, &oid)
- .map(|graph| graph.evaluate(storage).map_err(error::Retrieve::evaluate));
+ let loaded = ChangeGraph::load(storage, tip_refs.iter(), typename, &oid).map(|graph| {
+ graph
+ .evaluate(storage, &Filter::default())
+ .map_err(error::Retrieve::evaluate)
+ });
match loaded {
Some(Ok(obj)) => {
diff --git a/radicle-cob/src/object/collaboration/update.rs b/radicle-cob/src/object/collaboration/update.rs
index 8a632cc1a..91e878534 100644
--- a/radicle-cob/src/object/collaboration/update.rs
+++ b/radicle-cob/src/object/collaboration/update.rs
@@ -6,8 +6,10 @@ use nonempty::NonEmpty;
use radicle_crypto::PublicKey;
use crate::{
- change, change_graph::ChangeGraph, history::EntryId, CollaborativeObject, Embed, Evaluate,
- ObjectId, Store, TypeName,
+ change::{self, store::Filter},
+ change_graph::ChangeGraph,
+ history::EntryId,
+ CollaborativeObject, Embed, Evaluate, ObjectId, Store, TypeName,
};
use super::error;
@@ -83,8 +85,9 @@ where
let graph = ChangeGraph::load(storage, existing_refs.iter(), typename, &object_id)
.ok_or(error::Update::NoSuchObject)?;
- let mut object: CollaborativeObject<T> =
- graph.evaluate(storage).map_err(error::Update::evaluate)?;
+ let mut object: CollaborativeObject<T> = graph
+ .evaluate(storage, &Filter::default())
+ .map_err(error::Update::evaluate)?;
// Create a commit for this change, but don't update any references yet.
let entry = storage.store(
diff --git a/radicle-cob/src/tests.rs b/radicle-cob/src/tests.rs
index 63dd33129..7d41061cb 100644
--- a/radicle-cob/src/tests.rs
+++ b/radicle-cob/src/tests.rs
@@ -6,6 +6,7 @@ use git_ext::ref_format::{refname, Component, RefString};
use nonempty::{nonempty, NonEmpty};
use qcheck::Arbitrary;
+use crate::Filter;
use crate::{
create, get, list, object, test::arbitrary::Invalid, update, Create, Entry, ObjectId, TypeName,
Update, Updated, Version,
@@ -40,7 +41,7 @@ fn roundtrip() {
)
.unwrap();
- let expected = get(&storage, &typename, cob.id())
+ let expected = get(&storage, &typename, cob.id(), Filter::default())
.unwrap()
.expect("BUG: cob was missing");
@@ -126,7 +127,7 @@ fn update_cob() {
)
.unwrap();
- let not_expected = get::<NonEmpty<Entry>, _>(&storage, &typename, cob.id())
+ let not_expected = get::<NonEmpty<Entry>, _>(&storage, &typename, cob.id(), Filter::default())
.unwrap()
.expect("BUG: cob was missing");
@@ -146,7 +147,7 @@ fn update_cob() {
)
.unwrap();
- let expected = get(&storage, &typename, object.id())
+ let expected = get(&storage, &typename, object.id(), Filter::default())
.unwrap()
.expect("BUG: cob was missing");
@@ -235,6 +236,88 @@ fn traverse_cobs() {
assert_eq!(contents, vec![b"issue 1".to_vec(), b"issue 2".to_vec()]);
}
+#[test]
+fn block_entries_in_get() {
+ let storage = test::Storage::new();
+ let neil_signer = gen::<MockSigner>(2);
+ let neil = test::Person::new(&storage, "gaiman", *neil_signer.public_key()).unwrap();
+ let terry_signer = gen::<MockSigner>(1);
+ let terry = test::Person::new(&storage, "pratchett", *terry_signer.public_key()).unwrap();
+ let proj = test::Project::new(&storage, "discworld", *terry_signer.public_key()).unwrap();
+ let terry_proj = test::RemoteProject {
+ project: proj.clone(),
+ person: terry,
+ };
+ let neil_proj = test::RemoteProject {
+ project: proj,
+ person: neil,
+ };
+ let typename = "xyz.rad.issue".parse::<TypeName>().unwrap();
+ let cob = create::<NonEmpty<Entry>, _, _>(
+ &storage,
+ &terry_signer,
+ Some(terry_proj.project.content_id),
+ vec![],
+ terry_signer.public_key(),
+ Create {
+ contents: nonempty!(b"issue 1".to_vec()),
+ type_name: typename.clone(),
+ message: "creating xyz.rad.issue".to_string(),
+ embeds: vec![],
+ version: Version::default(),
+ },
+ )
+ .unwrap();
+ copy_to(
+ storage.as_raw(),
+ terry_signer.public_key(),
+ &neil_proj,
+ &typename,
+ *cob.id(),
+ )
+ .unwrap();
+
+ let Updated { .. } = update::<NonEmpty<Entry>, _, _>(
+ &storage,
+ &neil_signer,
+ Some(neil_proj.project.content_id),
+ vec![],
+ neil_signer.public_key(),
+ Update {
+ changes: nonempty!(b"issue 2".to_vec()),
+ object_id: *cob.id(),
+ type_name: typename.clone(),
+ embeds: vec![],
+ message: "commenting on xyz.rad.issue".to_string(),
+ },
+ )
+ .unwrap();
+
+ let not_blocked_issue =
+ get::<NonEmpty<Entry>, _>(&storage, &typename, cob.id(), Filter::default()).unwrap();
+ assert_eq!(
+ not_blocked_issue
+ .unwrap()
+ .object
+ .map(|entry| entry.contents),
+ nonempty![
+ nonempty![b"issue 1".to_vec()],
+ nonempty![b"issue 2".to_vec()]
+ ],
+ );
+ let blocked_issue = get::<NonEmpty<Entry>, _>(
+ &storage,
+ &typename,
+ cob.id(),
+ Filter::default().block([*neil_signer.public_key()].into_iter().collect()),
+ )
+ .unwrap();
+ assert_eq!(
+ blocked_issue.unwrap().object.map(|entry| entry.contents),
+ nonempty![nonempty![b"issue 1".to_vec()]],
+ );
+}
+
#[quickcheck]
fn parse_refstr(oid: ObjectId, typename: TypeName) {
let suffix = refname!("refs/cobs")
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 446944b2-20d0-4ac8-bb78-8addb74857ac -v /opt/radcis/ci.rad.levitte.org/cci/state/446944b2-20d0-4ac8-bb78-8addb74857ac/s:/446944b2-20d0-4ac8-bb78-8addb74857ac/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/446944b2-20d0-4ac8-bb78-8addb74857ac/w:/446944b2-20d0-4ac8-bb78-8addb74857ac/w -w /446944b2-20d0-4ac8-bb78-8addb74857ac/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /446944b2-20d0-4ac8-bb78-8addb74857ac/s/script.sh
+ cargo --version
info: syncing channel updates for '1.85-x86_64-unknown-linux-gnu'
info: latest update on 2025-03-18, rust version 1.85.1 (4eb161250 2025-03-15)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.85.1 (d73d2caf9 2024-12-31)
+ rustc --version
rustc 1.85.1 (4eb161250 2025-03-15)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded aead v0.5.2
Downloaded amplify_derive v4.0.0
Downloaded aes v0.8.4
Downloaded amplify_syn v2.0.1
Downloaded block-buffer v0.10.4
Downloaded base16ct v0.2.0
Downloaded amplify_num v0.5.2
Downloaded rand_chacha v0.3.1
Downloaded gix-fs v0.12.1
Downloaded crc32fast v1.4.0
Downloaded gix-odb v0.66.0
Downloaded git-ref-format-macro v0.3.0
Downloaded ssh-cipher v0.2.0
Downloaded data-encoding v2.5.0
Downloaded rfc6979 v0.4.0
Downloaded rand_core v0.6.4
Downloaded gix-chunk v0.4.11
Downloaded rand v0.8.5
Downloaded gix-revwalk v0.17.0
Downloaded gix-date v0.9.4
Downloaded spki v0.7.3
Downloaded radicle-git-ext v0.8.0
Downloaded itoa v1.0.11
Downloaded localtime v1.3.1
Downloaded socks5-client v0.4.1
Downloaded gix-revision v0.31.1
Downloaded unicode-display-width v0.3.0
Downloaded lock_api v0.4.11
Downloaded utf8_iter v1.0.4
Downloaded iana-time-zone v0.1.60
Downloaded gix-trace v0.1.12
Downloaded primeorder v0.13.6
Downloaded gix-quote v0.4.15
Downloaded gix-prompt v0.9.1
Downloaded num-iter v0.1.44
Downloaded normalize-line-endings v0.3.0
Downloaded numtoa v0.1.0
Downloaded gix-tempfile v15.0.0
Downloaded lexopt v0.3.0
Downloaded icu_locid_transform v1.5.0
Downloaded keccak v0.1.5
Downloaded gix-transport v0.44.0
Downloaded gix-shallow v0.1.0
Downloaded icu_normalizer_data v1.5.1
Downloaded opaque-debug v0.3.1
Downloaded gix-validate v0.9.4
Downloaded gix-packetline v0.18.4
Downloaded inout v0.1.3
Downloaded idna_adapter v1.2.0
Downloaded gix-path v0.10.15
Downloaded group v0.13.0
Downloaded gix-url v0.28.2
Downloaded maybe-async v0.2.10
Downloaded icu_locid_transform_data v1.5.1
Downloaded utf8parse v0.2.1
Downloaded p256 v0.13.2
Downloaded sha1_smol v1.0.0
Downloaded subtle v2.5.0
Downloaded chrono v0.4.38
Downloaded tree-sitter-language v0.1.2
Downloaded hmac v0.12.1
Downloaded pkcs1 v0.7.5
Downloaded xattr v1.3.1
Downloaded memchr v2.7.2
Downloaded inquire v0.7.5
Downloaded multibase v0.9.1
Downloaded hashbrown v0.14.3
Downloaded idna v1.0.3
Downloaded radicle-surf v0.22.0
Downloaded yansi v0.5.1
Downloaded tinystr v0.7.6
Downloaded bstr v1.9.1
Downloaded yoke v0.7.5
Downloaded signals_receipts v0.2.0
Downloaded termion v3.0.0
Downloaded thiserror v2.0.12
Downloaded qcheck v1.0.0
Downloaded memmap2 v0.9.4
Downloaded gix-traverse v0.43.1
Downloaded snapbox v0.4.17
Downloaded ppv-lite86 v0.2.17
Downloaded polyval v0.6.2
Downloaded walkdir v2.5.0
Downloaded tempfile v3.10.1
Downloaded poly1305 v0.8.0
Downloaded unicode-width v0.1.11
Downloaded unicode-ident v1.0.12
Downloaded typenum v1.17.0
Downloaded tree-sitter-css v0.23.1
Downloaded similar v2.5.0
Downloaded smallvec v1.13.2
Downloaded sem_safe v0.2.0
Downloaded spin v0.9.8
Downloaded socket2 v0.5.7
Downloaded serde_derive v1.0.219
Downloaded p384 v0.13.0
Downloaded tinyvec v1.6.0
Downloaded libc v0.2.155
Downloaded gix-ref v0.49.1
Downloaded pretty_assertions v1.4.0
Downloaded miniz_oxide v0.8.8
Downloaded tree-sitter-go v0.23.4
Downloaded unicode-normalization v0.1.23
Downloaded prodash v29.0.2
Downloaded serde_json v1.0.116
Downloaded unicode-segmentation v1.11.0
Downloaded tree-sitter-python v0.23.4
Downloaded winnow v0.6.26
Downloaded tree-sitter v0.24.4
Downloaded regex v1.11.1
Downloaded ssh-key v0.6.6
Downloaded vcpkg v0.2.15
Downloaded syn v2.0.89
Downloaded rustix v0.38.34
Downloaded tree-sitter-md v0.3.2
Downloaded tree-sitter-c v0.23.2
Downloaded regex-syntax v0.8.5
Downloaded tree-sitter-rust v0.23.2
Downloaded syn v1.0.109
Downloaded url v2.5.4
Downloaded tree-sitter-bash v0.23.3
Downloaded serde v1.0.219
Downloaded once_cell v1.19.0
Downloaded icu_properties v1.5.1
Downloaded ryu v1.0.17
Downloaded rsa v0.9.6
Downloaded tree-sitter-ruby v0.23.1
Downloaded tar v0.4.40
Downloaded regex-automata v0.4.9
Downloaded thiserror-impl v2.0.12
Downloaded sha2 v0.10.8
Downloaded jiff v0.2.1
Downloaded linux-raw-sys v0.4.13
Downloaded bloomy v1.2.0
Downloaded zerovec v0.10.4
Downloaded icu_properties_data v1.5.1
Downloaded tree-sitter-html v0.23.2
Downloaded libm v0.2.8
Downloaded thiserror-impl v1.0.69
Downloaded termion v2.0.3
Downloaded synstructure v0.13.1
Downloaded same-file v1.0.6
Downloaded tree-sitter-typescript v0.23.2
Downloaded popol v3.0.0
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded sha3 v0.10.8
Downloaded thiserror v1.0.69
Downloaded sec1 v0.7.3
Downloaded indexmap v2.2.6
Downloaded icu_collections v1.5.0
Downloaded gix-pack v0.56.0
Downloaded lazy_static v1.5.0
Downloaded num-bigint-dig v0.8.4
Downloaded p521 v0.13.3
Downloaded git2 v0.19.0
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded writeable v0.5.5
Downloaded timeago v0.4.2
Downloaded streaming-iterator v0.1.9
Downloaded shlex v1.3.0
Downloaded version_check v0.9.4
Downloaded cyphernet v0.5.2
Downloaded netservices v0.8.0
Downloaded gix-refspec v0.27.0
Downloaded utf16_iter v1.0.5
Downloaded pkg-config v0.3.30
Downloaded phf v0.11.3
Downloaded icu_provider_macros v1.5.0
Downloaded noise-framework v0.4.0
Downloaded quote v1.0.36
Downloaded icu_locid v1.5.0
Downloaded num-traits v0.2.18
Downloaded tree-sitter-highlight v0.24.4
Downloaded zeroize v1.7.0
Downloaded pkcs8 v0.10.2
Downloaded pem-rfc7468 v0.7.0
Downloaded nonempty v0.5.0
Downloaded newline-converter v0.3.0
Downloaded gix-sec v0.10.12
Downloaded radicle-std-ext v0.1.0
Downloaded icu_normalizer v1.5.0
Downloaded write16 v1.0.0
Downloaded scopeguard v1.2.0
Downloaded pbkdf2 v0.12.2
Downloaded qcheck-macros v1.0.0
Downloaded phf_shared v0.11.3
Downloaded percent-encoding v2.3.1
Downloaded jobserver v0.1.31
Downloaded tree-sitter-json v0.24.8
Downloaded proc-macro2 v1.0.92
Downloaded io-reactor v0.5.2
Downloaded log v0.4.21
Downloaded zerofrom-derive v0.1.6
Downloaded zerofrom v0.1.6
Downloaded universal-hash v0.5.1
Downloaded tinyvec_macros v0.1.1
Downloaded salsa20 v0.10.2
Downloaded num-integer v0.1.46
Downloaded scrypt v0.11.0
Downloaded crypto-bigint v0.5.5
Downloaded nonempty v0.9.0
Downloaded parking_lot_core v0.9.9
Downloaded parking_lot v0.12.1
Downloaded proc-macro-error v1.0.4
Downloaded icu_provider v1.5.0
Downloaded litemap v0.7.5
Downloaded gix-protocol v0.47.0
Downloaded crossbeam-channel v0.5.15
Downloaded cc v1.2.2
Downloaded arc-swap v1.7.1
Downloaded proc-macro-error-attr v1.0.4
Downloaded yoke-derive v0.7.5
Downloaded ed25519 v1.5.3
Downloaded ec25519 v0.1.0
Downloaded stable_deref_trait v1.2.0
Downloaded diff v0.1.13
Downloaded shell-words v1.1.0
Downloaded gix-diff v0.49.0
Downloaded errno v0.3.9
Downloaded ascii v1.1.0
Downloaded zerovec-derive v0.10.3
Downloaded either v1.11.0
Downloaded der v0.7.9
Downloaded signature v1.6.4
Downloaded home v0.5.9
Downloaded gix-utils v0.1.14
Downloaded ssh-encoding v0.2.0
Downloaded git-ref-format-core v0.3.0
Downloaded flate2 v1.1.1
Downloaded filetime v0.2.23
Downloaded displaydoc v0.2.5
Downloaded cyphergraphy v0.3.0
Downloaded anstream v0.6.13
Downloaded gix-lock v15.0.1
Downloaded gix-hash v0.15.1
Downloaded getrandom v0.2.15
Downloaded cipher v0.4.4
Downloaded chacha20poly1305 v0.10.1
Downloaded gix-credentials v0.26.0
Downloaded gix-commitgraph v0.25.1
Downloaded git-ref-format v0.3.0
Downloaded ff v0.13.0
Downloaded bitflags v2.5.0
Downloaded gix-features v0.39.1
Downloaded ctr v0.9.2
Downloaded sqlite3-src v0.5.1
Downloaded ct-codecs v1.1.1
Downloaded byteorder v1.5.0
Downloaded base64ct v1.6.0
Downloaded faster-hex v0.9.0
Downloaded escargot v0.5.10
Downloaded digest v0.10.7
Downloaded colored v2.1.0
Downloaded block-padding v0.3.3
Downloaded bcrypt-pbkdf v0.10.0
Downloaded base32 v0.4.0
Downloaded anstyle-query v1.0.2
Downloaded sqlite3-sys v0.15.2
Downloaded sqlite v0.32.0
Downloaded snapbox-macros v0.3.8
Downloaded siphasher v1.0.1
Downloaded siphasher v0.3.11
Downloaded signature v2.2.0
Downloaded gix-negotiate v0.17.0
Downloaded gix-config-value v0.14.12
Downloaded gix-command v0.4.1
Downloaded form_urlencoded v1.2.1
Downloaded fastrand v2.1.0
Downloaded data-encoding-macro v0.1.14
Downloaded gix-hashtable v0.6.0
Downloaded ghash v0.5.1
Downloaded base-x v0.2.11
Downloaded cpufeatures v0.2.12
Downloaded crossbeam-utils v0.8.19
Downloaded libz-sys v1.1.16
Downloaded chacha20 v0.9.1
Downloaded equivalent v1.0.1
Downloaded emojis v0.6.4
Downloaded elliptic-curve v0.13.8
Downloaded ecdsa v0.16.9
Downloaded cbc v0.1.2
Downloaded blowfish v0.9.1
Downloaded base64 v0.13.1
Downloaded cypheraddr v0.4.0
Downloaded anyhow v1.0.82
Downloaded fxhash v0.2.1
Downloaded data-encoding-macro-internal v0.1.12
Downloaded dyn-clone v1.0.17
Downloaded cfg-if v1.0.0
Downloaded gix-object v0.46.1
Downloaded gix-actor v0.33.2
Downloaded colorchoice v1.0.0
Downloaded aes-gcm v0.10.3
Downloaded const-oid v0.9.6
Downloaded bytesize v2.0.1
Downloaded autocfg v1.2.0
Downloaded generic-array v0.14.7
Downloaded crypto-common v0.1.6
Downloaded base64 v0.22.1
Downloaded base64 v0.21.7
Downloaded anstyle v1.0.6
Downloaded aho-corasick v1.1.3
Downloaded amplify v4.6.0
Downloaded anstyle-parse v0.2.3
Downloaded adler2 v2.0.0
Compiling libc v0.2.155
Compiling proc-macro2 v1.0.92
Compiling unicode-ident v1.0.12
Checking cfg-if v1.0.0
Compiling shlex v1.3.0
Compiling version_check v0.9.4
Checking memchr v2.7.2
Compiling typenum v1.17.0
Checking getrandom v0.2.15
Compiling quote v1.0.36
Compiling generic-array v0.14.7
Compiling syn v2.0.89
Compiling jobserver v0.1.31
Compiling cc v1.2.2
Checking aho-corasick v1.1.3
Compiling serde v1.0.219
Checking regex-syntax v0.8.5
Checking rand_core v0.6.4
Checking smallvec v1.13.2
Checking crypto-common v0.1.6
Checking log v0.4.21
Checking fastrand v2.1.0
Compiling autocfg v1.2.0
Checking bitflags v2.5.0
Checking regex-automata v0.4.9
Checking subtle v2.5.0
Checking once_cell v1.19.0
Checking stable_deref_trait v1.2.0
Compiling syn v1.0.109
Checking zeroize v1.7.0
Checking cpufeatures v0.2.12
Checking tinyvec_macros v0.1.1
Checking tinyvec v1.6.0
Compiling synstructure v0.13.1
Compiling crc32fast v1.4.0
Checking unicode-normalization v0.1.23
Checking bstr v1.9.1
Checking block-padding v0.3.3
Checking writeable v0.5.5
Checking litemap v0.7.5
Compiling icu_locid_transform_data v1.5.1
Checking inout v0.1.3
Checking block-buffer v0.10.4
Compiling serde_derive v1.0.219
Compiling zerofrom-derive v0.1.6
Compiling yoke-derive v0.7.5
Compiling zerovec-derive v0.10.3
Compiling displaydoc v0.2.5
Checking zerofrom v0.1.6
Checking yoke v0.7.5
Compiling icu_provider_macros v1.5.0
Compiling pkg-config v0.3.30
Checking zerovec v0.10.4
Compiling icu_properties_data v1.5.1
Checking digest v0.10.7
Checking cipher v0.4.4
Compiling icu_normalizer_data v1.5.1
Checking tinystr v0.7.6
Checking icu_collections v1.5.0
Compiling thiserror v1.0.69
Checking icu_locid v1.5.0
Compiling thiserror-impl v1.0.69
Checking icu_provider v1.5.0
Checking write16 v1.0.0
Checking utf8_iter v1.0.4
Checking icu_locid_transform v1.5.0
Checking utf16_iter v1.0.5
Compiling rustix v0.38.34
Checking sha2 v0.10.8
Checking icu_properties v1.5.1
Checking percent-encoding v2.3.1
Checking itoa v1.0.11
Checking linux-raw-sys v0.4.13
Checking hashbrown v0.14.3
Checking form_urlencoded v1.2.1
Checking universal-hash v0.5.1
Checking opaque-debug v0.3.1
Compiling vcpkg v0.2.15
Compiling amplify_syn v2.0.1
Checking byteorder v1.5.0
Checking icu_normalizer v1.5.0
Compiling data-encoding v2.5.0
Compiling libz-sys v1.1.16
Compiling amplify_derive v4.0.0
Checking idna_adapter v1.2.0
Checking idna v1.0.3
Compiling data-encoding-macro-internal v0.1.12
Checking url v2.5.4
Checking amplify_num v0.5.2
Checking signature v1.6.4
Checking ascii v1.1.0
Checking ed25519 v1.5.3
Checking data-encoding-macro v0.1.14
Checking tempfile v3.10.1
Compiling libgit2-sys v0.17.0+1.8.1
Checking aead v0.5.2
Compiling proc-macro-error-attr v1.0.4
Checking base-x v0.2.11
Checking ct-codecs v1.1.1
Checking multibase v0.9.1
Checking ec25519 v0.1.0
Checking poly1305 v0.8.0
Checking amplify v4.6.0
Checking chacha20 v0.9.1
Compiling proc-macro-error v1.0.4
Checking cyphergraphy v0.3.0
Checking keccak v0.1.5
Compiling git-ref-format-core v0.3.0
Checking sha3 v0.10.8
Checking polyval v0.6.2
Checking hmac v0.12.1
Compiling sqlite3-src v0.5.1
Checking base32 v0.4.0
Checking base64ct v1.6.0
Compiling thiserror v2.0.12
Checking ppv-lite86 v0.2.17
Checking rand_chacha v0.3.1
Checking pem-rfc7468 v0.7.0
Checking cypheraddr v0.4.0
Compiling git-ref-format-macro v0.3.0
Checking pbkdf2 v0.12.2
Checking ghash v0.5.1
Checking chacha20poly1305 v0.10.1
Checking ctr v0.9.2
Checking aes v0.8.4
Compiling thiserror-impl v2.0.12
Compiling crossbeam-utils v0.8.19
Checking aes-gcm v0.10.3
Checking git-ref-format v0.3.0
Checking noise-framework v0.4.0
Checking socks5-client v0.4.1
Checking ssh-encoding v0.2.0
Checking rand v0.8.5
Checking blowfish v0.9.1
Checking cbc v0.1.2
Checking radicle-std-ext v0.1.0
Checking ssh-cipher v0.2.0
Checking bcrypt-pbkdf v0.10.0
Checking cyphernet v0.5.2
Checking signature v2.2.0
Checking ssh-key v0.6.6
Checking crossbeam-channel v0.5.15
Checking qcheck v1.0.0
Checking radicle-ssh v0.9.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-ssh)
Compiling num-traits v0.2.18
Compiling serde_json v1.0.116
Checking equivalent v1.0.1
Checking indexmap v2.2.6
Checking tree-sitter-language v0.1.2
Checking ryu v1.0.17
Checking siphasher v1.0.1
Checking nonempty v0.9.0
Compiling lock_api v0.4.11
Checking radicle-dag v0.10.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-dag)
Compiling anyhow v1.0.82
Checking lazy_static v1.5.0
Compiling parking_lot_core v0.9.9
Checking iana-time-zone v0.1.60
Checking anstyle-query v1.0.2
Checking gix-trace v0.1.12
Checking scopeguard v1.2.0
Checking chrono v0.4.38
Checking colored v2.1.0
Checking bytesize v2.0.1
Checking localtime v1.3.1
Checking base64 v0.21.7
Checking utf8parse v0.2.1
Checking anstyle-parse v0.2.3
Checking parking_lot v0.12.1
Checking faster-hex v0.9.0
Checking errno v0.3.9
Checking sem_safe v0.2.0
Checking anstyle v1.0.6
Checking colorchoice v1.0.0
Checking signals_receipts v0.2.0
Checking anstream v0.6.13
Checking gix-utils v0.1.14
Checking adler2 v2.0.0
Checking snapbox-macros v0.3.8
Checking miniz_oxide v0.8.8
Checking gix-hash v0.15.1
Checking normalize-line-endings v0.3.0
Checking similar v2.5.0
Checking same-file v1.0.6
Checking snapbox v0.4.17
Checking walkdir v2.5.0
Checking flate2 v1.1.1
Checking radicle-signals v0.11.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-signals)
Checking prodash v29.0.2
Compiling tree-sitter v0.24.4
Checking sha1_smol v1.0.0
Checking gix-features v0.39.1
Checking numtoa v0.1.0
Checking diff v0.1.13
Checking unicode-segmentation v1.11.0
Checking yansi v0.5.1
Checking pretty_assertions v1.4.0
Compiling xattr v1.3.1
Compiling filetime v0.2.23
Checking lexopt v0.3.0
Compiling escargot v0.5.10
Checking home v0.5.9
Checking gix-path v0.10.15
Compiling tar v0.4.40
Checking newline-converter v0.3.0
Checking termion v2.0.3
Checking fxhash v0.2.1
Checking regex v1.11.1
Checking dyn-clone v1.0.17
Checking unicode-width v0.1.11
Checking streaming-iterator v0.1.9
Checking inquire v0.7.5
Compiling radicle-surf v0.22.0
Checking unicode-display-width v0.3.0
Checking termion v3.0.0
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-c v0.23.2
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-python v0.23.4
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-typescript v0.23.2
Checking sqlite3-sys v0.15.2
Checking sqlite v0.32.0
Compiling radicle-cli v0.12.1 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-cli)
Checking nonempty v0.5.0
Checking base64 v0.13.1
Checking tree-sitter-highlight v0.24.4
Checking timeago v0.4.2
Checking jiff v0.2.1
Checking winnow v0.6.26
Checking gix-hashtable v0.6.0
Checking gix-validate v0.9.4
Checking memmap2 v0.9.4
Checking gix-chunk v0.4.11
Checking gix-commitgraph v0.25.1
Checking gix-fs v0.12.1
Checking gix-tempfile v15.0.0
Checking shell-words v1.1.0
Checking gix-command v0.4.1
Checking gix-lock v15.0.1
Checking gix-url v0.28.2
Checking gix-config-value v0.14.12
Checking gix-quote v0.4.15
Checking gix-sec v0.10.12
Checking gix-packetline v0.18.4
Checking gix-prompt v0.9.1
Checking gix-transport v0.44.0
Checking gix-credentials v0.26.0
Checking gix-shallow v0.1.0
Compiling maybe-async v0.2.10
Checking arc-swap v1.7.1
Checking popol v3.0.0
Checking either v1.11.0
Checking io-reactor v0.5.2
Checking salsa20 v0.10.2
Checking socket2 v0.5.7
Checking siphasher v0.3.11
Compiling radicle-node v0.10.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-node)
Checking gix-date v0.9.4
Checking netservices v0.8.0
Checking gix-actor v0.33.2
Checking bloomy v1.2.0
Checking gix-object v0.46.1
Checking scrypt v0.11.0
Checking radicle-systemd v0.9.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-systemd)
Compiling qcheck-macros v1.0.0
Compiling radicle-remote-helper v0.10.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-remote-helper)
Checking phf_shared v0.11.3
Checking gix-revwalk v0.17.0
Checking gix-diff v0.49.0
Checking gix-ref v0.49.1
Checking phf v0.11.3
Checking gix-traverse v0.43.1
Checking gix-revision v0.31.1
Checking gix-refspec v0.27.0
Checking gix-pack v0.56.0
Checking gix-negotiate v0.17.0
Checking emojis v0.6.4
Checking gix-protocol v0.47.0
Checking gix-odb v0.66.0
Checking git2 v0.19.0
Checking radicle-git-ext v0.8.0
Checking radicle-term v0.12.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-term)
Checking radicle-crypto v0.11.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-crypto)
Checking radicle-cob v0.13.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-cob)
Checking radicle-crdt v0.1.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle-crdt)
error[E0308]: mismatched types
--> radicle-cob/src/tests.rs:44:55
|
44 | let expected = get(&storage, &typename, cob.id(), Filter::default())
| --- ^^^^^^^^^^^^^^^^^ expected `&Filter`, found `Filter`
| |
| arguments to this function are incorrect
|
note: function defined here
--> radicle-cob/src/object/collaboration/get.rs:19:8
|
19 | pub fn get<T, S>(
| ^^^
...
23 | filter: &Filter,
| ---------------
help: consider borrowing here
|
44 | let expected = get(&storage, &typename, cob.id(), &Filter::default())
| +
error[E0308]: mismatched types
--> radicle-cob/src/tests.rs:130:81
|
130 | let not_expected = get::<NonEmpty<Entry>, _>(&storage, &typename, cob.id(), Filter::default())
| ------------------------- ^^^^^^^^^^^^^^^^^ expected `&Filter`, found `Filter`
| |
| arguments to this function are incorrect
|
note: function defined here
--> radicle-cob/src/object/collaboration/get.rs:19:8
|
19 | pub fn get<T, S>(
| ^^^
...
23 | filter: &Filter,
| ---------------
help: consider borrowing here
|
130 | let not_expected = get::<NonEmpty<Entry>, _>(&storage, &typename, cob.id(), &Filter::default())
| +
error[E0308]: mismatched types
--> radicle-cob/src/tests.rs:150:58
|
150 | let expected = get(&storage, &typename, object.id(), Filter::default())
| --- ^^^^^^^^^^^^^^^^^ expected `&Filter`, found `Filter`
| |
| arguments to this function are incorrect
|
note: function defined here
--> radicle-cob/src/object/collaboration/get.rs:19:8
|
19 | pub fn get<T, S>(
| ^^^
...
23 | filter: &Filter,
| ---------------
help: consider borrowing here
|
150 | let expected = get(&storage, &typename, object.id(), &Filter::default())
| +
error[E0308]: mismatched types
--> radicle-cob/src/tests.rs:297:66
|
297 | get::<NonEmpty<Entry>, _>(&storage, &typename, cob.id(), Filter::default()).unwrap();
| ------------------------- ^^^^^^^^^^^^^^^^^ expected `&Filter`, found `Filter`
| |
| arguments to this function are incorrect
|
note: function defined here
--> radicle-cob/src/object/collaboration/get.rs:19:8
|
19 | pub fn get<T, S>(
| ^^^
...
23 | filter: &Filter,
| ---------------
help: consider borrowing here
|
297 | get::<NonEmpty<Entry>, _>(&storage, &typename, cob.id(), &Filter::default()).unwrap();
| +
error[E0308]: mismatched types
--> radicle-cob/src/tests.rs:312:9
|
308 | let blocked_issue = get::<NonEmpty<Entry>, _>(
| ------------------------- arguments to this function are incorrect
...
312 | Filter::default().block([*neil_signer.public_key()].into_iter().collect()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&Filter`, found `Filter`
|
note: function defined here
--> radicle-cob/src/object/collaboration/get.rs:19:8
|
19 | pub fn get<T, S>(
| ^^^
...
23 | filter: &Filter,
| ---------------
help: consider borrowing here
|
312 | &Filter::default().block([*neil_signer.public_key()].into_iter().collect()),
| +
Checking radicle v0.14.0 (/446944b2-20d0-4ac8-bb78-8addb74857ac/w/radicle)
For more information about this error, try `rustc --explain E0308`.
error: could not compile `radicle-cob` (lib test) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
Exit code: 101
{
"response": "finished",
"result": "failure"
}