Skip to content

skills: fetch the prior rejection before re-deriving a fix - #1014

Merged
max-sixty merged 3 commits into
mainfrom
fix/issue-1013
Aug 20, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/issue-1013

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Nightly's Step 8 dedup fetched only open PRs, and only their titles, so both places a maintainer's rejection is recorded — the closed PR that carried it, and the comments on the issue tracking it — sat outside what the check ever read. A run could re-derive a finding from the code and reopen an approach already turned down, with nothing in context to say otherwise. The searches now live in running-in-ci (loaded by nightly, triage, and ci-fix alike, before any gh pr create), matched on the symbol or path the change would edit rather than an issue number a re-derived finding doesn't have. Verified with pre-commit run --files on both changed files.

This is a query fix, not a judgment rule — worth stating up front, because #805 proposed the behavioral version of this and you closed it: "My sense is that the models would see this principle as implicit and not require explicit guidance." I think that was right, and it doesn't cover this case. There, the dedup had already surfaced the rejection and the agent acted on it correctly without being told to; the rule was belt-and-suspenders. Here the rejection is never fetched at all, and no amount of inference recovers a fact that isn't in context. So what's added is three gh invocations and one sentence on what the result means, not a restatement of a principle the model already applies.

What #1013 reported, and why the existing checks miss it

Filed by PRQL's tend bot after a third repeat attempt at the same fix was closed (PRQL/prql#6206). The prior two artifacts both said "don't fix this": PRQL/prql#6147, closed on the approach with the code reviewed as fine, and a note on PRQL/prql#6166 written by an earlier nightly run specifically so the next run would stop.

Three gaps, all in the projection rather than the judgment:

  1. --state open filters out the one state that carries a rejection. A closed PR on the same call site is the strongest available signal, and it's precisely what's excluded.
  2. --json number,title carries no bodies or comments. The issue's title reads as an ordinary unclaimed bug; the hold is in its comments. A prior run's note was write-only by construction.
  3. Matching by title or issue number never connects an attempt that predates the tracking issue. The reporter verified that gh pr list --state all --search "fold_module_def_stmt" returns all three attempts while --search "6166" omits the rejected one — hence searching by symbol.

The pre-gh pr create dedup in running-in-ci does use --state all, so the closed PR is inside the list it returns, but that section is framed entirely around concurrent siblings. A weeks-old closed PR reads as history there, and nothing said to open it and find out why it closed.

Per /tend-ci-runner:triage's "Skill text fixes", I checked co-loaded skills first — no existing guidance anywhere in plugins/ or .claude/ covers reading a closed PR's rationale, so nothing is duplicated.

No regression test

Documentation-only change to two skill files; the repo has no test coverage over skill prose. The generator/tests hits on "skills" are regtest outputs asserting skill names in generated workflow YAML, unaffected here. pre-commit run --files on both files passes trailing-whitespace, end-of-file-fixer, typos, the bang-backtick poison guard, and the install-tend reference-sync hook.


Closes #1013 — automated triage

Nightly's Step 8 dedup read only open PRs, and only their titles, so both
places a maintainer's rejection is recorded — the closed PR that carried
it, and the comments on the issue tracking it — sat outside what the check
fetched. A run could re-derive a finding from the code and reopen an
approach already turned down, with nothing in context to say otherwise.

The searches land in running-in-ci, which nightly, triage, and ci-fix all
load before creating a PR: match on the symbol or path the change would
edit, since a re-derived finding has no issue number, then read the closed
hits and the issue comment bodies. Step 8 points there instead of clearing
findings on its own.

This is a query fix, not a judgment rule. #805 proposed the behavioral
version and was closed because the model already infers it — but there the
dedup had surfaced the rejection; here it is never fetched.

Closes #1013

@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.

Two suggestions on the new recipe, both about the projection being wide enough to actually contain the rejection.

The framing holds up — this is a fetch gap, not a judgment rule, and the --state all + symbol search is the right shape. Skill-authoring rules are respected: the added text states the structural rule without citing the PRQL cases that produced it.

A recency-ordered `gh pr list` ages a rejection out in bot-throughput
time — at a few PRs a day any --limit drops it within weeks, and raising
the cap only moves the boundary. The symbol search doesn't have that
shelf life.
The prose says to read the issue bodies; the recipe projected only
comments, so an issue whose description states the hold read as clean.
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.

nightly: Step 8 dedup reads open PRs and titles only, so a PR closed on the approach doesn't stop a repeat attempt

2 participants