rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood40821473254acc441e09825847172bfdb9582827
{
"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:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Updated",
"patch": {
"id": "7535a1425881289a79dac4dceaa21a9df98435ed",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"title": "policy: change the default scope from 'all' to 'follow'",
"state": {
"status": "open",
"conflicts": []
},
"before": "b937a93892db3d80833b3cdde3bc37935151e274",
"after": "40821473254acc441e09825847172bfdb9582827",
"commits": [
"40821473254acc441e09825847172bfdb9582827",
"ce60201034f3e01eb87be9a01dadf35de861ee55",
"78e98100020a613e6ce3f78930977bbce90c1b0c",
"b5fdb41618972abf022c215a70e89a3797f996f9",
"f9245edf2bc976f00676978af7cbc0e5c892c206",
"5aeb5011e5c19ecf9b283d01fa24e024a13323c3",
"c434273564c7da2adb15b70e98aafab0a288c383",
"973b57c93c3654df17ff67f47274bfb4862ebc57",
"23f782f34388dad282a7516aa93731d8f3ca8889",
"9385868f9769726c09895f04fb3848ec93487466",
"6164b59f2917001c2e256a63ac92c794afdc347a",
"e72c4cff0c10274f68d91fb5be9cc457848b937e"
],
"target": "1cab036c331f5ac071f002504c44b01e95b8f25a",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "7535a1425881289a79dac4dceaa21a9df98435ed",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "As per the [Security > Issue with default value for Scope being All](https://radicle.zulipchat.com/#narrow/channel/498262-Security/topic/Issue.20with.20default.20value.20for.20Scope.20being.20All) zulip conversation. Change the default scope for cloned, seeded and newly initialised repositories from 'all' to 'follow'.",
"base": "91eb6fc078727337449c203b8cf54aba4f40d816",
"oid": "c4b43cc3c94c0f6d354f1d8ad9ca25a941c3bd98",
"timestamp": 1769532387
},
{
"id": "77ba7ca7733d0f968496a617dee58a54287a4bde",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "",
"base": "b937a93892db3d80833b3cdde3bc37935151e274",
"oid": "40821473254acc441e09825847172bfdb9582827",
"timestamp": 1770388461
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "284fcdd4-084a-49f2-9a1b-e331a3fe397b"
},
"info_url": "https://cci.rad.levitte.org//284fcdd4-084a-49f2-9a1b-e331a3fe397b.html"
}
Started at: 2026-02-06 15:34:24.059205+01:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ 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/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 136 issues · 18 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 7535a1425881289a79dac4dceaa21a9df98435ed
✓ Switched to branch patch/7535a14 at revision 77ba7ca
✓ Branch patch/7535a14 setup to track rad/patches/7535a1425881289a79dac4dceaa21a9df98435ed
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 40821473254acc441e09825847172bfdb9582827
HEAD is now at 40821473 radicle: refactor MigratingScope to simpler Scope type wrapper
Exit code: 0
$ rad patch show 7535a1425881289a79dac4dceaa21a9df98435ed -p
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Title policy: change the default scope from 'all' to 'follow' │
│ Patch 7535a1425881289a79dac4dceaa21a9df98435ed │
│ Author ade z6MkwGo…yS2aagA │
│ Head 40821473254acc441e09825847172bfdb9582827 │
│ Base b937a93892db3d80833b3cdde3bc37935151e274 │
│ Branches patch/7535a14 │
│ Commits ahead 12, behind 15 │
│ Status open │
│ │
│ As per the [Security > Issue with default value for Scope being │
│ All](https://radicle.zulipchat.com/#narrow/channel/498262-Security/topic/Issue.20with.20default.20value.20for.20Scope.20being.20All) │
│ zulip conversation. Change the default scope for cloned, seeded and newly │
│ initialised repositories from 'all' to 'follow'. │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 4082147 radicle: refactor MigratingScope to simpler Scope type wrapper │
│ ce60201 cli: seeding policy implicitly set warning test │
│ 78e9810 cli: add user warning for implicitly set seeding policy scope │
│ b5fdb41 radicle: introduce seeding policy scope wrapper type │
│ f9245ed protocol: note on peering and fetches │
│ 5aeb501 cli: changed the default scope from all to followed for clone and seed │
│ c434273 cli: do not print scope in block table │
│ 973b57c fetch: change ordering of rad/id resolution │
│ 23f782f log: add aliases support for base58 strings via RAD_ALIASES env var │
│ 9385868 cli-test: ensure we honour NO_COLOR env var │
│ 6164b59 log: Add regex-based highlighting to test logger │
│ e72c4cf log: New crate for logger implementations │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ● Revision 7535a14 @ c4b43cc by ade z6MkwGo…yS2aagA 1 week ago │
│ ↑ Revision 77ba7ca @ 4082147 by ade z6MkwGo…yS2aagA 4 seconds ago │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
commit 40821473254acc441e09825847172bfdb9582827
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Fri Feb 6 14:32:56 2026 +0000
radicle: refactor MigratingScope to simpler Scope type wrapper
Instead of maintaining the Serialize and Deserialize impls for
MigratingScope @fintohaps came up with a more elegant and simpler type
wrapper.
diff --git a/crates/radicle-cli/src/warning.rs b/crates/radicle-cli/src/warning.rs
index f59e403e0..9bae6dd15 100644
--- a/crates/radicle-cli/src/warning.rs
+++ b/crates/radicle-cli/src/warning.rs
@@ -2,7 +2,6 @@ use std::collections::HashMap;
use std::sync::LazyLock;
use radicle::node::config::ConnectAddress;
-use radicle::node::policy::Scope;
use radicle::node::Address;
use radicle::profile::Config;
@@ -45,17 +44,20 @@ fn nodes_renamed(config: &Config) -> Vec<String> {
}
fn implicit_seeding_policy_allow_scope(config: &Config) -> Vec<String> {
- use radicle::node::config::{DefaultSeedingPolicy, MigratingScope};
+ use radicle::node::config::DefaultSeedingPolicy;
+ use radicle::node::policy;
- if let DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Implicit(scope),
- } = config.node.seeding_policy
- {
- vec![format!(
+ if let DefaultSeedingPolicy::Allow { scope } = config.node.seeding_policy {
+ if scope.is_implicit() {
+ let scope = scope.into_inner();
+ vec![format!(
"node 'seedingPolicy.scope' has been set to '{scope}' by default. This default value will be removed in a future release. Please explicitly set it to one of ['{}', '{}'] in your node config.",
- Scope::All,
- Scope::Followed,
- )]
+ policy::Scope::All,
+ policy::Scope::Followed,
+ )]
+ } else {
+ vec![]
+ }
} else {
vec![]
}
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index a03575d2d..56f427e5f 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -8,7 +8,7 @@ use radicle::git;
use radicle::node;
use radicle::node::address::Store as _;
use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
-use radicle::node::config::{DefaultSeedingPolicy, MigratingScope};
+use radicle::node::config::{DefaultSeedingPolicy, Scope as ConfigScope};
use radicle::node::events::Event;
use radicle::node::policy::Scope;
use radicle::node::routing::Store as _;
@@ -2877,7 +2877,7 @@ fn rad_seed_policy_allow_no_scope() {
let mut environment = Environment::new();
let alice = environment.node_with(Config {
seeding_policy: DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Implicit(Scope::All),
+ scope: ConfigScope::from(None),
},
..Config::test(Alias::new("alice"))
});
diff --git a/crates/radicle/src/node/config.rs b/crates/radicle/src/node/config.rs
index 22ebfc22d..a77ad42f8 100644
--- a/crates/radicle/src/node/config.rs
+++ b/crates/radicle/src/node/config.rs
@@ -9,9 +9,11 @@ use serde::{Deserialize, Serialize};
use serde_json as json;
use crate::node;
-use crate::node::policy::{Scope, SeedingPolicy};
+use crate::node::policy::SeedingPolicy;
use crate::node::{Address, Alias, NodeId};
+use super::policy;
+
/// Peer-to-peer protocol version.
pub type ProtocolVersion = u8;
@@ -362,40 +364,61 @@ pub enum AddressConfig {
Forward,
}
-/// Temporary [`Profile::Scope`] type wrapper for tracking implicitly vs explicitly set "scope" in
-/// node config.
-///
-/// Implicitly defaulted [`Profile::Scope`] will be removed in the next few versions (added v1.6.1).
-#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
-#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
-pub enum MigratingScope {
- Explicit(Scope),
- Implicit(Scope),
-}
-
-impl From<MigratingScope> for Scope {
- fn from(value: MigratingScope) -> Self {
- match value {
- MigratingScope::Explicit(scope) => scope,
- MigratingScope::Implicit(scope) => scope,
- }
- }
-}
-
/// Default seeding policy. Applies when no repository policies for the given repo are found.
-#[derive(Debug, Copy, Clone, Default, PartialEq, Eq)]
+#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(tag = "default", rename_all = "camelCase")]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub enum DefaultSeedingPolicy {
/// Allow seeding.
Allow {
/// Seeding scope.
- scope: MigratingScope,
+ #[serde(skip_serializing_if = "Scope::is_implicit")]
+ scope: Scope,
},
/// Block seeding.
#[default]
Block,
}
+/// Temporary [`Profile::Scope`] type wrapper for tracking the optional nature of node configs
+/// `seedingPolicy.scope`.
+///
+/// Defaulted [`Profile::Scope`] will be removed in the next few versions (added v1.6.1).
+#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
+#[serde(transparent)]
+pub struct Scope(Option<policy::Scope>);
+
+impl Scope {
+ pub fn into_inner(self) -> policy::Scope {
+ self.0.unwrap_or(policy::Scope::All)
+ }
+
+ pub fn is_implicit(&self) -> bool {
+ self.0.is_none()
+ }
+
+ fn all() -> Self {
+ Self(Some(policy::Scope::All))
+ }
+
+ fn followed() -> Self {
+ Self(Some(policy::Scope::Followed))
+ }
+}
+
+impl From<policy::Scope> for Scope {
+ fn from(value: policy::Scope) -> Self {
+ Self(Some(value))
+ }
+}
+
+impl From<Option<policy::Scope>> for Scope {
+ fn from(value: Option<policy::Scope>) -> Self {
+ Self(value)
+ }
+}
+
impl DefaultSeedingPolicy {
/// Is this an "allow" policy.
pub fn is_allow(&self) -> bool {
@@ -405,7 +428,14 @@ impl DefaultSeedingPolicy {
/// Seed everything from anyone.
pub fn permissive() -> Self {
Self::Allow {
- scope: MigratingScope::Explicit(Scope::All),
+ scope: Scope::all(),
+ }
+ }
+
+ /// Seed only delegate changes.
+ pub fn followed() -> Self {
+ Self::Allow {
+ scope: Scope::followed(),
}
}
}
@@ -414,79 +444,13 @@ impl From<DefaultSeedingPolicy> for SeedingPolicy {
fn from(policy: DefaultSeedingPolicy) -> Self {
match policy {
DefaultSeedingPolicy::Block => Self::Block,
- DefaultSeedingPolicy::Allow { scope } => match scope {
- MigratingScope::Explicit(scope) => SeedingPolicy::Allow { scope },
- MigratingScope::Implicit(scope) => SeedingPolicy::Allow { scope },
+ DefaultSeedingPolicy::Allow { scope } => SeedingPolicy::Allow {
+ scope: scope.into_inner(),
},
}
}
}
-impl<'de> serde::Deserialize<'de> for DefaultSeedingPolicy {
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- #[derive(Debug, Deserialize, Default)]
- #[serde(rename_all = "camelCase", tag = "default")]
- pub enum Shadow {
- /// Allow seeding.
- Allow {
- /// Seeding scope.
- scope: Option<Scope>,
- },
- /// Block seeding.
- #[default]
- Block,
- }
-
- let shadow = Shadow::deserialize(deserializer)?;
-
- match shadow {
- Shadow::Allow { scope: None } => Ok(Self::Allow {
- scope: MigratingScope::Implicit(Scope::All),
- }),
- Shadow::Allow { scope: Some(scope) } => Ok(Self::Allow {
- scope: MigratingScope::Explicit(scope),
- }),
- Shadow::Block => Ok(Self::Block),
- }
- }
-}
-
-impl serde::Serialize for DefaultSeedingPolicy {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- #[derive(Debug, Serialize, Default)]
- #[serde(rename_all = "camelCase", tag = "default")]
- pub enum Shadow {
- /// Allow seeding.
- Allow {
- /// Seeding scope.
- #[serde(skip_serializing_if = "Option::is_none")]
- scope: Option<Scope>,
- },
- /// Block seeding.
- #[default]
- Block,
- }
-
- let shadow = match self {
- DefaultSeedingPolicy::Allow { scope } => match scope {
- MigratingScope::Explicit(scope) => Shadow::Allow {
- scope: Some(*scope),
- },
- MigratingScope::Implicit(_) => Shadow::Allow { scope: None },
- },
- DefaultSeedingPolicy::Block => Shadow::Block,
- };
-
- shadow.serialize(serializer)
- }
-}
-
/// Service configuration.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -774,8 +738,8 @@ mod test {
#[test]
fn deserialize_migrating_scope() {
- use super::{DefaultSeedingPolicy, MigratingScope};
- use crate::node::policy::Scope;
+ use super::{DefaultSeedingPolicy, Scope};
+ use crate::node::policy::Scope as PolicyScope;
use serde_json::json;
let seeding_policy: DefaultSeedingPolicy = serde_json::from_value(json!({
@@ -785,9 +749,7 @@ mod test {
assert_eq!(
seeding_policy,
- DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Implicit(Scope::All)
- }
+ DefaultSeedingPolicy::Allow { scope: Scope(None) }
);
let seeding_policy: DefaultSeedingPolicy = serde_json::from_value(json!({
@@ -798,9 +760,7 @@ mod test {
assert_eq!(
seeding_policy,
- DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Implicit(Scope::All)
- }
+ DefaultSeedingPolicy::Allow { scope: Scope(None) }
);
let seeding_policy: DefaultSeedingPolicy = serde_json::from_value(json!({
@@ -812,7 +772,7 @@ mod test {
assert_eq!(
seeding_policy,
DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Explicit(Scope::All)
+ scope: Scope(Some(PolicyScope::All))
}
);
@@ -825,25 +785,22 @@ mod test {
assert_eq!(
seeding_policy,
DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Explicit(Scope::Followed)
+ scope: Scope(Some(PolicyScope::Followed))
}
)
}
#[test]
fn serialize_migrating_scope() {
- use super::{DefaultSeedingPolicy, MigratingScope};
- use crate::node::policy::Scope;
+ use super::{DefaultSeedingPolicy, Scope};
+ use crate::node::policy::Scope as PolicyScope;
use serde_json::json;
assert_eq!(
json!({
"default": "allow"
}),
- serde_json::to_value(DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Implicit(Scope::All)
- })
- .unwrap()
+ serde_json::to_value(DefaultSeedingPolicy::Allow { scope: Scope(None) }).unwrap()
);
assert_eq!(
@@ -852,7 +809,7 @@ mod test {
"scope": "all"
}),
serde_json::to_value(DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Explicit(Scope::All)
+ scope: Scope(Some(PolicyScope::All))
})
.unwrap()
);
@@ -862,7 +819,7 @@ mod test {
"scope": "followed"
}),
serde_json::to_value(DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Explicit(Scope::Followed)
+ scope: Scope(Some(PolicyScope::Followed))
})
.unwrap()
);
diff --git a/crates/radicle/src/profile/config.rs b/crates/radicle/src/profile/config.rs
index bb94fc6dd..cae2fc8bd 100644
--- a/crates/radicle/src/profile/config.rs
+++ b/crates/radicle/src/profile/config.rs
@@ -7,7 +7,7 @@ use serde_json as json;
use thiserror::Error;
use crate::explorer::Explorer;
-use crate::node::config::{DefaultSeedingPolicy, MigratingScope};
+use crate::node::config::DefaultSeedingPolicy;
use crate::node::policy::{Policy, Scope};
use crate::node::Alias;
use crate::{cli, node, web};
@@ -193,7 +193,7 @@ impl Config {
log::warn!(target: "radicle", "Overwriting `seedingPolicy` configuration");
cfg.node.seeding_policy = match policy {
Policy::Allow => DefaultSeedingPolicy::Allow {
- scope: MigratingScope::Explicit(scope),
+ scope: scope.into(),
},
Policy::Block => DefaultSeedingPolicy::Block,
}
commit ce60201034f3e01eb87be9a01dadf35de861ee55
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu Feb 5 14:49:05 2026 +0000
cli: seeding policy implicitly set warning test
diff --git a/crates/radicle-cli/examples/rad-seed-policy-allow-no-scope.md b/crates/radicle-cli/examples/rad-seed-policy-allow-no-scope.md
new file mode 100644
index 000000000..83afb9dec
--- /dev/null
+++ b/crates/radicle-cli/examples/rad-seed-policy-allow-no-scope.md
@@ -0,0 +1,7 @@
+We want to ensure that a warning is printed when the `scope` field is missing in the `seedingPolicy`.
+
+``` alice
+$ rad node status
+! Warning: node 'seedingPolicy.scope' has been set to 'all' by default. This default value will be removed in a future release. Please explicitly set it to one of ['all', 'followed'] in your node config.
+[..]
+```
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 200f1ef0e..a03575d2d 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -8,7 +8,7 @@ use radicle::git;
use radicle::node;
use radicle::node::address::Store as _;
use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
-use radicle::node::config::DefaultSeedingPolicy;
+use radicle::node::config::{DefaultSeedingPolicy, MigratingScope};
use radicle::node::events::Event;
use radicle::node::policy::Scope;
use radicle::node::routing::Store as _;
@@ -2871,3 +2871,24 @@ fn rad_workflow() {
)
.unwrap();
}
+
+#[test]
+fn rad_seed_policy_allow_no_scope() {
+ let mut environment = Environment::new();
+ let alice = environment.node_with(Config {
+ seeding_policy: DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Implicit(Scope::All),
+ },
+ ..Config::test(Alias::new("alice"))
+ });
+
+ let alice = alice.spawn();
+
+ test(
+ "examples/rad-seed-policy-allow-no-scope.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
commit 78e98100020a613e6ce3f78930977bbce90c1b0c
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu Feb 5 14:47:46 2026 +0000
cli: add user warning for implicitly set seeding policy scope
extend the config warning system when seeding policy scope is implicitly
set.
diff --git a/crates/radicle-cli/src/commands/debug.rs b/crates/radicle-cli/src/commands/debug.rs
index da8d1daef..2564ddbcb 100644
--- a/crates/radicle-cli/src/commands/debug.rs
+++ b/crates/radicle-cli/src/commands/debug.rs
@@ -131,7 +131,7 @@ fn stderr_of(bin: &str, args: &[&str]) -> anyhow::Result<String> {
fn collect_warnings(profile: Option<&Profile>) -> Vec<String> {
match profile {
- Some(profile) => crate::warning::nodes_renamed(&profile.config),
+ Some(profile) => crate::warning::config_warnings(&profile.config),
None => vec!["No Radicle profile found.".to_string()],
}
}
diff --git a/crates/radicle-cli/src/commands/node/control.rs b/crates/radicle-cli/src/commands/node/control.rs
index f3c100996..63e833f72 100644
--- a/crates/radicle-cli/src/commands/node/control.rs
+++ b/crates/radicle-cli/src/commands/node/control.rs
@@ -257,7 +257,7 @@ pub fn connect_many(
}
pub fn status(node: &Node, profile: &Profile) -> anyhow::Result<()> {
- for warning in crate::warning::nodes_renamed(&profile.config) {
+ for warning in crate::warning::config_warnings(&profile.config) {
term::warning(warning);
}
diff --git a/crates/radicle-cli/src/warning.rs b/crates/radicle-cli/src/warning.rs
index 926794dd2..f59e403e0 100644
--- a/crates/radicle-cli/src/warning.rs
+++ b/crates/radicle-cli/src/warning.rs
@@ -2,6 +2,7 @@ use std::collections::HashMap;
use std::sync::LazyLock;
use radicle::node::config::ConnectAddress;
+use radicle::node::policy::Scope;
use radicle::node::Address;
use radicle::profile::Config;
@@ -22,26 +23,48 @@ fn nodes_renamed_for_option(
option: &'static str,
iter: impl IntoIterator<Item = ConnectAddress>,
) -> Vec<String> {
- let mut warnings: Vec<String> = vec![];
-
- for (i, value) in iter.into_iter().enumerate() {
+ iter.into_iter().enumerate().fold(Vec::new(), |mut warnings, (i, value)| {
let old: Address = value.into();
if let Some(new) = NODES_RENAMED.get(&old) {
warnings.push(format!(
"Value of configuration option `{option}` at index {i} mentions node with address '{old}', which has been renamed to '{new}'. Please update your configuration."
));
}
- }
-
- warnings
+ warnings
+ })
}
-pub(crate) fn nodes_renamed(config: &Config) -> Vec<String> {
+fn nodes_renamed(config: &Config) -> Vec<String> {
let mut warnings = nodes_renamed_for_option("node.connect", config.node.connect.clone());
warnings.extend(nodes_renamed_for_option(
"preferred_seeds",
config.preferred_seeds.clone(),
));
+
+ warnings
+}
+
+fn implicit_seeding_policy_allow_scope(config: &Config) -> Vec<String> {
+ use radicle::node::config::{DefaultSeedingPolicy, MigratingScope};
+
+ if let DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Implicit(scope),
+ } = config.node.seeding_policy
+ {
+ vec![format!(
+ "node 'seedingPolicy.scope' has been set to '{scope}' by default. This default value will be removed in a future release. Please explicitly set it to one of ['{}', '{}'] in your node config.",
+ Scope::All,
+ Scope::Followed,
+ )]
+ } else {
+ vec![]
+ }
+}
+
+pub(crate) fn config_warnings(config: &Config) -> Vec<String> {
+ let mut warnings = nodes_renamed(config);
+ warnings.extend(implicit_seeding_policy_allow_scope(config));
+
warnings
}
commit b5fdb41618972abf022c215a70e89a3797f996f9
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu Feb 5 14:44:19 2026 +0000
radicle: introduce seeding policy scope wrapper type
to support deprecating the seeding policy scope default value, a wrapper
type is introduced to enable hooking a user warning. When no scope value
is set in the node config the type is `Implicit` otherwise its
`Explicit`.
diff --git a/crates/radicle/Cargo.toml b/crates/radicle/Cargo.toml
index 07d0aece1..3f92f1889 100644
--- a/crates/radicle/Cargo.toml
+++ b/crates/radicle/Cargo.toml
@@ -68,6 +68,7 @@ pretty_assertions = { workspace = true }
qcheck = { workspace = true }
qcheck-macros = { workspace = true }
radicle-cob = { workspace = true, features = ["stable-commit-ids", "test"] }
+radicle-core = {workspace = true, features = ["qcheck"]}
radicle-crypto = { workspace = true, features = ["test"] }
radicle-git-metadata = { workspace = true }
tempfile = { workspace = true }
diff --git a/crates/radicle/src/node/config.rs b/crates/radicle/src/node/config.rs
index 6d289e78e..22ebfc22d 100644
--- a/crates/radicle/src/node/config.rs
+++ b/crates/radicle/src/node/config.rs
@@ -362,16 +362,34 @@ pub enum AddressConfig {
Forward,
}
+/// Temporary [`Profile::Scope`] type wrapper for tracking implicitly vs explicitly set "scope" in
+/// node config.
+///
+/// Implicitly defaulted [`Profile::Scope`] will be removed in the next few versions (added v1.6.1).
+#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
+pub enum MigratingScope {
+ Explicit(Scope),
+ Implicit(Scope),
+}
+
+impl From<MigratingScope> for Scope {
+ fn from(value: MigratingScope) -> Self {
+ match value {
+ MigratingScope::Explicit(scope) => scope,
+ MigratingScope::Implicit(scope) => scope,
+ }
+ }
+}
+
/// Default seeding policy. Applies when no repository policies for the given repo are found.
-#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
-#[serde(rename_all = "camelCase", tag = "default")]
+#[derive(Debug, Copy, Clone, Default, PartialEq, Eq)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub enum DefaultSeedingPolicy {
/// Allow seeding.
Allow {
/// Seeding scope.
- #[serde(default)]
- scope: Scope,
+ scope: MigratingScope,
},
/// Block seeding.
#[default]
@@ -386,7 +404,9 @@ impl DefaultSeedingPolicy {
/// Seed everything from anyone.
pub fn permissive() -> Self {
- Self::Allow { scope: Scope::All }
+ Self::Allow {
+ scope: MigratingScope::Explicit(Scope::All),
+ }
}
}
@@ -394,11 +414,79 @@ impl From<DefaultSeedingPolicy> for SeedingPolicy {
fn from(policy: DefaultSeedingPolicy) -> Self {
match policy {
DefaultSeedingPolicy::Block => Self::Block,
- DefaultSeedingPolicy::Allow { scope } => Self::Allow { scope },
+ DefaultSeedingPolicy::Allow { scope } => match scope {
+ MigratingScope::Explicit(scope) => SeedingPolicy::Allow { scope },
+ MigratingScope::Implicit(scope) => SeedingPolicy::Allow { scope },
+ },
+ }
+ }
+}
+
+impl<'de> serde::Deserialize<'de> for DefaultSeedingPolicy {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: serde::Deserializer<'de>,
+ {
+ #[derive(Debug, Deserialize, Default)]
+ #[serde(rename_all = "camelCase", tag = "default")]
+ pub enum Shadow {
+ /// Allow seeding.
+ Allow {
+ /// Seeding scope.
+ scope: Option<Scope>,
+ },
+ /// Block seeding.
+ #[default]
+ Block,
+ }
+
+ let shadow = Shadow::deserialize(deserializer)?;
+
+ match shadow {
+ Shadow::Allow { scope: None } => Ok(Self::Allow {
+ scope: MigratingScope::Implicit(Scope::All),
+ }),
+ Shadow::Allow { scope: Some(scope) } => Ok(Self::Allow {
+ scope: MigratingScope::Explicit(scope),
+ }),
+ Shadow::Block => Ok(Self::Block),
}
}
}
+impl serde::Serialize for DefaultSeedingPolicy {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: serde::Serializer,
+ {
+ #[derive(Debug, Serialize, Default)]
+ #[serde(rename_all = "camelCase", tag = "default")]
+ pub enum Shadow {
+ /// Allow seeding.
+ Allow {
+ /// Seeding scope.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ scope: Option<Scope>,
+ },
+ /// Block seeding.
+ #[default]
+ Block,
+ }
+
+ let shadow = match self {
+ DefaultSeedingPolicy::Allow { scope } => match scope {
+ MigratingScope::Explicit(scope) => Shadow::Allow {
+ scope: Some(*scope),
+ },
+ MigratingScope::Implicit(_) => Shadow::Allow { scope: None },
+ },
+ DefaultSeedingPolicy::Block => Shadow::Block,
+ };
+
+ shadow.serialize(serializer)
+ }
+}
+
/// Service configuration.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -683,4 +771,100 @@ mod test {
);
assert_eq!(config.limits.connection.outbound.0, 1337);
}
+
+ #[test]
+ fn deserialize_migrating_scope() {
+ use super::{DefaultSeedingPolicy, MigratingScope};
+ use crate::node::policy::Scope;
+ use serde_json::json;
+
+ let seeding_policy: DefaultSeedingPolicy = serde_json::from_value(json!({
+ "default": "allow"
+ }))
+ .unwrap();
+
+ assert_eq!(
+ seeding_policy,
+ DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Implicit(Scope::All)
+ }
+ );
+
+ let seeding_policy: DefaultSeedingPolicy = serde_json::from_value(json!({
+ "default": "allow",
+ "scope": null
+ }))
+ .unwrap();
+
+ assert_eq!(
+ seeding_policy,
+ DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Implicit(Scope::All)
+ }
+ );
+
+ let seeding_policy: DefaultSeedingPolicy = serde_json::from_value(json!({
+ "default": "allow",
+ "scope": "all"
+ }))
+ .unwrap();
+
+ assert_eq!(
+ seeding_policy,
+ DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Explicit(Scope::All)
+ }
+ );
+
+ let seeding_policy: DefaultSeedingPolicy = serde_json::from_value(json!({
+ "default": "allow",
+ "scope": "followed"
+ }))
+ .unwrap();
+
+ assert_eq!(
+ seeding_policy,
+ DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Explicit(Scope::Followed)
+ }
+ )
+ }
+
+ #[test]
+ fn serialize_migrating_scope() {
+ use super::{DefaultSeedingPolicy, MigratingScope};
+ use crate::node::policy::Scope;
+ use serde_json::json;
+
+ assert_eq!(
+ json!({
+ "default": "allow"
+ }),
+ serde_json::to_value(DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Implicit(Scope::All)
+ })
+ .unwrap()
+ );
+
+ assert_eq!(
+ json!({
+ "default": "allow",
+ "scope": "all"
+ }),
+ serde_json::to_value(DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Explicit(Scope::All)
+ })
+ .unwrap()
+ );
+ assert_eq!(
+ json!({
+ "default": "allow",
+ "scope": "followed"
+ }),
+ serde_json::to_value(DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Explicit(Scope::Followed)
+ })
+ .unwrap()
+ );
+ }
}
diff --git a/crates/radicle/src/profile/config.rs b/crates/radicle/src/profile/config.rs
index 75cbe9702..bb94fc6dd 100644
--- a/crates/radicle/src/profile/config.rs
+++ b/crates/radicle/src/profile/config.rs
@@ -7,7 +7,7 @@ use serde_json as json;
use thiserror::Error;
use crate::explorer::Explorer;
-use crate::node::config::DefaultSeedingPolicy;
+use crate::node::config::{DefaultSeedingPolicy, MigratingScope};
use crate::node::policy::{Policy, Scope};
use crate::node::Alias;
use crate::{cli, node, web};
@@ -192,7 +192,9 @@ impl Config {
) {
log::warn!(target: "radicle", "Overwriting `seedingPolicy` configuration");
cfg.node.seeding_policy = match policy {
- Policy::Allow => DefaultSeedingPolicy::Allow { scope },
+ Policy::Allow => DefaultSeedingPolicy::Allow {
+ scope: MigratingScope::Explicit(scope),
+ },
Policy::Block => DefaultSeedingPolicy::Block,
}
}
commit f9245edf2bc976f00676978af7cbc0e5c892c206
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Jan 27 16:30:42 2026 +0000
protocol: note on peering and fetches
As part of the work to change the default scope, one of the tests
surfaced an issue where the topology was Alice <--> Bob <--> Eve,
however because of the previous 'all' scope Alice could receive Eve
references via Bob, but since the scope was changed to 'follow' Alice
would need to have a direct connection to Eve. TODO left here for future
consideration.
diff --git a/crates/radicle-protocol/src/service.rs b/crates/radicle-protocol/src/service.rs
index 42fc27d2c..b461e7d28 100644
--- a/crates/radicle-protocol/src/service.rs
+++ b/crates/radicle-protocol/src/service.rs
@@ -1723,6 +1723,13 @@ where
// Refs can be relayed by peers who don't have the data in storage,
// therefore we only check whether we are connected to the *announcer*,
// which is required by the protocol to only announce refs it has.
+ //
+ // TODO(Ade): Perhaps it makes sense in a more peer-to-peer arrangement
+ // to establish connections to peers whom you follow but aren't directly connected
+ // to. E.g. Alice <--> Bob <--> Eve
+ // Alice follows Eve, Eve announces refs of interest but because Alice
+ // is not directly connected she cant see said refs if Bob isn't also interested in
+ // Eve's refs.
let Some(remote) = self.sessions.get(announcer).cloned() else {
trace!(
target: "service",
commit 5aeb5011e5c19ecf9b283d01fa24e024a13323c3
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Jan 27 16:27:34 2026 +0000
cli: changed the default scope from all to followed for clone and seed
The previous implementation used 'all' as the default for scope, this
could lead to surprising behaviour where a user would fetch all
references for cloned and seeded repositories. Instead have a progressive,
safe by default value - where it fetches only 'followed' references. Later
a user can decide to set the scope to 'all'. NOTE: the default policy
scope was not changed from 'all' and is intended to be changed at a
later date.
diff --git a/crates/radicle-cli/examples/rad-clone-connect.md b/crates/radicle-cli/examples/rad-clone-connect.md
index 169ede975..f6566a1b1 100644
--- a/crates/radicle-cli/examples/rad-clone-connect.md
+++ b/crates/radicle-cli/examples/rad-clone-connect.md
@@ -3,7 +3,7 @@ automatically connect to the necessary seeds.
```
$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
-✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'all'
+✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
Fetching rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from the network, found 2 potential seed(s).
✓ Target met: 1 seed(s)
✓ Creating checkout in ./heartwood..
diff --git a/crates/radicle-cli/examples/rad-clone-partial-fail.md b/crates/radicle-cli/examples/rad-clone-partial-fail.md
index d16cc0407..56f6bed4c 100644
--- a/crates/radicle-cli/examples/rad-clone-partial-fail.md
+++ b/crates/radicle-cli/examples/rad-clone-partial-fail.md
@@ -10,12 +10,13 @@ $ rad node routing
│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk │
╰──────────────────────────────────────────────────────────────────────────────────────╯
```
+
When she tries to clone, one of those will fail to fetch. But the clone command
still returns successfully.
```
$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --timeout 3
-✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'all'
+✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
Fetching rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from the network, found 3 potential seed(s).
✓ Target met: 1 seed(s)
✓ Creating checkout in ./heartwood..
diff --git a/crates/radicle-cli/examples/rad-clone.md b/crates/radicle-cli/examples/rad-clone.md
index 7eab6124b..543d49aba 100644
--- a/crates/radicle-cli/examples/rad-clone.md
+++ b/crates/radicle-cli/examples/rad-clone.md
@@ -2,7 +2,7 @@ To create a local copy of a repository on the radicle network, we use the
`clone` command, followed by the identifier or *RID* of the repository:
```
-$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed
+$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
Fetching rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from the network, found [..] potential seed(s).
✓ Target met: [..] seed(s)
diff --git a/crates/radicle-cli/examples/rad-fetch.md b/crates/radicle-cli/examples/rad-fetch.md
index 43a359868..89a4dd783 100644
--- a/crates/radicle-cli/examples/rad-fetch.md
+++ b/crates/radicle-cli/examples/rad-fetch.md
@@ -10,7 +10,7 @@ have to update our seeding policy for the project.
```
$ rad seed rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --no-fetch
-✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'all'
+✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
```
Now that the project is seeding we can fetch it and we will have it in
diff --git a/crates/radicle-cli/examples/rad-id-threshold.md b/crates/radicle-cli/examples/rad-id-threshold.md
index 924a90053..06a6c85bd 100644
--- a/crates/radicle-cli/examples/rad-id-threshold.md
+++ b/crates/radicle-cli/examples/rad-id-threshold.md
@@ -170,7 +170,7 @@ sync` and fetch his references:
``` ~bob
$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
-✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'all'
+✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
Fetching rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from the network, found 2 potential seed(s).
✓ Target met: 1 seed(s)
✓ Creating checkout in ./heartwood..
diff --git a/crates/radicle-cli/examples/rad-init-no-seed.md b/crates/radicle-cli/examples/rad-init-no-seed.md
index 03176c77f..8163f07df 100644
--- a/crates/radicle-cli/examples/rad-init-no-seed.md
+++ b/crates/radicle-cli/examples/rad-init-no-seed.md
@@ -21,7 +21,7 @@ If we then seed it, it becomes advertised in our inventory:
```
$ rad seed rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
✓ Inventory updated with rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
-✓ Seeding policy updated for rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK with scope 'all'
+✓ Seeding policy updated for rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK with scope 'followed'
```
```
$ rad node inventory
diff --git a/crates/radicle-cli/examples/rad-init-private-clone-seed.md b/crates/radicle-cli/examples/rad-init-private-clone-seed.md
index 5c5685f96..7d92732e4 100644
--- a/crates/radicle-cli/examples/rad-init-private-clone-seed.md
+++ b/crates/radicle-cli/examples/rad-init-private-clone-seed.md
@@ -30,7 +30,7 @@ $ rad inspect --identity
``` ~bob
$ rad ls --all --private
$ rad clone rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu --seed z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi --timeout 1
-✓ Seeding policy updated for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'all'
+✓ Seeding policy updated for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'followed'
Fetching rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu from the network, found 1 potential seed(s).
✓ Target met: 1 preferred seed(s).
✓ Creating checkout in ./heartwood..
@@ -49,7 +49,7 @@ We can also use `rad seed` to seed and fetch without creating a checkout.
``` ~bob
$ rad seed rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu --from z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi --timeout 1
-✓ Seeding policy exists for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'all'
+✓ Seeding policy exists for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'followed'
Fetching rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu from the network, found 1 potential seed(s).
✓ Target met: 1 seed(s)
```
diff --git a/crates/radicle-cli/examples/rad-init-private-clone.md b/crates/radicle-cli/examples/rad-init-private-clone.md
index 852538d95..bb0c0d77b 100644
--- a/crates/radicle-cli/examples/rad-init-private-clone.md
+++ b/crates/radicle-cli/examples/rad-init-private-clone.md
@@ -6,7 +6,7 @@ $ rad ls
```
``` ~bob (fail)
$ rad clone rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu --seed z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi --timeout 1
-✓ Seeding policy updated for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'all'
+✓ Seeding policy updated for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'followed'
Fetching rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu from the network, found 1 potential seed(s).
✗ Target not met: could not fetch from [z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi], and required 1 more seed(s)
! Warning: Failed to fetch from 1 seed(s).
diff --git a/crates/radicle-cli/examples/rad-init-private-no-seed.md b/crates/radicle-cli/examples/rad-init-private-no-seed.md
index 9b3bd246b..2250e8448 100644
--- a/crates/radicle-cli/examples/rad-init-private-no-seed.md
+++ b/crates/radicle-cli/examples/rad-init-private-no-seed.md
@@ -28,7 +28,7 @@ We can decide to seed it later, so that others can fetch it from us, given
that they are part of the allow list:
```
$ rad seed rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu
-✓ Seeding policy updated for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'all'
+✓ Seeding policy updated for rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu with scope 'followed'
```
But it still won't show up in our inventory, since it's private:
diff --git a/crates/radicle-cli/examples/rad-node.md b/crates/radicle-cli/examples/rad-node.md
index 3be1ef596..c6d44d23d 100644
--- a/crates/radicle-cli/examples/rad-node.md
+++ b/crates/radicle-cli/examples/rad-node.md
@@ -108,7 +108,7 @@ up in our inventory:
```
$ rad seed rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
✓ Inventory updated with rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
-✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'all'
+✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
$ rad node inventory
rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
```
diff --git a/crates/radicle-cli/examples/rad-patch-pull-update.md b/crates/radicle-cli/examples/rad-patch-pull-update.md
index fefcee864..e5f37ec2e 100644
--- a/crates/radicle-cli/examples/rad-patch-pull-update.md
+++ b/crates/radicle-cli/examples/rad-patch-pull-update.md
@@ -22,7 +22,7 @@ To push changes, run `git push`.
``` ~bob
$ rad clone rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
-✓ Seeding policy updated for rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK with scope 'all'
+✓ Seeding policy updated for rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK with scope 'followed'
Fetching rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK from the network, found 1 potential seed(s).
✓ Target met: 1 seed(s)
✓ Creating checkout in ./heartwood..
diff --git a/crates/radicle-cli/examples/rad-seed-many.md b/crates/radicle-cli/examples/rad-seed-many.md
index 4880b059c..96e946e05 100644
--- a/crates/radicle-cli/examples/rad-seed-many.md
+++ b/crates/radicle-cli/examples/rad-seed-many.md
@@ -4,10 +4,10 @@ is used):
```
$ rad seed rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW rad:z3zTnCfi6cVSZG8eCGn6AMDypgAPm
-✓ Seeding policy updated for rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW with scope 'all'
+✓ Seeding policy updated for rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW with scope 'followed'
Fetching rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW from the network, found 1 potential seed(s).
✓ Target met: 1 seed(s)
-✓ Seeding policy updated for rad:z3zTnCfi6cVSZG8eCGn6AMDypgAPm with scope 'all'
+✓ Seeding policy updated for rad:z3zTnCfi6cVSZG8eCGn6AMDypgAPm with scope 'followed'
Fetching rad:z3zTnCfi6cVSZG8eCGn6AMDypgAPm from the network, found 1 potential seed(s).
✓ Target met: 1 seed(s)
```
diff --git a/crates/radicle-cli/examples/rad-sync-without-node.md b/crates/radicle-cli/examples/rad-sync-without-node.md
index e7ed81801..cb80789c3 100644
--- a/crates/radicle-cli/examples/rad-sync-without-node.md
+++ b/crates/radicle-cli/examples/rad-sync-without-node.md
@@ -14,5 +14,5 @@ Note that seeding works fine without a running node:
``` ~alice
$ rad seed rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
-✓ Seeding policy updated for rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 with scope 'all'
+✓ Seeding policy updated for rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 with scope 'followed'
```
diff --git a/crates/radicle-cli/examples/rad-sync.md b/crates/radicle-cli/examples/rad-sync.md
index 43d861837..f90cd35da 100644
--- a/crates/radicle-cli/examples/rad-sync.md
+++ b/crates/radicle-cli/examples/rad-sync.md
@@ -107,7 +107,7 @@ It's also possible to receive an error if a repository is not found anywhere.
```
$ rad seed rad:z39mP9rQAaGmERfUMPULfPUi473tY --no-fetch
-✓ Seeding policy updated for rad:z39mP9rQAaGmERfUMPULfPUi473tY with scope 'all'
+✓ Seeding policy updated for rad:z39mP9rQAaGmERfUMPULfPUi473tY with scope 'followed'
```
``` (fail)
$ rad sync rad:z39mP9rQAaGmERfUMPULfPUi473tY
diff --git a/crates/radicle-cli/src/commands/clone/args.rs b/crates/radicle-cli/src/commands/clone/args.rs
index 0c763bfed..d45c8e2cc 100644
--- a/crates/radicle-cli/src/commands/clone/args.rs
+++ b/crates/radicle-cli/src/commands/clone/args.rs
@@ -62,7 +62,7 @@ pub struct Args {
/// Follow scope
#[arg(
long,
- default_value_t = Scope::All,
+ default_value_t = Scope::Followed,
value_parser = terminal::args::ScopeParser
)]
pub(super) scope: Scope,
diff --git a/crates/radicle-cli/src/commands/seed/args.rs b/crates/radicle-cli/src/commands/seed/args.rs
index e654d1c2e..d5b331c70 100644
--- a/crates/radicle-cli/src/commands/seed/args.rs
+++ b/crates/radicle-cli/src/commands/seed/args.rs
@@ -49,7 +49,7 @@ pub struct Args {
/// Peer follow scope for this repository
#[arg(
long,
- default_value_t = Scope::All,
+ default_value_t = Scope::Followed,
value_parser = terminal::args::ScopeParser
)]
pub(super) scope: Scope,
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 8c5610edb..200f1ef0e 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -572,6 +572,7 @@ fn rad_id_multi_delegate() {
alice.handle.seed(acme, Scope::All).unwrap();
bob.handle.follow(eve.id, None).unwrap();
+ eve.handle.follow(bob.id, None).unwrap();
alice.connect(&bob).converge([&bob]);
eve.connect(&alice).converge([&alice]);
@@ -2059,17 +2060,19 @@ fn rad_remote() {
.handle
.follow(bob.id, Some(Alias::new("bob")))
.unwrap();
+ alice
+ .handle
+ .follow(eve.id, Some(Alias::new("eve")))
+ .unwrap();
bob.connect(&alice);
bob.routes_to(&[(rid, alice.id)]);
bob.fork(rid, bob.home.path()).unwrap();
- bob.announce(rid, 2, bob.home.path()).unwrap();
alice.has_remote_of(&rid, &bob.id);
- eve.connect(&bob);
+ eve.connect(&alice);
eve.routes_to(&[(rid, alice.id)]);
eve.fork(rid, eve.home.path()).unwrap();
- eve.announce(rid, 2, eve.home.path()).unwrap();
alice.has_remote_of(&rid, &eve.id);
test(
commit c434273564c7da2adb15b70e98aafab0a288c383
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Jan 27 16:19:34 2026 +0000
cli: do not print scope in block table
Previous implementation used the default scope when a scope wasn't
present. Scope is not present when the policy is block, because block
doesn't have a scope. Instead use an empty string when printing the
block policy.
diff --git a/crates/radicle-cli/examples/rad-block.md b/crates/radicle-cli/examples/rad-block.md
index 413350273..a29630cda 100644
--- a/crates/radicle-cli/examples/rad-block.md
+++ b/crates/radicle-cli/examples/rad-block.md
@@ -38,7 +38,7 @@ $ rad seed
╭───────────────────────────────────────────────────────────╮
│ Repository Name Policy Scope │
├───────────────────────────────────────────────────────────┤
-│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block all │
+│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block │
╰───────────────────────────────────────────────────────────╯
```
diff --git a/crates/radicle-cli/src/commands/seed.rs b/crates/radicle-cli/src/commands/seed.rs
index 7482a8354..edc311490 100644
--- a/crates/radicle-cli/src/commands/seed.rs
+++ b/crates/radicle-cli/src/commands/seed.rs
@@ -84,7 +84,9 @@ pub fn seeding(profile: &Profile) -> anyhow::Result<()> {
.repository(rid)
.and_then(|repo| repo.project().map(|proj| proj.name().to_string()))
.unwrap_or_default();
- let scope = policy.scope().unwrap_or_default().to_string();
+ let scope = policy
+ .scope()
+ .map_or(String::new(), |scope| scope.to_string());
let policy = term::format::policy(&Policy::from(policy));
t.push([
commit 973b57c93c3654df17ff67f47274bfb4862ebc57
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Jan 27 16:18:26 2026 +0000
fetch: change ordering of rad/id resolution
The cached_tip represents the rad/id fetched from the other node. This
should be checked first to ensure that newer updates to the identity
document are used, as opposed to the possibly old state of the document.
diff --git a/crates/radicle-fetch/src/state.rs b/crates/radicle-fetch/src/state.rs
index 42469ab5e..2ae82eeb5 100644
--- a/crates/radicle-fetch/src/state.rs
+++ b/crates/radicle-fetch/src/state.rs
@@ -641,7 +641,8 @@ where
let tip = self.refname_to_id(refs::REFS_RAD_ID.clone())?;
let cached_tip = self.canonical_rad_id();
- tip.or(cached_tip)
+ cached_tip
+ .or(tip)
.map(|tip| self.verified(tip).map_err(error::Canonical::from))
.transpose()
}
commit 23f782f34388dad282a7516aa93731d8f3ca8889
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Jan 27 16:35:16 2026 +0000
log: add aliases support for base58 strings via RAD_ALIASES env var
diff --git a/crates/radicle-log/src/test.rs b/crates/radicle-log/src/test.rs
index b16d91e2d..b452035af 100644
--- a/crates/radicle-log/src/test.rs
+++ b/crates/radicle-log/src/test.rs
@@ -1,3 +1,4 @@
+use std::collections::HashMap;
use std::io::{self, Write};
use std::sync::{Arc, Mutex};
@@ -17,6 +18,7 @@ pub struct Logger {
pub base58_ref_oid_re: Regex,
pub base58_re: Regex,
writer: SharedWriter,
+ aliases: HashMap<String, String>,
}
/// The Base58 pattern used for Radicle IDs.
@@ -24,6 +26,15 @@ const BASE58_REGEX: &str = r"z[1-9A-HJ-NP-Za-km-z]{10,}";
impl Logger {
pub fn new(level: Level) -> Self {
+ let mut aliases = HashMap::new();
+ if let Ok(s) = std::env::var("RAD_ALIASES") {
+ for pair in s.split(',') {
+ if let Some((k, v)) = pair.split_once('=') {
+ aliases.insert(k.to_owned(), v.to_owned());
+ }
+ }
+ }
+
Self {
level,
// base58: Starts with 'z', base58 chars, 10+ length.
@@ -35,6 +46,7 @@ impl Logger {
).expect("invalid regex"),
base58_re: Regex::new(BASE58_REGEX).expect("invalid id regex"),
writer: Arc::new(Mutex::new(io::stdout())),
+ aliases,
}
}
@@ -51,40 +63,20 @@ impl Logger {
log::set_max_level(level.to_level_filter());
Ok(())
}
-}
-
-impl Log for Logger {
- fn enabled(&self, metadata: &Metadata) -> bool {
- metadata.level() <= self.level
- }
- fn log(&self, record: &Record) {
- if !self.enabled(record.metadata()) {
- return;
- }
+ fn paint_base58_with_aliases<'a>(&'a self, s: &'a str) -> Paint<&'a str> {
+ let alias_or_match_str = self.aliases.get(s).map(|x| x.as_str()).unwrap_or(s);
+ let colour = colour_for_base58(s);
- let target = record.target();
- let level = record.level();
-
- // Helper to paint the "plain" parts of the message based on the target/level.
- let paint_plain = |s: &str| -> String {
- match target {
- "test" => Paint::cyan(s).to_string(),
- "sim" => Paint::new(s).bold().to_string(),
- _ => match level {
- Level::Warn => Paint::yellow(s).underline().to_string(),
- Level::Error => Paint::red(s).underline().to_string(),
- _ => Paint::new(s).dim().to_string(),
- },
- }
- };
+ colour.paint(alias_or_match_str).bold()
+ }
- let msg = record.args().to_string();
+ fn format_message(&self, msg: &str, paint_plain: impl Fn(&str) -> String) -> String {
let mut coloured_msg = String::new();
let mut last_match = 0;
// Iterate over the main composite matches
- for caps in self.base58_ref_oid_re.captures_iter(&msg) {
+ for caps in self.base58_ref_oid_re.captures_iter(msg) {
let whole_match = caps.get(0).unwrap();
// Paint text BEFORE the match (Plain style)
@@ -94,7 +86,8 @@ impl Log for Logger {
if let Some(m) = caps.name("base58") {
// Standard Base58 match (not inside a ref)
let match_str = m.as_str();
- coloured_msg.push_str(&paint_base58(match_str).to_string());
+
+ coloured_msg.push_str(&self.paint_base58_with_aliases(match_str).to_string());
} else if let Some(m) = caps.name("oid") {
// Git OID match (RGB from hex with contrast check)
let oid = m.as_str();
@@ -111,13 +104,8 @@ impl Log for Logger {
// Paint the ID itself (Deterministic Colour + Bold)
let id = id_match.as_str();
- coloured_msg.push_str(
- &colour_for_base58(id)
- .paint(id)
- .bold()
- .underline()
- .to_string(),
- );
+ coloured_msg
+ .push_str(&self.paint_base58_with_aliases(id).underline().to_string());
last_ref_idx = id_match.end();
}
@@ -132,6 +120,39 @@ impl Log for Logger {
// Paint the remaining text
coloured_msg.push_str(&paint_plain(&msg[last_match..]));
+ coloured_msg
+ }
+}
+
+impl Log for Logger {
+ fn enabled(&self, metadata: &Metadata) -> bool {
+ metadata.level() <= self.level
+ }
+
+ fn log(&self, record: &Record) {
+ if !self.enabled(record.metadata()) {
+ return;
+ }
+
+ let target = record.target();
+ let level = record.level();
+
+ // Helper to paint the "plain" parts of the message based on the target/level.
+ let paint_plain = |s: &str| -> String {
+ match target {
+ "test" => Paint::cyan(s).to_string(),
+ "sim" => Paint::new(s).bold().to_string(),
+ _ => match level {
+ Level::Warn => Paint::yellow(s).underline().to_string(),
+ Level::Error => Paint::red(s).underline().to_string(),
+ _ => Paint::new(s).dim().to_string(),
+ },
+ }
+ };
+
+ let msg = record.args().to_string();
+ let coloured_msg = self.format_message(&msg, &paint_plain);
+
let time = LocalTime::now().as_secs();
let mut writer = self.writer.lock().unwrap_or_else(|e| e.into_inner());
@@ -152,13 +173,22 @@ impl Log for Logger {
let current = std::thread::current();
let target_str = format!("{}:", target);
- let prefix = if let Some(name) = current.name() {
- format!("{} {:<16} {:>10}", time, name, target_str)
+ // We format the timestamp separately to avoid it being colored as an OID.
+ let time_display = paint_plain(&format!("{} ", time));
+
+ let rest_of_prefix = if let Some(name) = current.name() {
+ format!("{:<16} {:>10}", name, target_str)
} else {
- format!("{} {:>10}", time, target_str)
+ format!("{:>10}", target_str)
};
- let _ = writeln!(writer, "{} {}", paint_plain(&prefix), coloured_msg);
+ let coloured_rest = self.format_message(&rest_of_prefix, &paint_plain);
+
+ let _ = writeln!(
+ writer,
+ "{}\t{} {}",
+ time_display, coloured_rest, coloured_msg
+ );
}
}
}
@@ -166,11 +196,6 @@ impl Log for Logger {
fn flush(&self) {}
}
-fn paint_base58(s: &str) -> Paint<&str> {
- let colour = colour_for_base58(s);
- colour.paint(s).bold()
-}
-
/// Deterministically pick a colour for a base58 string.
/// NOTE: If the output contains more than base58 strings than the number of colours below,
/// consider switching to the `paint_oid` system.
@@ -212,9 +237,9 @@ pub fn paint_oid(oid: &str) -> Paint<&str> {
let paint = colour.paint(oid);
// Thresholds: < 40 is very dark, > 215 is very bright.
- if luminance < 40.0 {
+ if luminance < 50.0 {
paint.bg(Color::White)
- } else if luminance > 215.0 {
+ } else if luminance > 205.0 {
paint.bg(Color::Black)
} else {
paint
commit 9385868f9769726c09895f04fb3848ec93487466
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Mon Jan 26 15:40:00 2026 +0000
cli-test: ensure we honour NO_COLOR env var
diff --git a/crates/radicle-cli-test/src/lib.rs b/crates/radicle-cli-test/src/lib.rs
index 4ab17e57c..f04855869 100644
--- a/crates/radicle-cli-test/src/lib.rs
+++ b/crates/radicle-cli-test/src/lib.rs
@@ -211,14 +211,20 @@ impl TestFormula {
use radicle_log::test::Logger;
use radicle_term::Paint;
- Paint::force(true);
-
let level = env_level().unwrap_or(log::Level::Debug);
let logger = Box::new(Logger::new(level));
log::set_boxed_logger(logger).expect("no other logger should have been set already");
log::set_max_level(level.to_level_filter());
+ // `NO_COLOR` is supported by [`radicle-term::Paint`] - however when using `force()` we
+ // override it. Because `cargo nextest` runs tests in a PTY and [`radicle-term::Paint`]
+ // detects that (disabling colours), we need to use `force()` to ensure colours are painted.
+ match env::var("NO_COLOR") {
+ Err(_) => Paint::force(true),
+ Ok(_) => log::info!(target: "test", "NO_COLOR detected, disabling colours."),
+ }
+
for (package, binary) in binaries {
log::debug!(target: "test", "Building binaries for package `{package}`..");
commit 6164b59f2917001c2e256a63ac92c794afdc347a
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu Jan 22 17:28:37 2026 +0000
log: Add regex-based highlighting to test logger
Enhance the test logger to highlight:
1. Base58 strings have a deterministic colour.
2. Git references are bold and underlined.
3. Base58 substrings within Git references keep their deterministic
color.
4. Git OIDs (short and long) have their first 6 characters mapped to
a hex colour with light and dark background adjustments.
5. Timestamps are accidentally often times captured by (3.).
6. Logs at the error level are red and underlined (in addition to 1.-4.).
7. Logs at the warning level are yellow and underlined (in addition to 1.-4.).
This might give some false postives, but that's accepted for faster
recognition when skimming test logs.
Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
diff --git a/crates/radicle-log/src/lib.rs b/crates/radicle-log/src/lib.rs
index 15d444424..ea1340f67 100644
--- a/crates/radicle-log/src/lib.rs
+++ b/crates/radicle-log/src/lib.rs
@@ -5,6 +5,9 @@
#[cfg(feature = "test")]
pub mod test;
+#[cfg(test)]
+mod tests;
+
use std::io::{self, Write};
use chrono::prelude::*;
diff --git a/crates/radicle-log/src/test.rs b/crates/radicle-log/src/test.rs
index f924d5056..b16d91e2d 100644
--- a/crates/radicle-log/src/test.rs
+++ b/crates/radicle-log/src/test.rs
@@ -1,13 +1,55 @@
-use log::*;
+use std::io::{self, Write};
+use std::sync::{Arc, Mutex};
+
+use log::{Level, Log, Metadata, Record, SetLoggerError};
+use regex::Regex;
+
use radicle_localtime::LocalTime;
+use radicle_term::{Color, Paint};
+
+/// A writer that can be shared across threads.
+pub type SharedWriter = Arc<Mutex<dyn Write + Send + Sync>>;
+/// The Test Logger
+/// Logs with Epoch timestamps, "test"/"sim" formatting and regex highlighting
pub struct Logger {
level: Level,
+ pub base58_ref_oid_re: Regex,
+ pub base58_re: Regex,
+ writer: SharedWriter,
}
+/// The Base58 pattern used for Radicle IDs.
+const BASE58_REGEX: &str = r"z[1-9A-HJ-NP-Za-km-z]{10,}";
+
impl Logger {
pub fn new(level: Level) -> Self {
- Self { level }
+ Self {
+ level,
+ // base58: Starts with 'z', base58 chars, 10+ length.
+ // ref: Starts with 'refs/', followed by valid ref chars.
+ // oid: Hex characters, between 6 and 40 length, with word boundaries. (currently
+ // matching timestamps too e.g. `1769096403171`)
+ base58_ref_oid_re: Regex::new(&format!(
+ r"(?P<base58>{BASE58_REGEX})|(?P<ref>refs/[a-zA-Z0-9/*._-]+)|(?P<oid>\b[0-9a-f]{{6,40}}\b)")
+ ).expect("invalid regex"),
+ base58_re: Regex::new(BASE58_REGEX).expect("invalid id regex"),
+ writer: Arc::new(Mutex::new(io::stdout())),
+ }
+ }
+
+ /// Create a new logger with a custom writer.
+ pub fn with_writer(level: Level, writer: SharedWriter) -> Self {
+ let mut logger = Self::new(level);
+ logger.writer = writer;
+ logger
+ }
+
+ pub fn init(self) -> Result<(), SetLoggerError> {
+ let level = self.level;
+ log::set_boxed_logger(Box::new(self))?;
+ log::set_max_level(level.to_level_filter());
+ Ok(())
}
}
@@ -17,49 +59,169 @@ impl Log for Logger {
}
fn log(&self, record: &Record) {
- use colored::Colorize;
+ if !self.enabled(record.metadata()) {
+ return;
+ }
+
+ let target = record.target();
+ let level = record.level();
+
+ // Helper to paint the "plain" parts of the message based on the target/level.
+ let paint_plain = |s: &str| -> String {
+ match target {
+ "test" => Paint::cyan(s).to_string(),
+ "sim" => Paint::new(s).bold().to_string(),
+ _ => match level {
+ Level::Warn => Paint::yellow(s).underline().to_string(),
+ Level::Error => Paint::red(s).underline().to_string(),
+ _ => Paint::new(s).dim().to_string(),
+ },
+ }
+ };
+
+ let msg = record.args().to_string();
+ let mut coloured_msg = String::new();
+ let mut last_match = 0;
+
+ // Iterate over the main composite matches
+ for caps in self.base58_ref_oid_re.captures_iter(&msg) {
+ let whole_match = caps.get(0).unwrap();
+
+ // Paint text BEFORE the match (Plain style)
+ coloured_msg.push_str(&paint_plain(&msg[last_match..whole_match.start()]));
+
+ // Handle the match based on which group captured it
+ if let Some(m) = caps.name("base58") {
+ // Standard Base58 match (not inside a ref)
+ let match_str = m.as_str();
+ coloured_msg.push_str(&paint_base58(match_str).to_string());
+ } else if let Some(m) = caps.name("oid") {
+ // Git OID match (RGB from hex with contrast check)
+ let oid = m.as_str();
+ coloured_msg.push_str(&paint_oid(oid).to_string());
+ } else if let Some(m) = caps.name("ref") {
+ // Git Ref match
+ let ref_str = m.as_str();
+ let mut last_ref_idx = 0;
+
+ // Search for Base58 IDs *inside* this ref string
+ for id_match in self.base58_re.find_iter(ref_str) {
+ let prefix = &ref_str[last_ref_idx..id_match.start()];
+ coloured_msg.push_str(&Paint::new(prefix).bold().underline().to_string());
+
+ // Paint the ID itself (Deterministic Colour + Bold)
+ let id = id_match.as_str();
+ coloured_msg.push_str(
+ &colour_for_base58(id)
+ .paint(id)
+ .bold()
+ .underline()
+ .to_string(),
+ );
+
+ last_ref_idx = id_match.end();
+ }
+
+ let suffix = &ref_str[last_ref_idx..];
+ coloured_msg.push_str(&Paint::new(suffix).bold().underline().to_string());
+ }
+
+ last_match = whole_match.end();
+ }
+
+ // Paint the remaining text
+ coloured_msg.push_str(&paint_plain(&msg[last_match..]));
+
let time = LocalTime::now().as_secs();
+ let mut writer = self.writer.lock().unwrap_or_else(|e| e.into_inner());
- match record.target() {
+ match target {
"test" => {
- println!(
- "{time} {} {}",
- "test:".cyan(),
- record.args().to_string().cyan()
- )
+ let _ = writeln!(writer, "{} {} {}", time, Paint::cyan("test:"), coloured_msg);
}
"sim" => {
- println!(
- "{time} {} {}",
- "sim:".bold(),
- record.args().to_string().bold()
- )
+ let _ = writeln!(
+ writer,
+ "{} {} {}",
+ time,
+ Paint::new("sim:").bold(),
+ coloured_msg
+ );
}
- target => {
- if self.enabled(record.metadata()) {
- let current = std::thread::current();
- let msg = format!("{:>10} {}", format!("{target}:"), record.args());
- let time = LocalTime::now().as_secs();
- let s = if let Some(name) = current.name() {
- format!("{time} {name:<16} {msg}")
- } else {
- format!("{time} {msg}")
- };
- match record.level() {
- log::Level::Warn => {
- println!("{}", s.yellow());
- }
- log::Level::Error => {
- println!("{}", s.red());
- }
- _ => {
- println!("{}", s.dimmed());
- }
- }
- }
+ _ => {
+ let current = std::thread::current();
+ let target_str = format!("{}:", target);
+
+ let prefix = if let Some(name) = current.name() {
+ format!("{} {:<16} {:>10}", time, name, target_str)
+ } else {
+ format!("{} {:>10}", time, target_str)
+ };
+
+ let _ = writeln!(writer, "{} {}", paint_plain(&prefix), coloured_msg);
}
}
}
fn flush(&self) {}
}
+
+fn paint_base58(s: &str) -> Paint<&str> {
+ let colour = colour_for_base58(s);
+ colour.paint(s).bold()
+}
+
+/// Deterministically pick a colour for a base58 string.
+/// NOTE: If the output contains more than base58 strings than the number of colours below,
+/// consider switching to the `paint_oid` system.
+pub fn colour_for_base58(s: &str) -> Color {
+ let mut hash: u32 = 0;
+ for b in s.bytes() {
+ hash = hash.wrapping_add(b as u32);
+ }
+
+ let colours = [
+ Color::Red,
+ Color::Green,
+ Color::Yellow,
+ Color::Blue,
+ Color::Magenta,
+ Color::Cyan,
+ Color::White,
+ ];
+
+ colours[(hash as usize) % colours.len()]
+}
+
+/// Paint an OID using its first 6 characters as an RGB hex code.
+/// Automatically applies a contrasting background if the colour is too bright or too dark.
+pub fn paint_oid(oid: &str) -> Paint<&str> {
+ if oid.len() < 6 {
+ return Paint::yellow(oid);
+ }
+
+ let r = u8::from_str_radix(&oid[0..2], 16).unwrap_or(128);
+ let g = u8::from_str_radix(&oid[2..4], 16).unwrap_or(128);
+ let b = u8::from_str_radix(&oid[4..6], 16).unwrap_or(128);
+
+ // Calculate relative luminance (0.0 to 255.0)
+ // Formula: 0.299*R + 0.587*G + 0.114*B
+ let luminance = (0.299 * r as f32) + (0.587 * g as f32) + (0.114 * b as f32);
+
+ let colour = Color::RGB(r, g, b);
+ let paint = colour.paint(oid);
+
+ // Thresholds: < 40 is very dark, > 215 is very bright.
+ if luminance < 40.0 {
+ paint.bg(Color::White)
+ } else if luminance > 215.0 {
+ paint.bg(Color::Black)
+ } else {
+ paint
+ }
+}
+
+/// Initialize the logger with the given level.
+pub fn init(level: Level) -> Result<(), SetLoggerError> {
+ Logger::new(level).init()
+}
diff --git a/crates/radicle-log/src/tests.rs b/crates/radicle-log/src/tests.rs
new file mode 100644
index 000000000..e6319d621
--- /dev/null
+++ b/crates/radicle-log/src/tests.rs
@@ -0,0 +1,196 @@
+use crate::test::{colour_for_base58, Logger};
+use log::{Level, Log, Record};
+use radicle_term::{Color, Paint};
+use std::io::{self, Write};
+use std::sync::{Arc, Mutex};
+
+#[derive(Clone)]
+struct TestWriter {
+ data: Arc<Mutex<Vec<u8>>>,
+}
+
+impl Write for TestWriter {
+ fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+ self.data.lock().unwrap().write(buf)
+ }
+
+ fn flush(&mut self) -> io::Result<()> {
+ Ok(())
+ }
+}
+
+#[test]
+fn test_colour_for() {
+ let s = "z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk";
+ let color = colour_for_base58(s);
+ assert_eq!(color, Color::Red);
+
+ let s = "z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi";
+ let color = colour_for_base58(s);
+ assert_eq!(color, Color::Blue);
+}
+
+#[test]
+fn test_base58_ref_oid_regex_matching() {
+ let logger = Logger::new(Level::Debug);
+
+ let cases = vec![
+ (
+ "fetched rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
+ vec![
+ "z42hL2jL4XNk6K8oHQaSWfMgCL7ji",
+ "z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
+ ],
+ ),
+ (
+ "Setting ref: refs/rad/id -> 3143236b2e40338f5574ec04e935a5ab80a6868a",
+ vec!["refs/rad/id", "3143236b2e40338f5574ec04e935a5ab80a6868a"],
+ ),
+ (
+ "Syncing z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk with z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
+ vec![
+ "z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk",
+ "z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
+ ],
+ ),
+ (
+ "Multiple refs: refs/heads/master and refs/tags/v1.0.0",
+ vec!["refs/heads/master", "refs/tags/v1.0.0"],
+ ),
+ (
+ "Mixed content: z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk and refs/remotes/origin/main",
+ vec![
+ "z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk",
+ "refs/remotes/origin/main",
+ ],
+ ),
+ (
+ "No matches here",
+ vec![],
+ ),
+ (
+ "Short z123 is not matched",
+ vec![],
+ ),
+ (
+ "Timestamp 1769096403171 is matched by regex but filtered in log",
+ vec!["1769096403171"],
+ ),
+ ];
+
+ for (msg, expected) in cases {
+ let matches: Vec<_> = logger
+ .base58_ref_oid_re
+ .find_iter(msg)
+ .map(|m| m.as_str())
+ .collect();
+ assert_eq!(matches, expected, "Failed matching for input: '{}'", msg);
+ }
+}
+
+#[test]
+fn test_log_output() {
+ Paint::force(true);
+
+ let cases = vec![
+ (
+ "Hello z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk world",
+ "test",
+ vec![
+ "\x1b[36mtest:\x1b[0m", // Target
+ "\x1b[36mHello \x1b[0m", // Plain text (Cyan for test)
+ "\x1b[1;31mz6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk\x1b[0m", // ID (Red + Bold)
+ "\x1b[36m world\x1b[0m", // Plain text (Cyan)
+ ],
+ ),
+ (
+ "Syncing z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk with z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
+ "test",
+ vec![
+ "\x1b[36mtest:\x1b[0m",
+ "\x1b[36mSyncing \x1b[0m",
+ "\x1b[1;31mz6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk\x1b[0m", // Red + Bold
+ "\x1b[36m with \x1b[0m",
+ "\x1b[1;34mz6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi\x1b[0m", // Blue + Bold
+ ],
+ ),
+ (
+ "Updated refs/heads/master",
+ "sim",
+ vec![
+ "\x1b[1msim:\x1b[0m", // Target (Bold)
+ "\x1b[1mUpdated \x1b[0m", // Plain text (Bold for sim)
+ "\x1b[1;4mrefs/heads/master\x1b[0m", // Ref (Bold + Underline)
+ ],
+ ),
+ (
+ "No matches here",
+ "test",
+ vec![
+ "\x1b[36mtest:\x1b[0m",
+ "\x1b[36mNo matches here\x1b[0m",
+ ],
+ ),
+ (
+ "Timestamp 1769096403171 is matched as OID and given RGB colour",
+ "test",
+ vec![
+ "\x1b[36mtest:\x1b[0m",
+ "\x1b[36mTimestamp \x1b[0m",
+ "\x1b[38;2;23;105;9m1769096403171\x1b[0m",
+ "\x1b[36m is matched as OID and given RGB colour\x1b[0m",
+ ]
+ ),
+ (
+ "Commit 3143236b2e40338f5574ec04e935a5ab80a6868a",
+ "test",
+ vec![
+ "\x1b[36mtest:\x1b[0m",
+ "\x1b[36mCommit \x1b[0m",
+ // OID painting: 314323 -> R=49, G=67, B=35.
+ // No background.
+ "\x1b[38;2;49;67;35m3143236b2e40338f5574ec04e935a5ab80a6868a\x1b[0m",
+ ]
+ ),
+ (
+ "Ref with ID refs/namespaces/z6Mkux1aUQD2voWWukVb5nNUR7thrHveQG4pDQua8nVhib7Z/refs/rad/sigrefs",
+ "test",
+ vec![
+ "\x1b[36mRef with ID \x1b[0m",
+ "\x1b[1;4mrefs/namespaces/\x1b[0m", // Prefix (Bold + Underline)
+ // ID: z6Mkux...
+ // We check for the ID string being present.
+ "z6Mkux1aUQD2voWWukVb5nNUR7thrHveQG4pDQua8nVhib7Z",
+ "\x1b[1;4m/refs/rad/sigrefs\x1b[0m", // Suffix (Bold + Underline)
+ ]
+ )
+ ];
+
+ for (msg, target, expected_parts) in cases {
+ let data = Arc::new(Mutex::new(Vec::new()));
+ let writer = TestWriter { data: data.clone() };
+ let logger = Logger::with_writer(Level::Debug, Arc::new(Mutex::new(writer)));
+
+ let args = format_args!("{}", msg);
+ let record = Record::builder()
+ .args(args)
+ .level(Level::Info)
+ .target(target)
+ .build();
+
+ logger.log(&record);
+
+ let output = String::from_utf8(data.lock().unwrap().clone()).unwrap();
+
+ for part in expected_parts {
+ assert!(
+ output.contains(part),
+ "Output did not contain expected part: {:?}\nFull output: {:?}",
+ part,
+ output
+ );
+ }
+ }
+
+ Paint::force(false);
+}
commit e72c4cff0c10274f68d91fb5be9cc457848b937e
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Thu Jan 22 17:28:37 2026 +0000
log: New crate for logger implementations
Move logging-related module `radicle::logging` into its own crate.
While at it, remove the "logger" feature flag from `radicle`.
Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
diff --git a/Cargo.lock b/Cargo.lock
index ebe36335f..cdab9fab6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2806,8 +2806,6 @@ dependencies = [
"amplify",
"base64 0.21.7",
"bytesize",
- "chrono",
- "colored",
"crossbeam-channel",
"cyphernet",
"dunce",
@@ -2864,6 +2862,7 @@ dependencies = [
"radicle-crypto",
"radicle-git-ref-format",
"radicle-localtime",
+ "radicle-log",
"radicle-node",
"radicle-surf",
"radicle-term",
@@ -2899,6 +2898,8 @@ dependencies = [
"log",
"pretty_assertions",
"radicle",
+ "radicle-log",
+ "radicle-term",
"shlex",
"snapbox",
"thiserror 2.0.17",
@@ -3032,6 +3033,18 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "radicle-log"
+version = "0.1.0"
+dependencies = [
+ "chrono",
+ "colored",
+ "log",
+ "radicle-localtime",
+ "radicle-term",
+ "regex",
+]
+
[[package]]
name = "radicle-node"
version = "0.16.0"
@@ -3054,6 +3067,7 @@ dependencies = [
"radicle-crypto",
"radicle-fetch",
"radicle-localtime",
+ "radicle-log",
"radicle-protocol",
"radicle-signals",
"radicle-systemd",
@@ -3117,6 +3131,7 @@ dependencies = [
"radicle",
"radicle-cli",
"radicle-crypto",
+ "radicle-log",
"thiserror 2.0.17",
]
diff --git a/Cargo.toml b/Cargo.toml
index e4a84362b..a3b1a8ad0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -52,6 +52,7 @@ radicle-fetch = { version = "0.16", path = "crates/radicle-fetch" }
radicle-git-metadata = { version = "0.1.0", path = "crates/radicle-git-metadata", default-features = false }
radicle-git-ref-format = { version = "0.1.0", path = "crates/radicle-git-ref-format", default-features = false }
radicle-localtime = { version = "0.1", path = "crates/radicle-localtime" }
+radicle-log = { version = "0.1", path = "crates/radicle-log" }
radicle-node = { version = "0.16", path = "crates/radicle-node" }
radicle-oid = { version = "0.1.0", path = "crates/radicle-oid", default-features = false }
radicle-protocol = { version = "0.4", path = "crates/radicle-protocol" }
diff --git a/crates/radicle-cli-test/Cargo.toml b/crates/radicle-cli-test/Cargo.toml
index 60c15811c..0a3e19ad0 100644
--- a/crates/radicle-cli-test/Cargo.toml
+++ b/crates/radicle-cli-test/Cargo.toml
@@ -15,7 +15,10 @@ rust-version.workspace = true
escargot = "0.5.7"
log = { workspace = true, features = ["std"] }
pretty_assertions = { workspace = true }
-radicle = { workspace = true, features = ["logger", "test"]}
+radicle = { workspace = true, features = ["test"] }
+radicle-log = { workspace = true, features = ["test"] }
+radicle-term = { workspace = true }
shlex = { workspace = true }
snapbox = { workspace = true }
-thiserror = { workspace = true, default-features = true }
\ No newline at end of file
+thiserror = { workspace = true, default-features = true }
+
diff --git a/crates/radicle-cli-test/src/lib.rs b/crates/radicle-cli-test/src/lib.rs
index fafe944bb..4ab17e57c 100644
--- a/crates/radicle-cli-test/src/lib.rs
+++ b/crates/radicle-cli-test/src/lib.rs
@@ -207,8 +207,11 @@ impl TestFormula {
// We don't need to re-build every time the `build` function is called. Once is enough.
BUILD.call_once(|| {
use escargot::format::Message;
- use radicle::logger::env_level;
- use radicle::logger::test::Logger;
+ use radicle_log::env_level;
+ use radicle_log::test::Logger;
+ use radicle_term::Paint;
+
+ Paint::force(true);
let level = env_level().unwrap_or(log::Level::Debug);
let logger = Box::new(Logger::new(level));
diff --git a/crates/radicle-cli/Cargo.toml b/crates/radicle-cli/Cargo.toml
index e147155d2..499b86bce 100644
--- a/crates/radicle-cli/Cargo.toml
+++ b/crates/radicle-cli/Cargo.toml
@@ -23,13 +23,14 @@ human-panic.workspace = true
itertools.workspace = true
log = { workspace = true, features = ["std"] }
nonempty = { workspace = true }
-radicle = { workspace = true, features = ["logger", "schemars"] }
+radicle = { workspace = true, features = ["schemars"] }
radicle-cob = { workspace = true }
radicle-crypto = { workspace = true }
radicle-git-ref-format = { workspace = true, features = ["macro"] }
radicle-localtime = { workspace = true }
radicle-surf = { workspace = true }
radicle-term = { workspace = true }
+radicle-log = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
@@ -59,6 +60,7 @@ radicle = { workspace = true, features = ["test"] }
radicle-cli-test = { workspace = true }
radicle-localtime = { workspace = true }
radicle-node = { workspace = true, features = ["test"] }
+radicle-log = { workspace = true, features = ["test"] }
[lints]
workspace = true
diff --git a/crates/radicle-cli/src/main.rs b/crates/radicle-cli/src/main.rs
index 3aa59e471..31995d489 100644
--- a/crates/radicle-cli/src/main.rs
+++ b/crates/radicle-cli/src/main.rs
@@ -117,8 +117,8 @@ fn main() {
.homepage(env!("CARGO_PKG_HOMEPAGE"))
.support("Open a support request at https://radicle.zulipchat.com/ or file an issue via Radicle itself, or e-mail to team@radicle.xyz"));
- if let Some(lvl) = radicle::logger::env_level() {
- let logger = Box::new(radicle::logger::Logger::new(lvl));
+ if let Some(lvl) = radicle_log::env_level() {
+ let logger = Box::new(radicle_log::Logger::new(lvl));
log::set_boxed_logger(logger).expect("no other logger should have been set already");
log::set_max_level(lvl.to_level_filter());
}
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 73f0638a7..8c5610edb 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -22,7 +22,7 @@ use radicle::test::fixtures;
use radicle_localtime::LocalTime;
#[allow(unused_imports)]
-use radicle_node::test::logger;
+use radicle_log::test::Logger;
use radicle_node::test::node::Node;
use radicle_node::PROTOCOL_VERSION;
diff --git a/crates/radicle-log/Cargo.toml b/crates/radicle-log/Cargo.toml
new file mode 100644
index 000000000..353da011e
--- /dev/null
+++ b/crates/radicle-log/Cargo.toml
@@ -0,0 +1,20 @@
+[package]
+name = "radicle-log"
+description = "Radicle loggers"
+homepage.workspace = true
+repository.workspace = true
+license.workspace = true
+version = "0.1.0"
+edition.workspace = true
+rust-version.workspace = true
+
+[features]
+test = []
+
+[dependencies]
+chrono = { workspace = true, features = ["clock"] }
+colored = { workspace = true }
+radicle-localtime = { workspace = true, features = ["serde"] }
+log = { version = "0.4", features = ["std"] }
+radicle-term = { workspace = true }
+regex = "1"
diff --git a/crates/radicle/src/logger.rs b/crates/radicle-log/src/lib.rs
similarity index 98%
rename from crates/radicle/src/logger.rs
rename to crates/radicle-log/src/lib.rs
index 7e74696d2..15d444424 100644
--- a/crates/radicle/src/logger.rs
+++ b/crates/radicle-log/src/lib.rs
@@ -5,8 +5,7 @@
#[cfg(feature = "test")]
pub mod test;
-use std::io;
-use std::io::Write;
+use std::io::{self, Write};
use chrono::prelude::*;
use colored::*;
diff --git a/crates/radicle/src/logger/test.rs b/crates/radicle-log/src/test.rs
similarity index 98%
rename from crates/radicle/src/logger/test.rs
rename to crates/radicle-log/src/test.rs
index fc8d81b20..f924d5056 100644
--- a/crates/radicle/src/logger/test.rs
+++ b/crates/radicle-log/src/test.rs
@@ -1,5 +1,5 @@
-use localtime::LocalTime;
use log::*;
+use radicle_localtime::LocalTime;
pub struct Logger {
level: Level,
diff --git a/crates/radicle-node/Cargo.toml b/crates/radicle-node/Cargo.toml
index 1ff3e2132..ae3593872 100644
--- a/crates/radicle-node/Cargo.toml
+++ b/crates/radicle-node/Cargo.toml
@@ -28,11 +28,12 @@ log = { workspace = true, features = ["kv", "std"] }
mio = { version = "1", features = ["net", "os-poll"] }
nonempty = { workspace = true, features = ["serialize"] }
qcheck = { workspace = true, optional = true }
-radicle = { workspace = true, features = ["logger"] }
+radicle = { workspace = true }
radicle-fetch = { workspace = true }
radicle-localtime = { workspace = true }
radicle-protocol = { workspace = true }
radicle-signals = { workspace = true }
+radicle-log = { workspace = true }
sqlite = { workspace = true, features = ["bundled"] }
scrypt = { version = "0.11.0", default-features = false }
serde = { workspace = true, features = ["derive"] }
@@ -54,6 +55,7 @@ mio = { version = "1", features = ["os-ext"] }
qcheck = { workspace = true }
qcheck-macros = { workspace = true }
radicle = { workspace = true, features = ["test"] }
+radicle-log = { workspace = true, features = ["test"] }
radicle-protocol = { workspace = true, features = ["test"] }
radicle-crypto = { workspace = true, features = ["test", "cyphernet"] }
snapbox = { workspace = true }
diff --git a/crates/radicle-node/src/main.rs b/crates/radicle-node/src/main.rs
index ddc3edf0d..476c2bb2a 100644
--- a/crates/radicle-node/src/main.rs
+++ b/crates/radicle-node/src/main.rs
@@ -378,7 +378,7 @@ fn initialize_logging(options: &LogOptions) -> Result<(), Box<dyn std::error::Er
const SYSLOG_IDENTIFIER: &str = "radicle-node";
logger::<&str, &str, _>(SYSLOG_IDENTIFIER.to_string(), []).map_err(Box::new)?
}
- Logger::Radicle => Box::new(radicle::logger::Logger::new(level)),
+ Logger::Radicle => Box::new(radicle_log::Logger::new(level)),
}
};
diff --git a/crates/radicle-node/src/test.rs b/crates/radicle-node/src/test.rs
index 87500a360..7a828f570 100644
--- a/crates/radicle-node/src/test.rs
+++ b/crates/radicle-node/src/test.rs
@@ -5,5 +5,5 @@ pub mod peer;
pub mod simulator;
pub use radicle::assert_matches;
-pub use radicle::logger::test as logger;
pub use radicle::test::*;
+pub use radicle_log::test as logger;
diff --git a/crates/radicle-protocol/Cargo.toml b/crates/radicle-protocol/Cargo.toml
index 40cc183cb..e3b9c0ec3 100644
--- a/crates/radicle-protocol/Cargo.toml
+++ b/crates/radicle-protocol/Cargo.toml
@@ -20,7 +20,7 @@ fastrand = { workspace = true }
log = { workspace = true, features = ["std"] }
nonempty = { workspace = true, features = ["serialize"] }
qcheck = { workspace = true, optional = true }
-radicle = { workspace = true, features = ["logger"] }
+radicle = { workspace = true }
radicle-fetch = { workspace = true }
radicle-localtime = { workspace = true }
sqlite = { workspace = true, features = ["bundled"] }
diff --git a/crates/radicle-remote-helper/Cargo.toml b/crates/radicle-remote-helper/Cargo.toml
index 411c005fb..4131ef713 100644
--- a/crates/radicle-remote-helper/Cargo.toml
+++ b/crates/radicle-remote-helper/Cargo.toml
@@ -19,4 +19,6 @@ log = { workspace = true }
radicle = { workspace = true }
radicle-cli = { workspace = true }
radicle-crypto = { workspace = true }
-thiserror = { workspace = true, default-features = true }
\ No newline at end of file
+radicle-log = { workspace = true }
+thiserror = { workspace = true, default-features = true }
+
diff --git a/crates/radicle-remote-helper/src/main.rs b/crates/radicle-remote-helper/src/main.rs
index 525b5255e..7389d7b1e 100644
--- a/crates/radicle-remote-helper/src/main.rs
+++ b/crates/radicle-remote-helper/src/main.rs
@@ -45,8 +45,8 @@ pub const VERSION: Version = Version {
fn main() {
let mut args = env::args();
- if let Some(lvl) = radicle::logger::env_level() {
- let logger = radicle::logger::StderrLogger::new(lvl);
+ if let Some(lvl) = radicle_log::env_level() {
+ let logger = radicle_log::StderrLogger::new(lvl);
log::set_boxed_logger(Box::new(logger))
.expect("no other logger should have been set already");
log::set_max_level(lvl.to_level_filter());
diff --git a/crates/radicle/Cargo.toml b/crates/radicle/Cargo.toml
index d7dab0072..07d0aece1 100644
--- a/crates/radicle/Cargo.toml
+++ b/crates/radicle/Cargo.toml
@@ -12,7 +12,6 @@ rust-version.workspace = true
[features]
default = []
test = ["tempfile", "qcheck", "radicle-crypto/test", "radicle-cob/test"]
-logger = ["colored", "chrono"]
qcheck = [
"radicle-core/qcheck",
"dep:qcheck"
@@ -28,8 +27,6 @@ schemars = [
amplify = { workspace = true, features = ["std"] }
base64 = "0.21.3"
bytesize = { version = "2", features = ["serde"] }
-chrono = { workspace = true, features = ["clock"], optional = true }
-colored = { workspace = true, optional = true }
crossbeam-channel = { workspace = true }
cyphernet = { workspace = true, features = ["tor", "dns", "p2p-ed25519"] }
dunce = { workspace = true }
diff --git a/crates/radicle/src/lib.rs b/crates/radicle/src/lib.rs
index b6698be4c..96f677382 100644
--- a/crates/radicle/src/lib.rs
+++ b/crates/radicle/src/lib.rs
@@ -19,8 +19,6 @@ pub mod explorer;
pub mod git;
pub mod identity;
pub mod io;
-#[cfg(feature = "logger")]
-pub mod logger;
pub mod node;
pub mod profile;
pub mod rad;
Exit code: 0
shell: 'export RUSTDOCFLAGS=''-D warnings'' cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps --all-features cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 284fcdd4-084a-49f2-9a1b-e331a3fe397b -v /opt/radcis/ci.rad.levitte.org/cci/state/284fcdd4-084a-49f2-9a1b-e331a3fe397b/s:/284fcdd4-084a-49f2-9a1b-e331a3fe397b/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w:/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w -w /284fcdd4-084a-49f2-9a1b-e331a3fe397b/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /284fcdd4-084a-49f2-9a1b-e331a3fe397b/s/script.sh
+ export 'RUSTDOCFLAGS=-D warnings'
+ RUSTDOCFLAGS='-D warnings'
+ cargo --version
info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
info: latest update on 2025-09-18, rust version 1.90.0 (1159e78c4 2025-09-14)
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.90.0 (840b83a10 2025-07-30)
+ rustc --version
rustc 1.90.0 (1159e78c4 2025-09-14)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded base32 v0.4.0
Downloaded anstyle v1.0.11
Downloaded amplify v4.6.0
Downloaded fast-glob v0.3.3
Downloaded elliptic-curve v0.13.8
Downloaded gix-credentials v0.30.0
Downloaded adler2 v2.0.0
Downloaded idna v1.0.3
Downloaded amplify_derive v4.0.0
Downloaded aho-corasick v1.1.3
Downloaded crypto-bigint v0.5.5
Downloaded num-bigint-dig v0.8.4
Downloaded icu_properties v1.5.1
Downloaded hmac v0.12.1
Downloaded lexopt v0.3.0
Downloaded gix-quote v0.6.0
Downloaded ascii v1.1.0
Downloaded base-x v0.2.11
Downloaded anstyle-parse v0.2.3
Downloaded icu_locid_transform v1.5.0
Downloaded lock_api v0.4.14
Downloaded fluent-uri v0.3.2
Downloaded icu_normalizer_data v1.5.1
Downloaded num-cmp v0.1.0
Downloaded libm v0.2.8
Downloaded inout v0.1.3
Downloaded ff v0.13.0
Downloaded keccak v0.1.5
Downloaded fxhash v0.2.1
Downloaded backtrace v0.3.75
Downloaded maybe-async v0.2.10
Downloaded filetime v0.2.23
Downloaded gix-hashtable v0.9.0
Downloaded home v0.5.9
Downloaded group v0.13.0
Downloaded gix-negotiate v0.21.0
Downloaded form_urlencoded v1.2.1
Downloaded gix-refspec v0.31.0
Downloaded num-iter v0.1.45
Downloaded itoa v1.0.11
Downloaded opaque-debug v0.3.1
Downloaded percent-encoding v2.3.1
Downloaded lazy_static v1.5.0
Downloaded parking_lot v0.12.5
Downloaded phf_shared v0.11.3
Downloaded human-panic v2.0.3
Downloaded overload v0.1.1
Downloaded pkcs8 v0.10.2
Downloaded radicle-git-ext v0.11.0
Downloaded radicle-std-ext v0.2.0
Downloaded proc-macro-error2 v2.0.1
Downloaded qcheck v1.0.0
Downloaded pkcs1 v0.7.5
Downloaded indicatif v0.18.0
Downloaded gix-ref v0.53.1
Downloaded rfc6979 v0.4.0
Downloaded ref-cast v1.0.24
Downloaded test-log v0.2.18
Downloaded jsonschema v0.30.0
Downloaded equivalent v1.0.1
Downloaded gix-pack v0.60.0
Downloaded ed25519 v1.5.3
Downloaded prodash v30.0.1
Downloaded serde_fmt v1.0.3
Downloaded scrypt v0.11.0
Downloaded tree-sitter-highlight v0.24.4
Downloaded nu-ansi-term v0.46.0
Downloaded outref v0.5.2
Downloaded signal-hook-mio v0.2.4
Downloaded num-integer v0.1.46
Downloaded signature v2.2.0
Downloaded memmap2 v0.9.8
Downloaded signal-hook-registry v1.4.5
Downloaded num-traits v0.2.19
Downloaded sem_safe v0.2.0
Downloaded sqlite3-sys v0.15.2
Downloaded shell-words v1.1.0
Downloaded sval_dynamic v2.14.1
Downloaded ssh-encoding v0.2.0
Downloaded streaming-iterator v0.1.9
Downloaded sval_serde v2.14.1
Downloaded git2 v0.19.0
Downloaded sval_buffer v2.14.1
Downloaded bloomy v1.2.0
Downloaded salsa20 v0.10.2
Downloaded rand v0.9.2
Downloaded shlex v1.3.0
Downloaded serde_derive_internals v0.29.1
Downloaded serde_derive v1.0.219
Downloaded signature v1.6.4
Downloaded tree-sitter-typescript v0.23.2
Downloaded zlib-rs v0.5.2
Downloaded unicode-display-width v0.3.0
Downloaded universal-hash v0.5.1
Downloaded value-bag v1.11.1
Downloaded unit-prefix v0.5.1
Downloaded unicode-width v0.1.11
Downloaded tree-sitter-go v0.23.4
Downloaded value-bag-serde1 v1.11.1
Downloaded gimli v0.31.1
Downloaded yansi v0.5.1
Downloaded uuid v1.16.0
Downloaded value-bag-sval2 v1.11.1
Downloaded utf8parse v0.2.1
Downloaded unicode-ident v1.0.12
Downloaded xattr v1.3.1
Downloaded zerofrom v0.1.6
Downloaded yoke-derive v0.7.5
Downloaded tinyvec_macros v0.1.1
Downloaded zerofrom-derive v0.1.6
Downloaded wait-timeout v0.2.1
Downloaded writeable v0.5.5
Downloaded walkdir v2.5.0
Downloaded zerovec-derive v0.10.3
Downloaded zeroize v1.7.0
Downloaded tracing-core v0.1.34
Downloaded tree-sitter-html v0.23.2
Downloaded yoke v0.7.5
Downloaded unicode-normalization v0.1.23
Downloaded tracing v0.1.41
Downloaded tree-sitter-ruby v0.23.1
Downloaded unicode-width v0.2.1
Downloaded regex-syntax v0.6.29
Downloaded url v2.5.4
Downloaded tokio v1.47.1
Downloaded tree-sitter-python v0.23.4
Downloaded zerovec v0.10.4
Downloaded zerocopy v0.7.35
Downloaded rustix v1.0.7
Downloaded tree-sitter-c v0.23.2
Downloaded winnow v0.7.13
Downloaded vcpkg v0.2.15
Downloaded tree-sitter-md v0.3.2
Downloaded regex-syntax v0.8.5
Downloaded rustix v0.38.34
Downloaded tracing-subscriber v0.3.19
Downloaded syn v2.0.106
Downloaded jiff v0.2.15
Downloaded tree-sitter v0.24.4
Downloaded tree-sitter-bash v0.23.3
Downloaded regex-automata v0.4.9
Downloaded syn v1.0.109
Downloaded object v0.36.7
Downloaded regex v1.11.1
Downloaded unicode-segmentation v1.11.0
Downloaded libc v0.2.174
Downloaded write16 v1.0.0
Downloaded version_check v0.9.4
Downloaded vsimd v0.8.0
Downloaded tree-sitter-rust v0.23.2
Downloaded tree-sitter-css v0.23.1
Downloaded sha1-checked v0.10.0
Downloaded utf16_iter v1.0.5
Downloaded utf8_iter v1.0.4
Downloaded tracing-log v0.2.0
Downloaded sha3 v0.10.8
Downloaded uuid-simd v0.8.0
Downloaded tree-sitter-language v0.1.2
Downloaded tree-sitter-json v0.24.8
Downloaded serde_json v1.0.140
Downloaded toml_writer v1.0.2
Downloaded ssh-key v0.6.6
Downloaded signal-hook v0.3.18
Downloaded p384 v0.13.0
Downloaded icu_properties_data v1.5.1
Downloaded unarray v0.1.4
Downloaded typenum v1.17.0
Downloaded typeid v1.0.3
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded toml_datetime v0.7.0
Downloaded toml v0.9.5
Downloaded tinystr v0.7.6
Downloaded timeago v0.4.2
Downloaded thread_local v1.1.9
Downloaded thiserror-impl v2.0.17
Downloaded thiserror-impl v1.0.69
Downloaded thiserror v2.0.17
Downloaded thiserror v1.0.69
Downloaded tempfile v3.23.0
Downloaded tar v0.4.40
Downloaded systemd-journal-logger v2.2.2
Downloaded synstructure v0.13.1
Downloaded sval_ref v2.14.1
Downloaded sval_nested v2.14.1
Downloaded sval_json v2.14.1
Downloaded sval_fmt v2.14.1
Downloaded sval v2.14.1
Downloaded structured-logger v1.0.4
Downloaded ssh-cipher v0.2.0
Downloaded spin v0.9.8
Downloaded socks5-client v0.4.1
Downloaded sharded-slab v0.1.7
Downloaded sha1 v0.10.6
Downloaded scopeguard v1.2.0
Downloaded rustc-demangle v0.1.26
Downloaded radicle-surf v0.26.0
Downloaded portable-atomic v1.11.0
Downloaded tinyvec v1.6.0
Downloaded subtle v2.5.0
Downloaded stable_deref_trait v1.2.0
Downloaded socket2 v0.5.7
Downloaded schemars v1.0.4
Downloaded rsa v0.9.6
Downloaded test-log-macros v0.2.18
Downloaded snapbox v0.4.17
Downloaded smallvec v1.15.1
Downloaded similar v2.5.0
Downloaded signals_receipts v0.2.0
Downloaded serde v1.0.219
Downloaded regex-automata v0.1.10
Downloaded serde_spanned v1.0.0
Downloaded serde-untagged v0.1.7
Downloaded schemars_derive v1.0.4
Downloaded proptest v1.9.0
Downloaded pretty_assertions v1.4.0
Downloaded p521 v0.13.3
Downloaded strsim v0.11.1
Downloaded spki v0.7.3
Downloaded snapbox-macros v0.3.8
Downloaded sha2 v0.10.8
Downloaded rusty-fork v0.3.1
Downloaded clap_builder v4.5.44
Downloaded bstr v1.12.0
Downloaded hashbrown v0.15.5
Downloaded emojis v0.6.4
Downloaded sec1 v0.7.3
Downloaded num-bigint v0.4.6
Downloaded mio v1.0.4
Downloaded mio v0.8.11
Downloaded memchr v2.7.2
Downloaded siphasher v1.0.1
Downloaded hashbrown v0.14.3
Downloaded sqlite v0.32.0
Downloaded siphasher v0.3.11
Downloaded cyphernet v0.5.2
Downloaded clap_complete v4.5.60
Downloaded ryu v1.0.17
Downloaded referencing v0.30.0
Downloaded pin-project-lite v0.2.16
Downloaded miniz_oxide v0.8.8
Downloaded num-complex v0.4.6
Downloaded rand_xorshift v0.4.0
Downloaded rand_core v0.9.3
Downloaded console v0.16.0
Downloaded num-rational v0.4.2
Downloaded clap_derive v4.5.41
Downloaded fancy-regex v0.14.0
Downloaded crc32fast v1.5.0
Downloaded colored v2.1.0
Downloaded cipher v0.4.4
Downloaded bitflags v1.3.2
Downloaded multibase v0.9.1
Downloaded erased-serde v0.4.6
Downloaded env_logger v0.11.8
Downloaded diff v0.1.13
Downloaded derive_more-impl v2.0.1
Downloaded byteorder v1.5.0
Downloaded either v1.11.0
Downloaded rand v0.8.5
Downloaded newline-converter v0.3.0
Downloaded itertools v0.14.0
Downloaded digest v0.10.7
Downloaded convert_case v0.7.1
Downloaded num v0.4.3
Downloaded normalize-line-endings v0.3.0
Downloaded nonempty v0.9.0
Downloaded noise-framework v0.4.0
Downloaded data-encoding-macro v0.1.14
Downloaded same-file v1.0.6
Downloaded fastrand v2.3.0
Downloaded faster-hex v0.10.0
Downloaded ec25519 v0.1.0
Downloaded ct-codecs v1.1.1
Downloaded clap_lex v0.7.5
Downloaded derive_more v2.0.1
Downloaded clap v4.5.44
Downloaded ecdsa v0.16.9
Downloaded dyn-clone v1.0.17
Downloaded document-features v0.2.11
Downloaded crypto-common v0.1.6
Downloaded const-oid v0.9.6
Downloaded bytes v1.10.1
Downloaded bit-set v0.8.0
Downloaded email_address v0.2.9
Downloaded data-encoding-macro-internal v0.1.12
Downloaded cyphergraphy v0.3.0
Downloaded cpufeatures v0.2.12
Downloaded colorchoice v1.0.0
Downloaded crossbeam-utils v0.8.19
Downloaded blowfish v0.9.1
Downloaded env_filter v0.1.3
Downloaded cypheraddr v0.4.0
Downloaded crossterm v0.29.0
Downloaded cfg-if v1.0.0
Downloaded bit-vec v0.8.0
Downloaded indexmap v2.2.6
Downloaded icu_collections v1.5.0
Downloaded fraction v0.15.3
Downloaded flate2 v1.1.1
Downloaded ctr v0.9.2
Downloaded cbc v0.1.2
Downloaded ref-cast-impl v1.0.24
Downloaded rand_core v0.6.4
Downloaded rand_chacha v0.9.0
Downloaded rand_chacha v0.3.1
Downloaded quote v1.0.41
Downloaded proc-macro2 v1.0.101
Downloaded p256 v0.13.2
Downloaded gix-transport v0.48.0
Downloaded chacha20 v0.9.1
Downloaded bytesize v2.0.1
Downloaded block-padding v0.3.3
Downloaded errno v0.3.13
Downloaded dunce v1.0.5
Downloaded chrono v0.4.38
Downloaded cc v1.2.2
Downloaded block-buffer v0.10.4
Downloaded base64 v0.21.7
Downloaded base16ct v0.2.0
Downloaded anyhow v1.0.82
Downloaded data-encoding v2.5.0
Downloaded crossbeam-channel v0.5.15
Downloaded bytecount v0.6.8
Downloaded aead v0.5.2
Downloaded once_cell v1.21.3
Downloaded litrs v0.4.1
Downloaded heapless v0.8.0
Downloaded gix-diff v0.53.0
Downloaded getrandom v0.3.3
Downloaded amplify_syn v2.0.1
Downloaded polyval v0.6.2
Downloaded libz-rs-sys v0.5.2
Downloaded escargot v0.5.10
Downloaded primeorder v0.13.6
Downloaded poly1305 v0.8.0
Downloaded parking_lot_core v0.9.12
Downloaded os_info v3.12.0
Downloaded heck v0.5.0
Downloaded gix-features v0.43.1
Downloaded getrandom v0.2.15
Downloaded quick-error v1.2.3
Downloaded qcheck-macros v1.0.0
Downloaded proc-macro-error-attr2 v2.0.0
Downloaded ppv-lite86 v0.2.17
Downloaded pkg-config v0.3.30
Downloaded gix-protocol v0.51.0
Downloaded gix-object v0.50.2
Downloaded phf v0.11.3
Downloaded pem-rfc7468 v0.7.0
Downloaded paste v1.0.15
Downloaded litemap v0.7.5
Downloaded addr2line v0.24.2
Downloaded jobserver v0.1.31
Downloaded gix-traverse v0.47.0
Downloaded gix-tempfile v18.0.0
Downloaded gix-revwalk v0.21.0
Downloaded gix-lock v18.0.0
Downloaded crossterm v0.25.0
Downloaded gix-packetline v0.19.1
Downloaded gix-commitgraph v0.29.0
Downloaded base64 v0.22.1
Downloaded aes-gcm v0.10.3
Downloaded pbkdf2 v0.12.2
Downloaded amplify_num v0.5.2
Downloaded anstream v0.6.13
Downloaded gix-revision v0.35.0
Downloaded gix-path v0.10.20
Downloaded gix-hash v0.19.0
Downloaded bcrypt-pbkdf v0.10.0
Downloaded autocfg v1.2.0
Downloaded fnv v1.0.7
Downloaded aes v0.8.4
Downloaded idna_adapter v1.2.0
Downloaded gix-prompt v0.11.1
Downloaded gix-command v0.6.2
Downloaded arc-swap v1.7.1
Downloaded icu_provider_macros v1.5.0
Downloaded hash32 v0.3.1
Downloaded gix-validate v0.10.0
Downloaded gix-utils v0.3.0
Downloaded gix-date v0.10.5
Downloaded matchers v0.1.0
Downloaded log v0.4.27
Downloaded gix-shallow v0.5.0
Downloaded gix-sec v0.12.0
Downloaded gix-chunk v0.4.11
Downloaded git-ref-format-core v0.6.0
Downloaded gix-trace v0.1.13
Downloaded gix-actor v0.35.4
Downloaded git-ref-format v0.6.0
Downloaded ghash v0.5.1
Downloaded ahash v0.8.11
Downloaded jiff-static v0.2.15
Downloaded inquire v0.7.5
Downloaded icu_provider v1.5.0
Downloaded icu_normalizer v1.5.0
Downloaded git-ref-format-macro v0.6.0
Downloaded base64ct v1.6.0
Downloaded icu_locid_transform_data v1.5.1
Downloaded icu_locid v1.5.0
Downloaded gix-url v0.32.0
Downloaded gix-fs v0.16.1
Downloaded generic-array v0.14.7
Downloaded gix-odb v0.70.0
Downloaded gix-config-value v0.15.1
Downloaded iana-time-zone v0.1.60
Downloaded chacha20poly1305 v0.10.1
Downloaded bitflags v2.9.1
Downloaded displaydoc v0.2.5
Downloaded der v0.7.9
Downloaded borrow-or-share v0.2.2
Downloaded anstyle-query v1.0.2
Downloaded linux-raw-sys v0.4.13
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded linux-raw-sys v0.9.4
Downloaded sqlite3-src v0.5.1
Downloaded libz-sys v1.1.16
Compiling libc v0.2.174
Compiling proc-macro2 v1.0.101
Compiling quote v1.0.41
Compiling unicode-ident v1.0.12
Checking cfg-if v1.0.0
Compiling shlex v1.3.0
Checking memchr v2.7.2
Compiling version_check v0.9.4
Compiling typenum v1.17.0
Checking getrandom v0.2.15
Compiling generic-array v0.14.7
Compiling syn v2.0.106
Compiling jobserver v0.1.31
Compiling serde v1.0.219
Compiling cc v1.2.2
Checking rand_core v0.6.4
Checking regex-syntax v0.8.5
Checking aho-corasick v1.1.3
Checking crypto-common v0.1.6
Checking smallvec v1.15.1
Compiling thiserror v2.0.17
Checking regex-automata v0.4.9
Checking stable_deref_trait v1.2.0
Checking once_cell v1.21.3
Checking subtle v2.5.0
Checking fastrand v2.3.0
Compiling parking_lot_core v0.9.12
Checking cpufeatures v0.2.12
Checking scopeguard v1.2.0
Checking lock_api v0.4.14
Checking block-buffer v0.10.4
Checking parking_lot v0.12.5
Checking digest v0.10.7
Checking bitflags v2.9.1
Checking byteorder v1.5.0
Compiling typeid v1.0.3
Compiling crc32fast v1.5.0
Checking tinyvec_macros v0.1.1
Checking tinyvec v1.6.0
Checking gix-trace v0.1.13
Compiling synstructure v0.13.1
Checking home v0.5.9
Checking itoa v1.0.11
Checking unicode-normalization v0.1.23
Checking zlib-rs v0.5.2
Checking bstr v1.12.0
Checking gix-utils v0.3.0
Checking same-file v1.0.6
Checking walkdir v2.5.0
Checking prodash v30.0.1
Compiling getrandom v0.3.3
Checking zeroize v1.7.0
Checking libz-rs-sys v0.5.2
Compiling serde_derive v1.0.219
Compiling thiserror-impl v2.0.17
Compiling zerofrom-derive v0.1.6
Compiling yoke-derive v0.7.5
Compiling zerovec-derive v0.10.3
Checking zerofrom v0.1.6
Checking gix-validate v0.10.0
Checking yoke v0.7.5
Checking gix-path v0.10.20
Checking flate2 v1.1.1
Compiling displaydoc v0.2.5
Checking gix-features v0.43.1
Checking zerovec v0.10.4
Compiling icu_locid_transform_data v1.5.1
Checking litemap v0.7.5
Checking writeable v0.5.5
Compiling heapless v0.8.0
Compiling pkg-config v0.3.30
Compiling rustix v1.0.7
Checking tinystr v0.7.6
Checking icu_locid v1.5.0
Compiling icu_provider_macros v1.5.0
Checking hash32 v0.3.1
Compiling icu_properties_data v1.5.1
Checking linux-raw-sys v0.9.4
Checking icu_provider v1.5.0
Compiling icu_normalizer_data v1.5.1
Checking icu_locid_transform v1.5.0
Checking faster-hex v0.10.0
Checking icu_collections v1.5.0
Checking sha1 v0.10.6
Checking block-padding v0.3.3
Checking icu_properties v1.5.1
Checking write16 v1.0.0
Checking utf16_iter v1.0.5
Checking utf8_iter v1.0.4
Checking inout v0.1.3
Checking sha1-checked v0.10.0
Compiling syn v1.0.109
Checking percent-encoding v2.3.1
Checking erased-serde v0.4.6
Checking serde_fmt v1.0.3
Checking gix-hash v0.19.0
Checking cipher v0.4.4
Checking value-bag-serde1 v1.11.1
Checking value-bag v1.11.1
Checking log v0.4.27
Checking icu_normalizer v1.5.0
Checking form_urlencoded v1.2.1
Compiling vcpkg v0.2.15
Checking idna_adapter v1.2.0
Checking idna v1.0.3
Compiling thiserror v1.0.69
Checking url v2.5.4
Compiling libz-sys v1.1.16
Checking tempfile v3.23.0
Compiling thiserror-impl v1.0.69
Checking hashbrown v0.14.3
Compiling serde_json v1.0.140
Checking equivalent v1.0.1
Checking sha2 v0.10.8
Checking indexmap v2.2.6
Compiling ref-cast v1.0.24
Checking ryu v1.0.17
Compiling libgit2-sys v0.17.0+1.8.1
Compiling ref-cast-impl v1.0.24
Checking universal-hash v0.5.1
Checking opaque-debug v0.3.1
Checking dyn-clone v1.0.17
Compiling amplify_syn v2.0.1
Checking signature v1.6.4
Checking ed25519 v1.5.3
Compiling serde_derive_internals v0.29.1
Checking aead v0.5.2
Compiling amplify_derive v4.0.0
Checking amplify_num v0.5.2
Checking ct-codecs v1.1.1
Checking ascii v1.1.0
Checking ec25519 v0.1.0
Compiling schemars_derive v1.0.4
Checking git-ref-format-core v0.6.0
Checking poly1305 v0.8.0
Checking chacha20 v0.9.1
Checking amplify v4.6.0
Checking polyval v0.6.2
Compiling sqlite3-src v0.5.1
Checking hmac v0.12.1
Checking cyphergraphy v0.3.0
Checking keccak v0.1.5
Checking base64ct v1.6.0
Checking sha3 v0.10.8
Checking pbkdf2 v0.12.2
Checking pem-rfc7468 v0.7.0
Checking ghash v0.5.1
Checking ctr v0.9.2
Checking schemars v1.0.4
Checking aes v0.8.4
Checking rand v0.8.5
Compiling data-encoding v2.5.0
Compiling autocfg v1.2.0
Checking base32 v0.4.0
Compiling crossbeam-utils v0.8.19
Checking cypheraddr v0.4.0
Compiling data-encoding-macro-internal v0.1.12
Compiling num-traits v0.2.19
Checking qcheck v1.0.0
Checking aes-gcm v0.10.3
Checking ssh-encoding v0.2.0
Checking chacha20poly1305 v0.10.1
Checking blowfish v0.9.1
Checking cbc v0.1.2
Checking ssh-cipher v0.2.0
Checking bcrypt-pbkdf v0.10.0
Checking noise-framework v0.4.0
Checking data-encoding-macro v0.1.14
Checking socks5-client v0.4.1
Checking base-x v0.2.11
Checking signature v2.2.0
Checking multibase v0.9.1
Checking ssh-key v0.6.6
Checking crossbeam-channel v0.5.15
Checking cyphernet v0.5.2
Checking radicle-ssh v0.10.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-ssh)
Checking anstyle-query v1.0.2
Checking jiff v0.2.15
Checking nonempty v0.9.0
Checking siphasher v1.0.1
Checking radicle-localtime v0.1.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-localtime)
Checking radicle-git-metadata v0.1.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-git-metadata)
Checking radicle-dag v0.10.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-dag)
Checking winnow v0.7.13
Compiling signal-hook v0.3.18
Checking hashbrown v0.15.5
Checking utf8parse v0.2.1
Checking anstyle-parse v0.2.3
Checking gix-hashtable v0.9.0
Checking gix-date v0.10.5
Checking radicle-git-ref-format v0.1.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-git-ref-format)
Checking signal-hook-registry v1.4.5
Checking gix-actor v0.35.4
Checking base64 v0.21.7
Checking colorchoice v1.0.0
Checking anstyle v1.0.11
Checking gix-object v0.50.2
Checking anstream v0.6.13
Checking mio v0.8.11
Checking mio v1.0.4
Checking serde-untagged v0.1.7
Checking bytesize v2.0.1
Checking memmap2 v0.9.8
Checking fast-glob v0.3.3
Compiling unicode-segmentation v1.11.0
Checking dunce v1.0.5
Checking tree-sitter-language v0.1.2
Checking signal-hook-mio v0.2.4
Checking gix-chunk v0.4.11
Compiling convert_case v0.7.1
Checking regex v1.11.1
Checking sem_safe v0.2.0
Checking errno v0.3.13
Compiling portable-atomic v1.11.0
Checking lazy_static v1.5.0
Checking signals_receipts v0.2.0
Compiling derive_more-impl v2.0.1
Checking gix-commitgraph v0.29.0
Compiling litrs v0.4.1
Checking bitflags v1.3.2
Checking unicode-width v0.2.1
Checking console v0.16.0
Compiling document-features v0.2.11
Checking crossterm v0.25.0
Checking derive_more v2.0.1
Checking gix-revwalk v0.21.0
Checking newline-converter v0.3.0
Checking gix-fs v0.16.1
Checking fxhash v0.2.1
Checking unicode-width v0.1.11
Checking unit-prefix v0.5.1
Checking inquire v0.7.5
Checking indicatif v0.18.0
Checking gix-tempfile v18.0.0
Checking crossterm v0.29.0
Checking radicle-signals v0.11.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-signals)
Checking unicode-display-width v0.3.0
Checking gix-quote v0.6.0
Checking shell-words v1.1.0
Checking iana-time-zone v0.1.60
Checking either v1.11.0
Checking chrono v0.4.38
Checking gix-command v0.6.2
Checking colored v2.1.0
Compiling object v0.36.7
Checking gix-lock v18.0.0
Checking gix-url v0.32.0
Checking gix-config-value v0.15.1
Checking gix-sec v0.12.0
Compiling rustix v0.38.34
Checking gimli v0.31.1
Checking adler2 v2.0.0
Checking miniz_oxide v0.8.8
Checking gix-prompt v0.11.1
Checking addr2line v0.24.2
Checking gix-traverse v0.47.0
Checking gix-revision v0.35.0
Checking gix-diff v0.53.0
Checking gix-packetline v0.19.1
Compiling tree-sitter v0.24.4
Compiling anyhow v1.0.82
Compiling linux-raw-sys v0.4.13
Checking rustc-demangle v0.1.26
Checking backtrace v0.3.75
Checking gix-transport v0.48.0
Checking gix-pack v0.60.0
Checking gix-refspec v0.31.0
Checking gix-credentials v0.30.0
Checking gix-shallow v0.5.0
Checking gix-ref v0.53.1
Checking gix-negotiate v0.21.0
Compiling maybe-async v0.2.10
Compiling proc-macro-error-attr2 v2.0.0
Checking arc-swap v1.7.1
Checking gix-protocol v0.51.0
Checking gix-odb v0.70.0
Compiling proc-macro-error2 v2.0.1
Compiling xattr v1.3.1
Compiling filetime v0.2.23
Checking uuid v1.16.0
Checking bytes v1.10.1
Compiling tar v0.4.40
Compiling git-ref-format-macro v0.6.0
Checking snapbox-macros v0.3.8
Checking salsa20 v0.10.2
Checking strsim v0.11.1
Compiling heck v0.5.0
Checking streaming-iterator v0.1.9
Checking normalize-line-endings v0.3.0
Checking siphasher v0.3.11
Checking similar v2.5.0
Checking clap_lex v0.7.5
Checking clap_builder v4.5.44
Checking snapbox v0.4.17
Checking sqlite3-sys v0.15.2
Checking sqlite v0.32.0
Checking radicle-crypto v0.14.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-crypto)
Checking bloomy v1.2.0
Compiling clap_derive v4.5.41
Checking scrypt v0.11.0
Compiling radicle-surf v0.26.0
Checking git-ref-format v0.6.0
Checking systemd-journal-logger v2.2.2
Checking serde_spanned v1.0.0
Checking toml_datetime v0.7.0
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-c v0.23.2
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-python v0.23.4
Checking radicle-std-ext v0.2.0
Checking toml_writer v1.0.2
Checking pin-project-lite v0.2.16
Checking tokio v1.47.1
Checking toml v0.9.5
Checking clap v4.5.44
Checking os_info v3.12.0
Compiling radicle-node v0.16.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-node)
Checking yansi v0.5.1
Checking diff v0.1.13
Compiling radicle-cli v0.17.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-cli)
Checking pretty_assertions v1.4.0
Checking human-panic v2.0.3
Checking structured-logger v1.0.4
Checking clap_complete v4.5.60
Checking radicle-systemd v0.11.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-systemd)
Checking tree-sitter-highlight v0.24.4
Checking itertools v0.14.0
Checking num-integer v0.1.46
Compiling qcheck-macros v1.0.0
Checking socket2 v0.5.7
Checking timeago v0.4.2
Checking lexopt v0.3.0
Compiling escargot v0.5.10
Checking bit-vec v0.8.0
Checking bit-set v0.8.0
Checking num-bigint v0.4.6
Checking rand_core v0.9.3
Compiling ahash v0.8.11
Checking num-iter v0.1.45
Checking num-complex v0.4.6
Checking env_filter v0.1.3
Checking zerocopy v0.7.35
Checking borrow-or-share v0.2.2
Checking fluent-uri v0.3.2
Checking env_logger v0.11.8
Checking num-rational v0.4.2
Checking phf_shared v0.11.3
Compiling test-log-macros v0.2.18
Checking wait-timeout v0.2.1
Checking num v0.4.3
Checking fnv v1.0.7
Compiling paste v1.0.15
Compiling radicle-remote-helper v0.14.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-remote-helper)
Checking ppv-lite86 v0.2.17
Checking vsimd v0.8.0
Checking outref v0.5.2
Checking quick-error v1.2.3
Checking rusty-fork v0.3.1
Checking rand_chacha v0.9.0
Checking uuid-simd v0.8.0
Checking test-log v0.2.18
Checking fraction v0.15.3
Checking phf v0.11.3
Checking referencing v0.30.0
Checking rand v0.9.2
Checking rand_xorshift v0.4.0
Checking fancy-regex v0.14.0
Checking email_address v0.2.9
Checking num-cmp v0.1.0
Checking base64 v0.22.1
Checking bytecount v0.6.8
Checking unarray v0.1.4
Checking emojis v0.6.4
Checking jsonschema v0.30.0
Checking proptest v1.9.0
Checking git2 v0.19.0
Checking radicle-oid v0.1.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-oid)
Checking radicle-term v0.16.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-term)
Checking radicle-git-ext v0.11.0
Checking radicle-cob v0.17.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-cob)
Checking radicle-core v0.1.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-core)
Checking radicle-log v0.1.0 (/284fcdd4-084a-49f2-9a1b-e331a3fe397b/w/crates/radicle-log)
error: the borrowed expression implements the required traits
--> crates/radicle-log/src/test.rs:154:54
|
154 | let coloured_msg = self.format_message(&msg, &paint_plain);
| ^^^^^^^^^^^^ help: change this to: `paint_plain`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `-D clippy::needless-borrows-for-generic-args` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrows_for_generic_args)]`
error: the borrowed expression implements the required traits
--> crates/radicle-log/src/test.rs:185:74
|
185 | let coloured_rest = self.format_message(&rest_of_prefix, &paint_plain);
| ^^^^^^^^^^^^ help: change this to: `paint_plain`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: could not compile `radicle-log` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `radicle-log` (lib test) due to 2 previous errors
Exit code: 101
{
"response": "finished",
"result": "failure"
}