{"type":"meta","slug":"pi-envelope-fixture","base_branch":"origin/main","gate0_mode":"strict","preset":"codex","land_mode":"none"}
{"type":"goal","text":"Give the Pi wrapper terminal-contract fixtures Pi's real session.started/agent.finished envelope and add rate-limit (exit 75) coverage."}
{"type":"methodology","text":"TDD on the existing suite; keep every existing assertion; change only the named test file; report the acceptance command's real output."}
{"type":"intent","text":"Close the SPEC-P3 residual fixture gap so wrapper terminal-contract coverage reflects Pi's actual output shape rather than a generic stub."}
{"type":"direction","verbatim":"do not push main; the run leaves its work on its own branch and the coordinator lands it"}
{"type":"direction","verbatim":"edit only modules/harness/v2/test/wrapper-terminal-contract.test.js"}
{"type":"anchor","path":"docs/plans/2026-08-04-pi-envelope-fixture.md","what":"plan"}
{"type":"task","id":"t1","wave":1,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-08-04-pi-envelope-fixture.md Task 1 for the full contract. Replace the Pi stub's generic {\"type\":\"result\"} envelope with Pi's real session.started/agent.finished envelope, and add a rate-limit case with resume_at asserting exit 75 plus exactly one usage event and one status line. Keep every existing assertion. Acceptance: node --test modules/harness/v2/test/wrapper-terminal-contract.test.js. Commit only: modules/harness/v2/test/wrapper-terminal-contract.test.js.","files_modify":["modules/harness/v2/test/wrapper-terminal-contract.test.js"],"acceptance":["node --test modules/harness/v2/test/wrapper-terminal-contract.test.js passes with zero failures","the Pi stub emits session.started and agent.finished lines, not a generic result envelope","a rate-limit case with resume_at asserts exit 75 with exactly one usage event and one status line"],"requires_decision":null,"verify":["node --test modules/harness/v2/test/wrapper-terminal-contract.test.js"]}
