Skip to content

skills(review-gates): don't re-propose maintainer-rejected remediations - #805

Closed
tend-agent wants to merge 1 commit into
mainfrom
daily/review-runs-30740054654
Closed

tend-agent wants to merge 1 commit into
mainfrom
daily/review-runs-30740054654

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Adds a suppression rule to the shared review gates: a finding whose remediation a maintainer has already rejected must not be re-proposed, even when the underlying pattern keeps recurring. Applies to both review-runs and review-reviewers (the file is symlinked into both skills).

Why

The recurring "tend-triage fires a full agent run on the bot's own monthly tracking-issue creation and exits via the self-conversation guard" finding has been surfaced by review-runs across multiple months. This window it recurred again (run 30692158824, tend-triage on review-runs-tracking: 2026-08 creation, ~$0.50 / 2 min).

The maintainer has now settled it:

That disposition lived only in the review-reviewers skill. review-runs — which independently re-derives the same finding every month, classifies it High/structural, and would clear both gates — has no rule telling it the fix was already declined. Without codification the next monthly review-runs run re-proposes a fix the maintainer explicitly closed. This is an invisible failure mode (the wasted re-proposal isn't a CI failure), so it qualifies for codification on a single post-rejection occurrence.

The gate lives in the shared file so it covers any future maintainer-rejected finding, not just this one — recurrence alone never reopens a settled call.

Change

One subsection under "Applying the gates": how to detect a rejected remediation (closed fix PR; documented non-issue), and that the correct disposition is a carry observation pointing at the rejection, with re-proposal allowed only when new evidence changes the tradeoff the maintainer weighed.

@tend-agent tend-agent added the review-runs Findings from review-runs skill label Aug 2, 2026
@max-sixty

Copy link
Copy Markdown
Owner

Did the agent have in its context the prior rejection?

My sense is that the models would see this principle as implicit and not require explicit guidance

@tend-agent

Copy link
Copy Markdown
Collaborator Author

Yes — this run had it. The finding cites #800's closure and #802's merge directly in the PR body, so the authoring agent saw the rejection and, rather than re-proposing the closed if: skip, recognized it was settled and proposed a guard instead. Step 5's dedup (gh pr list --state all, gh issue list --state closed) is what surfaces those.

Which is the honest counter to this PR: it demonstrates the principle applied without the explicit rule. The model already treated "a maintainer closed the fix PR" as "don't re-propose." I agree that's the kind of thing models reliably infer — the rule is closer to belt-and-suspenders than load-bearing.

The one thing codifying it buys is determinism across months: dedup only connects the recurrence to #800 when the keyword overlap happens to catch it, and that's probabilistic run-to-run. But that's a thin margin against the cost of another paragraph in a shared gates file that every review session loads.

My lean matches yours — this isn't worth the words. Happy to close it unless you'd rather keep the explicit rule for the determinism.

@max-sixty max-sixty closed this Aug 2, 2026
max-sixty pushed a commit that referenced this pull request Aug 20, 2026
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.

<details><summary>What #1013 reported, and why the existing checks miss
it</summary>

Filed by PRQL's tend bot after a third repeat attempt at the same fix
was closed ([PRQL/prql#6206](PRQL/prql#6206)).
The prior two artifacts both said "don't fix this":
[PRQL/prql#6147](PRQL/prql#6147), closed on the
**approach** with the code reviewed as fine, and a note on
[PRQL/prql#6166](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.

</details>

<details><summary>No regression test</summary>

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.

</details>

---
Closes #1013 — automated triage

---------

Co-authored-by: tend-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-runs Findings from review-runs skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants