fix(feedback): exclude our own triage tickets from dedup (re-triage dropped everything) #260

Merged
joshtronic merged 1 commit from fix/feedback-exclude-own-tickets into master 2026-06-26 04:06:23 +00:00
Collaborator

Fixes the "no issues filed" re-triage — it dropped every real bug as "already filed."

Root cause (my cleanup caused it): the targeted dedup search matched the feedback-triage tickets I had just closed while cleaning up the first bad batch (#64–67). A closed feedback ticket looked like proof the work was done, so Slide Swine → "dupe of closed #64", Boar-doku → "closed #65", etc. — all dropped.

Fix: a prior feedback-triage ticket (open or closed) is not evidence the bug was fixed — only a real commit/PR or a non-triage issue is. Both closed-issue dedup queries now filter out anything carrying the agent:feedback-triage marker. Commit search is untouched (a commit is a fix), so Boar Dungeon still drops correctly via #41.

Test covers it; check-sync green. No reviewer.

After this deploys I re-clear .feedback and the backlog re-triages for real — the 6 genuine bugs/ideas should finally file.

**Fixes the "no issues filed" re-triage** — it dropped every real bug as "already filed." **Root cause (my cleanup caused it):** the targeted dedup search matched the feedback-triage tickets I had just **closed** while cleaning up the first bad batch (#64–67). A *closed* feedback ticket looked like proof the work was done, so Slide Swine → "dupe of closed #64", Boar-doku → "closed #65", etc. — all dropped. **Fix:** a prior feedback-triage ticket (open or closed) is **not** evidence the bug was fixed — only a real commit/PR or a non-triage issue is. Both closed-issue dedup queries now filter out anything carrying the `agent:feedback-triage` marker. Commit search is untouched (a commit *is* a fix), so Boar Dungeon still drops correctly via #41. Test covers it; check-sync green. No reviewer. After this deploys I re-clear `.feedback` and the backlog re-triages for real — the 6 genuine bugs/ideas should finally file.
fix(feedback): exclude our own feedback-triage tickets from the dedup signal
All checks were successful
Lint / check-sync (pull_request) Successful in 4s
Lint / check-sync (push) Successful in 4s
c7d1228347
The clean re-triage dropped every REAL bug as 'already filed' -- because the
targeted search matched the feedback-triage tickets that had just been CLOSED
(during cleanup of the first bad batch). A closed feedback ticket looked like
proof the work was done, so Slide Swine/Boar-doku/Hog Four/Ham Jam all dropped as
dupes of their own rejected triage.

A prior feedback-triage ticket -- open OR closed -- is NOT evidence the bug was
fixed. Only a real fix (commit/PR) or a non-triage issue counts. Both closed-issue
dedup queries (feedback_gather_context + feedback_search_prior) now filter out
anything carrying the agent:feedback-triage marker. Commit search is unchanged --
a commit IS a fix. (Boar Dungeon still drops correctly: it matched commit #41.)

Test: search keeps a real closed issue, drops a feedback-triage-marked one.
bash -n + check-sync green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KXPafSYJPY6XkWHHk1Lfs
Author
Collaborator

🤖 Review — APPROVE (automated)

CI for c7d12283: success

Summary: Small, focused fix that filters the agent's own agent:feedback-triage tickets out of the two closed-issue dedup queries in lib/feedback.sh, so a previously-closed triage ticket is no longer mistaken for proof a bug was fixed. CI is green and a test covers the new behavior. Approving.

Why it holds up:

  • lib/feedback.sh — both closed-issue queries (feedback_gather_context, feedback_search_prior) gain select((.body // "") | test("agent:feedback-triage") | not). The .body // "" guards against null bodies, and test("agent:feedback-triage") is effectively a literal substring match (no regex metacharacters in the marker), so it matches the <!-- agent:feedback-triage --> comment. Correct.
  • The commit-search branches are left untouched, consistent with the description's claim that a commit is a fix (so #41/Boar Dungeon still dedups). Verified against the diff.
  • Limit bumps (30→40, 10→15) before the unchanged head -30/head -8 sensibly compensate for rows now dropped by the filter so the post-filter result count isn't starved. Reasonable.
  • The new test in bin/test-feedback.sh redefines _fj to return a triage-marked issue (#99) and a real one (#12), asserts #99 is excluded and #12 retained, and the mock's *) -> [] correctly starves the commits sub-query so only the filter path is exercised. The later file_issue block re-redefines _fj, so scoping is clean.

Scope / contract: Two files, ~30 lines, on-issue. No CI-config changes, no security surface, no drive-by refactors. Description is honest — the test exists and the code matches the stated root cause and fix.

Minor (non-blocking) notes, for the human's awareness only:

  • The updated comment says triage tickets are filtered "open or closed," but both dedup queries only fetch state=closed. Open triage tickets aren't in the dedup set at all, so the "open" half of the comment is aspirational, not enforced here — not a defect, just slightly imprecise wording.
  • The hand-rolled case assertion for #99 increments FAIL on failure but doesn't increment a PASS counter on success (unlike the has/eq helpers). Cosmetic; doesn't affect the exit-code gate, and CI passed.

No blocking concerns.


Independent review by the harness on claude-opus-4-8. The human reviewer is requested once Igor has reviewed; a human still merges.

### 🤖 Review — `APPROVE` _(automated)_ CI for `c7d12283`: **success** **Summary:** Small, focused fix that filters the agent's own `agent:feedback-triage` tickets out of the two closed-issue dedup queries in `lib/feedback.sh`, so a previously-closed triage ticket is no longer mistaken for proof a bug was fixed. CI is green and a test covers the new behavior. Approving. **Why it holds up:** - `lib/feedback.sh` — both closed-issue queries (`feedback_gather_context`, `feedback_search_prior`) gain `select((.body // "") | test("agent:feedback-triage") | not)`. The `.body // ""` guards against null bodies, and `test("agent:feedback-triage")` is effectively a literal substring match (no regex metacharacters in the marker), so it matches the `<!-- agent:feedback-triage -->` comment. Correct. - The commit-search branches are left untouched, consistent with the description's claim that a commit *is* a fix (so #41/Boar Dungeon still dedups). Verified against the diff. - Limit bumps (30→40, 10→15) before the unchanged `head -30`/`head -8` sensibly compensate for rows now dropped by the filter so the post-filter result count isn't starved. Reasonable. - The new test in `bin/test-feedback.sh` redefines `_fj` to return a triage-marked issue (#99) and a real one (#12), asserts #99 is excluded and #12 retained, and the mock's `*) -> []` correctly starves the commits sub-query so only the filter path is exercised. The later `file_issue` block re-redefines `_fj`, so scoping is clean. **Scope / contract:** Two files, ~30 lines, on-issue. No CI-config changes, no security surface, no drive-by refactors. Description is honest — the test exists and the code matches the stated root cause and fix. **Minor (non-blocking) notes, for the human's awareness only:** - The updated comment says triage tickets are filtered "open or closed," but both dedup queries only fetch `state=closed`. Open triage tickets aren't in the dedup set at all, so the "open" half of the comment is aspirational, not enforced here — not a defect, just slightly imprecise wording. - The hand-rolled `case` assertion for #99 increments `FAIL` on failure but doesn't increment a PASS counter on success (unlike the `has`/`eq` helpers). Cosmetic; doesn't affect the exit-code gate, and CI passed. No blocking concerns. --- <sub>Independent review by the harness on `claude-opus-4-8`. The human reviewer is requested once Igor has reviewed; a human still merges.</sub> <!-- review sha=c7d12283474ab48389a853f011b3fce96dcf1d88 verdict=APPROVE ci=success -->
igor added spent time 2026-06-26 04:05:00 +00:00
1 minute 8 seconds
joshtronic approved these changes 2026-06-26 04:06:07 +00:00
joshtronic deleted branch fix/feedback-exclude-own-tickets 2026-06-26 04:06:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Total time spent: 1 minute 8 seconds
igor
1 minute 8 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshtronic/igor!260
No description provided.