interplane-mv
INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.
Brought by drakestapleton
interplane-mv / provenance / README.md
| 1 | # Provenance companion manifest v0 (schema 0) |
| 2 | |
| 3 | NOT A MASTER PLAN. The smallest offline-checkable bridge from training-data evidence to a runtime |
| 4 | effect. Outside INTERPLANE Core (ADR 0004): Core does not read or depend on it. Provenance is |
| 5 | evidence, never authority: nothing here decides, grants or authorizes anything. |
| 6 | |
| 7 | ## What it binds, link by link |
| 8 | |
| 9 | `COMPANION.json` sits beside retained, immutable records and names them by path, raw-byte |
| 10 | SHA-256 and size. It reuses identities the records already carry; it mints no ids. |
| 11 | |
| 12 | | Link | Records | Identity reused | Checked | |
| 13 | |---|---|---|---| |
| 14 | | corpus + license assertions | `waldo_run_bom` (corpus BOM embedded) | WALDO `corpus_bom_sha256` | WALDO digest of the embedded `corpus_bom`; `corpus_license_assertions` equals its `licenses` keys (restated, never judged) | |
| 15 | | training plan / run | `waldo_plan`, `waldo_run_bom`, `waldo_run`, `waldo_preflight`, `waldo_model_bom`, `run_weights` | WALDO `plan_sha256` / model id, `runs[].bom_sha256`, `RUN.json bom_sha256`, preflight raw SHA-256 | every pin; run `complete` and not simulated; `current_run_id`; backend equals `execution.backend` | |
| 16 | | export (a conversion is its own record) | `release_bom`, `export_weights`, `export_config`, `export_tokenizer`, `export_chat_template` or explicit `null` | WALDO release BOM `source_bom_sha256`, `artifacts[]` | source pin, run and model id, every exported file; Hugging Face: safetensors tensor data equals the run's pinned weights | |
| 17 | | load support | `export_config`, `export_tokenizer` | none (a check result) | `LlamaForCausalLM` + Hugging Face `tokenizer.json` with `config.vocab_size` = tokenizer size; computed result must equal `load_support.declared` | |
| 18 | | AIEN candidate + loaded model | `candidate_manifest`, `aien_load_log` | CandidateManifestV1 `id`, `[executables]`, `[model]`; aien-cli daemon line `model_sha256=` / `tokenizer_sha256=` | all equal the exported bytes; refused unless load support is `supported_structural` | |
| 19 | | INTERPLANE trace | `interplane_trace` (array of envelopes) | `trace_id`, `request_id` | every envelope passes `interplane_core::validate_envelope_value`; same trace; request and its result present | |
| 20 | | effect | `ledger_claim`, `ledger_committed`, `ledger_grant`, `ledger_intent`, `ledger_ack`, `daemon_run` (strong, `aien-ledger-slice/1`) or `effect_receipt` (weaker, `record_effect_receipt/1`) | the daemon-written ledger records; or aien-cli `record_effect_receipt` v1 | see `BINDING.md`: request, trace, approval key recomputed, path and bytes, replay claim, grant, intent, ack, daemon process; the weaker receipt binds tool and digests only and is labelled `weak` | |
| 21 | |
| 22 | WALDO record digests are SHA-256 of Go `json.Marshal`; the files are `json.MarshalIndent` of the |
| 23 | same value, so the verifier strips insignificant whitespace from the retained bytes and hashes |
| 24 | that (`src/gojson.rs`). Checked on the real fixture: run BOM, model BOM, plan and embedded corpus |
| 25 | BOM all reproduce WALDO's own pins. |
| 26 | |
| 27 | ## Completeness and missing lineage |
| 28 | |
| 29 | Every link is an object or an explicit `null`; a record may be `"retained": false` (it keeps its |
| 30 | `sha256` and, for WALDO JSON, `waldo_sha256`, so the pins that cite it are still checked). |
| 31 | `completeness.state` is `complete` only when nothing is missing; otherwise `incomplete` with |
| 32 | `missing` listing exactly the `link:<name>` and `record:<name>` entries that are absent. A model |
| 33 | with no training evidence uses `lineage: {"kind": "unknown_pretraining", "origin": {...}}`; it |
| 34 | may not carry WALDO records. Nothing is filled in to make a chain look whole. |
| 35 | |
| 36 | ## Verdicts (one line, fixed check order, first failure wins) |
| 37 | |
| 38 | `PASS complete` (only when no link is missing) | `PASS_LABELLED_INCOMPLETE missing=<sorted,comma,list>` | `FAIL <code>: <detail>`. |
| 39 | Codes: `missing_companion`, `unparseable_companion`, `unsupported_companion`, |
| 40 | `malformed_companion`, `missing_record`, `missing_record_entry`, `size_mismatch` (partial or |
| 41 | truncated write), `digest_mismatch`, `unlabelled_missing`, `completeness_mismatch`, |
| 42 | `unparseable_record`, `binding_mismatch`, `run_not_complete`, `lineage_conflict`, |
| 43 | `conversion_mismatch`, `incompatible`, `load_support_mismatch`, `load_unsupported`, |
| 44 | `invalid_envelope`, `not_in_trace`, `synthetic_complete`, `canonicalization_mismatch`, |
| 45 | `unsupported_binding`, and for the fix-the-test slice (BINDING.md): `test_run_missing`, |
| 46 | `test_run_mismatch`, `unsupported_test_run`, `source_pin_mismatch`, `native_claim_contradicted`; and for effects the ledger does not show as landed (BINDING.md "Recovery outcomes"): `effect_not_done`, `effect_unresolved`, `effect_interrupted`, `test_run_on_unlanded_effect`. |
| 47 | |
| 48 | A complete verdict whose AIEN link names no frozen candidate manifest (`candidate_id: null`) ends |
| 49 | with `candidate=none`. Reading is strict: every JSON input (the manifest, each record, the JSON |
| 50 | inside a ledger note) is exactly one value with no repeated object key at any depth, and a |
| 51 | repeated key in a candidate manifest is refused, so two readers can never see different values in |
| 52 | the same bytes. A record path that passes through a symlink is refused. In the trace, a request |
| 53 | has one `tool_request`, at most one `requires_approval` result, then at most one final result |
| 54 | (spec/CORE.md lifecycle). A manifest whose `fixture.class` is anything but `real` (test material) |
| 55 | is never `PASS complete`; every other check still runs on it. The label is in-band: a manifest with |
| 56 | the `fixture` object deleted cannot be recognised as test material, so `complete` still rests on |
| 57 | every link being verified from retained bytes (the synthetic generator writes only `scripted_turn` |
| 58 | or the weak receipt, which can never be complete). |
| 59 | |
| 60 | ``` |
| 61 | cargo run -q -- verify fixtures/synthetic-full-chain # PASS_LABELLED_INCOMPLETE missing=link:model_turn effect=aien-ledger-slice/1:strong proposal=scripted_turn |
| 62 | cargo run -q -- verify fixtures/real-waldo-aien-chain # PASS complete effect=aien-ledger-slice/1:strong proposal=model_generation/2 candidate=none |
| 63 | cargo run -q -- verify fixtures/synthetic-weak-receipt # PASS_LABELLED_INCOMPLETE missing=link:model_turn effect=record_effect_receipt/1:weak |
| 64 | cargo run -q -- verify fixtures/real-waldo-smoke # PASS_LABELLED_INCOMPLETE missing=link:aien,link:effect,link:interplane |
| 65 | cargo run -q -- verify fixtures/real-waldo-tokenizer-json # PASS_LABELLED_INCOMPLETE missing=link:effect,link:interplane |
| 66 | ``` |
| 67 | |
| 68 | `seal` writes a new `COMPANION.json` from a skeleton and refuses to overwrite one: a sealed |
| 69 | record is never rewritten to match a new result. |
| 70 | |
| 71 | ## Fixtures |
| 72 | |
| 73 | - `fixtures/real-waldo-smoke`: REAL bytes, unmodified, from a WALDO CPU smoke run (openwaldo/waldo |
| 74 | tree 0fd421a, PyTorch backend, model `pytorch-smoke`, run `80b1d6cbe8ca88a1`, 2026-10-06). |
| 75 | Corpus, plan, run, model BOM and Hugging Face export verify. Its tokenizer is |
| 76 | `OpenWALDOByteTokenizer` custom code, not a Hugging Face `tokenizer.json`, so the load-support |
| 77 | check says `unsupported_tokenizer` and the AIEN, trace and effect links are labelled missing. |
| 78 | - `fixtures/real-waldo-tokenizer-json`: REAL bytes. WALDO CPU smoke run exported by the patched exporter |
| 79 | (aien-spark/waldo, now archived, `export-tokenizer-json` 09f262c, writes a Hugging Face `tokenizer.json`), then |
| 80 | really loaded by aien-cli (sovereign-core PR #248 head 8e7b14d, debug build, CPU). The `aien` link |
| 81 | is present with `candidate_id: null` (no frozen candidate, no `candidate_manifest` record); the |
| 82 | daemon log is retained in full, including its warm-up refusal (plain base model, no chat |
| 83 | template). Effect and INTERPLANE links are labelled missing. |
| 84 | - `fixtures/real-waldo-aien-chain`: REAL bytes from ONE run (CPU evidence), see `REAL-CHAIN.md`. A tiny |
| 85 | WALDO `chatml-v1` model, supervised-fine-tuned on tool-call conversations I wrote and exported with |
| 86 | `tokenizer.json` and the standard ChatML template (fork aien-spark/waldo, now archived, `export-tokenizer-json` 4c407d7), is |
| 87 | loaded by the AIEN daemon (aien-cli, sovereign-core main 12c1a5f, release build, CPU-reference backend). |
| 88 | AIEN's own generation path (`StreamTurn`) on that loaded model produces the tool-call text; the INTERPLANE |
| 89 | `aien_legacy` dialect parses it; the adapter drives one approved `write_file`; the daemon's ledger records |
| 90 | and the trace are retained, together with the DAEMON'S OWN record of the generation (sovereign-core #301, |
| 91 | `TurnFinished.generation_record`). The verifier re-parses the text, binds it to the trace and the ledger, and |
| 92 | checks the daemon's record: output digest = digest of the turn text, model and tokenizer digests = the exported |
| 93 | files, same daemon process, written before the effect. Verdict `PASS complete`: every link is verified from the |
| 94 | retained bytes of this one run. Residual limits: digests are of the files read at load time (a swap between hash |
| 95 | and load is not detected), the record is unsigned (a same-user process that can append to the compose ledger |
| 96 | could forge one), no authority follows. The model is a tiny memoriser with a fixed prompt: no capability claim. |
| 97 | - `fixtures/synthetic-weak-receipt`: SYNTHETIC, the same chain with the weaker v1 receipt (also labelled `link:model_turn` missing). |
| 98 | - `fixtures/synthetic-full-chain`: SYNTHETIC, generated by `src/synth.rs` (reproduced byte for |
| 99 | byte by a test). Schema-faithful WALDO subset plus one labelled deviation (an HF |
| 100 | `tokenizer.json` in the export), a CandidateManifestV1-shaped `CAND-SYNTH-0`, an aien-cli load |
| 101 | line, two INTERPLANE requests and one effect receipt. No AIEN process loaded it. |
| 102 | |
| 103 | ## Limits |
| 104 | |
| 105 | - Strong binding (`aien-ledger-slice/1`) ties the effect to the daemon's ledger records and to the |
| 106 | model only through process identity (the claim's executor pid and start time, the daemon |
| 107 | executable digest, the socket path in the load log). The daemon's records carry no model or |
| 108 | tokenizer digest; a daemon-written model digest is a sovereign-core change (see `REAL-CHAIN.md`). |
| 109 | - The ledger files are exports. The verifier cannot re-derive a Cortex record digest or tell an |
| 110 | export from a hand-written file; assurance beyond internal consistency needs the live journal or |
| 111 | a journal prefix digest, which are not recorded. See `BINDING.md`, Trust. |
| 112 | - A verdict says `complete` only when the model that produced the effect's content is linked to the |
| 113 | effect. A scripted model turn (`proposal_origin: scripted_turn`) and the weaker receipt always leave |
| 114 | `link:model_turn` missing. `model_generation/2` needs the daemon's own generation record and checks it (text digest, |
| 115 | model and tokenizer digests, daemon process, ordering); a missing, malformed or mismatched record is a `FAIL`. |
| 116 | `PASS complete` therefore exists only for chains where every link is verified from retained bytes of one run. It |
| 117 | is evidence about provenance, never permission, and says nothing about the model's capability. |
| 118 | - The weaker `record_effect_receipt` v1 names no request or trace; identical calls cannot be told |
| 119 | apart. It is accepted and labelled `weak`. Its digest form is `serde_json.to_vec.sorted-keys/1`, |
| 120 | not JCS; a mismatch is `canonicalization_mismatch` (`BINDING.md`). |
| 121 | - The minted flow of sovereign-core #296 (`ComposeAuthorize`, `compose_commit`, `minted_grant`) has |
| 122 | no binding yet; the INTERPLANE adapter uses the approved path. |
| 123 | - `training_code` and `conversion_tool` are recorded assertions (`checked: false`); WALDO's |
| 124 | release BOM does not carry the tool identity. |
| 125 | - Load support is structural plus one observed behaviour: the daemon's warm-up and one generation ran on |
| 126 | the tiny model (CPU). The model is a memoriser with a fixed prompt; nothing here measures capability. |
| 127 | - WALDO's own `index verify` / `model export` checks are not re-run here; this is a consumer. |
| 128 | - Provenance never grants execution. Nothing in this crate is consulted by AIEN or INTERPLANE. |