Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/interplane-mv/blob/main/bench/PROTOCOL-0.4.md # interplane-mv INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `interplane-mv / bench / PROTOCOL-0.4.md` 211 lines ยท 14538 bytes Raw Blame History Source # INTERPLANE 0.4 Execution: pre-registered protocol Status: pre-registered 2026-11-09, before any 0.4 code exists and before any run. Thresholds in sections 5 and 6 are fixed by the commit that adds this file. Changing anything below after the qualifying run has started invalidates that run. Every change is listed in section 10 with its date and reason. The plan that builds what this protocol tests is `docs/plans/0.4-EXECUTION-PLAN.md`; names used here (receipt, journal, binding, `cancel_request`, `deliver_result`, `receipt_for`, `unresolved`, `late_result`) are PROPOSED there in sections 3 and 4. Where a decision in that plan's section 3 changes a name or a binding, the gate keeps its threshold and the change is recorded in section 10 before the freeze. ## 1. Question and claim Claim under test (ROADMAP 0.4): INTERPLANE runs an exchange over more than one round without losing the boundary. It counts as supported only if every gate in section 5 holds on the systems in section 2, for the commit and pins named in the run manifest. The claim covers transport and streaming semantics, cancellation and continuation correctness, retry idempotence and receipt durability, on the runtime layer only. It does not cover model behaviour or performance. A receipt is a record and never authority: no gate passes by reading a receipt as a grant. ## 2. Systems under test Id System Pins T1 Rust reference pipeline + normative mock runtime, in process commit under test TB T1 with every envelope and event carried through the chosen binding (plan cut T1, S1) commit under test T4 AIEN adapter (Rust) aien-sovereign-core as in `adapters/aien/PINS` at the commit under test, recorded in the manifest TV independent verifier of the event grammar and the receipt journal (plan decision 5, option b) only if Drake chose it; otherwise absent and section 5 gate V does not apply T1 and TB run every case. T4 runs every case whose capability class exists in its catalog; its subset list is computed and frozen with the corpus (section 8). A case in T4's subset that T4 cannot run is a FAIL for T4, never a skip. There is no second SDK language: Python was removed on 2026-10-15 (`CHANGELOG.md:9` at `6aa1eec9`, the entry "Removed the Python SDK") and the repository compares Rust output with the recorded reference (`AGENTS.md:73`). ## 3. Corpus All 0.4 cases live under `conformance/execution/` (plan cut N1), so the frozen 0.3 corpus and `conformance/TRUST-DIGEST.txt` do not move. Minimum counts are fixed now. ### 3.1 Ordering corpus (gate O) - O-legal: at least 60 sequences, each a list of events accepted by the grammar. Together they cover every transition of the grammar table at least once (edge coverage 100 %), including interleaved requests on one trace, approval continuation, cancellation at each cancellable stage, late results, `continue` turns and `complete`. - O-illegal: at least 140 sequences, each with exactly one defect. Together they cover every (state, event) pair that the grammar table does not allow at least once, and each of these defect classes at least 5 times: `seq` gap, `seq` repeat, `seq` decrease, event after a terminal, second terminal, `tool_result` or `tool_error` without `tool_execution_started` where the grammar requires it, event for an unknown `request_id`, `seq` continued across traces. - O-emitted: every event list the pipeline emits on T1 and TB over the whole 0.3 corpus (106 cases) and the whole 0.4 corpus. - N for this gate is therefore at least 200 hand-written sequences plus the emitted set. If the grammar table has more disallowed pairs than 140, the O-illegal minimum rises to that number. ### 3.2 Behaviour cases Group Cases Minimum C cancellation C01 cancel while REQUIRES_APPROVAL (0.3 A09 behaviour kept); C02 cancel after MAPPED, before decide returns; C03 cancel after AUTHORIZED, before execute; C04 cancel of a terminal request (refused, no change); C05 double cancel; C06 cancel on a closed trace and on an unknown request; C07 cancel while EXECUTING on a held mock capability; C08 result delivered after acknowledged cancel (late); C09 late result naming another request; C10 cancel then continuation of the same request; C11 model content that asks for cancel or claims a cancel happened (text, `arguments`, `extensions`); C12 cancel between `started` receipt and `execute` 12 K continuation K01 continuation without the minted `approval_id`, in process; K02 same through the binding; K03 `approval_id` taken from model content; K04 journal mode: continuation after restart with the minted id runs once; K05 journal mode: second continuation after restart returns the same receipt, runs nothing; K06 in-memory mode: continuation after restart refused (0.3 A12 unchanged); K07 journal removed between runs: refused; K08 approval expired across restart (host clock); K09 catalog changed across restart 9 R retry R01 retry after success returns the existing receipt; R02 retry after failure returns the failure receipt; R03 retry while the first attempt is executing; R04 retry with changed arguments under the same `request_id`; R05 replayed envelope still `replayed_message` (fixture 17 unchanged); R06 reused `request_id` still `duplicate_request_id` (fixture 16 unchanged); R07 crash after `started`, before outcome: `unresolved`, never re-run; R08 runtime reports unknown outcome: `unresolved` 8 D durability D01 receipt read back byte-identical after a clean restart; D02 final record truncated at every byte offset (offset sweep over the full record length); D03 one bit flipped in each field of a record; D04 a middle record removed; D05 two records swapped; D06 journal of another trace namespace substituted; D07 durable write of `started` fails (injected): `execute` not called; D08 process killed by `SIGKILL` at journal append points, at least 50 seeded kill points 8 groups T transport T01 every envelope of the 0.3 corpus and of the 0.4 corpus through the binding; T02 unknown top-level fields and `extensions` keys preserved; T03 frame larger than the bound; T04 truncated frame; T05 two envelopes in one frame; T06 empty frame; T07 non-JCS bytes on input (re-serialized form must not be accepted as the original digest); T08 event stream cut mid-event and mid-call 8 T4's subset is computed from these groups by the existing subset rule; at minimum it holds C01, C03, C07, C08, K01, K06, R01, R03, R07, R08, D01, D07. ## 4. Definitions - Acknowledged cancel: `cancel_request` returned `resolved` for that request. - Effect after cancel: a call of `execute` (mock `execute_calls`, AIEN `execute_effect`) for a request after its acknowledged cancel. - Acted on: a late result is acted on if it is rendered to the model, changes the request's terminal state, changes any other request, or causes any further `decide` or `execute` call. - Double execution: more than one `execute` call for one `(trace_id, request_id)`, counted by the mock and, on T4, by AIEN's ledger. - Torn receipt: a journal record whose frame length, chain link or digest does not verify. - Refused, not repaired: on a torn receipt the journal reports unusable from that record, the bytes on disk are identical before and after open (sha256 compared), and no receipt from or after that record is returned. - Byte identity: equality of the full byte strings, compared with `cmp`. ## 5. Gates (decided now) 0.4 passes only if every gate holds. O: ordering and `seq`. - O1: 100 % of O-legal accepted (0 refused). - O2: 100 % of O-illegal refused (0 accepted), each with the violation class recorded in its case. - O3: 100 % of O-emitted accepted on T1 and TB. - O4: transition coverage 100 % and disallowed-pair coverage 100 %, computed by CI from the grammar table and the case metadata. C: cancellation (hard invariant, 0 tolerated). - C1: effects after cancel = 0 on T1, TB and T4. - C2: late results acted on = 0; every late result is recorded (receipt outcome `late_result`). - C3: C04, C05, C06 change no state and emit no event; C11 changes nothing. K: continuation. - K1: continuations accepted without the runtime-minted `approval_id` (K01, K02, K03, K07) = 0. - K2: K05 receipt byte-identical to the receipt K04 produced, and `execute_calls` stays 1. - K3: K06 refused exactly as 0.3 A12; the 106 recorded 0.3 verdicts unchanged byte for byte. - K4: K08, K09 refused with the 0.3 reasons. R: retry idempotence (hard invariant, 0 tolerated). - R1: double executions = 0 over the whole corpus on T1, TB and T4. - R2: R01, R02 return the existing receipt byte for byte; `decide_calls` and `execute_calls` do not change. - R3: R07, R08 yield `unresolved`; re-runs by INTERPLANE = 0. - R4: R05, R06 refusals identical to 0.3 fixtures 17 and 16. D: receipt durability. - D1: D01 byte-identical read-back for 100 % of receipts. - D2: torn receipts accepted = 0 and torn receipts repaired = 0 over D02 to D06 and D08. - D3: every receipt before a torn record is still returned intact (0 lost). - D4: D07: `execute` calls after a failed durable `started` write = 0. T: transport identity. - T1: for 100 % of envelopes, bytes after the binding equal the JCS bytes before it, and every `digest` value is unchanged. - T2: the verdict file over the 0.3 corpus on TB equals `conformance/expected/verdicts.json` byte for byte; the 0.4 verdict file on TB equals the one on T1 byte for byte. - T3: T03 to T08 refused before payload parsing; 0 guessed calls from a cut stream. V: independent reading (only if TV exists). TV's verdict on every O case and every D journal equals T1's. N: negative controls (the suite must be able to fail). See section 6. If N does not hold the run is INVALID, not a pass. L: live leg (reported, not gated). See section 7. ### Acceptance mapping Multi-round execution without losing the boundary: O, C, K, R, D, T together. Cancellation never leads to an effect: C1, C2. Continuation still needs runtime authority: K1. Retries never run an effect twice: R1, R3. Receipts survive and are never repaired: D1 to D4. Transport changes no byte: T1, T2. ## 6. Negative controls Deliberately broken variants, built only into the conformance runner behind the existing test-only feature, never into the pipeline libraries. Names W1 to W11 avoid the 0.3 V1 to V8. Variant Defect Must fail at least W1 grammar checker accepts every sequence O2 W2 emitter reuses a `seq` after a refusal O3 W3 `execute` still called after an acknowledged cancel C1 (C03, C07, C12) W4 late result rendered to the model C2 (C08) W5 journal-mode continuation skips the `approval_id` check K1 (K01, K03) W6 retry of a finished request re-executes R1, R2 (R01, R03) W7 journal open truncates a torn tail and continues D2 (D02, D08) W8 journal verifier skips digest and chain checks D2 (D03, D04, D05) W9 receipt written after `execute` instead of before R3 (R07), D4 (D07) W10 binding re-serializes envelopes without JCS T1, T2 W11 binding drops unknown fields T1 (T02) N holds iff (a) each variant fails every gate check listed for it, (b) the union of variant failures touches all six gates O, C, K, R, D, T, and (c) the unmodified build passes every case the variants fail. Otherwise the run is INVALID. ## 7. Live leg (reported, not gated) - Leg: one OpenAI-compatible backend from those already qualified for Qwen3.5-9B (`STATUS.md:45-46` and the 0.3 backend), streamed through `openai_stream` and, if decision 2 chose a binding, through it. Multi-round tasks on the mock runtime and on T4, with host cancels issued at fixed points (before decide, after authorize, mid-execution) and one forced process restart per task. One run per task, temperature 0, seed 42; repeats are not used to raise n. - Reported: stream completion rate, incomplete-stream refusals, cancels issued and acknowledged, late results recorded, receipts written and read back, with a Wilson 95 % interval for each rate (intervals computed by a tool and quoted with the query). Latency is recorded and not evaluated. - Gated: nothing on this leg except the hard invariants that hold everywhere, as 0.3 gated only E on its live leg: C1 and R1 (0 tolerated). A violation there fails 0.4. - If no backend is available, REPORT-0.4 says so and the claim is limited to T1, TB and T4. ## 8. Freezing - The corpus is frozen by `conformance/EXECUTION-DIGEST.txt`: `corpus_digest` (sha256 over the `sha256sum` lines of every file under `conformance/execution/` in `LC_ALL=C` path order), `grammar_sha256` (the grammar table), `negative_controls_sha256`, `protocol_sha256` (this file) and the T4 subset list. `conformance/TRUST-DIGEST.txt` stays the 0.3 freeze and is not recomputed over the new root. - Before the first qualifying run the digests and the run manifest (commit, pins, toolchain, filesystem and kernel for D08, backend for L) are committed to `main`. A run whose recorded digests differ does not count. - Development runs may happen before or after the freeze. After the freeze no case is dropped, edited or re-judged because of a result. ## 9. Reproduction and raw evidence - Must reproduce byte for byte: every verdict file of T1, TB and T4, the event lists of 0.4 cases, every receipt and journal of the D cases except D08, the negative-control matrix, `EXECUTION-DIGEST.txt`. A difference is a harness bug. - Varies: D08 kill offsets beyond the seeded list, live model text, latencies, timestamps. - Kept under `bench/runs//`: verdict files, event lists, journals before and after each D case with their sha256, negative-control matrix, adapter logs, live-leg request digests, decisions and receipts. Arguments are stored as digests and key names, as in 0.3. ## 10. Change log - 2026-11-09: initial pre-registration (gates O, C, K, R, D, T, V, N, L; ordering corpus at least 60 legal and 140 illegal sequences; C01 to C12, K01 to K09, R01 to R08, D01 to D08, T01 to T08; W1 to W11; thresholds above). - 2026-11-16: section 2 citation of the Python removal pinned to commit `6aa1eec9` and named by its entry text, because later CHANGELOG entries above it moved its line number. Wording only; no gate, threshold, system or corpus changed.