interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / docs / adr / 0015-golden-vectors.md

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