Repository navigation
Refuse a pull request with no issue reference or no agent-pr label - #719
Conversation
#711/#712/#713 entered the review path with no issue and no `agent-pr` label and nothing refused them: the enqueue guard only read `hold`, the conclusions and the diff. It now refuses a body with no `Fixes #<n>`/`Closes #<n>` line and one without the label, with the two wordings the issue fixes. The exemption is `isMechanicalRelease` over the changed files, not `result.exempt` — that flag is also true for T0/T1, and routine work still names its issue. Refs #718
The rules only hold where the branch is ours: a fork's head cannot be pushed by us, and the owner keeps their own workflow there (#711/#713). The test is `head.repo.full_name` against the repository being guarded, so it does not overlap `result.exempt`, which is also true for T0/T1 — routine work on our own branch still names its issue. Refs #718
|
Verdict: INC at 7abac48 The rule is the one the owner asked for and the five cases pin both directions; two things in this tip must change first. Blocking — the fork exemption can be switched off by the spelling of The second call is a valid invocation (both API paths resolve, and Blocking — the header comment still carries a placeholder. Everything else holds and I would not raise it again: the Ran: Not run: nothing end to end against a live pull request; the guard is a local script and CI only runs its tests, so the live path was exercised through the synthetic Non-blocking: |
The repository name in the API paths is case-insensitive, so `--repo thinkflowlab/flybot` made our own branch read as a fork and the guard answered ALLOW with the two new rules disabled. Both sides are lower-cased now, and a case pins the lower-case spelling: the refusal must still fire for our own branch, and a fork must stay exempt under either spelling. Also replaces the `#NNN` placeholder left in the header comment with #718. Refs #718
|
Verdict: PASS at d70f618 Both INC points are answered, and each one is now pinned by a case that goes red without the fix.
What I checked in the code beyond the two points:
Ran: Red, four cuts at this tip: Not run: Non-blocking, both for someone else's pen:
|
Written-by: Dev
Fixes #718.
Tip SHA: d70f618
Reproduce
node .github/scripts/enqueue-guard.mjs --pr <n>read onlyhold, the newest conclusion and the diff: a pull request on a branch of this repository whose body named no issue and which carried noagent-prlabel passed the guard. That is the gap #711/#712/#713 exposed - they entered the review path with neither.What changed
.github/scripts/enqueue-guard.mjs:guard()takesbody,mechanicalReleaseandfork, and pushes two reasons onto the existing list so the one-linemessagerenders them:no issue reference in the pull request body: add "Fixes #<n>"when no line matches/^[\s>#-]*(?:fixes|closes)\s*#\d+/im, andmissing label: agent-prwhen the label list - lower-cased the waymerge-gate'snames()reads it - lacks it.main()passesbody: pull.body,mechanicalRelease: isMechanicalRelease(files.map((f) => f.filename))andfork: head.repo.full_name !== repo, both sides lower-cased.result.exempt: a mechanical release PR (it carries neither by design), and a fork.exemptis also true for T0/T1, and routine work on our own branch still names its issue;head.repo.full_nameis the branch-ownership test the Chief fixed after Register a Bot when its friends are listed for sharing #711/Show a failed hold as Not sent, and make Approve all cover Bot Social #713 turned out to be the owner's own fork work. A deleted fork (head.reponull) is not this repository either, so it is exempt..github/scripts/enqueue-guard.test.mjs: thefakeGhpull response carriesbody(defaultFixes #602) andhead.repo.full_name(defaultThinkFlowLab/FlyBot) - without either every existing case changes meaning - the twoholdfixtures carryagent-prbesidehold, andrun()takes arepooverride so a case can spell the repository differently. Seven cases: same-repo missing reference, same-repo missing label, both present, fork, mechanical release, lower-case--repoon our own branch, fork under either spelling.AGENTS.md->### Merge gates: one bullet after theawaiting-approval is retiredone, naming both exemptions.INC answered
Verdict: INC at 7abac481(6337118114) named two things, both fixed on this tip:fork = pull.head?.repo?.full_name !== repolet--repo thinkflowlab/flybotread our own branch as a fork, answer ALLOW and switch both rules off. Both sides are lower-cased now, and two new cases pin it: our own branch still refuses under the lower-case spelling, and a fork stays exempt under either. Reverting only thetoLowerCase()makes#718: a lower-case --repo spelling does not turn our own branch into a forkred (21/22).#NNN. It names#718now (and the fork exemption beside the mechanical release one).What I ran
At the tip:
The 15 pre-existing cases stay green: the fixture change is what keeps them meaningful rather than newly refused.
Red without the source change
Four cuts, each restored afterwards (all at this tip):
guard()-> 17/22: the two refusal cases, the fork case (it also asserts the same pull request on our own branch is refused), and the lower-case case.if (!mechanicalRelease)-> 20/22: both fork cases fail.if (true)-> 19/22: both fork cases and the mechanical release case fail.toLowerCase()in theforkcomparison -> 21/22:#718: a lower-case --repo spelling does not turn our own branch into a fork.Not run
npm run verifyand the rest of.github/scripts/*.test.mjs: this box has no full checkout - only the three changed files plus what they import - so the whole suite is left to CI. No file other than the three changes. The doc test in the same file (#602: the instructions that enqueue point at the guard) is green here against the tip'sAGENTS.md,SKILL.mdandautonomous-dev.md.gh): this box has nogh. The cases drive the whole ofmain()through the injectablefakeGh, includingexempt,forkand thehead.reposhape the API sends.Risk
T3 by the repository's own rules (
.github/**andAGENTS.md), so it needs a PASS at the tip. The behaviour change is confined to the guard and only refuses more, and only for a branch this repository owns: a pull request with noFixes #<n>/Closes #<n>line or withoutagent-prcan no longer enter the queue - that is the point - while forks and the daily release PR are untouched. Per the issue, an owner-authored pull request on a fork gets no refusal at all now; noauthor_association: OWNERwaiver was added.