Skip to content

skills(running-in-ci): catch already-merged sibling PRs in dedup - #569

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-568
May 20, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-568

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Closes #568.

The dedup recheck in running-in-ci only looked at open PRs, so when a long tend-mention queue let a sibling run open and merge a fix before this run started, the merged sibling was invisible and a near-duplicate PR went out. There was no signal in Read Context either: a closed triggering issue (often closed-by the just-merged sibling PR) is a strong "work probably already done" hint that the skill didn't surface.

This PR tightens two spots in plugins/tend-ci-runner/skills/running-in-ci/SKILL.md:

  • Read Context gains a Triggering issue/PR already closed subsection. If the trigger is closed at job start and a linked PR merged after the triggering comment, exit silently. Issue triggers use closedByPullRequestsReferences; PR triggers check mergedAt/mergeCommit.
  • The dedup-recheck gh pr list switches from --state open to --state all (returning state and mergedAt) so closed and merged siblings count as overlaps. A second --search "author:$BOT_LOGIN <issue-number>" query catches sibling PRs that diverged on branch name but still reference the triggering issue in title or body.

Field names verified against live gh calls (gh issue view --json closedByPullRequestsReferences, gh pr view --json state,mergedAt,mergeCommit).

Long tend-mention queues let a sibling run merge a fix before this run
starts; --state open hid the duplicate. Broaden the dedup recheck to
--state all (plus an issue-number search for branch-divergent siblings)
and add a Read Context check that exits silently when the triggering
issue/PR is already closed by a merged sibling.

Closes #568

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@max-sixty
max-sixty merged commit aefdb1e into main May 20, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/issue-568 branch May 20, 2026 14:53
@max-sixty max-sixty mentioned this pull request May 23, 2026
2 of 3 tasks
max-sixty added a commit that referenced this pull request May 23, 2026
## Summary

- Bumps generator version to 0.1.0 and syncs lockfile.

7 commits since 0.0.25:
- fix: jitter outage-issue dedup to handle concurrent matrix-leg
failures (#586)
- fix: install-test default-branch probe on shallow checkout (#583)
- fix: pin install-tend badge link to max-sixty/tend (#585)
- skills(review-reviewers): call out commenter-self-edit filters as a
non-issue (#581)
- triage: skip on tend-outage labeled issues (#579)
- fix: use REST API for author_association in triage skill (#571)
- skills(running-in-ci): catch already-merged sibling PRs in dedup
(#569)

## Test plan
- [x] `wt test` passes
- [x] `pre-commit run --all-files` passes
- [ ] CI green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

running-in-ci dedup misses already-merged sibling PRs (and closed-issue signal)

2 participants