Skip to content

fix: give merge_group builds a valid version name in docs.yml - #72

Merged
coretl merged 4 commits into
mainfrom
fix/merge-group-version-name
Sep 2, 2026
Merged

coretl merged 4 commits into
mainfrom
fix/merge-group-version-name

Conversation

@ZohebShaikh

Copy link
Copy Markdown
Contributor

merge_group's ref_name is GitHub's internal
gh-readonly-queue//pr--, which contains '/' and fails the URL-path-segment check, hard-failing docs.yml for repos using a merge queue. These builds are never gathered by publish.yml's engine, so a fixed "merge-queue" name is enough.

The issue it is trying to fix in blueapi which uses merge queues

Run set -euo pipefail
Error: version name 'gh-readonly-queue/main/pr-1645-579cb18403ab661103b5e1093396e45b2e91939f' is not usable as a URL path segment — it must be non-empty and contain only A-Z a-z 0-9 . _ - (a '/' in a branch or tag name is the usual cause). Build this ref under a name that is, or exclude it from the workflow's triggers.
Error: Process completed with exit code 1.

Claude-Session: https://claude.ai/code/session_0183zj2nfvaMK3Yo14Wwkych

merge_group's ref_name is GitHub's internal
gh-readonly-queue/<base>/pr-<n>-<sha>, which contains '/' and fails
the URL-path-segment check, hard-failing docs.yml for repos using a
merge queue. These builds are never gathered by publish.yml's engine,
so a fixed "merge-queue" name is enough.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0183zj2nfvaMK3Yo14Wwkych
@ZohebShaikh
ZohebShaikh requested a review from coretl August 28, 2026 12:01
@ZohebShaikh

Copy link
Copy Markdown
Contributor Author

I have no idea if this is fixing anything, This is pure vibe coding

@coretl

coretl commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

I think I agree. The merge queue docs build is still valuable to check it builds, but the artifact can then be thrown away.

claude reviewing claude:

On #72 itself

The shape is right. The validator's failure mode is deliberate (fail loud rather than silently mangle a ref into a colliding path segment), so special-casing merge_group to a fixed literal is more in keeping than loosening the character check. The error message's own advice — "exclude it from the workflow's triggers" — is actively wrong for merge queues, so it's worth handling centrally: every consumer that turns on a merge queue hits this hard failure.

Two things I'd raise on the PR:

  • Skip the upload on merge_group. The artifact is provably ungatherable, so it's pure storage churn against the repo's Actions quota, once per queue entry. if: github.event_name != 'merge_group' on the upload step.
  • A separate bug this exposes. publish.yml triggers on workflow_run for CI completion with no filter on the triggering event, and its guards (conclusion == 'success', same head repo) both pass for a merge-group run. So once fix: give merge_group builds a valid version name in docs.yml #72 unbreaks docs, every queue entry will trigger a full site reassemble and Pages deploy that changes nothing, on top of the one the subsequent push to main triggers. Worth a github.event.workflow_run.event != 'merge_group' term in the guard — in the template, since publish.yml is the file each consumer carries.

ZohebShaikh and others added 3 commits September 1, 2026 11:14
docs.yml now skips uploading a merge_group build's docs artifact — it's
never gathered (the version name is the fixed "merge-queue" literal), so
uploading it was pure storage churn. publish.yml's guard gains a third
term, event != 'merge_group', since the other two guards both still pass
for a merge-queue run and would otherwise fire a full, no-op site
reassemble-and-redeploy on every queue entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BzmGP9Z1oWtHKVLbS8YD8C
…update

code-review caught two leftover mentions of "two guards" after the
previous commit added a third (event != 'merge_group').

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BzmGP9Z1oWtHKVLbS8YD8C
Code review flagged that this step-level if: had no coverage anywhere
in the harness — test_shape.py only asserted publish.yml's job-level
guard, so a future refactor could silently drop or invert it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011i7JVVjbNJ9ptXJaetbFH5
@coretl
coretl merged commit 93a04a7 into main Sep 2, 2026
5 checks passed
@ZohebShaikh

Copy link
Copy Markdown
Contributor Author

After checking in blueapi this did work. 🎉

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.

2 participants