Skip to content

The enqueue guard refuses Fixes owner/repo#N, so no fork pull request can be enqueued #809

Closed
Birfy/FlyBot
#29

Description

@Birfy

What happens. Since branches and pull requests moved to Birfy/FlyBot, the enqueue guard refuses every pull request that names its issue the way the team now requires — Fixes ThinkFlowLab/FlyBot#<n>:

REFUSE — do not enqueue #23: no issue reference in the pull request body: add "Fixes #<n>"

Reproduced on three fork pull requests, each with a clean merge state, nine green checks and the agent-pr label: #23 @ 046b284c (#801), #27 @ 0ea7112a (#804), #28 @ 48624e0b (#803). All three carry that full-name reference in the body and all three are refused.

Why. .github/scripts/enqueue-guard.mjs:47:

const ISSUE_REF = /^[\s>#-]*(?:fixes|closes)\s*#\d+/im

#\d+ cannot match ThinkFlowLab/FlyBot#801. That cross-repository spelling is the only correct one inside the fork: a bare Fixes #801 there resolves against the fork's numbering, which is not this issue (the fork's Issues are disabled), so the guard currently only accepts a reference that points at the wrong place. The refusal message at :77 makes it worse by telling the author to add the spelling that is wrong in that repository.

Nothing else about the guard is at fault. fork at :136 is head.repo.full_name !== repo; a branch pushed inside Birfy/FlyBot has the same head repo as the repo being checked, so fork=false and the upstream rules apply — that is intended, and it is exactly why the reference syntax has to be accepted.

What to change. One regex, one message, three tests:

  1. :47 — allow an optional owner/repo prefix: (?:[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+)?#\d+. Keep \s*, not \s+: Fixes#801 matches today and must keep matching.
  2. :77 — name both accepted spellings, for example no issue reference in the pull request body: add "Fixes #<n>" or "Fixes <owner>/<repo>#<n>".
  3. enqueue-guard.test.mjs — three cases: Fixes ThinkFlowLab/FlyBot#801 passes, Fixes #801 still passes, Fixes 801 still fails. :178 asserts the exact message text, so it moves in the same commit as :77 or package and tests-ok go red on the test's own assertion.

Verification.

  • node --test .github/scripts/enqueue-guard.test.mjs → 25/25 (22 today + 3). With the regex reverted, 24/25, and the cross-repository case is the one that fails.
  • node .github/scripts/enqueue-guard.mjs --repo Birfy/FlyBot --pr 23 → ALLOW (046b284c already carries a Verdict: PASS at that tip).
  • The same command for --pr 27 and --pr 28 → ALLOW.

Kill conditions (any one fails the change):

  • The regex also accepts Fixes 801 (no #), or stops accepting Closes #714.
  • A body whose only reference is prose ("this fixes things") passes: the reference must stay a line of its own, behind #, > or -.
  • fork at :136 is touched, or the agent-pr requirement at :78 is relaxed.
  • The change is enqueued through the guard it repairs. It lives in .github/**, so it is T3: PASS at the tip plus green CI, and it merges on that basis — the guard that would refuse it is the one being fixed.

Out of scope. Changing what counts as a reference (URLs, Refs, issue titles); the agent-pr requirement; the fork exemption; any rewrite of the guard's other refusal reasons; accepting Fixes <owner>/<repo> #<n> with a space before #.

Activity

  1. added
    bugSomething isn't working
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:automationScheduled tasks and automation
    and removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 23, 2026
  2. added a commit that references this issue on Oct 23, 2026
    ff27297
  3. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 23, 2026
  4. added a commit that references this issue on Oct 23, 2026
    73e9ca2
  5. Birfy commented on Oct 23, 2026

    @Birfy
    CollaboratorAuthor

    Landed in the fork as 73e9ca23 (#29, squash). Closed by the cross-repository Fixes line when that pull request merged; the state labels agent-working/agent-pr were cleared here because a closed issue carries history, not workflow state.

  6. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 23, 2026
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

    area:automationScheduled tasks and automationbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions