Repository navigation
skills(notifications): dedup bot-authored PRs cross-referencing the issue - #279
Merged
Merged
Conversation
…ssue The dedup check only looked at issue comments, so when tend-mention handled an @-mention by opening a PR with `Refs #N` in the body (no issue comment), the next tend-notifications run saw no bot response on the issue and opened a duplicate PR. Observed in run 24438580801 — `tend-notifications` opened PR #278 ~45min after tend-mention had already opened PR #277 for the same request. Both branches collided on `docs/workflow-override-example` and #278 was closed as a duplicate after ~$4 of wasted work. Add a third dedup check: for issue notifications, look at the timeline for `cross-referenced` events from bot-authored PRs created after the notification's `updated_at`. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This was referenced Apr 15, 2026
max-sixty
added a commit
that referenced
this pull request
Apr 18, 2026
Bumps generator version to 0.0.16 and syncs lockfile. 7 commits since 0.0.15: nightly bot PAT scope audit (#294), review-reviewers gist-backed evidence storage with single-fetch optimization (#291, #292), nightly closes bot-opened tracking issues when resolved (#290), drops GITHUB_STEP_SUMMARY writes that fail under Claude sandbox (#289), release docs clarification (#288), and notifications dedup of bot-authored PRs (#279). Co-Authored-By: Claude <[email protected]>
Merged
max-sixty
added a commit
that referenced
this pull request
Apr 18, 2026
Bumps generator to 0.0.16. ## Changes since 0.0.15 - #294 — nightly: audit bot PAT scopes via script - #292 — review-reviewers: fetch current-month gist once per run - #291 — review-reviewers: pilot gist-backed evidence storage - #290 — nightly: close bot-opened tracking issues when resolved - #289 — skills: drop `GITHUB_STEP_SUMMARY` writes that fail under Claude sandbox - #288 — docs(release): commit on the current branch, don't create a new one - #279 — notifications: dedup bot-authored PRs cross-referencing the issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The notifications skill's dedup check only looks at issue comments and PR reviews. When
tend-mentionhandles an@-mention by opening a PR withRefs #Nin the body (and no issue comment), the nexttend-notificationsrun misses that signal and opens a duplicate PR.Evidence
Observed today in issue max-sixty/tend#276:
@max-sixtycommented on #276 with@tend-agentmention asking for a PRtend-mentionrun 24437112906 firesRefs #276in body — no issue commenttend-notificationsrun 24438413763 starts — past the 10-min freshness gategh api repos/.../issues/276/comments --jq '[.[] | select(bot login and created_at > 04:54:37)] | length'returns0docs/workflow-override-exampleDirect cost: ~$4 of wasted API tokens on the second run, a confused issue timeline, and a correction comment the maintainer had to read.
Classification: structural — the failure is deterministic. For any
@tend-agentmention that tend-mention handles by opening a PR withRefs #N(no issue comment), the notifications skill will always miss the dedup and produce a duplicate.Fix
Add a third dedup check for issue notifications: search the issue timeline for
cross-referencedevents from bot-authored PRs created afterNOTIF_UPDATED_AT. GitHub emits these events when a PR body references the issue (viaRefs #N,#N, etc.), so this reliably catches the tend-mention→PR path.Verified against the real timeline for issue #276:
A dedup run at 05:40 with
NOTIF_UPDATED_AT=2026-04-15T04:54:37Zwould have returnedlength > 0and correctly skipped.Gate assessment
Test plan
tend-notificationsrun that processes an issue already handled bytend-mention(viaRefs #NPR) should skip and mark read instead of opening a duplicate PR.