fix(workerd): accept current plugin capability names - #2574
Closed
logelog wants to merge 1 commit into
Closed
Conversation
🦋 Changeset detectedLatest commit: 4128e41 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Scope checkThis PR changes 640 lines across 12 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
logelog
force-pushed
the
codex/emdash-workerd-capability-aliases
branch
from
August 20, 2026 03:17
e94fe43 to
1620247
Compare
The Workerd bridge and wrapper were added after the capability rename but still checked the pre-rename names. As a result, manifests using current content, media, users and network capabilities could be denied, and users:read did not expose ctx.users. Normalize capabilities at the bridge handler and wrapper boundaries, keep supported legacy aliases working, and report current names in permission errors. Add deterministic Workerd capability tests to the existing Tests job because pnpm test:unit does not run this package's tests.
logelog
force-pushed
the
codex/emdash-workerd-capability-aliases
branch
from
August 20, 2026 03:18
1620247 to
4128e41
Compare
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 does this PR do?
Fixes the Workerd sandbox rejecting manifests that declare current capability names for content, media, users, and network access.
The bridge and generated wrapper now normalize manifest capabilities before checking them. Current names authorize the matching APIs, supported legacy aliases remain accepted, and permission errors report the current names. This also exposes
ctx.userswhen a manifest declaresusers:read.Regression coverage exercises current and legacy names through the bridge, generated wrapper, and a real Workerd process. The existing Tests job now runs the deterministic Workerd capability tests because
pnpm test:unitdoes not include@emdash-cms/sandbox-workerd.Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain. Not applicable: this PR does not change the admin UI.AI-generated code disclosure
Screenshots / test output
Current head
4128e41afdb828422440076e133fc93dfb15d311is a conflict-free rebase of the Windows-validated candidatee94fe43fd780e33a8784da16613d9d06308d4df5ontoade23cdc9b400ba34bb1cad5f9fb5a4d3793114f. The source patch is unchanged, and both revisions have stable patch ID9db0092bb0d7d7d2a145ca1673e64e46a3bcfc8c.pnpm format, andgit diff --checkpassed.git diff --checkpassed.pnpm format:checkreported the same 10 symlink-checkout files on the pristine base and candidate because the Windows checkout hadcore.symlinks=false; this was not a candidate regression.