Description
Found by loop52 plan review rvplan2 from gaterun run-a.out R4 (codex/loop52/REPLAN/): the engine admits apply of 20 and 22 resources whose later teardown is refused at the Start commit (phase=teardown, after teardown-preview passed). Under create-only provisioning this strands permanent objects. A no-op re-apply also grows state (32,803 -> 41,889 bytes), so the post-apply document must include planned no-ops and one recovery.
Acceptance Criteria
- #1 Apply refuses before any request when the forecast teardown of the resulting state (incl. planned no-ops and one recovery) would exceed the state budget
- #2 A red test at base admits an apply whose teardown is then refused; green on the candidate
- #3 No change to the frozen contract, SourceRevision or ContractRevision; differential proof for any budget change
Definition of Done
- #1 just check (fmt-check, lint, gen-check, env-check, docs-check, test, race, hygiene, ui-check, compose-check, helm-test, lab-check, signal-fidelity)
- #2 just gen (only if a blueprint field, construct/workload config struct, or a skill under plugins/synthkit/skills/ changed)
- #3 just dump — inventory diffed against signals/
Implementation Plan
Independently review final inherited refusal forecast and corrected command proofs; preserve frozen revisions and budget logic.
Implementation Notes
Landed a1caa1b01c1fad14f5204e46b9c0d42ec8b6f2b7 after guarded final review PASS; encoded maximum IDs, generation reserve and canonical checksum sizing preserved. Complete CodeRabbit six paths, zero findings; exact tree 3ef641f passed remote composed just check run 20261023T084522Z-synthkit-ed14d240 including race. Red/green canonical refusal and TLS zero-request proofs retained. No budget/revision/codec/runtime-admission change; canonical single-teardown and bounded recovery limits remain. Generation/dump not applicable: no schema input or renderer change.
Final Summary
Apply preview and authority publication now reserve custody for a canonical teardown before management requests; no-op reapply and recovery forecasts included. Max-encoding and generation/checksum edge regressions covered; unchanged accepted candidate and concise operator/canonical docs landed. Exact remote full gate and guarded/CodeRabbit reviews passed.