Repository navigation
fix(review-runs): look for in-thread maintainer corrections, not just dispositions - #833
Conversation
… 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
left a comment
There was a problem hiding this comment.
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.
Problem
review-runsStep 4: Cross-check outcomes is the only place a run discovers that a maintainer disagreed with tend's output, andrunning-in-ci→ Learning from Feedback depends on that discovery. But Step 4's single recipe wasgh 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
sinceendpoints, 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/commentscovers issue and PR conversation comments;pulls/commentscovers inline review replies, where corrections totend-reviewoutput 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 bycreated_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_atalongsidecreated_at, becausesincefilters onupdated_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; thefor endpoint in issues pullsform and the nested-quoting in thejqfilter were executed as written, not just composed.Measured the truncation the
--paginateguards against, over a 7-day window on this repo: the unpaginated call returns 100 rows,--paginatereturns 142, and the 42 dropped are the newest — the boundary landed at2026-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_atis monotonic across the response andupdated_atis not. Confirmed thesincesemantics the same way — a comment created2026-08-01T08:39:05Zappears in a 24h window because it was updated2026-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