Skip to content

fix(review-runs,review-reviewers): dedup against merged PRs, and against tend before filing upstream - #891

Merged
max-sixty merged 2 commits into
mainfrom
hourly/review-31164742947-cargo-affected
Aug 7, 2026
Merged

fix(review-runs,review-reviewers): dedup against merged PRs, and against tend before filing upstream#891
max-sixty merged 2 commits into
mainfrom
hourly/review-31164742947-cargo-affected

Conversation

@tend-agent

@tend-agent tend-agent commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

Two dedup blocks were blind in two different ways, and the cited duplicate needed both fixed.

State filter. review-runs Step 5 and review-reviewers Step 4 both deduped against PRs with gh pr list --state open. A merged PR is never returned by that query, so a finding whose fix already landed reads as undeduped and gets filed again. running-in-ci's PR-creation dedup recheck already gets this right ("with --state all so closed and merged siblings show up"); these two recipes contradicted it.

Repo scope. review-runs is a generated workflow (generator/src/tend/config.py:24 lists it in the enabled set), so it runs in each adopter's checkout and an unqualified gh pr list returns the adopter's PRs. Step 6 routes bundled-skill defects upstream to tend, but neither Step 5 nor any of running-in-ci's dedup recipes — all local-repo — told the agent to dedup in the target repo before filing there. --state all alone does not close this: the adopter's PR list never contained the upstream fix at any state.

review-reviewers is unaffected by the second half. It runs in max-sixty/tend and files onto tend, so its unqualified gh pr list already resolves to the right repo; only the state filter was wrong there.

This bites hardest on tend specifically, because of the pinning model: adopters call max-sixty/tend/<harness>@X.Y.Z, so a merged skill fix stays dormant on their repos until the next release tags. The bug keeps reproducing after the fix merges — which is exactly the window in which the analysis legs are looking at it, and exactly when the dedup queries are blind to the fix.

What happened

max-sixty/cargo-affected's tend-review-runs run 31160677649 (08:11:33Z → 08:21:41Z) hit the | last evidence-log mis-selection: it appended ~12 KB of run evidence into the nightly's unrelated comment on target #73, noticed on its post-verify read, restored comment 5188771252, and re-appended to the real log 5150650688. Good recovery. It then filed #883 upstream, whose "Proposed fix" is a ## Run heading predicate on the comment selector.

#875 merged that exact fix at 07:34:40Z — 46 minutes before the issue was filed — as test("^## Run [0-9]") on the same selector, in the same file. #883 is a duplicate of a merged PR.

The run made three dedup queries before filing (gh issue list --state all --search "tracking issue comment append", a broader gh issue list --state all title regex, and a final gh issue list --state open recheck). All three were gh issue list, which never returns PRs — and all three ran against max-sixty/cargo-affected. Even had it run Step 5's PR line verbatim, it would not have returned #875, for both reasons: the state filter excluded merged PRs, and the query's repo was the adopter's, not tend's.

The fix

  • Both skills: gh pr list --state open--state all, projecting state,mergedAt so a merged hit is legible.
  • review-runs only: add the cross-repo pair (gh pr list/gh issue list --repo max-sixty/tend --state all) so a finding heading upstream under Step 6 is deduped against tend first.
  • review-runs only: the pinning note is scoped to the upstream repo, since in that skill the reader is the adopter and the local gh pr list above it has nothing to do with pinned refs. review-reviewers keeps the original wording, where tend is the reader and "on adopters" is the correct direction.

Both added commands were run against this repo to confirm they parse and return the expected shape.

Gate assessment

Not covered by

No open PR touches either dedup block. #845/#850/#838 are the run-window cluster; #849, #856, #857, #864, #869, #876, #809, #837, #821, #836 are elsewhere.

#883 stays open as a maintainer call — it is redundant with #875 but the option-2 half of its body (finish the gist migration for review-runs) is not.

Evidence: https://gist.github.com/dca23a6e6a0d8cae2665944ba31676fb

@tend-agent tend-agent added the claude-behavior Behavioral issues found by review-reviewers label Aug 7, 2026

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review-reviewers half is right — that skill runs in max-sixty/tend with tend as gh's default repo, so gh pr list --state all does reach #875.

The review-runs half doesn't fix the case in the PR body. review-runs is a generated workflow (generator/src/tend/config.py lists it in the enabled set), so it runs in each adopter's checkout — a bare gh pr list there returns the adopter's PRs. The cited duplicate was max-sixty/tend#883 filed from a max-sixty/cargo-affected run, duplicating max-sixty/tend#875. Changing --state open to --state all doesn't help: cargo-affected's PR list never contained #875 at any state. So the body's "Even had it run Step 5's PR line verbatim, --state open would not have returned #875" holds for a reason the patch doesn't address — the repo, not the state filter.

Step 6 routes bundled-skill defects upstream (file the fix against tend per **Filing Issues in Other Repos**), but nothing in Step 5 — or in running-in-ci's dedup recipes, which are all local-repo — tells the agent to dedup in the target repo before filing there. That's the actual gap that produced #883.

Second, smaller: the new paragraph is written from tend's vantage point, but in review-runs the reader is the adopter, and the local gh pr list it follows has nothing to do with pinned refs. Suggested reword below scopes it to the upstream repo, which is where the pinning argument actually bites. The review-reviewers copy is fine as-is.

Comment thread plugins/tend-ci-runner/skills/review-runs/SKILL.md
Comment thread plugins/tend-ci-runner/skills/review-runs/SKILL.md Outdated
…cts upstream

review-runs is a generated workflow, so its dedup queries run against the
adopter's own repo and can never see an upstream tend PR. Add the cross-repo
pair, and scope the pinning note to the upstream repo where it applies.
@tend-agent tend-agent changed the title fix(review-runs,review-reviewers): dedup against merged PRs, not just open ones fix(review-runs,review-reviewers): dedup against merged PRs, and against tend before filing upstream Aug 7, 2026
@max-sixty
max-sixty merged commit ad9e173 into main Aug 7, 2026
12 checks passed
@max-sixty
max-sixty deleted the hourly/review-31164742947-cargo-affected branch August 7, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-behavior Behavioral issues found by review-reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants