Skip to content

test(plugins): add an exhaustive registry fixture - #3236

Merged
ascorbic merged 9 commits into
mainfrom
test/maximal-marketplace-fixture
Sep 21, 2026
Merged

ascorbic merged 9 commits into
mainfrom
test/maximal-marketplace-fixture

Conversation

@ascorbic

@ascorbic ascorbic commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds a deliberately exhaustive registry fixture and uses it across the real plugin build, registry, installation, sandbox, MCP, and admin boundaries. The fixture keeps the historical package and plugin slug marketplace-test for compatibility, but its purpose and new test terminology are registry-specific.

  • Derives machine-checked inventories from the canonical capabilities, hooks, route modes and methods, Block Kit unions, admin declarations, and PluginContext methods.
  • Builds a real registry record, checks declared-access and public-route consent, installs and updates by opaque registry identity, reloads the stored bundle, restarts workerd, and invokes the updated plugin.
  • Exercises read-only and destructive Zod-backed MCP tools through the MCP SDK, permission and scope checks, schema validation, and workerd route dispatch.
  • Uses the same maximal fixture in @emdash-cms/plugin-test, including production Worker Loader bridges and a disposable R2 bucket for media operations.
  • Renders the configured fixture through production admin, saved-entry panel, and confirmed action endpoints in Arabic RTL. The Node fixture owns this sandbox journey; the Cloudflare fixture deliberately skips it because that target uses a noop sandbox runner.
  • Manually releases the private, changeset-excluded fixture as 0.2.0; the generated registry manifest reports the same version.

The coverage exposed and fixes two production compatibility bugs:

  • Core manifest validation now preserves existing content.publish, content.restore, and content.policy declarations, allowing those registry plugins to reach the normal installation consent checks.
  • The plugin CLI can extract registry metadata from Zod-backed MCP declarations without carrying MCP-only schema code into the sandbox runtime bundle. Hooks and routes can still use Zod at runtime.

The release notes are split by concern:

  • .changeset/shy-cats-test-media.md covers the plugin test harness and registry manifest validation.
  • .changeset/calm-tools-build.md covers the independent plugin CLI MCP build fix.

Related issue: none.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main. N/A: this changes an internal registry fixture whose manifest and Block Kit labels are static plugin metadata, not admin source strings.
  • I have added and reviewed the user-facing changeset (if this PR changes a published package)
  • New features link to an approved Discussion: N/A — no product feature is added.
  • I have included screenshots below if this PR changes the UI

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Codex (gpt-5.6-sol)

Screenshots / test output

Before, the historical fixture exposed a small dashboard and only a few primitive checks:

Marketplace test dashboard before the exhaustive registry fixture

After, the registry fixture exposes its declared authority and diagnostics in the rendered Arabic RTL admin:

Exhaustive registry fixture diagnostics in the Arabic RTL admin

Validated after merging origin/main (32f7d2011) into exact head 25c8081b9:

  • pnpm format
  • pnpm build
  • pnpm lint, pnpm lint:quick, and zero type-aware lint JSON diagnostics
  • pnpm typecheck
  • pnpm changeset status --since=origin/main
  • registry fixture typecheck and build; generated manifest version 0.2.0
  • plugin CLI: 513/513
  • plugin-test: 39/39
  • registry install/update conformance and real MCP SDK/workerd integration: 19/19
  • workerd: 196/196
  • Cloudflare: 487 passed, 2 skipped
  • rendered registry/editor E2E: 4/4
  • accepted Linux LTR/RTL editor baselines; exact-head visual remeasurement passed
  • registry fixture target boundary: Node 2/2 passed; Cloudflare 2/2 skipped as configured
  • independent adversarial review of the exact merged diff: no actionable findings

@changeset-bot

changeset-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 25c8081

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@emdash-cms/plugin-cli Patch
@emdash-cms/plugin-test Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/admin Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
create-emdash Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

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

@github-actions github-actions Bot added the review/needs-review No maintainer or bot review yet label Sep 21, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://test-maximal-marketplace-fixture.try.emdashcms.com, https://test-maximal-marketplace-fixture-emdash-playground.emdash-cms.workers.dev (commit 25c8081)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://88039492.try.emdashcms.com, https://88039492-emdash-playground.emdash-cms.workers.dev 25c8081 2026-09-21T12:48:14.113Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://fc65675f.try.emdashcms.com, https://fc65675f-emdash-playground.emdash-cms.workers.dev 91bc1ef 2026-09-21T12:27:08.289Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8b66ffdd.try.emdashcms.com, https://8b66ffdd-emdash-playground.emdash-cms.workers.dev c476c62 2026-09-21T11:20:26.536Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0e3b585d.try.emdashcms.com, https://0e3b585d-emdash-playground.emdash-cms.workers.dev 9fce7ed 2026-09-21T10:20:20.258Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a347384a.try.emdashcms.com, https://a347384a-emdash-playground.emdash-cms.workers.dev 03cc05a 2026-09-21T09:11:02.659Z Visit the dashboard ↗

@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 3,807 lines across 25 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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/admin@3236

@emdash-cms/auth

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth@3236

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth-atproto@3236

@emdash-cms/blocks

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/blocks@3236

@emdash-cms/cloudflare

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/cloudflare@3236

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/contentful-to-portable-text@3236

