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 / spark-harvester / README.md
| 1 | # spark-harvester |
| 2 | |
| 3 | Rights-gated reasoning extractor. Every bundle (`extract`, `distill`) and every |
| 4 | `HarvesterClient::query_with_grant` call requires an `aien-provenance` |
| 5 | `SourceGrant` signed by the P-256 authority key passed with `--authority-key`, |
| 6 | `--authority-key-file` or the `ATLAS_AUTHORITY_PUBKEY` vault entry. |
| 7 | |
| 8 | ## SourceGrant v2 digest cutover |
| 9 | |
| 10 | The harvester pins `aien-provenance` and `aien-protocol-types` from |
| 11 | `aien-dev/aien-protocols-mv` at `28bc49ec57a89398fcb463cf71c0add7fcd2ef6c` |
| 12 | (aien-protocols-mv#59). From that revision a grant signature covers the framed |
| 13 | transcript |
| 14 | |
| 15 | ``` |
| 16 | "AIEN_SOURCE_GRANT_V2\0" || grant_id(16) || len64le(source_uri) || source_uri |
| 17 | || len64le(license_spdx) || license_spdx || permissions_u32le |
| 18 | || len64le(issuer) || issuer || (0x00 | 0x01 || expires_at_u64le) |
| 19 | ``` |
| 20 | |
| 21 | The retired v1 transcript concatenated the string fields without lengths, so |
| 22 | bytes could move between `source_uri` and `license_spdx` under one signature. |
| 23 | |
| 24 | Cutover rules: |
| 25 | |
| 26 | - A grant signed under v1 fails with `SignatureVerificationFailed` at the rights |
| 27 | gate, the client and the CLI. There is no legacy verifier or fallback flag. |
| 28 | - Every grant issued before this pin must be reissued: the authority signs the |
| 29 | unchanged fields again with `SourceGrant::sign` from the pinned |
| 30 | `aien-provenance`. Keep the old grant file as history; do not edit it. |
| 31 | - Core held no committed signed grants or harvester receipts when the pin moved, |
| 32 | so no repository evidence was reissued. Bundles exported earlier keep their |
| 33 | recorded digests; they were admitted under v1 and are not re-verified. |
| 34 | - `crates/spark-mail-rs` still pins `aien-probe` at `7ac6facb`, which brings the |
| 35 | old `aien-provenance` and `aien-evaluation-protocol` into `Cargo.lock`. Mail |
| 36 | only runs the probe engine; it neither signs nor verifies grants or evaluation |
| 37 | receipts, so it is not a digest consumer and its pin is unchanged. |
| 38 | |
| 39 | `tests/source_grant_v2_cutover_tests.rs` holds the regression. The fixtures in |
| 40 | `tests/fixtures/` are one grant signed twice by a synthetic test authority |
| 41 | (signing scalar `[42u8; 32]`, public key |
| 42 | `020c901d423c831ca85e27c73c263ba132721bb9d7a84c4f0380b2a6756fd60133`): |
| 43 | `source-grant-v1-legacy.json` over the retired transcript, refused, and |
| 44 | `source-grant-v2-reissued.json` over the v2 transcript, accepted. |