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

GitHub aien-dev/interplane-mv#54 (code only)

closed derived 3eb16e8445d40046 #54

Imported from GitHub aien-dev/interplane-mv#54 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base d33ef187a83e4f3525af7092252835637091b6c8 · Head 550b4b595b938b359c44224590ab3c10d0badd9d

greptile-apps[bot] reviewed (COMMENTED) on 2026-10-05 12:30 UTC

aien-dev has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Apply it

git checkout -b patch-3eb16e8445d40046 d33ef187a83e4f3525af7092252835637091b6c8
curl -fsSL https://interplane.io/drakestapleton/interplane-mv/patches/3eb16e8445d40046.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/interplane-mv
54
550b4b595b938b359c44224590ab3c10d0badd9d
{"kind":"github-import","owner":"aien-dev","repo":"interplane-mv","number":54,"url":"https://github.com/aien-dev/interplane-mv/pull/54","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:40:07Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ca3cd7..9d18605 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
 
 ## Unreleased (0.3, Trust lane)
 
+- Bench receipts: `attempt` is now the number of runs of that condition. Before, a pair whose re-run also failed was labelled one too high (`attempt: 3` after two runs, REPORT-0.2x Limits), and in campaign mode a condition that never failed carried the pair's count. Offline test added (the old code fails it). Re-running `analyze.py` on `heldout-0.2x-20261005T0102Z` reproduces both committed summaries byte for byte.
 - Release preparation (plan 19.7 item 8): version 0.3.0 for the Rust workspace and the Python package (descriptions no longer say 0.1; intra-workspace path dependencies carry versions so `cargo package` works). Offline example `examples/offline/run_offline.py` (scripted injection, mock runtime, self-checking). CI job `package`: builds the wheel, installs it in a clean venv, runs the example from outside the checkout, checks that conformance from the wheel is byte-identical to the checkout, and runs `cargo package --workspace --locked`. Nothing is published to PyPI or crates.io.
 - AIEN adapter re-pinned to aien-sovereign-core 0bdc97a (#208: idempotency ledger bound to effect identity, `ApprovalDesk::revoke` for unspent grants, new `Error::IdempotencyConflict` and `ApprovalError::Revoked`). Made after REPORT-0.3 merged, so the 0.3 T4 evidence stays at 0c1d249. No adapter code change; a spent grant still cannot be given back (sovereign-core #206).
 - 0.2x campaign report (`docs/REPORT-0.2x.md`, run `bench/runs/heldout-0.2x-20261005T0102Z`): all four arms FAIL O1 and O2; T 0.89 everywhere; S passes in arms 1 to 3; not fragile. All 48 HTTP 500s were Ollama 0.34.0 failing to parse malformed Qwen3.5 tool calls.
diff --git a/bench/tools/run_bench.py b/bench/tools/run_bench.py
index 86bb1bd..ffe056b 100644
--- a/bench/tools/run_bench.py
+++ b/bench/tools/run_bench.py
@@ -721,6 +721,7 @@ def make_receipt(cx: dict, task: dict, cond: str, run: dict, attempt: int, prior
 def run_pair(cx: dict, task: dict, order: list, run_id: str, out: Path, conds: list) -> dict:
     prior: list = []
     runs: dict = {}
+    tries = {c: 0 for c in order}  # runs per condition; the receipt's `attempt`
     campaign = cx["campaign_mode"]
     # 0.2: up to 3 whole-pair attempts. Campaign (PROTOCOL-0.2x.md section 6): a run with an
     # infrastructure failure is re-run once, only the failed conditions.
@@ -731,6 +732,7 @@ def run_pair(cx: dict, task: dict, order: list, run_id: str, out: Path, conds: l
             if campaign and cond in runs and not runs[cond]["infra_failure"]:
                 continue
             runs[cond] = run_condition(cx, task, cond, run_id)
+            tries[cond] += 1
         bad = [c for c in order if runs[c]["infra_failure"]]
         if not bad:
             break
@@ -744,7 +746,7 @@ def run_pair(cx: dict, task: dict, order: list, run_id: str, out: Path, conds: l
     if "A" in runs and "B" in runs and not (runs["A"]["infra_failure"] or runs["B"]["infra_failure"]):
         pm = pair_measure(cx, task, runs)
     for cond in order:
-        rc = make_receipt(cx, task, cond, runs[cond], len(prior) + 1, prior, pm, run_id)
+        rc = make_receipt(cx, task, cond, runs[cond], tries[cond], prior, pm, run_id)
         write_json(out / "receipts" / f"{task['id']}.{cond}.json", rc)
     return {c: runs[c] for c in order}
 
diff --git a/bench/tools/test_runner_offline.py b/bench/tools/test_runner_offline.py
index 3ce9ef6..baa9bc5 100644
--- a/bench/tools/test_runner_offline.py
+++ b/bench/tools/test_runner_offline.py
@@ -420,6 +420,20 @@ def main() -> int:
         run_bench.main(["--tasks", "dev", "--condition", "both", "--endpoint", f"http://127.0.0.1:{srv.server_port}/v1",
                         "--out", str(out), "--tasks-dir", str(tdir), "--allow-nonfrozen", "--no-warmup", "--resume"])
         assert len(Handler.log) == before
+    # receipt `attempt` = runs of that condition (REPORT-0.2x: both-failed pairs were labelled 3)
+    saved = (run_bench.run_condition, run_bench.measure_run_tokens, run_bench.make_receipt, run_bench.write_json)
+    seen = {}
+    run_bench.run_condition = lambda cx, task, cond, rid: {"infra_failure": cond == "A", "infra_error": "HTTPError 500" if cond == "A" else None}
+    run_bench.measure_run_tokens = lambda cx, run: None
+    run_bench.make_receipt = lambda cx, task, cond, run, attempt, prior, pm, rid: seen.setdefault(cond, (attempt, len(prior)))
+    run_bench.write_json = lambda path, obj: None
+    try:
+        for campaign, want in ((True, {"A": (2, 2), "B1": (1, 2)}), (False, {"A": (3, 3), "B1": (3, 3)})):
+            seen.clear()
+            run_bench.run_pair({"campaign_mode": campaign}, {"id": "t"}, ["A", "B1"], "r", Path("."), ["A", "B1"])
+            assert seen == want, (campaign, seen)
+    finally:
+        run_bench.run_condition, run_bench.measure_run_tokens, run_bench.make_receipt, run_bench.write_json = saved
     print("offline runner test: PASS")
     return 0
 
diff --git a/docs/REPORT-0.2x.md b/docs/REPORT-0.2x.md
index 8ff1f46..c846f13 100644
--- a/docs/REPORT-0.2x.md
+++ b/docs/REPORT-0.2x.md
@@ -100,6 +100,8 @@ A, B1 and B3 alike.
 
 Each failed receipt is labelled `attempt: 3` although two attempts ran (`prior_infra_failures`
 lists both); the label counts one too many when both fail. The data are correct.
+Fixed after publication: `attempt` now counts the runs of that condition. This run's receipts
+stay as recorded.
 
 ### Latency
 
@@ -147,5 +149,5 @@ is a candidate compatibility note for the backend. No upstream issue was filed.
 
 1. A trigger for wrong-domain tool use, or another mechanism that reaches `nopath` tasks, needs a
    new pre-registered protocol and a fresh held-out set before any claim.
-2. Fix the receipt `attempt` label in `bench/tools/run_bench.py`.
+2. Fix the receipt `attempt` label in `bench/tools/run_bench.py` (done after publication).
 3. A rule for failed baseline runs in the next protocol.