commit c14b370ce9d965827fb9470bc977c1457330fe26
parent 590cf05f2808eeaac77a0196078d5d9dabb82cd4
Author: triesap <tyson@radroots.org>
Date: Fri, 23 Oct 2026 20:52:13 +0000
build: adopt the shared provider and return help before Myc startup
- Bind Cargo, Nix and generated V4 inputs to the published shared source.
- Select patched runtime dependencies and preserve explicit audit review debt.
- Return bounded static help before configuration and retain redacted failures.
- Verify the curated API, native regressions and actual platform artifacts.
Diffstat:
15 files changed, 212 insertions(+), 82 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -1495,9 +1495,9 @@ dependencies = [
[[package]]
name = "mio"
-version = "1.2.0"
+version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
+checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee"
dependencies = [
"libc",
"wasi",
@@ -1898,7 +1898,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",
@@ -1910,7 +1910,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",
@@ -1919,8 +1919,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",
]
@@ -1928,7 +1929,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",
@@ -1946,7 +1947,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",
@@ -1963,7 +1964,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",
@@ -1973,7 +1974,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",
@@ -1988,7 +1989,7 @@ dependencies = [
[[package]]
name = "radroots_nostr_connect"
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",
@@ -2004,7 +2005,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",
@@ -2015,7 +2016,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",
@@ -2025,7 +2026,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",
@@ -2037,7 +2038,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",
@@ -2058,7 +2059,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",
@@ -2076,7 +2077,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",
@@ -2091,7 +2092,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 = [
"radroots_core",
"radroots_event",
@@ -2101,7 +2102,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",
@@ -2112,7 +2113,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",
@@ -2134,7 +2135,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",
@@ -2847,9 +2848,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.51.0"
+version = "1.53.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bd1c4c0fc4a7ab90fc15ef6daaa3ec3b893f004f915f2392557ed23237820cd"
+checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e"
dependencies = [
"bytes",
"libc",
@@ -2872,13 +2873,13 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "2.7.0"
+version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
+checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.117",
+ "syn 3.0.3",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
@@ -58,24 +58,24 @@ futures-executor = "0.3"
hex = "0.4"
jsonschema = { version = "0.48.1", default-features = false }
nostr = { version = "0.44.2", features = ["nip04", "nip44", "nip46", "nip49"] }
-radroots_identity = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_nostr = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", features = ["events"] }
-radroots_nostr_connect = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha" }
-radroots_event_codec = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", features = ["json"] }
-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_secrets = { git = "https://github.com/radrootslabs/lib", rev = "4b4aa8a7feaab08492c3f596df9182070ee8d814", version = "=0.1.0-alpha", features = ["std"] }
-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 }
-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_identity = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_nostr = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", features = ["events"] }
+radroots_nostr_connect = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha" }
+radroots_event_codec = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", features = ["json"] }
+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_secrets = { git = "https://github.com/radrootslabs/lib", rev = "05ad0ff0f521535f7649027d4f3391e6464f7fa1", version = "=0.1.0-alpha", features = ["std"] }
+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 }
+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" }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["raw_value"] }
sha2 = "0.10"
sqlx = { version = "0.9.0", default-features = false, features = ["derive", "sqlite-bundled"] }
rustix = { version = "1", features = ["fs", "process", "std"] }
-tokio = { version = "1.48", 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"] }
toml = "0.8"
url = "2.5"
zeroize = "1.8"
diff --git a/contracts/api_baselines/myc.txt b/contracts/api_baselines/myc.txt
@@ -154,6 +154,7 @@ pub myc::MycCliPrimaryAuthorityV1::Daemon
pub myc::MycCliPrimaryAuthorityV1::LiveUnixAdmin
pub myc::MycCliPrimaryAuthorityV1::Offline
pub enum myc::MycCliV1ErrorKind
+pub myc::MycCliV1ErrorKind::HelpRequested
pub myc::MycCliV1ErrorKind::InvalidArguments
pub myc::MycCliV1ErrorKind::InvalidCommandInput
pub myc::MycCliV1ErrorKind::InvalidConfigPath
@@ -1018,7 +1019,8 @@ impl core::fmt::Debug for myc::MycCliInvocationV1
pub fn myc::MycCliInvocationV1::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub struct myc::MycCliV1Error
impl myc::MycCliV1Error
-pub const fn myc::MycCliV1Error::kind(self) -> myc::MycCliV1ErrorKind
+pub fn myc::MycCliV1Error::help_text(&self) -> core::option::Option<&str>
+pub const fn myc::MycCliV1Error::kind(&self) -> myc::MycCliV1ErrorKind
impl core::error::Error for myc::MycCliV1Error
impl core::fmt::Debug for myc::MycCliV1Error
pub fn myc::MycCliV1Error::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 myc --bin myc";
+ postInstall = ''
+ install -Dm444 ${lib.outPath}/crates/domain/NOTICE "$out/share/doc/myc/NOTICE"
+ '';
}
);
mkCargoCheck =
@@ -128,7 +131,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 = "myc"
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 = "9374bfa0d701e383a39aef265c73483e1423e702340d3b1981754a9f3cb0cfef"
+source_archive_sha256 = "c8c148f2e6007ac5ff13d2edb070bf8aff643661b9a03ff7ab1f75806ce15548"
+cargo_lock_sha256 = "4bc22845772c1b9290f9e172f4f7c9529fb61b5b754644eb2479ddc49a14b4b4"
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
@@ -300,6 +300,7 @@ impl fmt::Debug for MycCliExecutionPlanV1 {
/// Stable source-free classification for command-line admission failures.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MycCliV1ErrorKind {
+ HelpRequested,
InvalidArguments,
InvalidInstance,
InvalidRepoLocalRoot,
@@ -311,6 +312,7 @@ pub enum MycCliV1ErrorKind {
impl MycCliV1ErrorKind {
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",
@@ -323,22 +325,34 @@ impl MycCliV1ErrorKind {
}
}
-/// 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 MycCliV1Error {
kind: MycCliV1ErrorKind,
+ help_text: Option<Box<str>>,
}
impl MycCliV1Error {
const fn new(kind: MycCliV1ErrorKind) -> Self {
- Self { kind }
+ Self {
+ kind,
+ help_text: None,
+ }
}
/// Returns the stable failure classification.
#[must_use]
- pub const fn kind(self) -> MycCliV1ErrorKind {
+ pub const fn kind(&self) -> MycCliV1ErrorKind {
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 MycCliV1Error {
@@ -428,16 +442,26 @@ impl fmt::Debug for MycCliInvocationV1 {
/// Parses the exact hardened Myc bootstrap and command tree once.
///
-/// The iterator must include the program name as its first element. Clap's
-/// dependency-owned diagnostic is deliberately discarded so caller-controlled
-/// argument text cannot escape through this crate's stable error boundary.
+/// The iterator must include the program name as its first element. Only bounded
+/// static help is retained separately; all other dependency-owned diagnostics are
+/// discarded so caller-controlled argument text cannot escape the error boundary.
pub fn parse_myc_cli_v1_from<I, T>(arguments: I) -> Result<MycCliInvocationV1, MycCliV1Error>
where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
{
- let parsed = RawMycCliV1::try_parse_from(arguments)
- .map_err(|_| MycCliV1Error::new(MycCliV1ErrorKind::InvalidArguments))?;
+ let parsed = RawMycCliV1::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 MycCliV1Error {
+ kind: MycCliV1ErrorKind::HelpRequested,
+ help_text: Some(help.into_boxed_str()),
+ };
+ }
+ }
+ MycCliV1Error::new(MycCliV1ErrorKind::InvalidArguments)
+ })?;
let profile = parsed
.profile
.ok_or_else(|| MycCliV1Error::new(MycCliV1ErrorKind::InvalidArguments))?
@@ -572,7 +596,7 @@ fn valid_absolute_path(path: &Path, require_non_root: bool) -> bool {
}
#[derive(Parser)]
-#[command(name = "myc", disable_help_subcommand = true)]
+#[command(name = "myc", bin_name = "myc", disable_help_subcommand = true)]
struct RawMycCliV1 {
#[arg(long, global = true, value_enum)]
profile: Option<RawProfile>,
diff --git a/src/main.rs b/src/main.rs
@@ -1,6 +1,6 @@
#![forbid(unsafe_code)]
-use std::process::ExitCode;
+use std::{io::Write as _, process::ExitCode};
use myc::{MycLogRecord, MycProcessResult};
@@ -62,7 +62,15 @@ fn main() -> ExitCode {
eprintln!("{}", MycLogRecord::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 = MycProcessResult::InputOrConfiguration;
+ eprintln!("{}", MycLogRecord::process_result(result));
+ return result.exit_code();
+ }
let result = MycProcessResult::InputOrConfiguration;
eprintln!("{}", MycLogRecord::process_result(result));
result.exit_code()
diff --git a/supply-chain/config.toml b/supply-chain/config.toml
@@ -589,8 +589,9 @@ version = "0.8.9"
criteria = "safe-to-deploy"
[[exemptions.mio]]
-version = "1.2.0"
+version = "1.2.4"
criteria = "safe-to-deploy"
+notes = "Existing version-specific review debt advanced for the patched Tokio graph. Independent full-crate audit remains outstanding; current policy and runtime checks do not claim that audit. No advisory exception is added."
[[exemptions.negentropy]]
version = "0.5.1"
@@ -983,12 +984,14 @@ version = "0.1.1"
criteria = "safe-to-deploy"
[[exemptions.tokio]]
-version = "1.51.0"
+version = "1.53.3"
criteria = "safe-to-deploy"
+notes = "Existing version-specific review debt advanced for the patched Tokio graph. Independent full-crate audit remains outstanding; current policy and runtime checks do not claim that audit. No advisory exception is added."
[[exemptions.tokio-macros]]
-version = "2.7.0"
+version = "2.7.2"
criteria = "safe-to-deploy"
+notes = "Existing version-specific review debt advanced for the patched Tokio graph. Independent full-crate audit remains outstanding; current 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
@@ -23,42 +23,42 @@ fn service_host_is_the_exact_default_feature_profile() {
assert!(MANIFEST.contains("[features]\ndefault = [\"service-host\"]\nservice-host = []"));
assert!(!MANIFEST.contains("getrandom = \"0.2\""));
assert!(MANIFEST.contains(
- "tokio = { version = \"1.48\", 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\"] }"
));
}
#[test]
fn shared_runtime_paths_is_exactly_pinned_to_the_source_locked_lib() {
assert!(MANIFEST.contains(
- "radroots_runtime_paths = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_runtime_paths = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
}
#[test]
fn shared_identity_is_exactly_pinned_to_the_source_locked_lib() {
assert!(MANIFEST.contains(
- "radroots_identity = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_identity = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
}
#[test]
fn shared_service_host_is_exactly_pinned_to_the_source_locked_lib() {
assert!(MANIFEST.contains(
- "radroots_service_host = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_service_host = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
}
#[test]
fn shared_service_sqlite_is_exactly_pinned_to_the_source_locked_lib() {
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\" }"
));
}
#[test]
fn shared_storage_evidence_is_exactly_pinned_to_the_source_locked_lib() {
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 }"
));
}
@@ -72,7 +72,7 @@ fn delivery_dependencies_are_exactly_source_locked() {
] {
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\""
)),
"{dependency} is not pinned to the exact source lock"
);
@@ -100,15 +100,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(
- "[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.contains(
"workspace_catalog_sha256 = \"424909855b2af1ffc8fa6bbfd5aa0e6d17642662c18212fef4660e71700fbfc8\""
));
assert!(SOURCE_LOCK.contains(
- "source_archive_sha256 = \"3037aeae84b071a1dd04e215de5b4d21cf36065348bd5eed158d8cedd69fcfef\""
+ "source_archive_sha256 = \"c8c148f2e6007ac5ff13d2edb070bf8aff643661b9a03ff7ab1f75806ce15548\""
));
assert!(SOURCE_LOCK.ends_with(
"[contract_versions]\nconfig = 1\nstate = 12\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_myc"))
+ .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 = myc::parse_myc_cli_v1_from([
+ "caller-private-program",
+ "--instance",
+ "caller-private-instance",
+ "--config",
+ "/caller-private-path.toml",
+ "state",
+ "restore",
+ "--help",
+ ])
+ .unwrap_err();
+ assert_eq!(error.kind(), myc::MycCliV1ErrorKind::HelpRequested);
+ let help = error.help_text().unwrap();
+ assert!(help.len() <= 16 * 1024 && help.contains("myc state restore"));
+ assert!(!help.contains("caller-private"));
+ assert!(!format!("{error} {error:?}").contains("Usage:"));
+ let malformed =
+ myc::parse_myc_cli_v1_from(["caller-private-program", "--caller-private-invalid"])
+ .unwrap_err();
+ assert_eq!(malformed.kind(), myc::MycCliV1ErrorKind::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_myc")).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.myc.log.v1\",\"contract_version\":1,\"service\":\"myc\",\"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/services_hardening_local_signer_transport.rs b/tests/services_hardening_local_signer_transport.rs
@@ -84,7 +84,7 @@ fn machine_contract_freezes_the_complete_local_signer_transport() {
#[test]
fn implementation_uses_only_the_hardened_fixed_unix_admin_boundary() {
for required in [
- "radroots_service_host = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"",
+ "radroots_service_host = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\"",
"const MYC_LOCAL_SIGNER_ENDPOINT: &str = \"/v1/provider/operation\"",
"radroots_service_host::AdminClient",
".mutate::<_, LocalSignerResponse>(",
diff --git a/tests/services_hardening_native_release.rs b/tests/services_hardening_native_release.rs
@@ -17,7 +17,7 @@ const FLAKE_LOCK: &str = include_str!("../flake.lock");
const CARGO_CONFIG: &str = include_str!("../.cargo/config.toml");
const SYSTEMD_UNIT: &str = include_str!("../packaging/systemd/myc@.service");
-const LIB_REVISION: &str = "4b4aa8a7feaab08492c3f596df9182070ee8d814";
+const LIB_REVISION: &str = "05ad0ff0f521535f7649027d4f3391e6464f7fa1";
const LIB_REPOSITORY: &str = "https://github.com/radrootslabs/lib";
#[test]
@@ -274,7 +274,7 @@ fn every_radroots_dependency_is_exactly_source_locked() {
for required in [
"lib = {",
- "url = \"github:radrootslabs/lib/4b4aa8a7feaab08492c3f596df9182070ee8d814\";",
+ "url = \"github:radrootslabs/lib/05ad0ff0f521535f7649027d4f3391e6464f7fa1\";",
"inputs.crane.follows = \"crane\";",
"systems = lib.lib.supportedSystems;",
"nixosModules.default",
@@ -300,8 +300,8 @@ fn every_radroots_dependency_is_exactly_source_locked() {
"treefmt-nix": "treefmt-nix"
},
"locked": {
- "lastModified": 1792626713_u64,
- "narHash": "sha256-THmBCeJQwtKKZaQQyjTIMfk/qw0WtuXAbo29QkkpU3Q=",
+ "lastModified": 1792778501_u64,
+ "narHash": "sha256-q0uQg/AY3yo2adnro5xHm+vRy403tnRhXEo70yNr3eg=",
"owner": "radrootslabs",
"repo": "lib",
"rev": LIB_REVISION,
diff --git a/tests/services_hardening_runtime_context.rs b/tests/services_hardening_runtime_context.rs
@@ -288,7 +288,7 @@ fn unsupported_profile_platform_and_diagnostics_fail_safely() {
#[test]
fn shared_runtime_paths_are_the_only_path_policy_and_identity_authority() {
assert!(MANIFEST.contains(
- "radroots_runtime_paths = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }"
+ "radroots_runtime_paths = { git = \"https://github.com/radrootslabs/lib\", rev = \"05ad0ff0f521535f7649027d4f3391e6464f7fa1\", version = \"=0.1.0-alpha\" }"
));
assert!(LIB_SOURCE.contains("mod runtime_context;"));
assert!(!LIB_SOURCE.contains("pub mod runtime_context;"));
diff --git a/tests/services_hardening_state_catalog.rs b/tests/services_hardening_state_catalog.rs
@@ -469,7 +469,7 @@ fn catalog_errors_are_stable_source_free_and_redacted() {
#[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;"));