75%

Section 06: Symbol-intersection + hash-change anti-thrash gate

Goal

Bound the forward-coherence pass to genuinely-impacted downstream sections so the plan evolves continuously without re-reviewing the whole tail at every boundary.

Implementation Sketch

Symbol-intersection + hash-change gate. Reuse compute_intel_package_hash (content_hash.py:424; hashes .intel.md sibling) + intel_reviewed_hash (review_section_runtime/state.py writer; review_restale_dispatch.py reader; route_walk forwarder:1043).

Spec References

scripts/plan_corpus/content_hash.py (compute_intel_package_hash:424, LIFECYCLE_FIELDS:80); scripts/review_section_runtime/state.py; scripts/plan_orchestrator/review_restale_dispatch.py.

Work Items

  • TDD-first: pin that the forward-coherence route fires ONLY when a downstream section’s dossier hash changed AND >=1 constraint symbol intersects its work-items/dossier; no hash change -> skip; change + no intersection -> skip; failing tests.
  • Implement the gate reusing compute_intel_package_hash (hashes the .intel.md bytes, BUG-07-261) + the stored intel_reviewed_hash; bound the forward pass to impacted sections only — never re-review the whole tail.
  • Layer-closure: negative pins prove no thrash (unchanged dossier, non-intersecting symbol both skip); positive pin proves fire-on-impact.

Items

  • Bound the ALREADY-SHIPPED route_walk.dossier_constraint_violation_or_none gate (route_walk.py:1704, the §00 R2 walking-skeleton that today fires on plain sym in body with no change-bound) to fire ONLY when (the downstream section’s intel-dossier content-hash CHANGED since its last review AND >=1 constrained symbol intersects its work-items/dossier). Reuse compute_intel_package_hash (content_hash.py:424; hashes the .intel.md bytes per BUG-07-261) + the stored intel_reviewed_hash (WORKFLOW_STATE_SCALAR_FIELDS, content_hash.py:79 — NOT LIFECYCLE_FIELDS) recorded-vs-current compare already used at review_restale_dispatch.py:86-94. Bound the forward pass to impacted sections only — never re-review the whole tail, never re-fire on a section already reviewed against an unchanged constraint.

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “plan-forward-coherence/s-439dcb24” }, “generated_at”: “2026-06-26T02:16:16.139350+00:00”, “graph_state”: { “head_sha”: “8f006d26”, “last_code_import_at”: “2026-06-26T02:12:50.004Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:plan-forward-coherence/s-439dcb24] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “constrained_symbols”: [], “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/plan-forward-coherence” } } }

(full dossier: anti-thrash-gate—s-439dcb24.intel.json)