REQUEST_CHANGES (posted as comment; GitHub blocks self-review). Code is correct; one must-fix.
MUST-FIX 1: crumb verify FAILS at PR head 4c8dc36: '1 of 16 crumbs stale'. It passes on base 406a648. File mtimes show recall_native_report_test.rs (12:39) was saved before the .crumb compile (12:43), so something else still differs from the committed tree. Re-run crumb compile as the very last step and recommit.
Verified OK: spine.rs:2485-2490 fills compose_native/omega_sha from aien_omega_compose::LINKED / EXPECTED_OMEGA_SHA (lib.rs:23,25), empty in stub; control.rs serde(default) on both; no other behaviour or security default touched; startup line server.rs:265-272 prints STUB in stub build.
Stub: the 'not linked (stub build)' error is PRE-EXISTING (ComposeError::Unavailable Display, lib.rs:79, via open_home -> refusal, spine.rs:702-712). In a stub build no report is produced, so the new fill path is untested there; the stub arm only re-checks the old refusal text (weak, not wrong). Linked build asserts compose_native==LINKED, 40-hex, ==EXPECTED_OMEGA_SHA (new test and approved_daemon_ipc_test). Compat test deserializes a real old-shape JSON. Docs accurate.
Interplane adapter (pinned 4d4dfd4) only reads records_total from ComposeRecalled as json (compose_ledger.rs:371-396); extra fields harmless.
Independent review (Sonnet worker, VAC lane)
aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
GitHub aien-dev/aien-sovereign-core-mv#346 (code only)
Apply it
git checkout -b patch-271492af8cab6b4a d281a6096734d444aa6896f61e1c4a7b627f6126 curl -fsSL https://interplane.io/drakestapleton/aien-sovereign-core-mv/patches/271492af8cab6b4a.patch | git am
Provenance
github-import 1
aien-dev/aien-sovereign-core-mv
346
19bf64e9ec2de5fac5e95050c754a5836c79fb30
{"kind":"github-import","owner":"aien-dev","repo":"aien-sovereign-core-mv","number":346,"url":"https://github.com/aien-dev/aien-sovereign-core-mv/pull/346","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:52Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/.crumb b/.crumb index aa90c504..454a3b5f 100644 --- a/.crumb +++ b/.crumb @@ -77,14 +77,14 @@ } ], "children_root": "sha256:285ca7eafbe46d808ebe5e4fb533e464bfdf0fedaf3eef486ac2e2c8826baf6f", - "compiled_at": "2026-10-08T17:37:50Z", + "compiled_at": "2026-10-08T17:59:47Z", "compiler": "crumb-compile/1", - "digest": "sha256:370cd0f9db4c0b88bbe10fb0b5b4de2a546ba8effc132b69b1c3cc73a36dfa40", + "digest": "sha256:e3c54c6f21dc7bd6bb8e6b9e156fa37148bffd458b89c33cc7867e567cbde12c", "evidence_files": 187, "evidence_root": "sha256:27ee0353cb4d4aae2b7dbce2bfe0d9f4ef2a94cd7a4555b84684d59372503280", - "files": 1608, - "generated_at_commit": "f5dffb632270538ba940d6545d3ac88158104d0b", - "source_tree": "sha256:631aa08a805bc622dde948c74794eb683f219cc984e80dbb51df69730478186a" + "files": 1609, + "generated_at_commit": "b08d12c0ca28f0621d3aab46a711d0722eaf7caf", + "source_tree": "sha256:cdb227e8d38bebb8212ce4797d8fd508c845a1c30bbceec519bf7fdac3cd0044" } }, "history": [], diff --git a/crates/aien-runtime/src/control.rs b/crates/aien-runtime/src/control.rs index d6841a23..bef43d65 100644 --- a/crates/aien-runtime/src/control.rs +++ b/crates/aien-runtime/src/control.rs @@ -790,6 +790,13 @@ pub struct ComposeRecallReport { /// sha256 over the digests of records 1..=prefix (hex), when asked. pub prefix: Option<u64>, pub prefix_digest: Option<String>, + /// True when the daemon was built with the native Omega composition library + /// (not the stub). Absent in older replies (reads as false). + #[serde(default)] + pub compose_native: bool, + /// The omega commit the linked library was pinned to; empty for the stub. + #[serde(default)] + pub omega_sha: String, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] diff --git a/crates/aien-runtime/src/server.rs b/crates/aien-runtime/src/server.rs index 25fe19db..cc2c2a72 100644 --- a/crates/aien-runtime/src/server.rs +++ b/crates/aien-runtime/src/server.rs @@ -262,6 +262,14 @@ impl AienRuntimeServer { "off (authorize is authenticated by the OS user only)" } ); + if aien_omega_compose::LINKED { + println!( + "Compose: native (omega {})", + aien_omega_compose::EXPECTED_OMEGA_SHA + ); + } else { + println!("Compose: STUB (every compose call is Unavailable)"); + } } if let Some(b) = compose.clone() { let gate = b.clone(); diff --git a/crates/aien-runtime/src/spine.rs b/crates/aien-runtime/src/spine.rs index 3e80d88d..d8e781fa 100644 --- a/crates/aien-runtime/src/spine.rs +++ b/crates/aien-runtime/src/spine.rs @@ -2482,6 +2482,12 @@ impl ComposeBridge { missing, prefix, prefix_digest, + compose_native: aien_omega_compose::LINKED, + omega_sha: if aien_omega_compose::LINKED { + aien_omega_compose::EXPECTED_OMEGA_SHA.to_string() + } else { + String::new() + }, }) }); match r { diff --git a/crates/aien-runtime/tests/approved_daemon_ipc_test.rs b/crates/aien-runtime/tests/approved_daemon_ipc_test.rs index dd9af30f..d1638615 100644 --- a/crates/aien-runtime/tests/approved_daemon_ipc_test.rs +++ b/crates/aien-runtime/tests/approved_daemon_ipc_test.rs @@ -124,6 +124,28 @@ async fn approved_proposal_over_the_daemon_socket() { let socket = tmp.path().join("runtime.sock"); let (c, handle) = start(&socket).await; + // The recall reply says whether the native library is linked (VAC M3a). + match c + .send_command(ControlCommand::ComposeRecall { + ids: vec![], + prefix: None, + }) + .await + .unwrap() + { + ControlResponse::ComposeRecalled(r) => { + assert_eq!(r.compose_native, aien_omega_compose::LINKED); + if aien_omega_compose::LINKED { + assert_eq!(r.omega_sha.len(), 40); + assert!(r.omega_sha.chars().all(|ch| ch.is_ascii_hexdigit())); + assert_eq!(r.omega_sha, aien_omega_compose::EXPECTED_OMEGA_SHA); + } else { + assert!(r.omega_sha.is_empty()); + } + } + other => panic!("recall: {other:?}"), + } + // Before anything: forged approver (correct bytes, hashes and the MAC of // the honest approval) is refused, nothing appended. let good = signed(&dir, "req-1", "appr-1", "interplane-host"); @@ -249,3 +271,12 @@ async fn approved_proposal_over_the_daemon_socket() { let _ = c2.send_command(ControlCommand::Shutdown).await; let _ = tokio::time::timeout(Duration::from_secs(5), handle2).await; } + +/// Compat: a recall reply from an older daemon (no native fields) still reads. +#[test] +fn old_recall_json_without_native_fields_deserializes() { + let old = r#"{"compose_dir":"/d","machine_id":"m","records_total":0,"host":[],"cited":[],"missing":[],"prefix":null,"prefix_digest":null}"#; + let r: aien_runtime::control::ComposeRecallReport = serde_json::from_str(old).unwrap(); + assert!(!r.compose_native); + assert!(r.omega_sha.is_empty()); +} diff --git a/crates/aien-runtime/tests/recall_native_report_test.rs b/crates/aien-runtime/tests/recall_native_report_test.rs new file mode 100644 index 00000000..e4b93f66 --- /dev/null +++ b/crates/aien-runtime/tests/recall_native_report_test.rs @@ -0,0 +1,66 @@ +//! VAC M3a: the recall reply says whether the native Omega composition library +//! is linked. Runs in both builds (stub: recall is an explicit refusal naming the stub; linked: true and +//! the pinned 40-hex sha). One test per binary (it sets AIEN_COMPOSE_DIR). +use aien_inference_abi::MockInferenceBackend; +use aien_kv_cache::create_shared_kv_manager; +use aien_runtime::client::AienRuntimeClient; +use aien_runtime::control::{ControlCommand, ControlResponse}; +use aien_runtime::server::AienRuntimeServer; +use aien_runtime::spine::AienRuntimeSpine; +use aien_scheduler::SchedulerConfig; +use std::time::Duration; + +#[tokio::test] +async fn recall_reports_whether_compose_is_native() { + let tmp = tempfile::tempdir().unwrap(); + std::env::set_var("AIEN_COMPOSE_DIR", tmp.path().join("compose")); + let socket = tmp.path().join("runtime.sock"); + let cfg = SchedulerConfig { + max_batch_size: 8, + max_batch_tokens: 1024, + prefill_chunk_size: 64, + watermark_blocks: 4, + chunk_prefill: true, + max_prefill_tokens: 1024, + }; + let spine = AienRuntimeSpine::new(64, cfg, create_shared_kv_manager(256, 16)); + let server = AienRuntimeServer::new(spine, &socket); + let handle = tokio::spawn(async move { server.run(MockInferenceBackend::new(1)).await }); + let c = AienRuntimeClient::new(&socket); + let mut up = false; + for _ in 0..200 { + if c.is_alive().await { + up = true; + break; + } + tokio::time::sleep(Duration::from_millis(20)).await; + } + assert!(up, "daemon did not come up"); + match c + .send_command(ControlCommand::ComposeRecall { + ids: vec![], + prefix: None, + }) + .await + .unwrap() + { + ControlResponse::ComposeRecalled(r) => { + assert_eq!(r.compose_native, aien_omega_compose::LINKED); + if aien_omega_compose::LINKED { + assert_eq!(r.omega_sha.len(), 40); + assert!(r.omega_sha.chars().all(|ch| ch.is_ascii_hexdigit())); + assert_eq!(r.omega_sha, aien_omega_compose::EXPECTED_OMEGA_SHA); + } else { + assert!(r.omega_sha.is_empty()); + } + } + // The stub cannot open a compose home at all: recall is an explicit refusal + // (a verifier reads that as "not native"). + ControlResponse::Error(e) if !aien_omega_compose::LINKED => { + assert!(e.contains("not linked (stub build)"), "{e}"); + } + other => panic!("recall: {other:?}"), + } + let _ = c.send_command(ControlCommand::Shutdown).await; + let _ = handle.await; +} diff --git a/docs/COMPOSE_PROPOSER_HOOK.md b/docs/COMPOSE_PROPOSER_HOOK.md index acdfc13c..33ff806c 100644 --- a/docs/COMPOSE_PROPOSER_HOOK.md +++ b/docs/COMPOSE_PROPOSER_HOOK.md @@ -210,3 +210,10 @@ fix: the grant links the claim; a grant whose claim is not COMMITTED with matching evidence is refused at intent; the approved grant cannot be forged. Tests still to add: walk from an ack recovers trace_id and request_id; `record_effect_receipt` for approved writes names the grant. + +## Native vs stub in the recall reply (VAC M3a) +`ComposeRecallReport` (reply to `ComposeRecall`) carries `compose_native: bool` (the native Omega +composition library is linked, not the stub) and `omega_sha: String` (the pinned omega commit, 40 hex; +empty for the stub). Both are `#[serde(default)]`, so older replies still read as stub. The daemon also +prints `Compose: native (omega <sha>)` or `Compose: STUB (...)` at startup. An offline verifier uses +these to refuse a "native" claim from a stub daemon.