Skip to content

fix(groomer): guard already_done against regressions #1113

Description

@joryirving

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2Normal priority.status/readyReady for Dispatch worker pickup.type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions