Skip to content

ci: declare the Releases permission by key (the 2026-09-30 cut 403) - #300

Closed
theogravity wants to merge 1 commit into
mainfrom
ci/releases-permission-ride
Closed

theogravity wants to merge 1 commit into
mainfrom
ci/releases-permission-ride

Conversation

@theogravity

Copy link
Copy Markdown
Contributor

What

Names releases: in the permissions block at every point the job token touches the Releases API: publish-cli/publish-desktop (write), build-desktop's stageSidecar fetch (read), docker-image's gh release download (read). Pinned by release-cut-order.test.ts and docker-image-chain.test.ts.

Why

The 2026-09-30 desktop cut died with 403 Resource not accessible by integration on POST /releases while the job's granted scopes printed Contents: write; the same token pushed tags minutes before, and an hour earlier the same workflow had created cli-server-v1.7.0's release with a byte-identical release.yml. Server-side flip, content-unchanged file, releases-only API: that is GitHub's per-key re-mapping of GITHUB_TOKEN (fine-grained model, org-by-org rollout), where releases stop riding contents. The classic map ignores the new key; the fine-grained map requires it. The next cut is the empirical verifier.

Tests

bun test scripts/ 287/0 (fresh, not cached); both workflows parse via js-yaml.

…ches it

The 2026-09-30 desktop cut answered POST /releases with 403 'Resource
not accessible by integration' although the job's granted scopes printed
Contents: write, while the same token pushed tags minutes before and the
cli cut had created its release an hour earlier. That is the signature
of GitHub's per-key re-mapping of GITHUB_TOKEN (the fine-grained model,
rolled out org by org server-side): release operations stop riding
contents: write and need releases: write. The repo declared only
contents everywhere, which is right for the classic map and invisible to
the new one, and it is exactly what softprops' README cannot warn about
because the README still says contents: write.

Declared by key at all four token-to-Releases touchpoints: both publish
jobs (write), build-desktop's sidecar fetch (read), and docker-image's
gh release download (read, which narrows its workflow block only).
Redundant under either classic mapping, load-bearing under the other,
and the next cut verifies empirically: release-cut-order.test.ts pins
both publish gates and build-desktop, docker-image-chain.test.ts pins
the rail.
@theogravity

Copy link
Copy Markdown
Contributor Author

Closing on a retracted theory. actionlint (and GitHub's own push-run parser, which failed this branch's release.yml while everything else on the PR ran) proves the workflow permissions schema has NO releases key: release operations ride contents in the classic GITHUB_TOKEN model this repo uses. The 403 was therefore not a missing-key problem, and this PR's file could never have run. Recorded the investigation in the removal comment below; the original cut 403 remains unexplained by anything repo-side (identical file/branch/actor/token to the release that succeeded 40 minutes earlier; no rulesets, no branch protection, no platform incident on record).

@theogravity
theogravity deleted the ci/releases-permission-ride branch September 30, 2026 21:39
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant