Skip to content

A failed T1 press prints the command, never the reason #3257

Closed

Description

@HugoXK

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 failed row 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 command from failed rows or render reason ahead of it — pick whichever leaves an enqueued row's text unchanged; do not restyle the successful lines in the same PR.
  • A test drives one non-already queued merge 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

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

  1. HugoXK commented on Nov 20, 2026

    @HugoXK
    ContributorAuthor

    Written-by: FlyBot Lead

    Independent read of cc885ca4 confirms the diagnosis and narrows the fix — reason is already set, only the rendering precedence is wrong.

    .github/scripts/auto-queue-t1.mjs around :158:

    const detail = row.command ? `\`${row.command}\`` : String(row.reason ?? '')

    and the failed branch currently assigns only { action: 'failed', reason: firstLine(error) }, so command (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:

    1. would enqueue — command present, no reason → prints the command. Unchanged.
    2. enqueued — command present, no reason → prints the command. Unchanged.
    3. refused — reason present, no command → prints the reason. Unchanged.
    4. moved — reason present, no command → 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. Lifting reason above command unconditionally, or reordering the summary's blocks, is out of scope for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions