commit be6b479c8a62cb25b89791eaa7b0966b11603051
parent 18346a27d3db11dc82b5020d239e89ff5837f8b0
Author: triesap <tyson@radroots.org>
Date: Mon, 3 Aug 2026 12:56:35 +0000
facade: forbid a public radroots::sdk namespace
- Compile-fail the forbidden facade SDK namespace from packaged rustdoc.
- Keep the facade root limited to the curated client boundary exports.
- Assert the namespace contract remains present in primary documentation.
- Verify tests, doctests, strict Clippy, and architecture enforcement.
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/crates/radroots/README.md b/crates/radroots/README.md
@@ -82,5 +82,11 @@ implementations, coordinate FFI/mobile lifecycle, or inspect advanced
capability and diagnostics contracts. There is intentionally no
`radroots::sdk` namespace or wildcard SDK reexport.
+The namespace separation is a compiled contract:
+
+```compile_fail
+use radroots::sdk;
+```
+
The normative package charter is the [`radroots` release-v1
specification](../../docs/specs/radroots_crates_release_v1.md#19-radroots).
diff --git a/crates/radroots/tests/package_boundary.rs b/crates/radroots/tests/package_boundary.rs
@@ -3,6 +3,7 @@ use std::collections::BTreeSet;
const MANIFEST: &str = include_str!("../Cargo.toml");
const WORKSPACE: &str = include_str!("../../../Cargo.toml");
const ROOT: &str = include_str!("../src/lib.rs");
+const README: &str = include_str!("../README.md");
#[test]
fn package_has_final_identity_and_exact_dependencies() {
@@ -53,6 +54,7 @@ fn root_has_exact_exports_and_no_sdk_namespace() {
assert!(!ROOT.contains("pub mod sdk"));
assert!(!ROOT.contains("pub use radroots_sdk::*"));
assert_eq!(ROOT.matches("pub use ").count(), 1);
+ assert!(README.contains("```compile_fail\nuse radroots::sdk;\n```"));
}
#[test]