Repository navigation
Conversation
|
Scope checkThis PR changes 1,601 lines across 14 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. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 248dd3d | Jul 11 2026, 06:48 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 248dd3d | Jul 11 2026, 06:49 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 248dd3d | Jul 11 2026, 06:46 AM |
There was a problem hiding this comment.
The underlying key-rotation state machine is well-considered and the migration correctly captures the CAS-style pause/activate semantics. However, this slice does not actually wire the new behavior to the public HTTP surface, so the headline features from the PR description and spec are not reachable yet.
The biggest gap is that queryLabels is implemented to lazily re-sign stale labels only when it receives a VersionedLabelSigner, but apps/labeler/src/index.ts calls it with only env.DB and the request. The worker also has no signing-key binding in wrangler.jsonc/config.ts, so the public endpoint cannot perform the re-signing the spec calls for. Instead, public queries for pre-rotation labels will return 503.
A related gap is the WebSocket subscription stream: it reads issued_labels rows straight through without re-signing, so subscribers will receive labels signed with retired keys after a rotation.
Finally, the PR says operators can inspect rotation status and alerts, but index.ts exposes no route for getSigningStatus / listSigningAlerts.
I treat this as a comment rather than request-changes because the target branch is the umbrella feature branch and the missing pieces may be intentionally deferred to a follow-up slice — but the HTTP wiring should be completed before this feature is considered functional.
I also noted the PR template checklist item for an approved Discussion is not filled in; acceptable for a feature-branch slice, but should be present before merge to main.
Findings
-
[needs fixing]
apps/labeler/src/index.ts:24The public
queryLabelsroute is called without aVersionedLabelSigner, so the lazy re-signing logic added inquery-labels.tsis never reachable from HTTP. After a key rotation, public reads for labels signed with the previous key will hit theRESIGN_CONFIGURATION_MISMATCHpath and return503instead of re-signing the label. The spec calls for stale labels to be re-signed lazily on query, so the route either needs a signer constructed from the worker's signing key (which also requires a new env/secret binding) or the re-sign flow should be moved to an internal/admin path with explicit authorization. -
[needs fixing]
apps/labeler/src/subscribe-labels.ts:209The subscription
labelsAfter()query serves rows fromissued_labelsdirectly throughrowToLabel()without re-signing stale signatures. After a rotation, subscribers will receive labels signed with the retired key, which will fail verification against the current DID document. The samesigning-rotationre-signing logic used forqueryLabelsneeds to be available here too — either by re-signing on read or by ensuring only current-key signatures are broadcast. -
[suggestion]
apps/labeler/src/index.ts:22The PR description says operators can inspect rotation status and alerts, and
signing-rotation.tsexportsgetSigningStatusandlistSigningAlerts, butindex.tsdoes not expose any route for them. Consider adding an authenticated operator endpoint (for example under a separate admin path or as a dedicated XRPC method) so operators can actually observe rotation state and alerts.
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
|
Thanks. I checked these against the workstream boundaries and updated the PR description to make the scope explicit.
The approved design is tracked by RFC #694 and umbrella PR #1909. The labeler app is private, so the changeset warning is expected. |
0e2f097
into
feat/plugin-registry-labelling-service
What does this PR do?
Adds the persistence and service layer for routine signing-key rotation to the registry labeler. Issuance pauses across the DID update boundary, activation uses compare-and-swap state, historical labels are lazily re-signed without changing their creation timestamps, and rotation status and alerts are available to the later authenticated operator surface.
It also resolves the v1 identity strategy: discovery uses the base
#atproto_labelerDID service plus the EmDash policy document, without anapp.bsky.labeler.service/selfdeclaration. Standard moderation reports return an explicitNotSupportedresponse and are never persisted.The production signing runtime and HTTP wiring remain part of W3.1, which provisions the DID, Secrets Store key binding, startup key validation, and policy endpoint. Subscription backfill may retain old-key signatures as explicitly permitted by the AT Protocol key-rotation guidance; labels issued after activation use the active key.
Part of #1909 and RFC #694.
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.Admin i18n is not applicable because this changes only the labeler Worker and design documents. A changeset is not applicable because
@emdash-cms/labeleris private. This is an implementation slice of the approved registry labeler design tracked by RFC #694 and umbrella PR #1909.AI-generated code disclosure
Screenshots / test output
pnpm buildpnpm typecheckpnpm lint:jsonreports 0 diagnosticspnpm --filter @emdash-cms/labeler testpasses 23 workerd/D1 testsgit diff --check