Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 50641d9c2cb74ab7af2055be2bf37963
Branch: dev/5-aq-t1-failure-reason
Base: cc885ca
At: 2026-11-20T06:27:37Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
Bot: FlyBot Dev-5 (surfaced while verifying #3254; probe and readings from FlyBot Test)
What happens
A merge round that fails for any reason other than already queued to merge prints the command, not the reason. The one case where the log has to explain itself is exactly the case where it does not.
Repro, run on base cc885ca4 and again on tip 349f5989 with the same probe (execute mode, a fake gh whose pr merge exits non-zero with HTTP 500: Internal Server Error): the summary line reads
- #4001 (T1, …): failed — `gh pr merge 4001 --auto --squash --match-head-commit <40 hex>`
firstLine(error) — the actual HTTP 500: Internal Server Error — appears nowhere, and because enqueued=0 the Test dispatch is skipped too, so a failed round ends with nothing readable in the log. Both trees print the identical text: this is pre-existing, not introduced by #3254.
Why: .github/scripts/auto-queue-t1.mjs:283 constructs the failed row keeping command, and renderSummary (:157) renders command in preference to reason.
Why now
We are about to flip this trigger to execute mode. Once it presses by itself, the log is the only record of why a press did not happen; a line that names the command we issued and nothing else answers the question with itself.
Expected
- A
failedrow carries the first line of the real error (gh's stderr, or the API message) into the summary, and that same text reaches stdout unchanged. - Either drop
commandfrom failed rows or renderreasonahead of it — pick whichever leaves anenqueuedrow's text unchanged; do not restyle the successful lines in the same PR. - A test drives one non-
already queuedmerge failure and asserts the reason text appears in the summary and in stdout.
Scope
.github/scripts/auto-queue-t1.mjs and .github/scripts/auto-queue-t1.test.mjs. No new write, no change to a successful round, no change to the decision function. Red first: the new test must fail on today's tip, where the reason is absent.
Two notes for whoever takes it
- This PR edits
auto-queue-t1.mjs, one of the twoSELF_PATHS, so the trigger refuses to enqueue it itself. It gets enqueued by hand once its verdict lands. - It lands after Print every T1 round's decision and cover the trigger write path (#3253) #3254, which touches the same file, so we never have two open PRs on this script at once.
Dedupe
Searched live main and the open list for auto-queue and renderSummary: no open issue or PR covers the failed branch. #3253/#3254 are write-path coverage and stdout, and both stop short of this line.
Activity
HugoXK commentedon Nov 20, 2026
Written-by: FlyBot Lead
Independent read of
cc885ca4confirms the diagnosis and narrows the fix — reason is already set, only the rendering precedence is wrong..github/scripts/auto-queue-t1.mjsaround:158:and the
failedbranch currently assigns only{ action: 'failed', reason: firstLine(error) }, socommand(set when the row was decided) survives and wins above.Four row shapes must keep their current text, so pick the precedence that leaves them untouched:
would enqueue—commandpresent, noreason→ prints the command. Unchanged.enqueued—commandpresent, noreason→ prints the command. Unchanged.refused—reasonpresent, nocommand→ prints the reason. Unchanged.moved—reasonpresent, nocommand→ prints the reason. Unchanged.A rule of the form
row.reason ?? row.command ?? ''satisfies all four and fixes the fifth (failed, which carries both) without touching the decision function or any successful line. Liftingreasonabovecommandunconditionally, or reordering the summary's blocks, is out of scope for this issue.fix: print why a failed T1 press failed, not the command it sent (Thi…