lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit 4be7f9147a04bb531cc5ffb45a27b57256fe11af
parent 30296cde7fa95391d89d1e2d96211df1e3fd03e7
Author: triesap <tyson@radroots.org>
Date:   Thu, 15 Oct 2026 21:59:44 +0000

build: require Rust 1.99 for the active library minimum

- Align current package, catalog and native qualification compiler minimums.
- Preserve the original release specification and its frozen compiler identity.
- Share exact compiler admission and deduplicate identical qualification lanes.
- Regenerate current catalog projections and retain compiler drift controls.

Diffstat:
MCargo.toml | 2+-
Mcontracts/architecture/deviations.toml | 29+++++++++++++++++++++++++++++
Mcontracts/crates/catalog.v2.toml | 2+-
Mcontracts/crates/generated/package_groups.v1.toml | 2+-
Mcontracts/crates/generated/platform_inventory.v1.toml | 2+-
Mcontracts/crates/generated/release_inventory.v2.toml | 2+-
Mcontracts/releases/target_matrix.toml | 2+-
Mtools/xtask/src/architecture.rs | 52+++++++++++++++++++++++++++++++++++++---------------
Mtools/xtask/src/architecture/decision_package.rs | 4++--
Mtools/xtask/src/catalog.rs | 13++++++++++++-
Mtools/xtask/src/target_qualification.rs | 27+++++++++++++++++++--------
11 files changed, 105 insertions(+), 32 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml @@ -79,7 +79,7 @@ resolver = "3" [workspace.package] version = "0.1.0-alpha" edition = "2024" -rust-version = "1.97.1" +rust-version = "1.99.0" license = "MIT OR Apache-2.0" repository = "https://github.com/radrootslabs/lib" homepage = "https://radroots.org" diff --git a/contracts/architecture/deviations.toml b/contracts/architecture/deviations.toml @@ -1,6 +1,35 @@ schema_version = 1 architecture_id = "radroots.crates.release.v1" + +[[deviation]] +id = "RCRV1-DEV-040" +date = "2026-10-15" +status = "closed" +approval = "The user approved the complete shared SDK refactor, exact stable and MSRV Rust 1.99.0 across active inputs, and all local verified implementation checkpoints. Publication and host toolchain removal remain separately unauthorized." +affected_steps = ["030", "130"] +spec_anchors = ["contracts/crates/release_v1/radroots_crates_release_v1.toml#repository_policy", "contracts/crates/release_v1/radroots_crates_release_v1.toml#release_policy"] +source_evidence = [ + "The active development selector already chooses1.99.0, but Cargo/catalog MSRV and target qualification still select1.97.1; architecture and catalog guards reject the approved new minimum.", + "The approved shared_sdk_refactor.v1 decision requires exact stable/MSRV1.99.0 and preserves historical receipts and dedicated nightly/SP1 identities. ReleaseV1 and original consolidation baselines are immutable history, not the active successor compiler minimum.", +] +replacement_action = "Apply the approved current minimum to Cargo, catalog and target qualification; distinguish it from the unchanged frozenReleaseV1 compiler identity in architecture/public-metadata admission. Share the exact current compiler policy among those validators, reject old/floating compiler drift, avoid duplicate identical compiler runs, and regenerate only current catalog projections through their owning producer. Keep all imported/native provenance, dependencies, frozen specs, original receipts and unrelated source unchanged." +verification = [ + "Validate the prospective deviation before implementation. Bind existing architecture/catalog/target test purposes and exact original source under the retained-test register; keep all existing tests and add current-minimum/frozen-history denial controls.", + "Retain actual focused unchanged-guard failures for the new policy cases, then prove the same source cases pass with current compiler/source changes. Do not reinterpret frozen history or the prior MSRV PASS.", + "Run exact1.99 locked all-feature/all-target xtask check/tests, strictClippy, formatting, owning catalog write/check, architecture and contract validation. Prove unchanged Cargo.lock/package identities and original frozen artifacts; inspect the exact generated delta before a local commit.", +] +unresolved_risk = "This contained Lib policy migration does not qualify all native/WASM/iOS/browser products, source-lock/artifact generators, other capsule or root consumers, acquisition images/Nix inputs, final supported matrix, publication/adoption or host removal. Those remain required in the owning030/130units." +normative_architecture_change = true +adr_required = true + +closure_evidence = [ + "The prospective deviation passed the existing architecture command before implementation. Four focused current-minimum/history/target cases fail against unchanged policy. All four exact test-function bodies remain byte-identical through green qualification; no existing test is removed or newly ignored.", + "Current Cargo/catalog/MSRV and target qualification now require exact1.99.0, sharing the current compiler constant with standalone target admission. Architecture independently checks the unchanged originalReleaseV1 minimum1.97.1; public package metadata uses the successor current minimum. Identical current/MSRV compiler lanes execute once.", + "Exact Rust1.99.0 all-feature/all-target xtask checking and603passing tests, strictClippy, formatting, owning catalog write/check, architecture and complete contract validation passed locally. The same two pre-existing canonical native/WASM generator tests remain ignored. Actual metadata shows all51workspace packages at1.99.0/edition2024; the installed compiler release and commit were captured.", + "Cargo.lock, the exact frozenReleaseV1 artifact set, original consolidation baseline/steps, current selector components/target and all51catalog package/provenance/dependency identities remain unchanged. Source-owned generation changes only the catalog SHA in three current projections. Other stable inputs, acquisition, source-lock/artifact emitters, actual whole product matrix, final consumer adoption and host removal remain open in030/130. Final closed-deviation architecture/source review is required before local commit.", +] + [[deviation]] id = "RCRV1-DEV-039" date = "2026-10-15" diff --git a/contracts/crates/catalog.v2.toml b/contracts/crates/catalog.v2.toml @@ -3,7 +3,7 @@ schema = "radroots.workspace.catalog.v2" architecture = "radroots.crates.release.v2" consolidation = "radroots.rust.consolidation.v1" version = "0.1.0-alpha" -rust_version = "1.97.1" +rust_version = "1.99.0" edition = "2024" resolver = "3" public_package_count = 19 diff --git a/contracts/crates/generated/package_groups.v1.toml b/contracts/crates/generated/package_groups.v1.toml @@ -1,5 +1,5 @@ schema = "radroots.workspace.package-groups.v1" -catalog_sha256 = "ee295f2352e2577a4052d980624415aec9871197d4fc9910a4c21c83a9179200" +catalog_sha256 = "f6f0d6af573b28e5b5bf7c6862d26ba6a5583d5674149fb4e96f8a6630b51735" [[group]] id = "boundaries" diff --git a/contracts/crates/generated/platform_inventory.v1.toml b/contracts/crates/generated/platform_inventory.v1.toml @@ -1,5 +1,5 @@ schema = "radroots.workspace.platform-inventory.v1" -catalog_sha256 = "ee295f2352e2577a4052d980624415aec9871197d4fc9910a4c21c83a9179200" +catalog_sha256 = "f6f0d6af573b28e5b5bf7c6862d26ba6a5583d5674149fb4e96f8a6630b51735" [[platform]] id = "any" diff --git a/contracts/crates/generated/release_inventory.v2.toml b/contracts/crates/generated/release_inventory.v2.toml @@ -1,5 +1,5 @@ schema = "radroots.workspace.release-inventory.v2" -catalog_sha256 = "ee295f2352e2577a4052d980624415aec9871197d4fc9910a4c21c83a9179200" +catalog_sha256 = "f6f0d6af573b28e5b5bf7c6862d26ba6a5583d5674149fb4e96f8a6630b51735" architecture = "radroots.crates.release.v2" version = "0.1.0-alpha" public_packages = ["radroots", "radroots_blossom", "radroots_core", "radroots_event", "radroots_event_codec", "radroots_geonames", "radroots_identity", "radroots_nostr", "radroots_nostr_connect", "radroots_protocol", "radroots_sdk", "radroots_secrets", "radroots_signing", "radroots_storage", "radroots_storage_sqlite", "radroots_sync", "radroots_trade", "radroots_transport", "radroots_transport_nostr"] diff --git a/contracts/releases/target_matrix.toml b/contracts/releases/target_matrix.toml @@ -1,5 +1,5 @@ schema_version = 1 -msrv_toolchain = "1.97.1" +msrv_toolchain = "1.99.0" current_toolchain = "1.99.0" [[operating_system]] diff --git a/tools/xtask/src/architecture.rs b/tools/xtask/src/architecture.rs @@ -12,6 +12,9 @@ mod decision_package; mod dependency_boundary; mod retired_compatibility; +pub(crate) const STABLE_TOOLCHAIN: &str = "1.99.0"; +const FROZEN_V1_MSRV: &str = "1.97.1"; + const DEVIATIONS_RELATIVE: &str = "contracts/architecture/deviations.toml"; const ARCHITECTURE_RELATIVE: &str = "contracts/crates/release_v1/radroots_crates_release_v1.toml"; const ARCHITECTURE_ID: &str = "radroots.crates.release.v1"; @@ -214,12 +217,13 @@ fn validate_workspace_toolchain( manifest.workspace.resolver, architecture.resolver )); } - if manifest.workspace.package.rust_version != architecture.rust_version - || architecture.rust_version != "1.97.1" - { + if architecture.rust_version != FROZEN_V1_MSRV { + return Err("frozen release-v1 compiler identity must remain unchanged".to_owned()); + } + if manifest.workspace.package.rust_version != STABLE_TOOLCHAIN { return Err(format!( - "workspace rust-version {} must match architecture rust_version {}", - manifest.workspace.package.rust_version, architecture.rust_version + "workspace rust-version {} must match current minimum {STABLE_TOOLCHAIN}", + manifest.workspace.package.rust_version )); } let workspace_package = &manifest.workspace.package; @@ -306,10 +310,10 @@ fn validate_workspace_toolchain( .get("toolchain") .and_then(|value| value.get("channel")) .and_then(toml::Value::as_str); - if channel != Some("1.99.0") { - return Err( - "rust-toolchain.toml channel must match development compiler 1.99.0".to_owned(), - ); + if channel != Some(STABLE_TOOLCHAIN) { + return Err(format!( + "rust-toolchain.toml channel must match current compiler {STABLE_TOOLCHAIN}" + )); } Ok(()) } @@ -394,7 +398,7 @@ fn validate_public_package_metadata( package, "rust-version", &workspace.workspace.package.rust_version, - &architecture.rust_version, + STABLE_TOOLCHAIN, name, )?; validate_public_manifest_field( @@ -1290,7 +1294,7 @@ adr_required = false fn complete_workspace_manifest(members: &str) -> String { format!( - "[workspace]\nmembers = [{members}]\nresolver = \"3\"\n\n[workspace.package]\nversion = \"0.1.0\"\nedition = \"2024\"\nrust-version = \"1.97.1\"\nlicense = \"MIT OR Apache-2.0\"\nrepository = \"https://github.com/radrootslabs/sdk\"\nhomepage = \"https://radroots.org\"\nreadme = \"README\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\n\n[workspace.metadata.radroots.public-package]\nversion = \"0.1.0\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\nreadme = \"README.md\"\n\n[workspace.lints.rust]\nunsafe_code = \"deny\"\n\n[workspace.lints.rustdoc]\nbroken_intra_doc_links = \"deny\"\n\n[workspace.lints.clippy]\ndbg_macro = \"deny\"\ntodo = \"deny\"\nunimplemented = \"deny\"\n" + "[workspace]\nmembers = [{members}]\nresolver = \"3\"\n\n[workspace.package]\nversion = \"0.1.0\"\nedition = \"2024\"\nrust-version = \"1.99.0\"\nlicense = \"MIT OR Apache-2.0\"\nrepository = \"https://github.com/radrootslabs/sdk\"\nhomepage = \"https://radroots.org\"\nreadme = \"README\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\n\n[workspace.metadata.radroots.public-package]\nversion = \"0.1.0\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\nreadme = \"README.md\"\n\n[workspace.lints.rust]\nunsafe_code = \"deny\"\n\n[workspace.lints.rustdoc]\nbroken_intra_doc_links = \"deny\"\n\n[workspace.lints.clippy]\ndbg_macro = \"deny\"\ntodo = \"deny\"\nunimplemented = \"deny\"\n" ) } @@ -1344,14 +1348,14 @@ adr_required = false } fs::write( root.join("Cargo.toml"), - "[workspace]\nmembers = [\"crates/a\", \"tools/xtask\"]\nresolver = \"3\"\n\n[workspace.package]\nrust-version = \"1.97.1\"\n", + "[workspace]\nmembers = [\"crates/a\", \"tools/xtask\"]\nresolver = \"3\"\n\n[workspace.package]\nrust-version = \"1.99.0\"\n", ) .expect("write complete workspace"); validate_workspace_members(&root).expect("complete membership"); fs::write( root.join("Cargo.toml"), - "[workspace]\nmembers = [\"tools/xtask\"]\nresolver = \"3\"\n\n[workspace.package]\nrust-version = \"1.97.1\"\n", + "[workspace]\nmembers = [\"tools/xtask\"]\nresolver = \"3\"\n\n[workspace.package]\nrust-version = \"1.99.0\"\n", ) .expect("write incomplete workspace"); let error = validate_workspace_members(&root).expect_err("missing member must fail"); @@ -1416,8 +1420,26 @@ adr_required = false "[toolchain]\nchannel = \"1.99.0\"\n", ) .expect("write toolchain"); - let architecture = architecture(); - validate_workspace_toolchain(&root, &architecture).expect("exact toolchain policy"); + let mut architecture = architecture(); + assert_eq!(architecture.rust_version, "1.97.1"); + validate_workspace_toolchain(&root, &architecture).expect("exact current toolchain policy"); + + for minimum in ["1.97.1", "1.98.0", "stable", "1.100.0"] { + let manifest = complete_workspace_manifest("").replace("1.99.0", minimum); + fs::write(root.join("Cargo.toml"), manifest).expect("write wrong current minimum"); + assert!( + validate_workspace_toolchain(&root, &architecture).is_err(), + "accepted wrong current minimum {minimum}" + ); + } + fs::write(root.join("Cargo.toml"), complete_workspace_manifest("")) + .expect("restore current minimum"); + architecture.rust_version = "1.99.0".to_owned(); + assert!( + validate_workspace_toolchain(&root, &architecture).is_err(), + "accepted relabeled frozen release minimum" + ); + architecture.rust_version = "1.97.1".to_owned(); fs::write( root.join("rust-toolchain.toml"), diff --git a/tools/xtask/src/architecture/decision_package.rs b/tools/xtask/src/architecture/decision_package.rs @@ -240,8 +240,8 @@ fn validate_bytes(raw: &[u8]) -> Result<(), String> { fn validate_ownership(p: &Policy) -> Result<(), String> { require( p.toolchain.edition == "2024" - && p.toolchain.stable == "1.99.0" - && p.toolchain.msrv == "1.99.0" + && p.toolchain.stable == super::STABLE_TOOLCHAIN + && p.toolchain.msrv == super::STABLE_TOOLCHAIN && p.toolchain.historical_receipts_immutable && p.toolchain.dedicated_nightly_and_sp1_separate, "exact compiler target drift", diff --git a/tools/xtask/src/catalog.rs b/tools/xtask/src/catalog.rs @@ -303,7 +303,7 @@ fn validate_catalog(catalog: &Catalog) -> Result<(), String> { || catalog.architecture != RELEASE_ID || catalog.consolidation != CONSOLIDATION_ID || catalog.version != VERSION - || catalog.rust_version != "1.97.1" + || catalog.rust_version != crate::architecture::STABLE_TOOLCHAIN || catalog.edition != "2024" || catalog.resolver != "3" || catalog.public_package_count != 19 @@ -1747,6 +1747,17 @@ mod tests { } #[test] + fn catalog_rejects_obsolete_and_floating_compiler_minimum() { + let mut catalog = checked_in_catalog(); + catalog.rust_version = "1.99.0".to_owned(); + validate_catalog(&catalog).expect("exact current compiler minimum"); + for minimum in ["1.97.1", "1.98.0", "stable", "1.100.0"] { + catalog.rust_version = minimum.to_owned(); + assert!(validate_catalog(&catalog).is_err(), "accepted {minimum}"); + } + } + + #[test] fn catalog_rejects_version_visibility_license_and_retirement_drift() { let mut catalog = checked_in_catalog(); catalog diff --git a/tools/xtask/src/target_qualification.rs b/tools/xtask/src/target_qualification.rs @@ -1,4 +1,4 @@ -use std::{fs, path::Path, process::Command}; +use std::{collections::BTreeSet, fs, path::Path, process::Command}; use serde::Deserialize; @@ -32,7 +32,10 @@ struct CatalogPackage { pub fn run(workspace_root: &Path) -> Result<(), String> { let (matrix, packages) = load(workspace_root)?; - for toolchain in [&matrix.msrv_toolchain, &matrix.current_toolchain] { + for toolchain in [&matrix.msrv_toolchain, &matrix.current_toolchain] + .into_iter() + .collect::<BTreeSet<_>>() + { run_command( workspace_root, "rustup", @@ -105,10 +108,13 @@ fn validate(matrix: &TargetMatrix) -> Result<(), String> { matrix.schema_version )); } - if matrix.msrv_toolchain != "1.97.1" || matrix.current_toolchain != "1.99.0" { - return Err( - "target matrix must retain MSRV 1.97.1 and development compiler 1.99.0".to_owned(), - ); + if matrix.msrv_toolchain != crate::architecture::STABLE_TOOLCHAIN + || matrix.current_toolchain != crate::architecture::STABLE_TOOLCHAIN + { + return Err(format!( + "target matrix must select exact current/MSRV compiler {}", + crate::architecture::STABLE_TOOLCHAIN + )); } let expected = [ ( @@ -193,7 +199,7 @@ mod tests { .and_then(std::path::Path::parent) .expect("workspace root"); let (matrix, packages) = load(root).expect("target matrix"); - assert_eq!(matrix.msrv_toolchain, "1.97.1"); + assert_eq!(matrix.msrv_toolchain, "1.99.0"); assert_eq!(matrix.current_toolchain, "1.99.0"); assert_eq!(matrix.operating_system.len(), 2); assert_eq!( @@ -214,7 +220,7 @@ mod tests { fn unsupported_production_targets_are_rejected() { let mut matrix = TargetMatrix { schema_version: 1, - msrv_toolchain: "1.97.1".to_owned(), + msrv_toolchain: "1.99.0".to_owned(), current_toolchain: "1.99.0".to_owned(), operating_system: vec![ OperatingSystem { @@ -236,6 +242,11 @@ mod tests { assert!(validate(&matrix).is_err(), "accepted {toolchain}"); } matrix.current_toolchain = "1.99.0".to_owned(); + for toolchain in ["stable", "1.97.1", "1.98.0", "1.100.0"] { + matrix.msrv_toolchain = toolchain.to_owned(); + assert!(validate(&matrix).is_err(), "accepted minimum {toolchain}"); + } + matrix.msrv_toolchain = "1.99.0".to_owned(); for (name, target) in [ ("windows", "x86_64-pc-windows-gnu"), ("macos", "x86_64-apple-darwin"),