Skip to content

fix(ci): make the release gate start and pass on Windows - #1431

Merged
wizzomafizzo merged 3 commits into
mainfrom
fix/release-gate-permissions
Sep 5, 2026
Merged

fix(ci): make the release gate start and pass on Windows#1431
wizzomafizzo merged 3 commits into
mainfrom
fix/release-gate-permissions

Conversation

@wizzomafizzo

@wizzomafizzo wizzomafizzo commented Sep 5, 2026

Copy link
Copy Markdown
Member
  • The first v2.17.2 tag build ended in startup_failure with no jobs run. GitHub rejected build.yml with: "Error calling workflow 'lint-and-test.yml'. The workflow is requesting 'security-events: write', but is only allowed 'security-events: none'."
  • lint-and-test.yml declares security-events: write at workflow level for its govulncheck SARIF upload. The release gate job added in fix(test): unblock Windows and macOS CI, and gate releases on it #1409 calls it granting only contents, pull-requests and packages read, and GitHub validates a called workflow's declared permissions against the caller's grant before any job starts, whether or not the step that uses them will run.
  • Grant security-events: write on the gate job. Nothing in a gate run uses it, because the release_gate input already skips the SARIF upload.
  • With the gate running, its Windows job failed on TestScrapeLoop_AccumulatesSourceLoadFailures from fix(scraper): follow the MiSTer artwork pack format #1429. scrapeLoop formats each failed source path with %q, which escapes the backslashes in a Windows path, while the test searched the error for the raw path. The assertion now compares against strconv.Quote of the path, which is what %q produces.
  • With the gate passing and every target built, Windows signing was rejected: SignPath accepts an artifact only when every job upstream of it ran in the "GitHub Actions" runner group, and the gate's Linux job runs on ubicloud-standard-4. Before fix(test): unblock Windows and macOS CI, and gate releases on it #1409 the build job had no dependency on lint-and-test.yml, so that runner was never in a release's chain. The gate now runs its Linux job on ubuntu-latest; pull requests and pushes to main keep the Ubicloud runner.
  • The gate had never run on a real tag before this: fix(test): unblock Windows and macOS CI, and gate releases on it #1409 landed after v2.17.1, and the weekly build-check workflow, which calls build.yml the same way, has been failing at startup on main since 2026-08-31 for a reason not yet looked at.
  • All three commits are cherry-picked from release/v2.17.2, where the v2.17.2 tag points at the last one.

…lares

The first v2.17.2 tag build ended in startup_failure with no jobs run:

  The workflow is not valid. .github/workflows/build.yml (Line: 59, Col: 3):
  Error calling workflow 'lint-and-test.yml'. The workflow is requesting
  'security-events: write', but is only allowed 'security-events: none'.

lint-and-test.yml declares security-events: write at workflow level for its
govulncheck SARIF upload. The gate job added in #1409 calls it with only the
three read scopes it needs, and GitHub validates a called workflow's declared
permissions against the caller's grant before any job starts, whether or not
the step that uses them will run. The gate skips the SARIF upload, but the
declaration is what is checked.

Grant it on the gate job. Nothing in the gate run uses the scope.

The gate has never run on a real tag before this: #1409 landed after v2.17.1,
and build-check.yml, which would have exercised the same call, has been
failing at startup on main since 2026-08-31.

(cherry picked from commit d7f08f0)
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 292979a4-38c2-49ef-9940-40f310c0a57d

📥 Commits

Reviewing files that changed from the base of the PR and between dc01ac2 and a7d7905.

📒 Files selected for processing (1)
  • .github/workflows/build.yml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The build workflow grants security-events: write to the lint-and-test job. The change satisfies the permission contract required by the called workflow for SARIF uploads.

Changes

Workflow Permission Update

Layer / File(s) Summary
Grant SARIF upload permission
.github/workflows/build.yml
The lint-and-test job now grants security-events: write and documents the called workflow requirement.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to a7d79

The release gate now has the permission required for the reusable lint-and-test workflow to start and upload SARIF when applicable. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies a CI fix that allows the release gate to start and pass. It matches the pull request objective.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

TestScrapeLoop_AccumulatesSourceLoadFailures failed on the v2.17.2 release
gate's Windows job:

  Error "misterdocs: load \"media\\\\fat\\\\docs\\\\SNES\\\\Artwork One\": ..."
  does not contain "media\\fat\\docs\\SNES\\Artwork One"

scrapeLoop formats each failed source path with %q, which escapes the
backslashes in a Windows path, while the test searched the error for the raw
path. Forward slashes need no escaping, so the assertion only held on Linux
and macOS. Compare against strconv.Quote of the path, which is what %q
produces.

(cherry picked from commit 2b5190a)
@wizzomafizzo wizzomafizzo changed the title fix(ci): grant the release gate the permissions lint-and-test.yml needs fix(ci): make the release gate start and pass on Windows Sep 5, 2026
The v2.17.2 tag build passed its gate and built every target, then Windows
signing failed:

  Build artifact cannot be signed because of continuous integration system
  setup validation errors: At least one job that had an impact on the
  artifact creation was executed on a non-github-hosted runner but only
  GitHub hosted runners are allowed. The job "lint-and-test / CI (ubuntu,
  ubicloud-standard-4)" was executed on a runner group "Default" that is
  not allowed.

SignPath's policy for this project accepts artifacts only when every job
upstream of them ran in the "GitHub Actions" runner group. Before #1409 the
build job had no dependency on lint-and-test.yml, so the Ubicloud runner its
Linux job uses was never part of a release's chain. The gate made it one.

Pick ubuntu-latest for that job when release_gate is set. Pull requests and
pushes to main keep the Ubicloud runner, and every other job the gate runs
is already GitHub-hosted.

(cherry picked from commit e508758)
@wizzomafizzo
wizzomafizzo merged commit 805930b into main Sep 5, 2026
17 checks passed
@wizzomafizzo
wizzomafizzo deleted the fix/release-gate-permissions branch September 5, 2026 11:10
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