commit a33300f3534d6700b4af2ec6fdf9012c68740b3f
parent c9f31a3a7888c3bd55da31b199e3da1ceb3d8b37
Author: triesap <tyson@radroots.org>
Date: Fri, 23 Oct 2026 18:40:30 +0000
build: adopt patched shared runtime and preserve static command help
- Pin the verified Lib source and Tokio 1.53.3 dependency graph.
- Bind current Cargo and Nix inputs through the generated V4 source lock.
- Install complete data notices and handle bounded help before startup.
- Verify native behavior, API freshness, source policy and Darwin/Linux builds.
Diffstat:
20 files changed, 214 insertions(+), 79 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -1482,9 +1482,9 @@ dependencies = [
[[package]]
name = "mio"
-version = "1.1.1"
+version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
+checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee"
dependencies = [
"libc",
"wasi",
@@ -1835,7 +1835,7 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
name = "radroots_blossom"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"mediatype",
"serde",
@@ -1847,7 +1847,7 @@ dependencies = [
[[package]]
name = "radroots_core"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"rust_decimal",
"serde",
@@ -1856,8 +1856,9 @@ dependencies = [
[[package]]
name = "radroots_domain"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
+ "jiff-tzdb",
"radroots_identity",
"zeroize",
]
@@ -1865,7 +1866,7 @@ dependencies = [
[[package]]
name = "radroots_event"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"hex",
"jiff-tzdb",
@@ -1883,7 +1884,7 @@ dependencies = [
[[package]]
name = "radroots_event_codec"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"hex",
"radroots_blossom",
@@ -1900,7 +1901,7 @@ dependencies = [
[[package]]
name = "radroots_identity"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"k256",
"serde",
@@ -1910,7 +1911,7 @@ dependencies = [
[[package]]
name = "radroots_nostr"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"nostr 0.44.7",
"radroots_event",
@@ -1925,7 +1926,7 @@ dependencies = [
[[package]]
name = "radroots_protocol"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"radroots_identity",
"serde",
@@ -1936,7 +1937,7 @@ dependencies = [
[[package]]
name = "radroots_runtime_paths"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"rustix",
"serde",
@@ -1946,7 +1947,7 @@ dependencies = [
[[package]]
name = "radroots_secrets"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"chacha20poly1305",
"serde",
@@ -1958,7 +1959,7 @@ dependencies = [
[[package]]
name = "radroots_service_host"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"bytes",
"fs2",
@@ -1979,7 +1980,7 @@ dependencies = [
[[package]]
name = "radroots_service_sqlite"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"fs2",
"futures",
@@ -1997,7 +1998,7 @@ dependencies = [
[[package]]
name = "radroots_storage"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"radroots_domain",
"radroots_event",
@@ -2012,7 +2013,7 @@ dependencies = [
[[package]]
name = "radroots_trade"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"hex",
"radroots_core",
@@ -2026,7 +2027,7 @@ dependencies = [
[[package]]
name = "radroots_transport"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"radroots_event",
"radroots_identity",
@@ -2037,7 +2038,7 @@ dependencies = [
[[package]]
name = "radroots_transport_nostr"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"async-utility",
"async-wsocket",
@@ -2059,7 +2060,7 @@ dependencies = [
[[package]]
name = "radroots_transport_nostr_native"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814"
+source = "git+https://github.com/radrootslabs/lib?rev=05ad0ff0f521535f7649027d4f3391e6464f7fa1#05ad0ff0f521535f7649027d4f3391e6464f7fa1"
dependencies = [
"futures",
"radroots_transport",
@@ -2824,9 +2825,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.50.0"
+version = "1.53.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d"
+checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e"
dependencies = [
"bytes",
"libc",
@@ -2849,13 +2850,13 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "2.6.1"
+version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c"
+checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.117",
+ "syn 3.0.3",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
@@ -52,19 +52,19 @@ workspace = true
[dependencies]
base64 = "0.22"
-radroots_event = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", features = ["serde"] }
-radroots_event_codec = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", features = ["json"] }
-radroots_nostr = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", features = ["events"] }
-radroots_protocol = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_runtime_paths = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_service_host = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_service_sqlite = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_storage = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", default-features = false }
-radroots_transport = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", default-features = false, features = ["std"] }
-radroots_transport_nostr = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_transport_nostr_native = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_secrets = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_trade = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
+radroots_event = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", features = ["serde"] }
+radroots_event_codec = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", features = ["json"] }
+radroots_nostr = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", features = ["events"] }
+radroots_protocol = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_runtime_paths = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_service_host = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_service_sqlite = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_storage = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", default-features = false }
+radroots_transport = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", default-features = false, features = ["std"] }
+radroots_transport_nostr = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_transport_nostr_native = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_secrets = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_trade = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
chacha20poly1305 = { version = "0.10" }
clap = { version = "4", features = ["derive"] }
@@ -78,7 +78,7 @@ serde_json = { version = "1", default-features = false, features = ["raw_value"]
sha2 = { version = "0.10" }
sqlx = { version = "0.9.0", default-features = false, features = ["sqlite-bundled"] }
thiserror = { version = "2" }
-tokio = { version = "1", default-features = false, features = ["io-util", "macros", "net", "rt-multi-thread", "signal", "sync", "time"] }
+tokio = { version = "1.53.3", default-features = false, features = ["io-util", "macros", "net", "rt-multi-thread", "signal", "sync", "time"] }
tempfile = { version = "3" }
toml = { version = "0.8" }
url = "2"
diff --git a/README b/README
@@ -1,5 +1,9 @@
# rhizome
+Global and nested `--help` print static command help and exit successfully
+before configuration, identity, state, signals or network startup. Malformed
+arguments retain the fixed redacted error result and nonzero exit status.
+
This is the README for `rhi` which listens on Rad Roots networks and maintains
a stable activity record for parties buying and selling agricultural goods.
diff --git a/contracts/api_baselines/rhi.txt b/contracts/api_baselines/rhi.txt
@@ -119,6 +119,7 @@ pub rhi::RhiCliPrimaryAuthorityV1::Daemon
pub rhi::RhiCliPrimaryAuthorityV1::LiveUnixAdmin
pub rhi::RhiCliPrimaryAuthorityV1::Offline
pub enum rhi::RhiCliV1ErrorKind
+pub rhi::RhiCliV1ErrorKind::HelpRequested
pub rhi::RhiCliV1ErrorKind::InvalidArguments
pub rhi::RhiCliV1ErrorKind::InvalidCommandInput
pub rhi::RhiCliV1ErrorKind::InvalidConfigPath
@@ -961,7 +962,8 @@ impl core::fmt::Debug for rhi::RhiCliInvocationV1
pub fn rhi::RhiCliInvocationV1::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub struct rhi::RhiCliV1Error
impl rhi::RhiCliV1Error
-pub const fn rhi::RhiCliV1Error::kind(self) -> rhi::RhiCliV1ErrorKind
+pub fn rhi::RhiCliV1Error::help_text(&self) -> core::option::Option<&str>
+pub const fn rhi::RhiCliV1Error::kind(&self) -> rhi::RhiCliV1ErrorKind
impl core::error::Error for rhi::RhiCliV1Error
impl core::fmt::Debug for rhi::RhiCliV1Error
pub fn rhi::RhiCliV1Error::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
diff --git a/flake.lock b/flake.lock
@@ -45,17 +45,17 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
- "lastModified": 1792626713,
- "narHash": "sha256-THmBCeJQwtKKZaQQyjTIMfk/qw0WtuXAbo29QkkpU3Q=",
+ "lastModified": 1792778501,
+ "narHash": "sha256-q0uQg/AY3yo2adnro5xHm+vRy403tnRhXEo70yNr3eg=",
"owner": "radrootslabs",
"repo": "lib",
- "rev": "4b4aa8a7feaab08492c3f596df9182070ee8d814",
+ "rev": "05ad0ff0f521535f7649027d4f3391e6464f7fa1",
"type": "github"
},
"original": {
"owner": "radrootslabs",
"repo": "lib",
- "rev": "4b4aa8a7feaab08492c3f596df9182070ee8d814",
+ "rev": "05ad0ff0f521535f7649027d4f3391e6464f7fa1",
"type": "github"
}
},
diff --git a/flake.nix b/flake.nix
@@ -8,7 +8,7 @@
# that upstream fetch defect while preserving the same locked sources.
crane.url = "github:ipetkov/crane/01bc1d404a51a0a07e9d8759cd50a7903e218c82";
lib = {
- url = "github:radrootslabs/lib/4b4aa8a7feaab08492c3f596df9182070ee8d814";
+ url = "github:radrootslabs/lib/05ad0ff0f521535f7649027d4f3391e6464f7fa1";
inputs.crane.follows = "crane";
};
nixpkgs.follows = "lib/nixpkgs";
@@ -70,6 +70,9 @@
version = "0.1.0";
CARGO_PROFILE = "release";
cargoExtraArgs = "--locked --package rhi --bin rhi";
+ postInstall = ''
+ install -Dm444 ${lib.outPath}/crates/domain/NOTICE "$out/share/doc/rhi/NOTICE"
+ '';
}
);
mkCargoCheck =
@@ -130,7 +133,7 @@
buildInfo = {
serviceVersion = "0.1.0";
serviceCommit = self.rev or "0000000000000000000000000000000000000000";
- libRevision = "4b4aa8a7feaab08492c3f596df9182070ee8d814";
+ libRevision = "05ad0ff0f521535f7649027d4f3391e6464f7fa1";
rustVersion = "1.99.0";
target = "x86_64-unknown-linux-gnu";
featureProfile = "service-host";
diff --git a/radroots.service.source_lock.v4.toml b/radroots.service.source_lock.v4.toml
@@ -2,12 +2,12 @@ schema = "radroots.service.source_lock.v4"
contract_version = 4
service = "rhi"
repository = "https://github.com/radrootslabs/lib"
-revision = "4b4aa8a7feaab08492c3f596df9182070ee8d814"
+revision = "05ad0ff0f521535f7649027d4f3391e6464f7fa1"
architecture = "radroots.crates.release.v2"
workspace_catalog_sha256 = "424909855b2af1ffc8fa6bbfd5aa0e6d17642662c18212fef4660e71700fbfc8"
version = "0.1.0-alpha"
-source_archive_sha256 = "3037aeae84b071a1dd04e215de5b4d21cf36065348bd5eed158d8cedd69fcfef"
-cargo_lock_sha256 = "e2fcc8dccc0da3019c619bca420e2321a0f895fd90b2e1c0fb3b095e05af11c5"
+source_archive_sha256 = "c8c148f2e6007ac5ff13d2edb070bf8aff643661b9a03ff7ab1f75806ce15548"
+cargo_lock_sha256 = "9e32d78f952fba7b09c19a6e06966a6654fefe7909f2e498ca043f6ebbccef73"
rust_version = "1.99.0"
host_feature_profile = "service-host"
@@ -33,12 +33,12 @@ trailer = "two_zero_blocks"
[nix]
material = "bound"
-lib_revision = "4b4aa8a7feaab08492c3f596df9182070ee8d814"
+lib_revision = "05ad0ff0f521535f7649027d4f3391e6464f7fa1"
supported_systems = ["aarch64-darwin", "x86_64-linux"]
[nix.public_input_lock]
path = "flake.lock"
-sha256 = "e8665a3e37ca57e14b08c7ba670566a8d70ffbbecd2a4f4af361961b354ffdc9"
+sha256 = "874c4c76b897463ead34390c54ae82d85633e1bfe0ad058a282ca48ac7874166"
binding = "exact_regular_file_bytes"
mutable_reference = "forbidden"
lib_input = "lib"
diff --git a/src/cli_v1.rs b/src/cli_v1.rs
@@ -474,6 +474,7 @@ impl fmt::Debug for RhiCliExecutionPlanV1 {
/// Stable source-free classification for command-line admission failures.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RhiCliV1ErrorKind {
+ HelpRequested,
InvalidArguments,
InvalidInstance,
InvalidRepoLocalRoot,
@@ -485,6 +486,7 @@ pub enum RhiCliV1ErrorKind {
impl RhiCliV1ErrorKind {
const fn message(self) -> &'static str {
match self {
+ Self::HelpRequested => "command-line help requested",
Self::InvalidArguments => "command-line arguments are invalid",
Self::InvalidInstance => "instance identifier is invalid",
Self::InvalidRepoLocalRoot => "repo-local profile requires a valid absolute root",
@@ -497,22 +499,34 @@ impl RhiCliV1ErrorKind {
}
}
-/// One safe command-line admission failure.
-#[derive(Clone, Copy, PartialEq, Eq)]
+/// One safe command-line admission outcome requiring process-level handling.
+#[derive(Clone, PartialEq, Eq)]
pub struct RhiCliV1Error {
kind: RhiCliV1ErrorKind,
+ help_text: Option<Box<str>>,
}
impl RhiCliV1Error {
const fn new(kind: RhiCliV1ErrorKind) -> Self {
- Self { kind }
+ Self {
+ kind,
+ help_text: None,
+ }
}
/// Returns the stable failure classification.
#[must_use]
- pub const fn kind(self) -> RhiCliV1ErrorKind {
+ pub const fn kind(&self) -> RhiCliV1ErrorKind {
self.kind
}
+
+ /// Returns bounded static command help, without caller argument text.
+ /// The process owner may print this on stdout and return success without
+ /// executing a command. Display and Debug remain source-free diagnostics.
+ #[must_use]
+ pub fn help_text(&self) -> Option<&str> {
+ self.help_text.as_deref()
+ }
}
impl fmt::Debug for RhiCliV1Error {
@@ -610,8 +624,18 @@ where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
{
- let parsed = RawRhiCliV1::try_parse_from(arguments)
- .map_err(|_| RhiCliV1Error::new(RhiCliV1ErrorKind::InvalidArguments))?;
+ let parsed = RawRhiCliV1::try_parse_from(arguments).map_err(|error| {
+ if error.kind() == clap::error::ErrorKind::DisplayHelp {
+ let help = error.to_string();
+ if help.len() <= 16 * 1024 {
+ return RhiCliV1Error {
+ kind: RhiCliV1ErrorKind::HelpRequested,
+ help_text: Some(help.into_boxed_str()),
+ };
+ }
+ }
+ RhiCliV1Error::new(RhiCliV1ErrorKind::InvalidArguments)
+ })?;
let profile = parsed
.profile
.ok_or_else(|| RhiCliV1Error::new(RhiCliV1ErrorKind::InvalidArguments))?
@@ -784,7 +808,7 @@ fn valid_absolute_path(path: &Path, require_non_root: bool) -> bool {
}
#[derive(Parser)]
-#[command(name = "rhi", disable_help_subcommand = true)]
+#[command(name = "rhi", bin_name = "rhi", disable_help_subcommand = true)]
struct RawRhiCliV1 {
#[arg(long, global = true, value_enum)]
profile: Option<RawProfile>,
diff --git a/src/main.rs b/src/main.rs
@@ -1,5 +1,6 @@
#![forbid(unsafe_code)]
+use std::io::Write;
use std::process::ExitCode;
use rhi::{RhiLogRecord, RhiProcessResult};
@@ -62,7 +63,15 @@ fn main() -> ExitCode {
eprintln!("{}", RhiLogRecord::process_result(result));
result.exit_code()
}
- Err(_) => {
+ Err(error) => {
+ if let Some(help) = error.help_text() {
+ if std::io::stdout().lock().write_all(help.as_bytes()).is_ok() {
+ return ExitCode::SUCCESS;
+ }
+ let result = RhiProcessResult::InputOrConfiguration;
+ eprintln!("{}", RhiLogRecord::process_result(result));
+ return result.exit_code();
+ }
let result = RhiProcessResult::InputOrConfiguration;
eprintln!("{}", RhiLogRecord::process_result(result));
result.exit_code()
diff --git a/supply-chain/config.toml b/supply-chain/config.toml
@@ -585,8 +585,9 @@ version = "0.8.9"
criteria = "safe-to-deploy"
[[exemptions.mio]]
-version = "1.1.1"
+version = "1.2.4"
criteria = "safe-to-deploy"
+notes = "Existing version-specific review debt advanced for the patched Tokio1.53.3 graph. Independent full-crate audit remains outstanding; current source policy and runtime checks do not claim that audit. No advisory exception is added."
[[exemptions.negentropy]]
version = "0.5.1"
@@ -979,12 +980,14 @@ version = "0.1.1"
criteria = "safe-to-deploy"
[[exemptions.tokio]]
-version = "1.50.0"
+version = "1.53.3"
criteria = "safe-to-deploy"
+notes = "Existing version-specific review debt advanced for the patched Tokio1.53.3 graph. Independent full-crate audit remains outstanding; current source policy and runtime checks do not claim that audit. No advisory exception is added."
[[exemptions.tokio-macros]]
-version = "2.6.1"
+version = "2.7.2"
criteria = "safe-to-deploy"
+notes = "Existing version-specific review debt advanced for the patched Tokio1.53.3 graph. Independent full-crate audit remains outstanding; current source policy and runtime checks do not claim that audit. No advisory exception is added."
[[exemptions.tokio-rustls]]
version = "0.26.4"
diff --git a/tests/build_policy.rs b/tests/build_policy.rs
@@ -44,7 +44,7 @@ fn source_lock_metadata_is_exact_and_nix_is_bound() {
fn shared_host_packages_are_exactly_source_locked() {
for dependency in ["radroots_service_host", "radroots_service_sqlite"] {
assert!(MANIFEST.contains(&format!(
- "{dependency} = {{ git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }}"
+ "{dependency} = {{ git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }}"
)));
}
}
@@ -52,7 +52,7 @@ fn shared_host_packages_are_exactly_source_locked() {
#[test]
fn shared_service_sqlite_is_the_only_catalog_authority() {
assert!(MANIFEST.contains(
- "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
for forbidden in ["rusqlite", "libsqlite3-sys"] {
assert!(
@@ -65,20 +65,20 @@ fn shared_service_sqlite_is_the_only_catalog_authority() {
#[test]
fn shared_storage_generation_type_is_exactly_source_locked() {
assert!(MANIFEST.contains(
- "radroots_storage = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\", default-features = false }"
+ "radroots_storage = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\", default-features = false }"
));
}
#[test]
fn shared_transport_spi_is_exactly_source_locked_without_serde() {
assert!(MANIFEST.contains(
- "radroots_transport = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\", default-features = false, features = [\"std\"] }"
+ "radroots_transport = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\", default-features = false, features = [\"std\"] }"
));
assert!(MANIFEST.contains(
- "radroots_transport_nostr = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_transport_nostr = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
assert!(MANIFEST.contains(
- "radroots_transport_nostr_native = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_transport_nostr_native = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
}
@@ -91,15 +91,15 @@ fn source_lock_binds_the_current_cargo_lock() {
));
assert!(SOURCE_LOCK.contains(&format!("cargo_lock_sha256 = \"{digest}\"")));
assert!(SOURCE_LOCK.contains(&format!("sha256 = \"{flake_digest}\"")));
- assert!(SOURCE_LOCK.contains("revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\""));
+ assert!(SOURCE_LOCK.contains("revision = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\""));
assert!(SOURCE_LOCK.contains(
"workspace_catalog_sha256 = \"424909855b2af1ffc8fa6bbfd5aa0e6d17642662c18212fef4660e71700fbfc8\""
));
assert!(SOURCE_LOCK.contains(
- "source_archive_sha256 = \"3037aeae84b071a1dd04e215de5b4d21cf36065348bd5eed158d8cedd69fcfef\""
+ "source_archive_sha256 = \"c8c148f2e6007ac5ff13d2edb070bf8aff643661b9a03ff7ab1f75806ce15548\""
));
assert!(SOURCE_LOCK.contains(
- "[nix]\nmaterial = \"bound\"\nlib_revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"\nsupported_systems = [\"aarch64-darwin\", \"x86_64-linux\"]\n"
+ "[nix]\nmaterial = \"bound\"\nlib_revision = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\"\nsupported_systems = [\"aarch64-darwin\", \"x86_64-linux\"]\n"
));
assert!(SOURCE_LOCK.ends_with(
"[contract_versions]\nconfig = 1\nstate = 11\nadmin = 1\nstatus = 1\nprovider = 1\n"
diff --git a/tests/command_display.rs b/tests/command_display.rs
@@ -0,0 +1,89 @@
+#![forbid(unsafe_code)]
+
+use std::path::Path;
+use std::process::{Command, Output, Stdio};
+use std::time::{Duration, Instant};
+
+fn output(command: &mut Command, directory: &Path) -> Output {
+ let mut child = command
+ .current_dir(directory)
+ .stdin(Stdio::null())
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .unwrap();
+ let deadline = Instant::now() + Duration::from_secs(10);
+ while child.try_wait().unwrap().is_none() {
+ if Instant::now() >= deadline {
+ child.kill().unwrap();
+ child.wait().unwrap();
+ panic!("command-display process exceeded its ten-second deadline");
+ }
+ std::thread::sleep(Duration::from_millis(10));
+ }
+ let output = child.wait_with_output().unwrap();
+ assert!(output.stdout.len() <= 16 * 1024 && output.stderr.len() <= 16 * 1024);
+ output
+}
+
+#[test]
+fn declared_help_succeeds_without_bootstrap_or_created_state() {
+ for arguments in [
+ vec!["--help"],
+ vec!["config", "--help"],
+ vec!["state", "restore", "--help"],
+ ] {
+ let root = tempfile::tempdir().unwrap();
+ let output = output(
+ Command::new(env!("CARGO_BIN_EXE_rhi"))
+ .arg("--config")
+ .arg(root.path().join("absent.toml"))
+ .args(&arguments),
+ root.path(),
+ );
+ assert!(output.status.success(), "{arguments:?}");
+ assert!(!output.stdout.is_empty());
+ assert!(output.stderr.is_empty());
+ assert!(!String::from_utf8_lossy(&output.stdout).contains("absent.toml"));
+ assert!(std::fs::read_dir(root.path()).unwrap().next().is_none());
+ }
+}
+
+#[test]
+fn help_is_bounded_static_and_diagnostics_remain_redacted() {
+ let error = rhi::parse_rhi_cli_v1_from([
+ "caller-private-program",
+ "--instance",
+ "caller-private-instance",
+ "--config",
+ "/caller-private-path.toml",
+ "state",
+ "restore",
+ "--help",
+ ])
+ .unwrap_err();
+ assert_eq!(error.kind(), rhi::RhiCliV1ErrorKind::HelpRequested);
+ let help = error.help_text().unwrap();
+ assert!(help.len() <= 16 * 1024 && help.contains("rhi state restore"));
+ assert!(!help.contains("caller-private"));
+ assert!(!format!("{error} {error:?}").contains("Usage:"));
+ let malformed =
+ rhi::parse_rhi_cli_v1_from(["caller-private-program", "--caller-private-invalid"])
+ .unwrap_err();
+ assert_eq!(malformed.kind(), rhi::RhiCliV1ErrorKind::InvalidArguments);
+ assert!(malformed.help_text().is_none());
+ assert!(!format!("{malformed} {malformed:?}").contains("caller-private"));
+}
+
+#[test]
+fn malformed_arguments_keep_the_exact_redacted_process_result() {
+ let root = tempfile::tempdir().unwrap();
+ let output = output(
+ Command::new(env!("CARGO_BIN_EXE_rhi")).arg("--caller-private-invalid"),
+ root.path(),
+ );
+ assert_eq!(output.status.code(), Some(2));
+ assert!(output.stdout.is_empty());
+ assert_eq!(output.stderr, b"{\"schema\":\"radroots.rhi.log.v1\",\"contract_version\":1,\"service\":\"rhi\",\"level\":\"error\",\"event\":\"process_result\",\"code\":\"input_or_configuration\",\"exit_code\":2}\n");
+ assert!(std::fs::read_dir(root.path()).unwrap().next().is_none());
+}
diff --git a/tests/package_boundary.rs b/tests/package_boundary.rs
@@ -603,7 +603,7 @@ fn doctor_and_process_results_are_closed_bounded_and_process_safe() {
}
assert!(
MANIFEST.contains(
- "tokio = { version = \"1\", default-features = false, features = [\"io-util\", \"macros\", \"net\", \"rt-multi-thread\", \"signal\", \"sync\", \"time\"] }"
+ "tokio = { version = \"1.53.3\", default-features = false, features = [\"io-util\", \"macros\", \"net\", \"rt-multi-thread\", \"signal\", \"sync\", \"time\"] }"
)
);
assert!(MANIFEST.contains(
diff --git a/tests/services_hardening_admin_wave_qualification.rs b/tests/services_hardening_admin_wave_qualification.rs
@@ -121,7 +121,7 @@ fn qualification_is_executable_source_locked_and_authority_safe() {
.all(|byte| byte.is_ascii_hexdigit() && !byte.is_ascii_uppercase())
);
assert_eq!(revision, "053d0c750bf9cd683c6ea37cefe7e79617ba629f");
- assert!(MANIFEST.contains("rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\""));
+ assert!(MANIFEST.contains("rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\""));
assert!(
MANIFEST
.contains("radroots_service_host = { git = \"https://github.com/radrootslabs/lib\"")
diff --git a/tests/services_hardening_failure_qualification.rs b/tests/services_hardening_failure_qualification.rs
@@ -180,7 +180,7 @@ fn historical_source_lock_binds_the_shared_sqlite_failure_corpus() {
.expect("Lib revision");
assert_eq!(revision, "053d0c750bf9cd683c6ea37cefe7e79617ba629f");
assert!(MANIFEST.contains(
- "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\""
+ "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\""
));
assert_eq!(
contract["source_locked_shared_sqlite_corpus"],
diff --git a/tests/services_hardening_native_release.rs b/tests/services_hardening_native_release.rs
@@ -20,7 +20,7 @@ const SYSTEMD_UNIT: &str = include_str!("../packaging/systemd/rhi@.service");
const RELEASE_ACCEPTANCE: &str = include_str!("../scripts/release-acceptance.sh");
const XTASK_MANIFEST: &str = include_str!("../tools/xtask/Cargo.toml");
-const LIB_REVISION: &str = "4b4aa8a7feaab08492c3f596df9182070ee8d814";
+const LIB_REVISION: &str = "05ad0ff0f521535f7649027d4f3391e6464f7fa1";
const LIB_REPOSITORY: &str = "https://github.com/radrootslabs/lib";
#[test]
@@ -288,7 +288,7 @@ fn every_radroots_dependency_is_exactly_source_locked() {
assert!(source.contains(&format!("?rev={LIB_REVISION}#{LIB_REVISION}")));
for required in [
- "url = \"github:radrootslabs/lib/4b4aa8a7feaab08492c3f596df9182070ee8d814\";",
+ "url = \"github:radrootslabs/lib/05ad0ff0f521535f7649027d4f3391e6464f7fa1\";",
"systems = lib.lib.supportedSystems;",
"nixosModules.default",
] {
diff --git a/tests/services_hardening_process.rs b/tests/services_hardening_process.rs
@@ -720,7 +720,7 @@ fn process_qualification_contract_freezes_the_exact_wave_closure() {
lower_hex(&Sha256::digest(FAILURE_QUALIFICATION_CONTRACT)),
contract["component_qualification"]["sha256"]
);
- assert!(SOURCE_LOCK.contains("revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\""));
+ assert!(SOURCE_LOCK.contains("revision = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\""));
}
#[test]
diff --git a/tests/services_hardening_state_catalog.rs b/tests/services_hardening_state_catalog.rs
@@ -579,7 +579,7 @@ fn secret_object() -> SchemaObject {
#[test]
fn catalog_source_is_pure_pinned_and_uses_only_the_shared_authority() {
assert!(MANIFEST.contains(
- "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
assert!(LIB_SOURCE.contains("mod state_catalog;"));
assert!(!LIB_SOURCE.contains("pub mod state_catalog;"));
diff --git a/tests/services_hardening_wave_100_a.rs b/tests/services_hardening_wave_100_a.rs
@@ -52,7 +52,7 @@ fn wave_one_removed_files_remain_absent_with_current_source_binding() {
"schema = \"radroots.service.source_lock.v4\"\ncontract_version = 4\nservice = \"rhi\"\n"
));
assert!(SOURCE_LOCK.contains("material = \"bound\""));
- assert!(SOURCE_LOCK.contains("lib_revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\""));
+ assert!(SOURCE_LOCK.contains("lib_revision = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\""));
}
#[test]
diff --git a/tests/source_guards.rs b/tests/source_guards.rs
@@ -43,7 +43,7 @@ fn rhi_manifest_exact_pins_radroots_contract() {
);
assert_eq!(
dependency.get("rev").and_then(toml::Value::as_str),
- Some("4b4aa8a7feaab08492c3f596df9182070ee8d814"),
+ Some("05ad0ff0f521535f7649027d4f3391e6464f7fa1"),
"RHI must source-lock {name} to the exact promoted Lib revision"
);
assert_eq!(