s-02 Gate engine-read: verify_and_complete_v7 requires the LLVM dual-exec verdict
Goal
Make scripts/plan_orchestrator/review_phase.py:verify_and_complete_v7 (the SOLE
v7 done-writer, INV-17) ENGINE-READ each compiler-scope section’s LLVM dual-exec
verdict from test-all-summary.json (s-01’s per_section_llvm_parity) and
fail-closed — replacing the caller-passed tests_pass=True / dual_exec_parity=None
defaults that today let an LLVM-red section complete.
Implementation Sketch
- Mirror the BUG-07-175 engine-read pattern already in
verify_and_complete_v7(gates_requiredis read from plan_json directly, UNION with caller set): read the section’s LLVM parity verdict from the summary, fold a failing/unknown verdict into theDeliverableVerificationfailures (compiler scope only). - Caller may ADD a required gate, never SUBTRACT: a caller
tests_pass=Truecannot override a red engine-read verdict. - Tooling-scope (
v7_section_scope!= compiler) sections are exempt (no LLVM leg). - A missing/stale summary for a compiler-scope section is fail-closed (REVIEW_REQUIRED / quarantine), never a silent pass.
Spec References
- review_phase.py verify_and_complete_v7 (INV-17 sole done-writer choke point).
- BUG-07-175 engine-read precedent (section.gates_required read directly).
Work Items
- verify_and_complete_v7 engine-reads the section’s LLVM dual-exec verdict from test-all-summary.json per_section_llvm_parity, NOT the caller-passed tests_pass/dual_exec_parity (mirror BUG-07-175 gates_required engine-read)
- fail-closed for compiler-scope: a section whose LLVM leg is red OR unattributed CANNOT complete; the caller may ADD a required gate, never SUBTRACT one; tooling-scope sections are exempt
- tests: compiler-scope section with red LLVM leg -> REVIEW_REQUIRED/quarantine never COMPLETED; green -> completes; tooling-scope unaffected; absent summary -> fail-closed
Items
- verify_and_complete_v7 engine-reads the section’s per-node verdict from test-all-summary.json (s-01’s per-node block) for BOTH backend dimensions — the LLVM dual-exec parity leg AND the leak_free leg (ORI_CHECK_LEAKS=1) — NOT the caller-passed tests_pass/dual_exec_parity (mirror BUG-07-175 gates_required engine-read)
- fail-closed for compiler-scope: a section whose LLVM parity leg is red OR whose leak leg is leak-positive (or EITHER leg unattributed) CANNOT complete; the caller may ADD a required gate, never SUBTRACT one; tooling-scope sections are exempt (no LLVM/leak leg)
- tests: compiler-scope section with red LLVM parity leg -> REVIEW_REQUIRED/quarantine never COMPLETED; compiler-scope section that is leak-positive (parity-green) -> REVIEW_REQUIRED/quarantine never COMPLETED; parity-green AND leak-free -> completes; tooling-scope unaffected; absent/stale summary (either leg unattributed) -> fail-closed
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “roadmap-llvm-verification/s-ac79dd80” }, “generated_at”: “2026-06-21T02:38:53.753387+00:00”, “graph_state”: { “head_sha”: “b0bd51a8”, “last_code_import_at”: “2026-06-21T02:38:01.055Z”, “embedding_stale”: false, “insights_stale”: true, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:roadmap-llvm-verification/s-ac79dd80] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/roadmap-llvm-verification” } } }
(full dossier: gate-engine-read—s-ac79dd80.intel.json)