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
aien-sovereign-core-mv / crates / aien-allen / tests / e2e_demo_subject.rs
| 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | // Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | |
| 16 | //! Operator input for the ALLEN end-to-end demo (scripts/allen_e2e_demo.sh). |
| 17 | //! NOT a test: it is `#[ignore]`d and does nothing unless the demo driver sets |
| 18 | //! its environment. It writes ONE exported kind-24 subject head object, bound |
| 19 | //! to the lineage of the demo's Cortex journal, using the TEST-ONLY fixture |
| 20 | //! encoder. Real subjects are created only by Aienux `cs_provision`, so the |
| 21 | //! demo labels this subject a host-built fixture. |
| 22 | //! DEMO_SUBJECT_OUT path of the head object file to write |
| 23 | //! DEMO_LINEAGE_HEX 64 hex: digest of Cortex record 1 of the demo home |
| 24 | //! DEMO_SUBJECT_NAME fixture name (derives root/agent ids) |
| 25 | //! Prints `AGENT=<64 hex>` and `ROOT=<64 hex>` on stdout. |
| 26 | mod support; |
| 27 | |
| 28 | #[test] |
| 29 | #[ignore = "operator input for scripts/allen_e2e_demo.sh, not a test"] |
| 30 | fn write_demo_subject() { |
| 31 | let (Ok(out), Ok(lineage), Ok(name)) = ( |
| 32 | std::env::var("DEMO_SUBJECT_OUT"), |
| 33 | std::env::var("DEMO_LINEAGE_HEX"), |
| 34 | std::env::var("DEMO_SUBJECT_NAME"), |
| 35 | ) else { |
| 36 | panic!("set DEMO_SUBJECT_OUT, DEMO_LINEAGE_HEX and DEMO_SUBJECT_NAME"); |
| 37 | }; |
| 38 | let mut f = support::fx(&name); |
| 39 | f.cortex = aien_allen::unhex32(&lineage).expect("DEMO_LINEAGE_HEX is 64 hex"); |
| 40 | let chain = support::chain(&f, 2); |
| 41 | support::write_head(std::path::Path::new(&out), chain.last().unwrap()); |
| 42 | println!("AGENT={}", aien_allen::hex(&f.agent)); |
| 43 | println!("ROOT={}", aien_allen::hex(&f.root)); |
| 44 | } |