emdash

npm i https://pkg.pr.new/emdash-cms/emdash@3236

create-emdash

npm i https://pkg.pr.new/emdash-cms/emdash/create-emdash@3236

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/gutenberg-to-portable-text@3236

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-cli@3236

@emdash-cms/plugin-test

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-test@3236

@emdash-cms/plugin-types

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-types@3236

@emdash-cms/registry-client

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-client@3236

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-lexicons@3236

@emdash-cms/registry-loader

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-loader@3236

@emdash-cms/registry-moderation

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-moderation@3236

@emdash-cms/registry-verification

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-verification@3236

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/sandbox-workerd@3236

@emdash-cms/x402

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/x402@3236

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-ai-moderation@3236

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-atproto@3236

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-audit-log@3236

@emdash-cms/plugin-color

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-color@3236

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-embeds@3236

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-field-kit@3236

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-forms@3236

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-webhook-notifier@3236

commit: 25c8081

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs 91bc1ef Sep 21 2026, 12:26 PM

github-actions Bot pushed a commit that referenced this pull request Sep 21, 2026

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full diff for PR #3236. This is a large, well-scoped test-only change that makes the marketplace fixture exhaustive, closes a core manifest-schema gap so content:publish, content:restore, and content:policy declared-access facets validate, and adds registry conformance tests, a plugin-test inventory suite, and a Playwright Block Kit spec.

I verified the new fixture’s capabilities, hooks, route permissions, and Block Kit declarations against the production allowlists in @emdash-cms/plugin-types, @emdash-cms/auth, and @emdash-cms/blocks. The core schema fix in packages/core/src/plugins/manifest-schema.ts is mirrored correctly in @emdash-cms/plugin-types and covered by the new registry-install conformance test. The wrapped/sandboxed runtime receives the new content-create callback wiring, and the plugin-test host now exposes the R2 media binding used by the updated fixture.

No blocking logic bugs, security issues, or backward-incompatible changes were found. One cross-target test-matrix gap is noted below.


Findings

  • [suggestion] e2e/fixture-cloudflare/astro.config.mjs:37

    The Cloudflare e2e fixture does not load @emdash-cms/plugin-marketplace-test, and its sandboxRunner resolves to a noop whenever the marketplace URL is set (line 39). The new marketplace-test-block-kit.spec.ts will 404 or fail under EMDASH_E2E_TARGET=cloudflare because /plugins/marketplace-test/* and the sandboxed plugin routes are unavailable.

    			plugins: [colorPlugin()],
    			marketplace: marketplaceUrl,
    			sandboxRunner: marketplaceUrl ? "./noop-sandbox.mjs" : undefined,
    

    Consider either:

    1. Adding marketplaceTestPlugin to the Cloudflare fixture (mirroring e2e/fixture/astro.config.mjs), or
    2. Guarding marketplace-test-block-kit.spec.ts with test.skip(process.env.EMDASH_E2E_TARGET === "cloudflare", ...) so the spec only runs on the Node target that actually installs the fixture plugin.

@github-actions github-actions Bot added review/awaiting-author Reviewed; waiting on the author to respond and removed review/needs-review No maintainer or bot review yet labels Sep 21, 2026
@ascorbic ascorbic changed the title test(plugins): make marketplace fixture exhaustive test(plugins): make registry fixture exhaustive Sep 21, 2026
@github-actions github-actions Bot added review/needs-rereview New commits since the last review and removed review/awaiting-author Reviewed; waiting on the author to respond labels Sep 21, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 21, 2026
@ascorbic ascorbic changed the title test(plugins): make registry fixture exhaustive test(plugins): add an exhaustive registry fixture Sep 21, 2026
@ascorbic ascorbic added the bot:review Trigger an emdashbot code review on this PR label Sep 21, 2026
@emdashbot emdashbot Bot removed the bot:review Trigger an emdashbot code review on this PR label Sep 21, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 21, 2026
@ascorbic

Copy link
Copy Markdown
Member Author

/accept-baselines

@github-actions

Copy link
Copy Markdown
Contributor

✅ Baselines accepted by @ascorbic and committed to this PR.

…ace-fixture

# Conflicts:
#	e2e/tests/visual-regression.spec.ts-snapshots/content-editor-ltr-chromium-linux.png
#	e2e/tests/visual-regression.spec.ts-snapshots/content-editor-rtl-chromium-linux.png
@github-actions

Copy link
Copy Markdown
Contributor

Overlapping PRs

This PR modifies files that are also changed by other open PRs:

This may cause merge conflicts or duplicated work. A maintainer will coordinate.

github-actions Bot pushed a commit that referenced this pull request Sep 21, 2026
@ascorbic

Copy link
Copy Markdown
Member Author

/accept-baselines

@github-actions

Copy link
Copy Markdown
Contributor

✅ Baselines accepted by @ascorbic and committed to this PR.

@ascorbic
ascorbic enabled auto-merge (squash) September 21, 2026 13:05
@ascorbic
ascorbic disabled auto-merge September 21, 2026 13:46
@ascorbic
ascorbic merged commit 26e035d into main Sep 21, 2026
57 checks passed
@ascorbic
ascorbic deleted the test/maximal-marketplace-fixture branch September 21, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant