Skip to content

fix(review-runs): look for in-thread maintainer corrections, not just dispositions - #833

Merged
max-sixty merged 2 commits into
mainfrom
fix/issue-827
Aug 11, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/issue-827

Conversation

@tend-agent

@tend-agent tend-agent commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

review-runs Step 4: Cross-check outcomes is the only place a run discovers that a maintainer disagreed with tend's output, and running-in-ci → Learning from Feedback depends on that discovery. But Step 4's single recipe was gh pr list --author "$BOT_LOGIN" — a PR-disposition query — and its prose asked only about merges, closures, and relabels. Every question it posed was answerable from state changes.

That misses the most common correction shape on an issue-heavy repo: a maintainer replying in-thread that a bot claim was wrong, leaving the issue's labels and state untouched. Nothing in the section asks for it, so a run following Step 4 as written reports "0 maintainer corrective comments" while one sits in its window.

The miss compounds: the all-clear gets written into the monthly tracking issue, and future runs read it as ground truth when counting occurrences under Gate 1 — so a recurring correction never accumulates the occurrences its own gate requires. Structural, not stochastic; there is no decision point.

Solution

Adds the mirror-image query next to the existing disposition one — same repo-wide since endpoints, inverted login filter — plus a sentence naming in-thread contradiction as a correction class, and a note that "no maintainer corrections" should only be written after the query ran.

issues/comments covers issue and PR conversation comments; pulls/comments covers inline review replies, where corrections to tend-review output land. Both are repo-wide, so it's two calls regardless of how many threads the bot touched.

The query is --paginated. That is load-bearing rather than cosmetic: the response is ascending by created_at, so a single 100-item page drops the newest comments — precisely where a fresh correction sits — and the bot's own comments consume that budget before the login filter runs. A silently truncated result would reintroduce the miss this PR exists to close.

The projection reports updated_at alongside created_at, because since filters on updated_at: a comment created before the window appears on the strength of an in-window edit. That is worth keeping — an edited claim is still a correction — but without both timestamps it reads as a broken filter.

Testing

Ran the recipe verbatim against this repo. It surfaces exactly the class of comment the disposition query cannot see — e.g. #800 ("Not worth the complication.") and #817, neither reachable from a closed/merged/relabeled signal. Both endpoints accept since; the for endpoint in issues pulls form and the nested-quoting in the jq filter were executed as written, not just composed.

Measured the truncation the --paginate guards against, over a 7-day window on this repo: the unpaginated call returns 100 rows, --paginate returns 142, and the 42 dropped are the newest — the boundary landed at 2026-08-04T16:28:43Z. In this particular window all 42 were the bot's own comments, so no human comment was actually lost; the mechanism is what's demonstrated, not an observed loss.

Confirmed the ordering claim directly: created_at is monotonic across the response and updated_at is not. Confirmed the since semantics the same way — a comment created 2026-08-01T08:39:05Z appears in a 24h window because it was updated 2026-08-04T08:50:03Z.

Also verified the reported miss reproduces from the skill text alone: Step 4 before this change contained no query filtering for non-bot comments.


Closes #827 — automated triage

… dispositions

Step 4's only recipe queried bot PR dispositions, and its prose asked only
about merges, closures, and relabels. A maintainer replying in-thread that a
bot claim was wrong — leaving labels and state untouched — was unreachable,
so runs reported no corrective feedback while one sat in the window and
Learning-from-Feedback never fired for the triage surface.

Closes #827

@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 new query has a silent-truncation hole that reintroduces the miss it's meant to close: gh api returns only the first page without --paginate, and the page is ordered oldest-first, so once the window holds more than 100 comments the newest ones are dropped — exactly where a fresh maintainer correction sits. The bot's own comments consume that budget: running the recipe on this repo just now returned 88 issues/comments in a 24h window, all 88 authored by tend-agent, with zero non-bot comments surviving the filter. A day 15% busier drops real signal without any indication in the output. Inline suggestion below.

Worth a word in the comment too: since on both endpoints filters on updated_at, not created_at. The run above returned comments created 2026-08-01 inside a 24h window, while the projection reports at: .created_at — someone following the recipe sees four-day-old timestamps and reasonably concludes the filter is broken. Surfacing edited comments is arguably a feature here, but the recipe should say so rather than let it read as a bug.

Without --paginate the response caps at one 100-item page ordered ascending
by created_at, so the newest comments -- where a fresh correction sits -- are
the first dropped, silently. The bot's own comments consume that budget before
the login filter runs.

Also report updated_at alongside created_at: since filters on updated_at, so
older edited comments legitimately appear in the window and the projection
should show why a row qualified.

This branch was previously deployed

1 inactive deployment
tend — 4bca2ba1 Deployed Aug 5, 2026 by tend-agent via review #1064
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.

review-runs Step 4 can't see a maintainer correcting a bot comment — only PR dispositions

2 participants