Skip to content

feat(registry): add delegated release contracts#1918

Merged
ascorbic merged 1 commit into
feat/delegated-release-servicefrom
feat/delegated-release-service-01-lexicons
Jul 10, 2026
Merged

feat(registry): add delegated release contracts#1918
ascorbic merged 1 commit into
feat/delegated-release-servicefrom
feat/delegated-release-service-01-lexicons

Conversation

@ascorbic

Copy link
Copy Markdown
Collaborator

What does this PR do?

Implements the delegated release service's experimental record contract from RFC #1870:

  • Adds the embedded package profile extension with the signed repository anchor and release policy.
  • Adds optional release provenance to the existing release extension.
  • Regenerates and exports typed lexicon contracts.
  • Documents the intentional boundary between Lexicon syntax validation and later semantic/cross-record enforcement.

This is the shared contract PR. Consumer changes remain blocked until it merges into feat/delegated-release-service.

Related to #1908, #1870, and Discussion #1590.

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.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: RFC: Attested Automated Publishing #1590

i18n is not applicable: no admin UI is changed.

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: OpenCode with GPT-5.6-terra

Screenshots / test output

  • pnpm build passes with existing virtual-import and deliberate test-plugin eval warnings
  • pnpm --filter @emdash-cms/registry-lexicons test passes: 18 tests
  • pnpm --filter @emdash-cms/registry-lexicons typecheck passes
  • pnpm lint passes with 0 warnings/errors
  • pnpm --filter @emdash-cms/registry-lexicons regen is clean
  • Targeted formatting and git diff --check pass
  • publint passes; attw --pack then hits the known filename crash also reproduced in unchanged registry packages

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 649de62

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

This PR includes changesets to release 19 packages
Name Type
@emdash-cms/registry-lexicons Minor
@emdash-cms/admin Patch
@emdash-cms/plugin-cli Patch
@emdash-cms/registry-client Patch
emdash Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash 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 size/L review/needs-review No maintainer or bot review yet cla: signed labels Jul 10, 2026
@cloudflare-workers-and-pages

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
emdash-demo-do 649de62 Jul 10 2026, 02:53 PM

@ascorbic
ascorbic merged commit 2e778e4 into feat/delegated-release-service Jul 10, 2026
6 of 8 checks passed
@ascorbic
ascorbic deleted the feat/delegated-release-service-01-lexicons branch July 10, 2026 14:53

@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.

This PR is a focused contract-only change: it adds the new profileExtension lexicon for delegated-release policy on package profiles, extends the existing releaseExtension with optional provenance references, regenerates the typed schemas, and keeps the hand-maintained NSID map in sync. The approach fits the approved Discussion/RFC and the experimental registry package, and it correctly defers cross-record semantic enforcement (e.g. requireProvenance) to later consumers.

I inspected the lexicon JSON, generated TypeScript schemas, src/index.ts exports, the changeset, and the new tests. The changeset is present and targets the right package with a minor bump. No admin UI / i18n / SQL / auth code is touched, so the bulk of the AGENTS.md conventions do not apply here. I did not run the test suite or linter; my conclusions are based on static code inspection.

No blocking issues. I have one small suggestion to improve a test so it actually exercises the schema rule it claims to test.

$type: NSID.packageProfileExtension,
repository: "https://github.com/example/gallery",
releasePolicy: {
approvers: Array.from({ length: 33 }, (_, index) => `did:plc:${index}`),

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.

[suggestion] The test name says it rejects an oversized approver list, but the 33 entries are did:plc:${index} (e.g. did:plc:0, did:plc:1, …). These are syntactically invalid did:plc identifiers, so the schema will most likely reject for the DID format before it ever checks the 32-item cap. The test still passes, but it doesn't prove the length limit works.

Use distinct, syntactically valid DIDs so the array-length rule is the actual reason for rejection:

Suggested change
approvers: Array.from({ length: 33 }, (_, index) => `did:plc:${index}`),
approvers: Array.from({ length: 33 }, (_, index) => `did:web:example${index}.com`),

@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 Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: signed review/awaiting-author Reviewed; waiting on the author to respond size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant