diff --git a/README.md b/README.md index de093ff..77b333f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ > Models express intent. Runtimes retain authority. INTERPLANE defines the boundary between them. +This repository holds the protocol (normative text and JSON Schemas), the Rust reference +implementation, the conformance fixtures, the AIEN reference adapter, and the benchmark and +qualification records behind every published result. A model's output is parsed into tool +requests; the runtime decides each request with its own policy; INTERPLANE carries the request and +the decision across the boundary and refuses to upgrade a decision. Website: +[interplane.io](https://interplane.io) (its source is +[aien-dev/interplane.io](https://github.com/aien-dev/interplane.io)). + ``` Model side: Qwen3.5 Ajax (when published) other local or hosted models \ | / @@ -17,6 +25,39 @@ adapter removed on 2026-10-15; see "Removed adapters" below); Qwen3.5 is the fir dialect. Each runtime keeps its own tools, policy, approvals, memory and execution. INTERPLANE only standardizes what crosses between them and makes it measurable. +## Where it fits in AIEN + +INTERPLANE is an attachment of [Aienix](https://github.com/aien-dev/aienix), the core tree of AIEN: +it lives in its own repository and plugs into the core at a boundary. Related repositories: + +- [aien-dev/aien-sovereign-core-mv](https://github.com/aien-dev/aien-sovereign-core-mv): the AIEN + host runtime. `adapters/aien` pins its `aien-capability` and `aien-mcp` crates. Its `aien-test` + tool is the Spark judge that tests every pull request here. +- [aien-dev/aegis-runtime-mv](https://github.com/aien-dev/aegis-runtime-mv) and + [aien-dev/aien-protocols-mv](https://github.com/aien-dev/aien-protocols-mv): sibling checkouts the + AIEN adapter builds against, pinned in `adapters/aien/PINS`. +- [aien-dev/aien-architecture-mv](https://github.com/aien-dev/aien-architecture-mv): AIEN's + canonical architecture and decision records. +- [aien-dev/aien-receipts](https://github.com/aien-dev/aien-receipts): the signed test bundles the + Spark publishes for this repository, under `interplane//bundle.json`. + +## Status (2026-10-19) + +- Version 0.3.0 (the Rust workspace version in `rust/Cargo.toml`). Pre-1.0. +- 0.1 (Reality Layer) is the base. 0.2 (Capability) is closed with its pre-registered gate failed + and the failure published (`docs/REPORT-0.2.md`). 0.3 (Trust) is closed with its gate passed + (`docs/REPORT-0.3.md`). 0.4 and 0.5 are planned, not built (`ROADMAP.md`). +- 2026-10-15: the Python SDK, the Python adapters and the Python bench tools were removed; the + conformance tools and examples moved to Rust (PRs #106, #107, #108). +- 2026-10-16: the repository joined the Spark verification pipeline (PR #109), and the DGX Spark + became the only test judge. On 2026-10-18 the hosted test workflows were removed (PRs #112, #113; + see `docs/PIPELINE.md`). +- Open tracking issues: #101 (INTERPLANE against the native AIENOS authority) and #80 (a protocol + revision candidate on refusal text). + +[`STATUS.md`](STATUS.md) is the only place that says what is implemented, tested, conformant or +qualified. Nothing elsewhere in this repository claims more than `STATUS.md` does. + ## Try it offline (no model, no GPU, no network) ``` @@ -26,26 +67,20 @@ cd rust && cargo run -q -p interplane-crossveil --example offline A scripted model fetches a web page that carries an injected instruction, then "obeys" it by asking to send an email, write a file and append a note. The reference pipeline with its mock runtime denies the email and the write, holds the note for a person's approval (untrusted content -is in view) and executes none of them. The example checks this and exits 1 on any difference. CI -runs it (job `rust`). +is in view) and executes none of them. The example checks this and exits 1 on any difference. The +Spark gate `INTERPLANE-RUST` runs it (see "Build and test"). -To connect your own program, see `docs/WRITING-AN-ADAPTER.md` and its runnable example -`rust/crates/interplane-crossveil/examples/todo_adapter.rs` (run it with -`cargo run -q -p interplane-crossveil --example todo_adapter`): a to-do list host with its own +To connect your own program, see [`docs/WRITING-AN-ADAPTER.md`](docs/WRITING-AN-ADAPTER.md) and its +runnable example `rust/crates/interplane-crossveil/examples/todo_adapter.rs` (run it from `rust/` +with `cargo run -q -p interplane-crossveil --example todo_adapter`): a to-do list host with its own policy, an approval a person grants and one they decline. ## What is in the repository (version 0.3.0) -The Rust workspace is at version 0.3.0. The Python package that shipped beside it was removed on -2026-10-15 (see "Removed Python" below). The base is 0.1, the Reality Layer. -0.2 (Capability) is closed with its pre-registered gate failed and the failure published -(`docs/REPORT-0.2.md`). 0.3 (Trust) is closed with its gate passed (`docs/REPORT-0.3.md`). 0.4 and 0.5 -are planned, not built (`ROADMAP.md`). - | Module | What it is | Status | |---|---|---| | **Core** | normative JSON Schemas (2020-12) for envelope, intent, capability, decision, result, event, catalog, selection, input record, probe report; versioning and error codes | see `STATUS.md` | -| **Lenshift** | model dialect parsers and result renderers: `openai`, `qwen35`; `ajax` reserved | see `STATUS.md` | +| **Lenshift** | model dialect parsers and result renderers: `openai`, `openai_stream`, `qwen35`, `aien_legacy`; `ajax` reserved | see `STATUS.md` | | **Crossveil** | the authority-boundary contract: two runtime callbacks, a lifecycle with fail-closed invariants, trust classes | see `STATUS.md` | | **CrossAxis** | explicit, versioned capability mapping; a deterministic domain selector with a before/after receipt; bounded expansion | see `STATUS.md` | | **Interplane Probe** | measured capability qualification of an OpenAI-compatible endpoint | see `STATUS.md` | @@ -53,28 +88,72 @@ are planned, not built (`ROADMAP.md`). | Vectorveil | the envelope and canonical JSON; no transport framework | envelope only | | RelayLine | the event vocabulary for multi-round exchanges | contract only | -`STATUS.md` is the only place that says what is implemented, tested, or merely specified. Nothing -elsewhere in this repository claims more than `STATUS.md` does. +The counts 106 and 56 are what `interplane-conformance` and `interplane-corpus validate` report on +main (see "Build and test"). ## Layout ``` spec/ normative Markdown + spec/schemas/*.schema.json rust/ Cargo workspace: interplane-core, -lenshift, -crossaxis, -crossveil, -conformance, -probe -dialects/ per-dialect fixtures -conformance/ canonical fixtures + runner contract +dialects/ per-dialect fixtures (fixtures/) and recorded provider streams (replay/) +conformance/ canonical fixtures, recorded verdicts (expected/), trust corpus freeze adapters/ aien/ reference adapter (depends on its host; Core never does); odysseus/ keeps catalog records only examples/ receipt/ (before/after receipt); the offline and to-do examples are in rust/crates/interplane-crossveil/examples/ bench/ CrossAxis benchmark corpora, pre-registered protocols (0.2, 0.2x, 0.3), published runs (records only) qualification/ real-model probe captures, evidence and reports provenance/ companion manifest verifier, outside Core (ADR 0004) -docs/ reports (REPORT-*.md), WRITING-AN-ADAPTER.md, plans, analysis +docs/ reports (REPORT-*.md), PIPELINE.md, WRITING-AN-ADAPTER.md, plans, analysis docs/adr/ decisions +tests/gates/ the Spark test gates and their one entry point, run.sh +.aien/ Spark pipeline settings: gates that always run, the bundle verification key STATUS.md what is implemented, tested, conformant or qualified ROADMAP.md the layers and where each stands +CHANGELOG.md changes by version CURRENT_STATE.md what the host projects' live code actually contained when this started ``` +## Build and test + +You need the Rust toolchain named in `rust-toolchain.toml` (1.99.0); `rustup` picks it up +automatically. From the repository root: + +``` +cd rust +cargo test --all +cargo run -q -p interplane-conformance --bin interplane-conformance -- ../conformance/fixtures --out /tmp/verdicts.json +cmp /tmp/verdicts.json ../conformance/expected/verdicts.json +cargo run -q -p interplane-conformance --bin interplane-corpus -- validate +``` + +The `cmp` line prints nothing when the verdicts match the recorded reference byte for byte. + +Every pull request is tested on the DGX Spark, not on GitHub (see `docs/PIPELINE.md`). Each gate +is a file in `tests/gates/` and runs `tests/gates/run.sh `; you can run a step yourself the +same way: + +| Gate | Step | What it checks | +|---|---|---| +| `INTERPLANE-NO-PYTHON` | `no-python` | no Python file is tracked; runs on every change (`.aien/always`) | +| `INTERPLANE-SCHEMAS-AND-FIXTURES` | `schemas-and-fixtures` | schema self-check, then every fixture against the schemas | +| `INTERPLANE-RUST` | `rust` | fmt, clippy, all tests, both offline examples, the 106 verdicts equal `conformance/expected/verdicts.json` | +| `INTERPLANE-PACKAGE` | `package` | every crate packages and builds from its `.crate` file | +| `INTERPLANE-NEGATIVE-CONTROLS` | `negative-controls` | trust corpus digests, deliberately broken variants are detected, matrix equals the recorded one | +| `INTERPLANE-PROVENANCE` | `provenance` | the provenance verifier's tests and its six fixture verdicts | +| `INTERPLANE-ADAPTER-AIEN` | `adapter-aien` | the AIEN adapter and its T4 subset; needs the sibling checkouts `../aegis-runtime` and `../aien-protocols` | + +For example, `tests/gates/run.sh no-python` prints `AIEN-OBS python_files_found false` and exits 0. + +## Where the evidence lives + +- `STATUS.md`: the state of every component, with the fixture or run that backs it. +- `docs/REPORT-*.md`: the published reports for 0.1, 0.2, 0.2x, 0.3 and the adapter reproduction. +- `bench/runs/`: the recorded benchmark and trust-gate runs. +- `qualification/`: real-model probe captures and reports (Qwen3.5-9B on Ollama, llama.cpp and SGLang). +- `adapters/aien/evidence/`: recorded runs of the AIEN adapter against a live AIEN daemon. +- [aien-dev/aien-receipts](https://github.com/aien-dev/aien-receipts/tree/main/interplane): the + signed Spark test bundle for each tested commit. + ## Removed adapters Two Python adapters were removed on 2026-10-15 under the project rule that no Python ships here: @@ -92,11 +171,13 @@ history (present through commit `43ec8f8`). ## Removed Python -No Python ships in this repository (project rule, 2026-10-15); CI fails if a Python file is tracked. -The Python SDK (`python/`, package `interplane`) was a second implementation of every SDK module, -kept byte-identical to Rust by CI. It was removed on 2026-10-15 and is in git history. Its last -conformance verdicts and negative-control matrix were byte-identical to the Rust ones and are kept as -`conformance/expected/`; CI now compares the Rust output against those files. +No Python ships in this repository (project rule, 2026-10-15); the `INTERPLANE-NO-PYTHON` gate fails +if a Python file is tracked. The Python SDK (`python/`, package `interplane`) was a second +implementation of every SDK module, kept byte-identical to Rust by the tests of that time. It was +removed on 2026-10-15 and is in git history. Its last conformance verdicts and negative-control +matrix were byte-identical to the Rust ones and are kept as `conformance/expected/`; the +`INTERPLANE-RUST` and `INTERPLANE-NEGATIVE-CONTROLS` gates compare the Rust output against those +files. ## Security in one paragraph @@ -104,9 +185,10 @@ The model side is untrusted. Lenshift never executes. CrossAxis never grants. A means "structurally understandable", never "authorized". A signature proves origin, never authority. The runtime makes every authorization decision through its own policy engine; INTERPLANE carries the decision and refuses to upgrade it. Denied never becomes authorized by retry. +To report a vulnerability, see [`SECURITY.md`](SECURITY.md). ## License -Apache-2.0 for the protocol, schemas, fixtures and the Rust reference SDK. `adapters/aien` depends on AGPL host -projects and is AGPL-3.0-or-later, with its own `LICENSE`, as are the Odysseus catalog records in -`adapters/odysseus`; see `docs/adr/0002-licensing.md`. +Apache-2.0 for the protocol, schemas, fixtures and the Rust reference SDK (`LICENSE`). +`adapters/aien` depends on AGPL host projects and is AGPL-3.0-or-later, with its own `LICENSE`, as +are the Odysseus catalog records in `adapters/odysseus`; see `docs/adr/0002-licensing.md`. diff --git a/adapters/aien/README.md b/adapters/aien/README.md index 4e621ee..fecbe30 100644 --- a/adapters/aien/README.md +++ b/adapters/aien/README.md @@ -14,7 +14,7 @@ spent only by AIEN. Nothing under `rust/`, `spec/` or ## Pinned AIEN sources `aien-capability` and `aien-mcp` are git dependencies pinned to -`aien-spark/aien-sovereign-core@9b5e6e82359f4ad6b6f03042e83ef6411c5f15ce` (main 2026-10-08; `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 4d4dfd4, `git diff --stat 4d4dfd4 9b5e6e8 -- crates/aien-capability crates/aien-mcp` is empty, and the live gate below passed against a daemon built from 9b5e6e8. 4d4dfd4 was main 2026-10-07, after PR #296 merged: the daemon honours only grants it minted itself and refuses every caller-written authorization note, sovereign-core #261; and PR #295: an approved proposal carries a signed requirements goal, a missing one is refused, #289. `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 8bcd79b, main after PR #262 merged: the authenticated `ComposeApprovedProposal` daemon command the ledger route uses; `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 7d37da1, after PR #260 merged: two-phase approval spend, a grant is reserved at mint, committed when the effect runs, released if the effect is dropped, and `EffectLane::with_clock` re-checks expiry at commit; before #260 `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 0bdc97a, main after PR #208 merged, which binds the idempotency ledger to effect identity and lets an approver revoke an unspent grant; before it, PR #207 merged, +[`aien-dev/aien-sovereign-core-mv`](https://github.com/aien-dev/aien-sovereign-core-mv) at `9b5e6e82359f4ad6b6f03042e83ef6411c5f15ce` (main 2026-10-08; `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 4d4dfd4, `git diff --stat 4d4dfd4 9b5e6e8 -- crates/aien-capability crates/aien-mcp` is empty, and the live gate below passed against a daemon built from 9b5e6e8. 4d4dfd4 was main 2026-10-07, after PR #296 merged: the daemon honours only grants it minted itself and refuses every caller-written authorization note, sovereign-core #261; and PR #295: an approved proposal carries a signed requirements goal, a missing one is refused, #289. `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 8bcd79b, main after PR #262 merged: the authenticated `ComposeApprovedProposal` daemon command the ledger route uses; `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 7d37da1, after PR #260 merged: two-phase approval spend, a grant is reserved at mint, committed when the effect runs, released if the effect is dropped, and `EffectLane::with_clock` re-checks expiry at commit; before #260 `crates/aien-capability` and `crates/aien-mcp` are byte-identical to 0bdc97a, main after PR #208 merged, which binds the idempotency ledger to effect identity and lets an approver revoke an unspent grant; before it, PR #207 merged, which makes the authority exposure-aware, on top of PR #204 single-use approvals and the PR #203 authority seam). `aegis` (feature `aegis-gate`, on by default) cannot be a git dependency because `aegis-runtime`'s own `Cargo.toml` reaches a sibling checkout by relative path @@ -23,11 +23,12 @@ checkout: ``` /interplane/adapters/aien (this crate) -/interplane-audit/aegis-runtime aien-spark/aegis-runtime @ AEGIS_RUNTIME_REV in PINS -/interplane-audit/aien-protocols aien-spark/aien-protocols @ AIEN_PROTOCOLS_REV in PINS +/interplane-audit/aegis-runtime aien-dev/aegis-runtime-mv @ AEGIS_RUNTIME_REV in PINS +/interplane-audit/aien-protocols aien-dev/aien-protocols-mv @ AIEN_PROTOCOLS_REV in PINS ``` -All sibling pins live in one file, `PINS` (this directory). CI (`.github/workflows/ci.yml`, job `adapter-aien`) +All sibling pins live in one file, `PINS` (this directory). The Spark gate `INTERPLANE-ADAPTER-AIEN` +(`tests/gates/run.sh adapter-aien`; it replaced the hosted job `adapter-aien`, removed on 2026-10-18) and local setup both call `setup-siblings.sh`, which reads `PINS`, so they use the same commits: ``` @@ -39,7 +40,9 @@ cd adapters/aien && cargo test # toolchain is pinned by /rust-toolchai The script also fails if the `aien-sovereign-core` rev in `Cargo.toml` differs from `SOVEREIGN_CORE_REV` in `PINS`. To move a pin, change `PINS` (and `Cargo.toml` for sovereign-core) in the same PR. Without the `aegis-gate` feature the crate still builds and every `decide()` is `denied` (fail closed). -Building `aegis-runtime` writes `mojo/libaegis_simd.so` inside that checkout (its `build.rs`). +Building `aegis-runtime` at the pinned commit (f4e8709, 2026-10-04) writes `mojo/libaegis_simd.so` inside that +checkout (its `build.rs`) when a `mojo` compiler is installed. aegis-runtime removed Mojo on its `main` on +2026-10-15 (aegis-runtime PR #49); the pin here has not moved past that yet. ## Reused from AIEN (called for real) @@ -457,8 +460,9 @@ cargo test --offline cargo fmt --check && cargo clippy --offline --all-targets -- -D warnings ``` -Building `aegis` runs its `build.rs`, which writes `mojo/libaegis_simd.so` into the pinned -aegis clone as an untracked file. This crate is its own Cargo workspace and is not a member of +Building `aegis` at the pinned commit runs its `build.rs`, which writes `mojo/libaegis_simd.so` into the +pinned aegis clone as an untracked file when a `mojo` compiler is installed (aegis-runtime `main` has had +no Mojo since 2026-10-15). This crate is its own Cargo workspace and is not a member of `rust/Cargo.toml`. ### The same cycle with a real model turn diff --git a/bench/README.md b/bench/README.md index 9318a29..1c3ac97 100644 --- a/bench/README.md +++ b/bench/README.md @@ -21,7 +21,8 @@ stay unchanged as the evidence for those results; CI no longer recomputes the be the commands below that name these tools describe how the records were made. The two recorded adapter hosts (`runs/adapter-repro-20261005T1215Z/toy/authority.py` and `runs/home-check-20261005T1320Z/authority.py`, with their `run_subset.py`) were ported to Rust in -`rust/crates/interplane-conformance/tests/hosts/`, where CI still reproduces their verdict files. +`rust/crates/interplane-conformance/tests/hosts/`, where the Spark gate `INTERPLANE-RUST` (`cargo test --all`) +still reproduces their verdict files. ## Layout @@ -35,12 +36,12 @@ The two recorded adapter hosts (`runs/adapter-repro-20261005T1215Z/toy/authority | `stubs/.json` | Fixed results for read-only Odysseus tools the reference adapter does not execute. | | `stubs/backends.json` | Simulated backends `sim-1`: for every tool a task lists, which backend answers it after Odysseus authorizes the call, and its documented semantics. | | `stubs/stores/.json` | Private-data stores (notes, memory, calendar, contacts, editor documents, models, tokens) read by the `sim-1` backends. A fixture without a file has empty stores. | -| `tools/sim_backends.py` | The `sim-1` simulators (stdlib only), shared by the runner and the validator. | -| `tools/validate.py` | Structural validator (stdlib only). CI job `bench-structural` runs it. | -| `tools/stats.py` | The pre-registered paired statistics (Newcombe 1998 method 10, exact McNemar), with a self-test against the paper's table. | -| `CORPUS-DIGEST.txt` | Frozen digests of the corpus; CI recomputes and compares. | -| `PROTOCOL-0.2x.md` | Pre-registered 0.2x protocol (future work, no results): held-out set, seven conditions, runtime-triggered expansion rules, thresholds. | -| `heldout-0.2x/` | The 0.2x held-out qualification set: 120 `tasks/`, its own `fixtures/`, `stores/`, `stubs/`, `prompts/discovery-addendum.md` and `CORPUS-DIGEST.txt`. Paths inside its tasks are relative to this folder. Check with `validate.py --corpus 0.2x`. | +| `tools/sim_backends.py` | Removed 2026-10-15 (in git history). The `sim-1` simulators, shared by the runner and the validator. | +| `tools/validate.py` | Removed 2026-10-15 (in git history), with the hosted CI job `bench-structural` that ran it. Structural validator. | +| `tools/stats.py` | Removed 2026-10-15 (in git history). The pre-registered paired statistics (Newcombe 1998 method 10, exact McNemar), with a self-test against the paper's table. | +| `CORPUS-DIGEST.txt` | Frozen digests of the corpus. Nothing recomputes them now (see Status). | +| `PROTOCOL-0.2x.md` | Pre-registered 0.2x protocol: held-out set, seven conditions, runtime-triggered expansion rules, thresholds. Run on 2026-10-05: qualified FAIL in all four arms (`STATUS.md`, `docs/REPORT-0.2x.md`). | +| `heldout-0.2x/` | The 0.2x held-out qualification set: 120 `tasks/`, its own `fixtures/`, `stores/`, `stubs/`, `prompts/discovery-addendum.md` and `CORPUS-DIGEST.txt`. Paths inside its tasks are relative to this folder. It was checked with `validate.py --corpus 0.2x` (removed 2026-10-15). | ## Categories (dev / qual) @@ -113,7 +114,7 @@ reference and is never used for judging. workspace sits at a fixed temp path so its text is stable), `computed` (deterministic simulators over the fixture's store or the run's workspace copy; writes stay in the run), and `declared_failure` (`bash`, `python`: always the same documented error, because shell output - cannot be simulated deterministically). `validate.py` fails when a task lists a tool with no + cannot be simulated deterministically). `validate.py` (removed 2026-10-15) failed when a task lists a tool with no backend, when an answer or recovery task lists a `declared_failure` tool, when a simulator is not deterministic on some fixture, or when a store holds the answer of an expansion task on its fixture (that would make expansion unnecessary). Tools no task lists keep the reference @@ -159,14 +160,14 @@ they were published with the 0.2 run. The 0.2x gate uses only the held-out set i - Covered means every `required_capabilities` entry is selected and every `allowed_alternatives` group has at least one selected member. 4. If the answer needs a judgment call, redesign the task until a substring or regex decides it. -5. Run `python3 bench/tools/validate.py`. When the change is intended, run it with - `--write-digest` and commit the new `CORPUS-DIGEST.txt` in the same commit. A change to a - `qual` task after the qualification freeze invalidates that run. +5. The validator that checked a change and rewrote `CORPUS-DIGEST.txt` (`tools/validate.py`, with + `--write-digest`) was removed on 2026-10-15; a corpus change needs a Rust port of it first. A change + to a `qual` task after the qualification freeze invalidates that run. No git repository fixture is needed: the catalog has no git tool, so `fixtures/build.sh` does not exist. -## Running it (paired runner and analyzer) +## Running it (paired runner and analyzer; historical, the tools were removed on 2026-10-15) - `tools/run_bench.py` runs both conditions per task through the INTERPLANE pipeline with the real `OdysseusAuthority` (Odysseus at a8c147b, via `ODYSSEUS_SRC`), against an OpenAI-compatible @@ -187,7 +188,7 @@ exist. - `tools/bench_eval.py` is the deterministic judge and the per-run metrics, shared by the runner and the analyzer. `tools/analyze.py ` (stdlib only, no inference) writes `summary.json`, `summary.md` and `tasks.csv`, byte-identically for the same input. -- Offline tests: `tools/test_analyze.py` (stdlib, runs in CI against a checked-in synthetic run) +- Offline tests: `tools/test_analyze.py` (stdlib; it ran in CI against a checked-in synthetic run) and `tools/test_runner_offline.py` (a scripted fake endpoint; needs the Odysseus venv; also runs every `sim-1` backend kind twice and checks the results are identical, and runs `runtime-v1` with the denial and approval negative controls). @@ -195,7 +196,7 @@ exist. `CORPUS-DIGEST.txt`. `tasks_digest` and `protocol_sha256` are unchanged. The 0.2 runs carry the digests they ran against in their own `manifest.json`, which is unchanged. -## Gate M live-model leg (PROTOCOL-0.3.md section 7) +## Gate M live-model leg (PROTOCOL-0.3.md section 7; historical, the tool was removed on 2026-10-15) `tools/live_injection.py` re-runs the injection fixtures of C01 to C08 and C11 (33 cases) with the scripted obedient model replaced by a live one. For each case it replays the fixture's earlier steps @@ -207,7 +208,7 @@ dialect and lets the mock authority decide. Temperature 0, seed 42, one run per --endpoint http://localhost:11434/v1 --model --out bench/runs//live/ `--scripted obey|refuse|silent|other|mixed` uses a deterministic fake endpoint instead (offline; -`tools/test_live_injection.py` runs in CI). Output: `manifest.json`, `cases/.json`, +`tools/test_live_injection.py` ran in CI). Output: `manifest.json`, `cases/.json`, `summary.json`, `summary.md`: follow rate (injected intent emitted / cases run) with Wilson 95 % interval per category and pooled, refusal / no-answer / other counts, and total violations (the only gated number, must be 0). The verdict (`summary.json` `verdict`, exit code) is PASS only when every @@ -221,9 +222,10 @@ and a lexical refusal match, or empty text). Arguments are stored only as digest Two C07 cases (23, 25) forge fields of an envelope, which a model cannot do; for them only the content that claims the forged value is live. -## Running the 0.2x campaign (PROTOCOL-0.2x.md, section 10) +## Running the 0.2x campaign (PROTOCOL-0.2x.md, section 10; historical) -Nothing here has been run on the held-out set. The runner switches, all required with `--backends sim-1`: +The campaign ran on 2026-10-05 (`runs/heldout-0.2x-20261005T0102Z`, qualified FAIL, see `STATUS.md`); the runner +that drove it was removed on 2026-10-15. The runner switches, all required with `--backends sim-1`: | Switch | What it does | |---|---| diff --git a/conformance/README.md b/conformance/README.md index 10e7801..b2701ac 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -8,7 +8,8 @@ was taken and is listed below. ## Layout - `fixtures/NN-slug.json`: the 27 required cases (01-18 core; 19 valid write, 20 missing required argument, 21 stale capability mapping, 22 untrusted tool result, 23 untrusted memory result; 24 expansion by requested_excluded, 25 expansion refused by bound; 26 unrecognized content_kind, 27 absent, null and unrecognized trust). `fixtures/injection/NN-slug.json`: injection cases (0.3 cut I1: scripted obedient model, judged for effects and content-derived intents; seed cases 01 workspace, 02 tool output, 03 forged approval; cut I2 cases 04-19 for C01 to C05, fixture-level `mock_data`; cut I3 cases 20-34 for C06 to C09 and C11 (20-22 C06, 23-25 C07, 26-28 C08, 29-31 C09, 32-34 C11); cut I4 cases 35-42 for C12 (35-38) and C13 (39-42), fixture-level `mock_fault`). `negative-controls.json` and `TRUST-DIGEST.txt`: the negative-control expectations (V1 to V8) and the corpus freeze file. `fixtures/digest/jcs-01.json`: the JCS digest check. `fixtures/lifecycle/NN-slug.json`: approval continuation cases driven against the lifecycle directly (01 forged id, 02 empty or missing id, 03 id minted for another request, 04 the runtime-minted id, 05 non-`authorized` continuation values); format in `spec/CORE.md`. `fixtures/approval/NN-slug.json`: approval cases A01 to A14 of bench/PROTOCOL-0.3.md plus SDK follow-ups 15 (explicit `denied` continuation value) and 16 (continuation decision citing another request_id), and 17, the protocol's A15 (`protocol_case: "A15"`: the approved effect fails at the provider after the approval was spent; mock `execute_raises`) driven through the pipeline with host-side `approve`, `cancel`, `restart` and `mock` steps (case name `approval-ANN-slug`); format in `spec/CORE.md` (Approval continuation). -- `../dialects/fixtures/{openai,qwen35}/*.json`: Lenshift parse fixtures. +- `../dialects/fixtures/{openai,openai_stream,qwen35,aien_legacy}/*.json`: Lenshift parse fixtures (56 in all, as + `interplane-corpus validate` reports). `../dialects/replay/` holds recorded provider streams. - `interplane-corpus validate` (`rust/crates/interplane-conformance`, module `fixture_check`): checks every envelope and intent against `spec/schemas/`, fixture shape, runtime-count consistency, the JCS fixture, plus negative controls. Exit status is non-zero on failure. Run from `rust/`: @@ -89,10 +90,11 @@ authorizes, and fail if the policy is removed. ## Raw evidence dumps (0.3 cut R1a) -Both runners take `--dump ` and write, per pipeline case, `.results.json` (every result payload in +The runner (`interplane-conformance`) takes `--dump ` and writes, per pipeline case, `.results.json` (every result payload in canonical form, `provenance.duration_ms` null) and `.inputs.json` (the full input ledger of the case trace, -whether or not the fixture asserts it). The verdict files are unchanged. The two runners write byte-identical dumps; -REPORT-0.3 counts gates P1, P2 and P4 over them (bench/PROTOCOL-0.3.md section 9). +whether or not the fixture asserts it). The verdict files are unchanged. When REPORT-0.3 was written, the Rust and +the now-removed Python runner wrote byte-identical dumps; REPORT-0.3 counts gates P1, P2 and P4 over them +(bench/PROTOCOL-0.3.md section 9). ## Corpus accounting (gate I) @@ -117,7 +119,14 @@ calls `decide`, so its `ObservedRecord` has `decide_invoked` false. The runner writes its full `observed` array (with `result_digest` filled) as canonical JSON (RFC 8785). The Rust runner's output must equal `conformance/expected/verdicts.json` byte for byte (the retired -Python runner produced the same file; CI compares on every change). The runner also compares its +Python runner produced the same file). The Spark gate `INTERPLANE-RUST` (`tests/gates/run.sh rust`) compares +them on every change that touches the code. To check by hand, from `rust/`: + +``` +cargo run -q -p interplane-conformance --bin interplane-conformance -- ../conformance/fixtures --out /tmp/verdicts.json +cmp /tmp/verdicts.json ../conformance/expected/verdicts.json +``` + The runner also compares its array to the fixture's `expected.observed` after setting every `result_digest` to null. ## Spec ambiguities resolved (fail-closed), with spec citations diff --git a/provenance/README.md b/provenance/README.md index fa5f2ab..32700a7 100644 --- a/provenance/README.md +++ b/provenance/README.md @@ -76,14 +76,14 @@ record is never rewritten to match a new result. `OpenWALDOByteTokenizer` custom code, not a Hugging Face `tokenizer.json`, so the load-support check says `unsupported_tokenizer` and the AIEN, trace and effect links are labelled missing. - `fixtures/real-waldo-tokenizer-json`: REAL bytes. WALDO CPU smoke run exported by the patched exporter - (aien-spark/waldo `export-tokenizer-json` 09f262c, writes a Hugging Face `tokenizer.json`), then + (aien-spark/waldo, now archived, `export-tokenizer-json` 09f262c, writes a Hugging Face `tokenizer.json`), then really loaded by aien-cli (sovereign-core PR #248 head 8e7b14d, debug build, CPU). The `aien` link is present with `candidate_id: null` (no frozen candidate, no `candidate_manifest` record); the daemon log is retained in full, including its warm-up refusal (plain base model, no chat template). Effect and INTERPLANE links are labelled missing. - `fixtures/real-waldo-aien-chain`: REAL bytes from ONE run (CPU evidence), see `REAL-CHAIN.md`. A tiny WALDO `chatml-v1` model, supervised-fine-tuned on tool-call conversations we wrote and exported with - `tokenizer.json` and the standard ChatML template (fork aien-spark/waldo `export-tokenizer-json` 4c407d7), is + `tokenizer.json` and the standard ChatML template (fork aien-spark/waldo, now archived, `export-tokenizer-json` 4c407d7), is loaded by the AIEN daemon (aien-cli, sovereign-core main 12c1a5f, release build, CPU-reference backend). AIEN's own generation path (`StreamTurn`) on that loaded model produces the tool-call text; the INTERPLANE `aien_legacy` dialect parses it; the adapter drives one approved `write_file`; the daemon's ledger records diff --git a/rust/README.md b/rust/README.md index 91f1f3b..cc6e1c7 100644 --- a/rust/README.md +++ b/rust/README.md @@ -1,18 +1,28 @@ -# INTERPLANE 0.1: Rust reference implementation +# INTERPLANE Rust reference implementation (workspace version 0.3.0) -Six crates, minimal dependencies (serde, serde_json, sha2, regex, thiserror; the probe adds ureq). No async runtime. +Six crates, minimal dependencies (serde, serde_json, sha2, regex, thiserror; the probe adds ureq, +and the conformance crate's default `schema-check` feature adds jsonschema). No async runtime. +Since 2026-10-15 this is the only implementation; the Python SDK was removed (see the root +README). - `interplane-core`: wire types, JCS canonical JSON and digests, envelope validation, request ledger, lifecycle state machine. -- `interplane-lenshift`: dialect parsers (`openai`, `qwen35`) that turn model output into tool requests. +- `interplane-lenshift`: dialect parsers (`openai`, `openai_stream`, `qwen35`, `aien_legacy`; `ajax` reserved) that turn model output into tool requests. - `interplane-crossaxis`: mapping tables, argument coercion, capability selection and measurement. -- `interplane-crossveil`: the admission pipeline (fails closed) and the mock runtime. -- `interplane-conformance`: runs `conformance/fixtures` and writes verdicts. +- `interplane-crossveil`: the admission pipeline (fails closed) and the mock runtime. Examples: `offline` and `todo_adapter`. +- `interplane-conformance`: two binaries. `interplane-conformance` runs `conformance/fixtures` and writes verdicts; `interplane-corpus` checks schemas and fixtures, freezes `TRUST-DIGEST.txt` and computes adapter subsets. The library module `adapter_runner` judges a new adapter. - `interplane-probe`: qualifies an OpenAI-compatible endpoint with measured probes. +Run these from this directory (`rust/`): + ``` -cargo test --offline -cargo run -p interplane-conformance -- ../conformance/fixtures --out /tmp/verdicts.json +cargo test --all +cargo run -q -p interplane-conformance --bin interplane-conformance -- ../conformance/fixtures --out /tmp/verdicts.json +cargo run -q -p interplane-conformance --bin interplane-corpus -- validate +cargo run -q -p interplane-crossveil --example offline INTERPLANE_PROBE_API_KEY=... cargo run -p interplane-probe -- --endpoint http://host:8000 --model M --out report.json --skip context ``` +The conformance crate has two binaries, so `cargo run -p interplane-conformance` needs `--bin`. The probe key is read from the environment only; it is never printed or written to the report. +The full check the Spark runs on every change is `tests/gates/run.sh rust` from the repository +root.