Problem
review-runs' "Recording below-threshold findings" step picks its append target with | last:
EXISTING_COMMENT=$(gh api "repos/$REPO/issues/$TRACKING_NUMBER/comments" \
--jq "[.[] | select(.user.login == \"$BOT_LOGIN\")] | last | .id // empty")
That selects the newest bot comment on the tracker, not the evidence log. Every other tend workflow posts as the same bot account, so any one of them commenting on the tracking issue silently hijacks the append target and forks the log in two — after which each subsequent run appends to whichever fork happens to be newest.
This is structural: | last is deterministic, and there is no decision point anywhere in the chain. Nothing in the recipe distinguishes "the evidence log" from "some other comment the bot left here."
What happened on max-sixty/cargo-affected
tend-nightly run 30984146563 posted a below-threshold survey finding as its own comment on the review-runs-tracking issue (#73) on 2026-08-05. That is reasonable behavior on nightly's part — the tracker is where below-threshold findings go — but it made comment 5188771252 the newest bot comment on the issue.
The 2026-08-05 review-runs run recorded the fork as a below-threshold observation and moved on. Today's run (31160677649) hit the consequence: | last resolved to 5188771252 (the nightly comment, 2523 bytes) rather than 5150650688 (the evidence log, 42610 bytes), and appended ~12 KB of run evidence into the middle of an unrelated finding. I noticed on the post-verify read, moved the entry to the real log, and restored the nightly comment — but a run that didn't re-read after posting would have left the log permanently split.
The failure is also invisible: the append succeeds, gh api returns 200, and nothing downstream errors. The only symptom is that a future run's "read historical evidence" step gets the entries in a jumbled order across two comments, which degrades gate evaluation rather than breaking it.
Why the 50 KB branch makes it worse over time
The recipe starts a fresh comment when the existing one exceeds 50000 bytes. Once that fires, the tracker holds two bot comments and | last points at the new one — correct by luck. But the moment any other workflow comments after that, the pointer moves again. On this repo the evidence log is now 54635 bytes, so the next run takes the create-new branch, and the run after that will resolve | last to whichever of the three comments is newest.
Proposed fix
Two options, in the order I'd prefer them:
-
Select by content marker rather than recency. Every evidence entry begins with a ## Run <id> heading, so the log is self-identifying:
EXISTING_COMMENT=$(gh api "repos/$REPO/issues/$TRACKING_NUMBER/comments" \
--jq "[.[] | select(.user.login == \"$BOT_LOGIN\" and (.body | startswith(\"## Run \")))] | last | .id // empty")
One-line change, no new state, and it keeps working when the 50 KB branch legitimately creates a second log comment. review's analogous recipe already narrows by a second predicate (.commit_id == "$HEAD_SHA"), so the shape has precedent in the plugin.
-
Finish the gist migration. review-runs' SKILL.md already carries <!-- TODO: migrate this to gist-backed storage once the review-reviewers pilot validates it -->, and review-reviewers has been running on per-(target, month) secret gists for a while now. A gist keyed by target+month has no "which comment is the log" question at all, and no 65 KB ceiling. If the pilot is considered validated, this supersedes option 1 entirely — but it's a bigger change and needs the gist PAT scope on every consumer, so option 1 is worth taking regardless as the cheap correctness fix.
I'd also suggest the skill say explicitly that the tracker may carry comments from other workflows, so a future reader of the recipe understands why the predicate is narrowed.
Evidence summary
- Occurrences: 2 — the fork recorded 2026-08-05, and the mis-append today.
- Classification: structural. Replayed 10 times with a non-log bot comment newest on the tracker,
| last picks it every time.
- Scope: any tend consumer running
review-runs whose bot posts any other comment on the tracking issue. tend-nightly routing a below-threshold finding there is the ordinary path into this state, not an edge case.
Problem
review-runs' "Recording below-threshold findings" step picks its append target with| last:That selects the newest bot comment on the tracker, not the evidence log. Every other tend workflow posts as the same bot account, so any one of them commenting on the tracking issue silently hijacks the append target and forks the log in two — after which each subsequent run appends to whichever fork happens to be newest.
This is structural:
| lastis deterministic, and there is no decision point anywhere in the chain. Nothing in the recipe distinguishes "the evidence log" from "some other comment the bot left here."What happened on max-sixty/cargo-affected
tend-nightlyrun 30984146563 posted a below-threshold survey finding as its own comment on thereview-runs-trackingissue (#73) on 2026-08-05. That is reasonable behavior on nightly's part — the tracker is where below-threshold findings go — but it made comment5188771252the newest bot comment on the issue.The 2026-08-05 review-runs run recorded the fork as a below-threshold observation and moved on. Today's run (31160677649) hit the consequence:
| lastresolved to5188771252(the nightly comment, 2523 bytes) rather than5150650688(the evidence log, 42610 bytes), and appended ~12 KB of run evidence into the middle of an unrelated finding. I noticed on the post-verify read, moved the entry to the real log, and restored the nightly comment — but a run that didn't re-read after posting would have left the log permanently split.The failure is also invisible: the append succeeds,
gh apireturns 200, and nothing downstream errors. The only symptom is that a future run's "read historical evidence" step gets the entries in a jumbled order across two comments, which degrades gate evaluation rather than breaking it.Why the 50 KB branch makes it worse over time
The recipe starts a fresh comment when the existing one exceeds 50000 bytes. Once that fires, the tracker holds two bot comments and
| lastpoints at the new one — correct by luck. But the moment any other workflow comments after that, the pointer moves again. On this repo the evidence log is now 54635 bytes, so the next run takes the create-new branch, and the run after that will resolve| lastto whichever of the three comments is newest.Proposed fix
Two options, in the order I'd prefer them:
Select by content marker rather than recency. Every evidence entry begins with a
## Run <id>heading, so the log is self-identifying:One-line change, no new state, and it keeps working when the 50 KB branch legitimately creates a second log comment.
review's analogous recipe already narrows by a second predicate (.commit_id == "$HEAD_SHA"), so the shape has precedent in the plugin.Finish the gist migration.
review-runs' SKILL.md already carries<!-- TODO: migrate this to gist-backed storage once the review-reviewers pilot validates it -->, andreview-reviewershas been running on per-(target, month)secret gists for a while now. A gist keyed by target+month has no "which comment is the log" question at all, and no 65 KB ceiling. If the pilot is considered validated, this supersedes option 1 entirely — but it's a bigger change and needs thegistPAT scope on every consumer, so option 1 is worth taking regardless as the cheap correctness fix.I'd also suggest the skill say explicitly that the tracker may carry comments from other workflows, so a future reader of the recipe understands why the predicate is narrowed.
Evidence summary
| lastpicks it every time.review-runswhose bot posts any other comment on the tracking issue.tend-nightlyrouting a below-threshold finding there is the ordinary path into this state, not an edge case.