rhi

Coordinated trade for connected markets
git clone https://radroots.dev/git/rhi.git
Log | Files | Refs | README | LICENSE

commit c9f31a3a7888c3bd55da31b199e3da1ceb3d8b37
parent fa61581f3aaa6e6714288ba06e7e94f5b6a43b01
Author: triesap <tyson@radroots.org>
Date:   Thu, 22 Oct 2026 01:15:10 +0000

build: align the verified shared provider inputs

- Pin the published provider without changing package versions or edges.
- Regenerate the exact service source lock and current fixture identities.
- Replace the fixture timing inference with observed socket-mode synchronization.
- Verify native runtime checks and actual Darwin and Linux Nix tests.

Diffstat:
MCargo.lock | 34+++++++++++++++++-----------------
MCargo.toml | 26+++++++++++++-------------
Mflake.lock | 8++++----
Mflake.nix | 4++--
Mradroots.service.source_lock.v4.toml | 10+++++-----
Mtests/build_policy.rs | 18+++++++++---------
Mtests/services_hardening_admin_wave_qualification.rs | 2+-
Mtests/services_hardening_failure_qualification.rs | 2+-
Mtests/services_hardening_native_release.rs | 4++--
Mtests/services_hardening_process.rs | 39+++++++++++++++++++++++++++++----------
Mtests/services_hardening_state_catalog.rs | 2+-
Mtests/services_hardening_wave_100_a.rs | 2+-
Mtests/source_guards.rs | 2+-
13 files changed, 86 insertions(+), 67 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -1835,7 +1835,7 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "radroots_blossom" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" 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=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "rust_decimal", "serde", @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "radroots_domain" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "radroots_identity", "zeroize", @@ -1865,7 +1865,7 @@ dependencies = [ [[package]] name = "radroots_event" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "hex", "jiff-tzdb", @@ -1883,7 +1883,7 @@ dependencies = [ [[package]] name = "radroots_event_codec" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "hex", "radroots_blossom", @@ -1900,7 +1900,7 @@ dependencies = [ [[package]] name = "radroots_identity" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "k256", "serde", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "radroots_nostr" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "nostr 0.44.7", "radroots_event", @@ -1925,7 +1925,7 @@ dependencies = [ [[package]] name = "radroots_protocol" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "radroots_identity", "serde", @@ -1936,7 +1936,7 @@ dependencies = [ [[package]] name = "radroots_runtime_paths" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "rustix", "serde", @@ -1946,7 +1946,7 @@ dependencies = [ [[package]] name = "radroots_secrets" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "chacha20poly1305", "serde", @@ -1958,7 +1958,7 @@ dependencies = [ [[package]] name = "radroots_service_host" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "bytes", "fs2", @@ -1979,7 +1979,7 @@ dependencies = [ [[package]] name = "radroots_service_sqlite" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "fs2", "futures", @@ -1997,7 +1997,7 @@ dependencies = [ [[package]] name = "radroots_storage" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "radroots_domain", "radroots_event", @@ -2012,7 +2012,7 @@ dependencies = [ [[package]] name = "radroots_trade" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "hex", "radroots_core", @@ -2026,7 +2026,7 @@ dependencies = [ [[package]] name = "radroots_transport" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "radroots_event", "radroots_identity", @@ -2037,7 +2037,7 @@ dependencies = [ [[package]] name = "radroots_transport_nostr" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "async-utility", "async-wsocket", @@ -2059,7 +2059,7 @@ dependencies = [ [[package]] name = "radroots_transport_nostr_native" version = "0.1.0-alpha" -source = "git+https://github.com/radrootslabs/lib?rev=a903133cdcd78b6a25687bd23c793d17d17b90c8#a903133cdcd78b6a25687bd23c793d17d17b90c8" +source = "git+https://github.com/radrootslabs/lib?rev=4b4aa8a7feaab08492c3f596df9182070ee8d814#4b4aa8a7feaab08492c3f596df9182070ee8d814" dependencies = [ "futures", "radroots_transport", 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 = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha", features = ["serde"] } -radroots_event_codec = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha", features = ["json"] } -radroots_nostr = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha", features = ["events"] } -radroots_protocol = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } -radroots_runtime_paths = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } -radroots_service_host = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } -radroots_service_sqlite = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } -radroots_storage = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha", default-features = false } -radroots_transport = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha", default-features = false, features = ["std"] } -radroots_transport_nostr = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } -radroots_transport_nostr_native = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } -radroots_secrets = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } -radroots_trade = { git = "https://github.com/radrootslabs/lib", rev = "a903133cdcd78b6a25687bd23c793d17d17b90c8", version = "=0.1.0-alpha" } +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" } chacha20poly1305 = { version = "0.10" } clap = { version = "4", features = ["derive"] } diff --git a/flake.lock b/flake.lock @@ -45,17 +45,17 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1792599601, - "narHash": "sha256-7md838KxMxBzdQNo6E4uGWzq3LyH6PGHgD/FMtjA/Wc=", + "lastModified": 1792626713, + "narHash": "sha256-THmBCeJQwtKKZaQQyjTIMfk/qw0WtuXAbo29QkkpU3Q=", "owner": "radrootslabs", "repo": "lib", - "rev": "a903133cdcd78b6a25687bd23c793d17d17b90c8", + "rev": "4b4aa8a7feaab08492c3f596df9182070ee8d814", "type": "github" }, "original": { "owner": "radrootslabs", "repo": "lib", - "rev": "a903133cdcd78b6a25687bd23c793d17d17b90c8", + "rev": "4b4aa8a7feaab08492c3f596df9182070ee8d814", "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/a903133cdcd78b6a25687bd23c793d17d17b90c8"; + url = "github:radrootslabs/lib/4b4aa8a7feaab08492c3f596df9182070ee8d814"; inputs.crane.follows = "crane"; }; nixpkgs.follows = "lib/nixpkgs"; @@ -130,7 +130,7 @@ buildInfo = { serviceVersion = "0.1.0"; serviceCommit = self.rev or "0000000000000000000000000000000000000000"; - libRevision = "a903133cdcd78b6a25687bd23c793d17d17b90c8"; + libRevision = "4b4aa8a7feaab08492c3f596df9182070ee8d814"; 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 = "a903133cdcd78b6a25687bd23c793d17d17b90c8" +revision = "4b4aa8a7feaab08492c3f596df9182070ee8d814" architecture = "radroots.crates.release.v2" workspace_catalog_sha256 = "424909855b2af1ffc8fa6bbfd5aa0e6d17642662c18212fef4660e71700fbfc8" version = "0.1.0-alpha" -source_archive_sha256 = "6b0bc8e7df9c4ad79db25f33b6105d14452b3f57571f2f5bd225fa46440bfef7" -cargo_lock_sha256 = "b31471c5b905c18a3d98b67f573f731d05ef2baacb32657a7f803a8f97913e2e" +source_archive_sha256 = "3037aeae84b071a1dd04e215de5b4d21cf36065348bd5eed158d8cedd69fcfef" +cargo_lock_sha256 = "e2fcc8dccc0da3019c619bca420e2321a0f895fd90b2e1c0fb3b095e05af11c5" rust_version = "1.99.0" host_feature_profile = "service-host" @@ -33,12 +33,12 @@ trailer = "two_zero_blocks" [nix] material = "bound" -lib_revision = "a903133cdcd78b6a25687bd23c793d17d17b90c8" +lib_revision = "4b4aa8a7feaab08492c3f596df9182070ee8d814" supported_systems = ["aarch64-darwin", "x86_64-linux"] [nix.public_input_lock] path = "flake.lock" -sha256 = "08533633e0cb307e0881c2649b7e83cabaaf227ee6535d62f4ee4c3ae31fd383" +sha256 = "e8665a3e37ca57e14b08c7ba670566a8d70ffbbecd2a4f4af361961b354ffdc9" binding = "exact_regular_file_bytes" mutable_reference = "forbidden" lib_input = "lib" 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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\", version = \"=0.1.0-alpha\" }}" + "{dependency} = {{ git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", 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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\", version = \"=0.1.0-alpha\" }" + "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", 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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\", version = \"=0.1.0-alpha\", default-features = false }" + "radroots_storage = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", 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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\", version = \"=0.1.0-alpha\", default-features = false, features = [\"std\"] }" + "radroots_transport = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\", default-features = false, features = [\"std\"] }" )); assert!(MANIFEST.contains( - "radroots_transport_nostr = { git = \"https://github.com/radrootslabs/lib\", rev = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\", version = \"=0.1.0-alpha\" }" + "radroots_transport_nostr = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", version = \"=0.1.0-alpha\" }" )); assert!(MANIFEST.contains( - "radroots_transport_nostr_native = { git = \"https://github.com/radrootslabs/lib\", rev = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\", version = \"=0.1.0-alpha\" }" + "radroots_transport_nostr_native = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", 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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\"")); + assert!(SOURCE_LOCK.contains("revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"")); assert!(SOURCE_LOCK.contains( "workspace_catalog_sha256 = \"424909855b2af1ffc8fa6bbfd5aa0e6d17642662c18212fef4660e71700fbfc8\"" )); assert!(SOURCE_LOCK.contains( - "source_archive_sha256 = \"6b0bc8e7df9c4ad79db25f33b6105d14452b3f57571f2f5bd225fa46440bfef7\"" + "source_archive_sha256 = \"3037aeae84b071a1dd04e215de5b4d21cf36065348bd5eed158d8cedd69fcfef\"" )); assert!(SOURCE_LOCK.contains( - "[nix]\nmaterial = \"bound\"\nlib_revision = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\"\nsupported_systems = [\"aarch64-darwin\", \"x86_64-linux\"]\n" + "[nix]\nmaterial = \"bound\"\nlib_revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"\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/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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\"")); + assert!(MANIFEST.contains("rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"")); 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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\"" + "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"" )); 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 = "a903133cdcd78b6a25687bd23c793d17d17b90c8"; +const LIB_REVISION: &str = "4b4aa8a7feaab08492c3f596df9182070ee8d814"; 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/a903133cdcd78b6a25687bd23c793d17d17b90c8\";", + "url = \"github:radrootslabs/lib/4b4aa8a7feaab08492c3f596df9182070ee8d814\";", "systems = lib.lib.supportedSystems;", "nixosModules.default", ] { diff --git a/tests/services_hardening_process.rs b/tests/services_hardening_process.rs @@ -101,6 +101,14 @@ impl Drop for RelayHarness { } fn relay_session(stream: TcpStream, stop: &AtomicBool) { + relay_session_when_ready(stream, stop, || true); +} + +fn relay_session_when_ready( + stream: TcpStream, + stop: &AtomicBool, + handshake_ready: impl FnOnce() -> bool, +) { // Accepted sockets can inherit the listener's nonblocking mode on macOS. // This fixture uses blocking tungstenite with explicit I/O deadlines. stream @@ -112,6 +120,9 @@ fn relay_session(stream: TcpStream, stop: &AtomicBool) { stream .set_write_timeout(Some(RELAY_HANDSHAKE_TIMEOUT)) .expect("relay handshake write timeout"); + if !handshake_ready() { + return; + } let mut websocket = match accept(stream) { Ok(websocket) => websocket, Err(_) => return, @@ -195,21 +206,27 @@ fn loopback_relay_waits_for_delayed_upgrade_on_an_inherited_nonblocking_socket() let (server, _) = listener.accept().expect("accepted regression socket"); // Exercise inherited nonblocking mode explicitly on every platform. server.set_nonblocking(true).expect("inherited socket mode"); + let observed_server = server.try_clone().expect("observe accepted socket mode"); let stop = Arc::new(AtomicBool::new(false)); let session_stop = Arc::clone(&stop); - let (finished, completion) = std::sync::mpsc::channel(); + let (ready, configured) = std::sync::mpsc::sync_channel(0); + let (resume, released) = std::sync::mpsc::sync_channel(0); let session = thread::spawn(move || { - relay_session(server, &session_stop); - let _ = finished.send(()); + relay_session_when_ready(server, &session_stop, || { + ready.send(()).is_ok() && released.recv_timeout(PROCESS_DEADLINE).is_ok() + }); }); - let waiting = matches!( - completion.recv_timeout(Duration::from_millis(50)), - Err(std::sync::mpsc::RecvTimeoutError::Timeout) - ); let response = (|| -> Result<Message, String> { - if !waiting { - return Err("relay discarded an upgrade before the client sent it".to_owned()); + configured + .recv_timeout(PROCESS_DEADLINE) + .map_err(|error| error.to_string())?; + // Observe the actual shared socket flags before sending upgrade bytes. + // A timed absence of completion is not evidence under scheduler load. + let flags = rustix::fs::fcntl_getfl(&observed_server).map_err(|error| error.to_string())?; + if flags.contains(rustix::fs::OFlags::NONBLOCK) { + return Err("relay retained inherited nonblocking mode".to_owned()); } + resume.send(()).map_err(|error| error.to_string())?; let (mut socket, _) = tungstenite::client(format!("ws://{address}/delayed"), client) .map_err(|error| error.to_string())?; socket @@ -218,6 +235,8 @@ fn loopback_relay_waits_for_delayed_upgrade_on_an_inherited_nonblocking_socket() socket.read().map_err(|error| error.to_string()) })(); stop.store(true, Ordering::SeqCst); + drop(resume); + drop(configured); session.join().expect("joined regression relay"); assert_eq!( response.expect("delayed upgrade and request succeed"), @@ -701,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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\"")); + assert!(SOURCE_LOCK.contains("revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"")); } #[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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\", version = \"=0.1.0-alpha\" }" + "radroots_service_sqlite = { git = \"https://github.com/radrootslabs/lib\", rev = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\", 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 = \"a903133cdcd78b6a25687bd23c793d17d17b90c8\"")); + assert!(SOURCE_LOCK.contains("lib_revision = \"4b4aa8a7feaab08492c3f596df9182070ee8d814\"")); } #[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("a903133cdcd78b6a25687bd23c793d17d17b90c8"), + Some("4b4aa8a7feaab08492c3f596df9182070ee8d814"), "RHI must source-lock {name} to the exact promoted Lib revision" ); assert_eq!(