Repository navigation
feat(labeler): verification-state history input via aggregator read (W8.4 slice 3) - #2074
Conversation
🦋 Changeset detectedLatest commit: ae43eaa The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
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 |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | ae43eaa | Jul 16 2026, 01:08 PM |
Scope checkThis PR changes 891 lines across 18 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-demo-do | ae43eaa | Jul 16 2026, 01:08 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | ae43eaa | Jul 16 2026, 01:08 PM |
There was a problem hiding this comment.
This slice delivers the right thing for W8.4: an additive, read-only aggregator query for publisher verification claims, consumed by analyzeHistory as operator-only history context that structurally can never become a label. The approach matches the existing aggregator read patterns (getPackage, label-enforcement, hydrateLabels) and keeps the fail-safe posture: aggregator failures are isolated in their own try/catch so they never discard the own-D1 findings. The second input (handle/profile changes) is honestly left as a documented seam rather than half-built against non-existent ingestion.
What I checked:
- The new
getPublisherVerificationXRPC route, lexicon definitions, router registration, and view mapping. - Per-issuer redaction behavior and the blank
atproto-accept-labelersinternal read path. AggregatorClient.getPublisherVerificationwiring and error contract.analyzeHistoryintegration and the newpublisher-verificationhistory category throughvalidateFinding.- Tests for redaction, failure isolation, and orchestrator validation.
- AGENTS.md conventions: SQL uses bound parameters/column constants, no admin UI strings were added, the changeset covers the published
registry-lexiconspackage, and apps are private so no additional changeset is needed.
Headline conclusion: every changed hunk is consistent with the integration-branch conventions, the ratified redaction design, and the existing codebase. No blockers or bugs found. Note: analyzeHistory accepts an aggregator but no production orchestrator path passes one yet; that is consistent with the orchestrator's own documented test-only status, so it is not a merge defect for this slice.
…W8.4 slice 3) Adds the publisher verification-state input to analyzeHistory, the first of W8.4 slice 3's two aggregator-sourced history inputs. - registry-lexicons: new getPublisherVerification query + publisherVerificationView / verificationClaimView defs, returning the non-tombstoned verification claims indexed for a publisher DID. - aggregator: read-only route over publisher_verifications, redaction-gated on the publisher DID exactly like getPackage (a blank accept-labelers header opts out, so an internal caller reads unfiltered). - labeler: AggregatorClient.getPublisherVerification; analyzeHistory consumes it behind an optional reader and emits a publisher-verification history finding with issuer/handle specifics in privateDetail only. The aggregator read has its own try/catch so a failure never discards the own-D1 findings. The second slice-3 input, recent handle/profile changes, is not built: the aggregator keeps only current profile state (publishers is upserted) and does not ingest the atproto identity events that carry handle changes, so no change history exists to expose. Blocked on ingestion, not a read path. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…slice 3 review) Each verification claim is authored by its issuer's repo, so a subject-keyed lookup could resurface a taken-down issuer's vouch. Hydrate labels for the subject DID and every distinct issuer DID in one batched call; a redacted subject 404s the whole view, a redacted issuer drops only its own claim. A blank accept-labelers header (the internal labeler read) has an empty accepted set, so nothing is filtered and every claim is seen. Also correct the shipped docs: the read is NOT indistinguishable from absence (a non-redacted DID returns 200, possibly with an empty verifications array; only a redacted subject 404s), and it returns claims regardless of expiry — expiresAt is present for the consumer to evaluate in-force state, not a server-side filter. Co-Authored-By: Claude Opus 4.8 <[email protected]>
759afbe to
ae43eaa
Compare
There was a problem hiding this comment.
This is a re-review of W8.4 slice 3, which adds the read-only aggregator query for publisher verification claims (com.emdashcms.experimental.aggregator.getPublisherVerification) and wires it into analyzeHistory as operator-only history context.
Approach judgment: The change is still the right thing for the integration branch. It delivers exactly the one slice-3 input that is buildable now (verification state) and honestly leaves the other input (recent handle/profile changes) as a documented seam because the aggregator does not ingest a change history. The per-issuer redaction design is correctly implemented, the internal labeler read opts out of default redaction with the blank atproto-accept-labelers header, and the fail-safe posture (aggregator failure is isolated in its own try/catch so it never discards own-D1 findings) is preserved.
What I checked:
- New aggregator route, lexicon definitions, generated types, and router registration.
- SQL uses bound parameters and constant column lists; the partial index on
publisher_verifications(subject_did)already supports the read query. - Per-issuer redaction behavior and the blank-header unfiltered read path.
AggregatorClient.getPublisherVerificationwiring and error contract.analyzeHistoryintegration, the newpublisher-verificationhistory category, andvalidateFindingadmission.- Tests for ordering, tombstone filtering, redaction (subject and issuer), blank-header unfiltered reads, failure isolation, and binding transport.
- AGENTS.md conventions: no admin UI strings, no
ec_*locale filter needed, additive changeset for the publishedregistry-lexiconspackage, and apps are private so no additional changeset is required.
Headline conclusion: The slice remains clean and consistent with the integration-branch conventions and ratified design. The prior approval still holds. The only issue I found is a contradictory inline comment about whether a redacted subject is distinguishable from an unverified one.
| // A redacted publisher DID hides the whole view — the caller can't tell it | ||
| // apart from an empty result, which is the point of redaction. |
There was a problem hiding this comment.
[suggestion] The inline comment contradicts the route's documented behavior (and the actual code): this endpoint returns 404 NotFound for a redacted subject DID but 200 with an empty verifications array for a non-redacted, unverified DID, so the two are intentionally distinguishable.
| // A redacted publisher DID hides the whole view — the caller can't tell it | |
| // apart from an empty result, which is the point of redaction. | |
| // A redacted publisher DID hides the whole view as NotFound. This is | |
| // distinct from a non-redacted, unverified DID, which returns 200 with an | |
| // empty verifications array — only the subject's claim state is concealed. |
9501d61
into
feat/plugin-registry-labelling-service
What does this PR do?
Implements W8.4 slice 3 of the plugin-registry labelling service: the aggregator-sourced inputs to the labeler's publisher-history stage. Targets the integration branch
feat/plugin-registry-labelling-service.Scope honesty — this delivers one of the two slice-3 inputs:
✅ Verification state (delivered). A new read-only aggregator query
com.emdashcms.experimental.aggregator.getPublisherVerificationreturns the non-tombstoned verification claims indexed for a publisher DID. The labeler consumes it throughAggregatorClient.getPublisherVerificationandanalyzeHistory, emitting an operator-onlypublisher-verificationhistory finding (specifics inprivateDetailonly). Like everysource: "history"finding it can never become a label — the resolver drops it, andvalidateFindingholds it to the dedicated history category set.⏳ Recent handle/profile changes (documented seam, NOT built). This input is genuinely un-ingested, not half-wired: the aggregator's
publisherstable is upsert-only (current state, no prior-values log), handle isn't stored except snapshotted inside a verification record at issuance, and the Jetstream ingestor does not subscribe to the atproto identity events that carry handle changes (apps/aggregator/src/jetstream-client.ts). Deriving "recent changes" therefore requires new aggregator ingestion work (a W4-era gap) — a follow-up ingestion ticket is needed before this second input can exist. It is left as a documented seam inhistory-context.tsand the route header; nothing speculative was built against non-existent tables.Best-effort + fail-safe: history is operator-only context that never gates a run. The aggregator read sits in its own
try/catchinsideanalyzeHistory, so a read failure skips only the verification context and never discards the decision-relevant own-D1 findings.Per-issuer redaction (review follow-up): each verification claim is authored by its issuer's repo, so
getPublisherVerificationhydrates labels for the subject DID and every distinct issuer DID in one batched call — a redacted subject 404s the whole view, a redacted issuer drops only its own claim. The internal labeler read sends a blankatproto-accept-labelersheader (empty accepted set), so it reads every claim unfiltered and weighs trust itself.Ratified plan-doc decisions governing this slice live on the integration branch (
.opencode/plans/plugin-registry-labelling-service/implementation-plan.md, W8.4, including the 2026-07-16 read-path ratification and the per-issuer-redaction decision recorded in09e795d9).Closes #
Type of change
Checklist
pnpm typecheckpasses (labeler, aggregator, registry-lexicons)pnpm lintpasses (type-aware lint shows the ~40 repo-wide baseline diagnostics only; none in the changed files)pnpm testpasses (labeler full 660, aggregator full 305, registry-lexicons 23)pnpm formathas been run (oxfmt on touched TS, prettier-clean on the lexicon JSON)@emdash-cms/registry-lexiconsminor (additivegetPublisherVerificationNSID + views)AI-generated code disclosure
Screenshots / test output
Targeted invariant tests (per-issuer redaction, the security-critical part of this PR):
Suites: aggregator 305 pass (14 files), labeler 660 pass (33 files), registry-lexicons 23 pass. The workers test pool needs a Cloudflare account selected (
CLOUDFLARE_ACCOUNT_IDfor EmDash CMS) since two are available.Query cost: per-issuer redaction adds no round-trip in the realistic case — it widens the existing single label-hydration query's
IN (...)list (chunked at 50), so a request stays at 2 queries (verifications SELECT + one hydration) until a publisher has 50+ distinct issuers.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/labeler-history-aggregator. Updated automatically when the playground redeploys.