commit ff0bb738e138003a8c49dda4d34f673be6290c4b
parent 1e7dfb72bb40648d84cb33245a898a26cdd8186f
Author: triesap <tyson@radroots.org>
Date: Mon, 10 Aug 2026 21:06:10 +0000
source-lock: recognize service consumers
- Accept explicit Myc and RHI consumer-root identities.
- Keep generated artifact routes limited to SDK, mobile, and Studio products.
- Document the service-marker boundary in repository instructions.
- Prove both service markers validate while artifact routing fails closed.
Diffstat:
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/AGENTS.md b/AGENTS.md
@@ -27,6 +27,9 @@ This file exists for compatibility with tools that look for AGENTS.md.
Service-event source, registry, generated, and consumer work must implement
that exact kind, tag, cardinality, query, and supersession contract; it may
not reinterpret the reservation from current prototype wire behavior.
+- Source-lock consumer identities include `sdk`, `mobile`, `studio`, `myc`,
+ and `rhi`. Only the first three are generated-artifact product identities;
+ accepting a service consumer marker must not expose an artifact route.
- Current source and tests are implementation evidence. They do not silently
override `radroots.crates.release.v1`.
- Record any evidence-based plan deviation in
diff --git a/tools/xtask/src/build_control.rs b/tools/xtask/src/build_control.rs
@@ -93,8 +93,11 @@ impl ConsumerRoot {
.map_err(|error| format!("consumer marker is not UTF-8: {error}"))?
.trim()
.to_owned();
- if !matches!(product.as_str(), "sdk" | "mobile" | "studio") {
- return Err("consumer marker must contain sdk, mobile, or studio".to_owned());
+ if !matches!(
+ product.as_str(),
+ "sdk" | "mobile" | "studio" | "myc" | "rhi"
+ ) {
+ return Err("consumer marker must contain sdk, mobile, studio, myc, or rhi".to_owned());
}
let source_lock_path = canonical.join(SOURCE_LOCK_NAME);
let source_lock = parse_source_lock(&source_lock_path)?;
@@ -1163,6 +1166,16 @@ mod tests {
}
#[test]
+ fn source_lock_accepts_services_without_creating_artifact_routes() {
+ for product in ["myc", "rhi"] {
+ let fixture = Fixture::new(product);
+ let consumer = ConsumerRoot::open(&fixture.consumer).expect("valid service consumer");
+ assert_eq!(consumer.product, product);
+ assert!(validate_artifact_route(product, "linux", "rust").is_err());
+ }
+ }
+
+ #[test]
fn source_lock_supports_a_contained_nested_lockfile() {
let mut fixture = Fixture::new("studio");
let core = fixture.consumer.join("core");