Skip to content

feat(registry): add labeller Lexicons - #1923

Merged
ascorbic merged 1 commit into
feat/plugin-registry-labelling-servicefrom
feat/labeller-10-labeller-lexicons
Jul 10, 2026
Merged

ascorbic merged 1 commit into
feat/plugin-registry-labelling-servicefrom
feat/labeller-10-labeller-lexicons

Conversation

@ascorbic

@ascorbic ascorbic commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds experimental public Lexicons for the EmDash registry labeller.

  • Defines public assessment, current assessment, manual-action, and fixed-field policy views.
  • Adds getAssessment, getCurrentAssessment, listAssessments, and getPolicy query contracts.
  • Generates TypeScript contracts and exports their NSIDs.
  • Adds schema tests, including publisher-DID manual actions.

Implements W1.2/W1.3 from #1909. It adds contracts only; no labeler service routes are implemented yet.

Related to #1909 and #694.

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 RFC: Decentralized Plugin Registry #694

Admin i18n is not applicable because this package has no user interface.

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: OpenCode with GPT-5.6-sol and independent review subagents

Screenshots / test output

  • pnpm run codegen passes
  • pnpm build passes
  • pnpm --filter @emdash-cms/registry-lexicons test: 14 passed
  • pnpm --filter @emdash-cms/registry-lexicons typecheck passes
  • pnpm lint passes
  • pnpm changeset status passes
  • git diff --check passes

attw --pack retains its existing internal filename crash after publint succeeds.


Try this PR

Open a fresh playground →

A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.

Tracks feat/labeller-10-labeller-lexicons. Updated automatically when the playground redeploys.

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e71f8a2

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

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 1,513 lines across 15 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.

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

cloudflare-workers-and-pages Bot commented Jul 10, 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
emdash-playground e71f8a2 Jul 10 2026, 03:39 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 10, 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
emdash-demo-do e71f8a2 Jul 10 2026, 03:39 PM

@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-cache e71f8a2 Jul 10 2026, 03:36 PM

@ascorbic
ascorbic merged commit 4510fb4 into feat/plugin-registry-labelling-service Jul 10, 2026
8 checks passed
@ascorbic
ascorbic deleted the feat/labeller-10-labeller-lexicons branch July 10, 2026 15:42

@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, contracts-only addition of experimental labeller query lexicons for the plugin registry. It implements the scoped W1.2/W1.3 work from #1909 by defining getAssessment, getCurrentAssessment, listAssessments, and getPolicy contracts, generating the TypeScript/runtime validators, exporting NSIDs, and adding schema smoke tests. The change fits the existing @emdash-cms/registry-lexicons package conventions (hand-authored JSON lexicons → generated .ts via @atcute/lex-cli → re-exports in src/index.ts).

The code is largely clean, but one real inconsistency should be fixed before the contracts harden in a published package: the policy object def is named #labelerPolicy (single l) while the NSID namespace, file paths, hand-written exports, documentation, and every other new def use labeller (double l). This leaves consumers importing LabellerDefs.LabelerPolicy and pointing to an emdash-labeler-policy.json well-known URL, which is awkward for a public contract. Renaming to #labellerPolicy keeps the surface internally consistent.

I also suggest bumping the changeset from patch to minor since this is a feature addition rather than a bug fix, though this is less critical for an unstable 0.x package.

"description": { "type": "string", "minLength": 1, "maxLength": 4096 }
}
},
"labelerPolicy": {

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.

[needs fixing] The policy object def is named labelerPolicy (single l), while the surrounding NSID namespace, file paths, hand exports in src/index.ts, and the PR title/description all use labeller (double l). This inconsistency will persist in generated TypeScript (LabellerDefs.LabelerPolicy / labelerPolicySchema) and in the well-known policy URL used in tests (emdash-labeler-policy.json).

Because this is a public contract, it is much cheaper to align the spelling now than after release. Rename the def to labellerPolicy and update the getPolicy.json reference and generated code/tests accordingly.

Suggested change
"labelerPolicy": {
"labellerPolicy": {
"type": "object",

@@ -0,0 +1,5 @@
---
"@emdash-cms/registry-lexicons": patch

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] This changeset adds new public query contracts, so a minor bump is more conventional than patch (even though the package is pre-1.0 and experimental). Not a blocker, but it helps downstream consumers read the release note correctly.

@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/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant