ci(release): grant packages: write to fix Release startup_failure - #93
Merged
Ryan Zhu (underthestars-zhy) merged 1 commit intoJul 23, 2026
Conversation
…kflow buildspace commit 2535977 (Jul 17) added a github-packages-publish job with 'permissions: packages: write' to typescript-service-release.yaml. GitHub validates called-workflow job permissions against the caller's grant when the workflow graph is compiled — even for jobs skipped via 'if:' — so every push to main since then died with startup_failure (runs for #79, #81, #82) and no release was published. Co-authored-by: Ryan Zhu <zhuhaoyu0909@icloud.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Ryan Zhu (underthestars-zhy)
marked this pull request as ready for review
July 23, 2026 08:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every push to
mainsince Jul 19 fails the Release workflow at startup withstartup_failureand zero jobs (e.g. run 29706990353 for #79 — same for #81 and #82). As a result, #79'srelease-labeled merge never published a version.Root cause: buildspace commit
2535977(Jul 17) added agithub-packages-publishjob withpermissions: packages: writeto the sharedtypescript-service-release.yamlreusable workflow. GitHub validates a called workflow's job-level permissions against the caller's grant when compiling the workflow graph — before evaluatingif:— so even though that job is opt-in (publish-github-packagesdefaults tofalseand would be skipped), the entire run is rejected at startup because our caller only grantedcontents: write, pull-requests: read, id-token: write.Evidence: the last successful release (Jul 14) resolved
buildspace@mainatc3c48ac(pre-change); all Jul 19 failures resolved43f12a6(post-change). The only structural diff in the reusable workflow between those SHAs is the new job withpackages: write.Fix
Grant
packages: writein thereleasejob'spermissionsblock. This only widens what the called workflow is allowed to request; the GitHub Packages publish job itself stays opt-in and skipped for this repo.After merging
Merging this PR alone won't publish the pending releases (this PR has no
releaselabel). Either add thereleaselabel to this PR before merging, or trigger the Release workflow viaworkflow_dispatchwithrelease: trueafterwards to ship the accumulated #79/#81/#82 changes.photon-hq/uricalls the same reusable workflow withoutpackagesand will need the same one-liner before its next release.Note on agent rules
AGENTS.md forbids agents from modifying
.github/workflows/; this change was explicitly requested by the user to repair the release pipeline, and CI has no policy check on workflow files (onlysnapshot-policyanddeps-policy).Upstream version
(none — no API changes)
Routes added/removed/changed
(none)
Snapshot changes
New runtime dependencies
Checklist
@photon-ai/dashboard-apiversion bump, not hand edits (n/a — no type changes)bun run checkpasses locally (not run — workflow-only change, no code touched; CI runs it on this PR)Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.