Skip to content

fix(fleet-bump): match the open-PR guard on the ref, not on code search - #535

Merged
rubenvdlinde merged 1 commit into
mainfrom
fix/fleet-bump-open-pr-guard
Aug 21, 2026
Merged

fix(fleet-bump): match the open-PR guard on the ref, not on code search#535
rubenvdlinde merged 1 commit into
mainfrom
fix/fleet-bump-open-pr-guard

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

in:head is not a valid pull-request search qualifier. GitHub doesn't reject it — it treats the query as free text, which matches nothing.

Measured against docudesk#711, while that PR was open

query result
--search "chore/fleet-shared-deps in:head" (what shipped) EMPTY — 3 attempts, ~30s apart
--head chore/fleet-shared-deps-20260821 the PR
--json headRefName + startswith(...) the PR

So this guard has never fired, and could not fire.

Why this one is worse than it looks

The guard exists so the weekly sweep never opens a second PR on top of one a maintainer is already fixing — and it is the reason this workflow can safely refuse to force-push. A guard that always answers "nothing open" silently withdraws that safety while still reading as enforced.

Matching on headRefName goes through the REST API's ref data, so there's no search index to lag or misparse.

Found while verifying #534 end-to-end: the fixed sweep opened docudesk#711 correctly (package-lock.json +3/-3, as intended), and the guard's own query couldn't see it.

`in:head` is not a valid pull-request search qualifier. GitHub does not reject
it -- it treats the query as free text, which then matches nothing.

MEASURED 2026-08-21 against docudesk#711 while that PR was open:

  gh pr list --search "chore/fleet-shared-deps in:head"   -> EMPTY (x3, ~30s apart)
  gh pr list --head chore/fleet-shared-deps-20260821      -> the PR
  gh pr list --json headRefName | startswith(...)         -> the PR

So the guard has never fired and could not fire. That is the worst failure
available to this particular guard: it exists so the weekly sweep never opens
a second PR on top of one a maintainer is already fixing, and it is the whole
reason the workflow can safely refuse to force-push. Always answering "nothing
open" silently withdraws that safety while looking like it is enforced.

Matching on headRefName reads refs through the REST API -- no search index to
lag or misparse.
@rubenvdlinde
rubenvdlinde merged commit 8eb5fb0 into main Aug 21, 2026
36 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/fleet-bump-open-pr-guard branch August 21, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant