Repository navigation
fix(release): require workers-scripts.admin in the release manifest (#225) - #229
Merged
Merged
Conversation
…225) Installing a release creates the site and admin Workers. Since Cloudflare's granular Worker roles, Workers Editor (workers-scripts.edit) cannot create a Worker; a grant built from the manifest's requiredScopes got a 403 on the new site Worker's asset upload. The standard manifest now names Workers Admin. - scripts/release-bundle/standard.ts: workers-scripts.edit -> .admin, with a test that keeps it so. - release-manifest fixtures follow (schema unchanged: ScopeId is a pattern). - RFC-0046 §3: the scopes rule for consumers. Manifests up to v0.9.0 keep .edit (immutable releases); a consumer treats .admin as covering .edit and asks for .admin when it builds a grant from an older manifest. Closes #225 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Madraka <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Madraka <[email protected]>
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.
What
The standard release manifest's
requiredScopesnow names Workers Admin (workers-scripts.admin) instead of Workers Editor (workers-scripts.edit).Installing a release creates the site Worker and the admin Worker. Since Cloudflare introduced granular Worker roles (changelog 2026-09-15), an Editor cannot create Workers. So a grant built from the old list could not install a release. The asset upload for the new site Worker answered 403 with an empty
errorsarray, as the issue reports.Changes
scripts/release-bundle/standard.ts:workers-scripts.edit→workers-scripts.admin, with a comment.packages/cli/test/release-bundle.test.ts: a test that fails if the manifest goes back to.edit.packages/core-contracts/fixtures/{valid,invalid}/release-manifest/*.json(10 files): updated to match. The schema is unchanged, becauseScopeIdis only a pattern. Nopnpm genwas needed and nothing generated changed.docs/rfcs/0046-release-bundles.md§3: a dated "Scopes" note with the consumer rule.Old manifests (v0.9.0 and earlier)
Releases are immutable, so v0.9.0's manifest keeps
workers-scripts.edit. The next release carriesworkers-scripts.admin. Consumers should treat the old manifests as follows:requiredScopes, treatworkers-scripts.adminas coveringworkers-scripts.edit. A grant holding Admin satisfies old and new manifests alike.workers-scripts.adminin place ofworkers-scripts.edit. A grant with only.editcannot install a release.No code in this repository compares scopes today. The shared verifier designed for #227 will expose this rule as a
missingScopeshelper.Not changed
scripts/is not published, and@cloudhal/core-contractsships onlydist,schemasandREADME.md, not its fixtures.Tests
Not run locally, because the owner's machine is under load. CI is the test run for this PR. The tests that cover it:
packages/cli/test/release-bundle.test.ts;cargo test).Closes #225
🤖 Generated with Claude Code