Single source of truth for the lean mirror sets — LEAN_SCRIPTS/LEAN_TESTS duplicated between sync_plugin.py and claims_audit.py
Problem
The "lean set" (which scripts/tests ship into the plugin/ and simplicio_loop/_bundle/ mirrors) is hard-coded twice: in scripts/sync_plugin.py and again in scripts/claims_audit.py. Editing one and forgetting the other makes the two mirror checks silently disagree — the syncer copies one set, the auditor validates another, and drift passes the gate.
Evidence
scripts/sync_plugin.py:45-47 — LEAN_SCRIPTS (hierarchical_planner, cross_agent_wiki), LEAN_TESTS (_selfrun, test_loop_e2e, test_cross_agent_wiki).
scripts/claims_audit.py:142,145 — the same names independently hard-coded for the parity checks.
Failure scenario
Add a third runtime script to the bundle by editing sync_plugin.py only → sync_plugin copies it, claims_audit check 4/5 never validates it → a later stale copy of that script ships in the wheel while the gate stays green (compounds with the one-directional bundle-parity issue).
Proposed fix
Extract one constant module (e.g. scripts/mirror_manifest.py or a small MIRROR_MANIFEST dict importable by both) declaring: lean scripts, lean tests, hook lean set, and the mirrored subtrees. sync_plugin.py and claims_audit.py both import it. Add a test asserting both consumers resolve identical sets (trivially true after the refactor, but pins the contract against future re-duplication).
Acceptance criteria
Single source of truth for the lean mirror sets — LEAN_SCRIPTS/LEAN_TESTS duplicated between sync_plugin.py and claims_audit.py
Problem
The "lean set" (which scripts/tests ship into the
plugin/andsimplicio_loop/_bundle/mirrors) is hard-coded twice: inscripts/sync_plugin.pyand again inscripts/claims_audit.py. Editing one and forgetting the other makes the two mirror checks silently disagree — the syncer copies one set, the auditor validates another, and drift passes the gate.Evidence
scripts/sync_plugin.py:45-47—LEAN_SCRIPTS(hierarchical_planner,cross_agent_wiki),LEAN_TESTS(_selfrun,test_loop_e2e,test_cross_agent_wiki).scripts/claims_audit.py:142,145— the same names independently hard-coded for the parity checks.Failure scenario
Add a third runtime script to the bundle by editing
sync_plugin.pyonly →sync_plugincopies it,claims_auditcheck 4/5 never validates it → a later stale copy of that script ships in the wheel while the gate stays green (compounds with the one-directional bundle-parity issue).Proposed fix
Extract one constant module (e.g.
scripts/mirror_manifest.pyor a smallMIRROR_MANIFESTdict importable by both) declaring: lean scripts, lean tests, hook lean set, and the mirrored subtrees.sync_plugin.pyandclaims_audit.pyboth import it. Add a test asserting both consumers resolve identical sets (trivially true after the refactor, but pins the contract against future re-duplication).Acceptance criteria
sync_plugin.pyandclaims_audit.py.python3 scripts/sync_plugin.py --checkandpython3 scripts/check.pygreen with no mirror changes.