aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / docs / adr / 0015-golden-vectors.md
| 1 | # ADR 0015 canonical golden vectors |
| 2 | |
| 3 | `0015-golden-vectors.json` contains the byte-exact inputs and outputs for |
| 4 | ObjectId, empty and one-entry catalogs, CommitRecord objects, Superblock A/B, |
| 5 | CRC32C, genesis, adjacent generations, and equivalent roots. Unit fixtures are |
| 6 | full 4096-byte hex strings; each includes a SHA-256 digest. CommitRecord |
| 7 | semantic bytes, ObjectIds, catalog semantic bytes, CRC fields, fixed resource |
| 8 | geometry, and expected root classifications are also recorded. |
| 9 | |
| 10 | The fixtures use a deterministic UUID (`00 01 ... 0f`) so bytes are |
| 11 | reproducible. A real provisioner MUST still create a fresh random 128-bit Store |
| 12 | UUID. |
| 13 | |
| 14 | Check the kernel against the vectors from the repository root: |
| 15 | |
| 16 | ```sh |
| 17 | cargo test -p aienos-kernel --test store_v1_golden_vectors |
| 18 | ``` |
| 19 | |
| 20 | The test (`crates/aienos-kernel/tests/store_v1_golden_vectors.rs`) builds every |
| 21 | fixture with the kernel's own Store v1 encoders (`ObjectId`, `Catalog`, |
| 22 | `CatalogEntry`, `CommitRecord`, `Superblock`, `crc32c`) and requires each |
| 23 | hex field in the manifest to match byte for byte, including every padded |
| 24 | 4096-byte unit, every `*_sha256` digest, and every CRC field. It also decodes |
| 25 | each encoding back to the value that produced it, rebuilds the ObjectId |
| 26 | preimages from the contract and ties them to the kernel ObjectIds, and checks |
| 27 | the genesis, adjacent-generation, and equivalent-root relations. Every field in |
| 28 | each manifest section must be asserted: a field added to the JSON without a |
| 29 | matching assertion fails the test. The exact fixtures are the |
| 30 | interoperability oracle; they are frozen and must not be regenerated to match a |
| 31 | changed encoder. |