Prevent the groomer from auto-closing an already_done issue when reopen or regression evidence calls its current behavior into question.
Parent: #1059. Follow-up from #1069 and PR #1112.
Problem
src/lib/groomer/close-grounding.ts requires verbatim acceptance-criterion evidence at the pinned SHA and treats a merged closing PR as corroboration only: an issue still open after that merge may have been reopened. That protects against closing on a PR reference alone, but does not prove runtime behavior. If the code/text still exists while its behavior has regressed, every excerpt can ground successfully and the open bug can be closed as already_done. The current apply path does not inspect reopen history or regression evidence as a hard veto.
Scope
- Identify authoritative, bounded signals for a reopen or reported regression and define how to capture them alongside the existing issue snapshot. Do not infer that every open issue with a merged PR is resolved; do not rely on code presence alone when explicit counterevidence exists.
- Fail closed when credible reopen/regression evidence conflicts with
already_done; retain the issue for human review rather than marking done. Where evidence cannot establish behavior, say so rather than claiming full regression detection.
- Re-check any signal needed for a close before applying it, and record the decision and evidence for audit. Preserve existing pinned-repository per-criterion grounding for ordinary closes.
Acceptance criteria
- A reopened issue or explicit regression report with unchanged code cannot be auto-closed merely because repository excerpts still match.
- An ordinary issue with current-state proof and no contradictory evidence remains eligible under the existing policy.
- Missing or stale required history does not silently become proof of no regression.
- Tests cover reopened-after-merged-PR, behavior regression with code still present, ordinary already-done, and evidence changing between planning and apply.
Expected files
src/lib/groomer/close-grounding.ts
src/lib/groomer/mutation-applier.ts
Implementation may touch additional snapshot and test files; the two paths above are the policy/apply boundaries this fix must revisit.
Out of scope: semantic duplicate/superseded auto-close, general behavioral verification of arbitrary code, and UI force-close.
Prevent the groomer from auto-closing an
already_doneissue when reopen or regression evidence calls its current behavior into question.Parent: #1059. Follow-up from #1069 and PR #1112.
Problem
src/lib/groomer/close-grounding.tsrequires verbatim acceptance-criterion evidence at the pinned SHA and treats a merged closing PR as corroboration only: an issue still open after that merge may have been reopened. That protects against closing on a PR reference alone, but does not prove runtime behavior. If the code/text still exists while its behavior has regressed, every excerpt can ground successfully and the open bug can be closed asalready_done. The current apply path does not inspect reopen history or regression evidence as a hard veto.Scope
already_done; retain the issue for human review rather than marking done. Where evidence cannot establish behavior, say so rather than claiming full regression detection.Acceptance criteria
Expected files
src/lib/groomer/close-grounding.tssrc/lib/groomer/mutation-applier.tsImplementation may touch additional snapshot and test files; the two paths above are the policy/apply boundaries this fix must revisit.
Out of scope: semantic duplicate/superseded auto-close, general behavioral verification of arbitrary code, and UI force-close.