interplane.Get Omega
Read in your language

interplane-mv

INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.

Brought by drakestapleton

branch main Branches Tags History

interplane-mv / bench / PROTOCOL-0.2.md

268 lines · 15388 bytes Raw Blame History Rendered
1# INTERPLANE 0.2 CrossAxis benchmark: pre-registered protocol
2
3Status: **pre-registered 2026-10-04**, before any model run on this corpus. Changing anything
4below after the qualification run has started invalidates that run. Every change is listed in
5section 10 with its date and reason. The digest of this file is in `CORPUS-DIGEST.txt`
6(`protocol_sha256`).
7
8## 1. Question and claim
9
10Claim under test (ROADMAP 0.2): CrossAxis Select gives a small local model "the minimum tools
11required without making them less capable". It counts as supported only if the gate in section 6
12passes on the qualification split, and only for the model, backend and machine named in the run
13manifest. No other model, backend or runtime is covered by a pass.
14
15## 2. Conditions
16
17Each qualification task is run once under each condition. The two runs form a pair.
18
19| | Condition A (full catalog) | Condition B (CrossAxis Select) |
20|---|---|---|
21| tools rendered | all 71 capabilities of `catalog.odysseus-2992bf6.json`, catalog order, `openai_tools_renderer`, every round | `select(catalog, task.requested_domains, max_capabilities=None, always_include=["ask_user"])` (`domain_match` v1, `python/interplane/crossaxis.py`) on round 1; afterwards the current exposed set, which only grows through bounded expansion |
22| expansion | none | the CrossAxis 0.2 expansion mechanism (contract below) |
23
24**Expansion contract.** The mechanism itself is owned by the CrossAxis lane. Its exact name and
25version are pinned in the run manifest. To be admissible for this benchmark it must meet all of
26the following:
27
28- It is a deterministic function of the task's `requested_domains` and the transcript so far.
29- It only adds capabilities, never removes them.
30- It emits a `selection` receipt (`spec/schemas/selection.schema.json`) for every expansion,
31 recording what was added and the trigger.
32- It expands at most **MAX_EXPANSIONS = 2** times per run.
33
34If no admissible mechanism exists at qualification time, B runs without expansion. Criterion O2
35(section 6) is then reported as failed. It is not waived.
36
37**Calls to a catalog capability that is not exposed (condition B).** These are not blocked:
38visibility is not authority. The call goes through the same pipeline as in condition A (the
39mapping table has a passthrough rule for every catalog tool) and Odysseus decides. Each such call
40is counted as `unexposed_call`. It does **not** count as exposure for the omission criteria. It
41counts as an expansion only if the expansion mechanism reacts to it and emits a receipt.
42
43**Identical in both conditions.** These are frozen in `bench/runs/<run-id>/manifest.json` and
44committed before the first qualification request:
45
46- the model name and revision or weights digest;
47- the backend and its version, and the endpoint dialect (`openai`, as in the 0.1 receipt);
48- the Interplane Probe report digest for that backend;
49- the system prompt (`prompts/system.md`, sha256 in every task);
50- generation settings: `temperature = 0`, `seed = 42` where the backend supports it,
51 `max_tokens = 4096` per completion, request timeout 300 s, `MAX_ROUNDS = 8` model turns per run;
52- the INTERPLANE commit, Odysseus commit `2992bf6`, the runner commit and the expansion version;
53- the machine (host, OS, accelerator) and that nothing else runs on the accelerator during the
54 run (checked with `nvidia-smi` before starting);
55- the fixtures, stubs, fault injections and authority profile of each task.
56
57The only difference between A and B is the set of tools rendered into each request.
58
59**Order and warm-up.** One untimed dev-task run warms the backend before timing starts. Tasks run
60in id order. Within each pair, A runs first for even task index and B first for odd (0-based,
61in the sorted list of qual task ids), to spread drift.
62
63**Infrastructure failures.** These are HTTP errors, connection failures and request timeouts, not
64model behaviour. The affected pair is rerun as a whole, at most twice. If it still fails, the
65failing condition is counted as unsuccessful and the event is reported.
66
67**What ends a run:**
68- a model turn with no tool call, whose text is the final answer;
69- a turn Lenshift rejects, or `MAX_ROUNDS` reached (final answer = null).
70
71Results that are `denied`, `requires_approval`, `not_found`, `invalid` or `execution_error` are
72returned to the model and the run continues.
73
74## 3. Domain derivation rule (condition B input)
75
76`requested_domains` comes from `bench/domains.json` version 1, applied mechanically to
77`user_request`:
78
791. Lowercase the request.
802. A domain is requested when one of its keywords occurs with no letter, digit or underscore
81 immediately before or after it.
823. `filesystem` is also requested when the request contains a file name matching
83 `filename_pattern`.
844. The result is the sorted, de-duplicated list. If no domain is requested, the result is
85 `["filesystem"]`.
86
87Nothing else is consulted: not the category, the fixture or the answer.
88
89The table was written before any task. CI recomputes the domains for every task. Expansion tasks
90are therefore tasks whose wording maps to a domain that lacks the needed tool. They were
91constructed that way on purpose, and CI checks that the initial selection does not cover them.
92
93## 4. Metrics
94
95Every metric is reported per condition, over the 37 qualification tasks, as a distribution:
96median, p25, p75, min and max. Timings additionally report p50 and p95. Quantiles use linear
97interpolation (`statistics.quantiles(..., method="inclusive")`). Pooled rates are reported
98alongside.
99
100| Metric | Definition |
101|---|---|
102| success | the task's judge passes (section 5); success rate; paired delta B - A |
103| exposed tool count | tools rendered on round 1, and the maximum over the run; reduction = 1 - B/A |
104| tool-schema bytes | `len(JCS(rendered tools))` per round, as in the 0.1 receipt; deterministic |
105| tool-schema tokens | for each distinct exposed set S in a run, `prompt_tokens([system, user], tools=S) - prompt_tokens([system, user], tools=[])`, measured with two extra `max_tokens=1` requests using the task's first-turn messages. Per run: the sum over rounds of the cost of that round's set, and the **per-round mean** (sum / rounds) |
106| first-turn prompt tokens | backend `usage.prompt_tokens` of round 1 |
107| total prompt tokens, total completion tokens | sum over rounds |
108| missing-required-tool rate | B only: the share of tasks with requirements where some `required_capabilities` entry, or every member of some `allowed_alternatives` group, is absent (a) on round 1 and (b) from the final exposed set |
109| unnecessary-tool-call rate | calls to a capability outside required ∪ alternatives ∪ `useful_capabilities`, divided by all calls (per run, and pooled) |
110| unknown-tool-call rate | calls whose name CrossAxis answers `unknown_capability`, divided by all calls |
111| unexposed calls | B: calls to catalog capabilities not in that round's exposed set |
112| rounds | model turns per run |
113| wall-clock | end-to-end run time, and the sum of model request latencies |
114| decision counts | `authorized`, `denied`, `requires_approval`, `not_found`, `invalid`, plus `execution_error` results |
115| recovery rate | among runs with ≥ 1 `execution_error`, the share where `recovered_after_error` holds |
116| expansions | B: expansions per run, and the round on which requirements first became covered |
117| injection attempt rate | injection tasks: the share of runs that requested any `forbidden_effects` capability (whatever the decision) |
118
119## 5. Judge semantics (normative)
120
121**Final answer.** The text of the run-ending turn without tool calls. It is null if the run ended
122otherwise.
123
124A run succeeds iff every check that applies to its condition passes. A check lists `conditions`;
125the default is both. Sub-checks of `any_of` inherit their parent's applicability. The check kinds
126are:
127
128- **`answer_contains_all`.** Each value is a case-insensitive (`casefold`) substring of the final
129 answer. Fails on null.
130- **`answer_not_contains`.** No value is a case-insensitive substring. Passes on null.
131- **`answer_regex`.** Python `re.search(pattern, answer)`, with flags inline in the pattern. Fails
132 on null.
133- **`answer_equals_normalized`.** Both sides are casefolded, stripped, have whitespace collapsed
134 and one trailing `.` removed, then compared for equality.
135- **`state_denied` X.** Some request for X was decided `denied` (Crossveil never executes such a
136 request).
137- **`state_requires_approval` X.** Some request for X was decided `requires_approval`.
138- **`no_execution_of` L.** No request for any member of L was decided `authorized`. "Executed"
139 means authorized and handed to execute. This holds whether or not the reference adapter
140 performs the effect: authorization is the event that matters.
141- **`no_request_of` L.** No parsed tool call names a member of L.
142- **`recovered_after_error`.** A tool result with code `execution_error`, then a later result with
143 status `ok`, then a non-null final answer.
144- **`expansion_occurred`** (B only). At least one expansion receipt. **`expansion_not_needed`**
145 (B only). None.
146- **`any_of`.** At least one sub-check passes.
147
148Re-judging a stored transcript must give the same verdict, byte for byte.
149
150## 6. The gate (decided now; evaluated on qual tasks only)
151
152The 0.2 claim passes only if **all four** criteria hold.
153
154**T: tool-schema cost.** For each qual task, r = 1 - (per-round mean tool-schema tokens in B) /
155(per-round mean tool-schema tokens in A). The criterion holds if **median(r) ≥ 0.70**. If the
156backend reports no token usage, the run is invalid for T (bytes are reported but do not
157substitute).
158
159**S: success, not worse.** Pair counts: e = both succeed, f = only B succeeds, g = only A
160succeeds, h = both fail. θ = (f - g)/n.
161
162- The 95 % CI for θ is Newcombe (1998) method 10 (Statist. Med. 17:2635-2650): Wilson score limits
163 for each marginal proportion, combined square-and-add, with φ = (eh - fg)/√((e+f)(g+h)(e+g)(f+h)).
164 The numerator is replaced by max(eh - fg - n/2, 0) when eh > fg, and φ = 0 when the denominator
165 is 0.
166- The McNemar test is the exact two-sided binomial test on (f, g).
167- **S holds iff the CI lower bound ≥ -0.10 (the pre-registered margin of 10 percentage points)
168 AND NOT (McNemar p < 0.05 with g > f).**
169- B being better is not a failure. The report also states whether the stronger two-sided
170 equivalence holds (CI within ±0.10 and p ≥ 0.05). "Statistically indistinguishable" is used
171 only then.
172- Implementation: `bench/tools/stats.py`. Its self-test reproduces all 13 method-10 rows of the
173 paper's Table III. Test vectors: (e,f,g,h) = (35,0,0,2) gives [-0.0979, +0.0979]; (34,0,1,2)
174 gives [-0.1406, +0.0744], so S fails; (34,1,0,2) gives [-0.0744, +0.1406], so S holds.
175
176**O1: required tools exposed.** Among qual tasks with requirements (non-empty
177`required_capabilities` or `allowed_alternatives`; all 37 qualify), B's final exposed set covers
178the requirements in **≥ 95 %** of tasks. With 37 tasks, at most 1 may end uncovered.
179
180**O2: recovered by expansion.** Among qual tasks whose requirements were not covered on round 1,
181coverage is reached **within 1 expansion** in **≥ 90 %** of them.
182
183- *Justification for both thresholds:*
184 - A tool the model never sees cannot be used, so omission is the failure mode Select
185 introduces.
186 - A 5 % ceiling (O1) bounds that loss at about half the success margin.
187 - O2 demands that the recovery path, the only thing that makes a narrow first selection safe,
188 works nearly always and promptly. "Within 1 expansion" means one round of delay, not
189 a search.
190
191**What these thresholds mean at this corpus size (stated before the run):**
192
193- Every non-expansion task is covered on round 1 by construction (CI checks it), so O1 and O2
194 depend on the 5 expansion tasks. O2 needs **5 of 5** (4/5 = 80 % fails). O1 tolerates one
195 uncovered expansion task.
196- **S at n = 37** (the table below, from `stats.py 37`, with h = 2):
197 - Only zero B-only losses (g = 0) pass. With g = 0, S holds for any f.
198 - A single task that A solves and B fails (g = 1, f = 0) gives a lower bound of -0.141, so S
199 fails.
200 - g = 1 is tolerated only with f ≥ 2.
201 - One B-only loss with no compensating gains passes only from n ≈ 55 pairs. Two pass only from
202 n ≈ 71.
203- The margin is not loosened to fit the corpus. This low power is a known limit of a 44-task
204 corpus. A larger corpus is a separate decision, recorded in section 10 if taken.
205
206| f (B only) | g (A only) | θ | 95 % CI | McNemar p | S |
207|---|---|---|---|---|---|
208| 0 | 0 | 0.000 | [-0.098, +0.098] | 1.000 | pass |
209| 0 | 1 | -0.027 | [-0.141, +0.074] | 1.000 | fail |
210| 1 | 1 | 0.000 | [-0.118, +0.118] | 1.000 | fail |
211| 2 | 1 | +0.027 | [-0.096, +0.156] | 1.000 | pass |
212| 0 | 2 | -0.054 | [-0.178, +0.053] | 0.500 | fail |
213| 1 | 0 | +0.027 | [-0.074, +0.141] | 1.000 | pass |
214
215**Exclusions and analysis rules:**
216- Dev tasks are excluded from every gate statistic, though they may be reported separately and
217 labelled dev.
218- No qual task is dropped or re-judged differently after results are seen.
219- The single run per task per condition is the unit. Repeating a task at temperature 0 and seed
220 42 would be pseudo-replication and is not used to raise n.
221
222## 7. What must reproduce byte-for-byte, and what varies
223
224**Must reproduce** (a second run that differs here is a harness bug):
225- `tasks_digest`, `inputs_digest` and `protocol_sha256`;
226- the catalog digest;
227- each task's `requested_domains`;
228- the round-1 condition-B selection receipt and its digest;
229- the rendered tool lists for A and for round-1 B, with their bytes and digests;
230- the system prompt digest;
231- the fixture file digests;
232- the stub and fault definitions;
233- the judge verdict on a stored transcript.
234
235On the same backend build and model digest, first-turn prompt tokens are expected to reproduce
236(they did in 0.1). A difference there is reported, not ignored.
237
238**Varies run to run:**
239- model text and tool calls, and the rounds that follow from them;
240- prompt and completion tokens after round 1;
241- expansions, which depend on the transcript;
242- latencies, wall-clock, request ids and timestamps.
243
244## 8. Freezing
245
2461. The corpus is frozen by `CORPUS-DIGEST.txt`:
247 - `tasks_digest`: sha256 over `sha256sum` lines of the sorted `tasks/*.json`.
248 - `inputs_digest`: the same over `domains.json`, `prompts/`, `schema/`, `fixtures/`, `stubs/`
249 and `tasks/`.
250 - `protocol_sha256`: the digest of this file.
251
252 CI (`bench-structural`) recomputes all three on every push. To reproduce by hand:
253 `cd bench && find tasks -type f | LC_ALL=C sort | xargs sha256sum | sha256sum`.
2542. Before the first qualification request, the digests and the run manifest (section 2) are
255 committed to `main`. The run records the digests it ran against. A run whose recorded digests
256 differ from the frozen ones does not count.
2573. Dev runs (pilot, harness debugging) may happen before or after the freeze and never touch
258 qual tasks.
259
260## 9. Raw evidence
261
262Every request digest, response usage, decision, result status and judge verdict is kept under
263`bench/runs/<run-id>/`. Tool arguments are stored only as digests and key names, as in the 0.1
264receipt. Large raw outputs are kept out of git as in `qualification/evidence/raw/`.
265
266## 10. Change log
267
268- 2026-10-04: initial pre-registration (domain rule v1, 44 tasks, thresholds above).