Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 343dca7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 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 |
Scope checkThis PR changes 1,793 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. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
emdash-demo-cache | 343dca7 | Jul 12 2026, 08:13 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 343dca7 | Jul 12 2026, 08:14 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
emdash-demo-do | 343dca7 | Jul 12 2026, 08:14 AM |
8b3e5ea
into
feat/delegated-release-service
There was a problem hiding this comment.
This PR is a well-scoped, architecture-consistent addition to the registry work: it introduces an authoritative direct-PDS read path in registry-client and centralizes record/policy/provenance verification in registry-verification. The code is generally careful about fail-closed validation, size/time bounds, identity checks, and semver baseline selection.
I reviewed the diff, read every changed file, and traced conventions in the existing registry packages. Most of the implementation looks solid, but I found three issues worth addressing:
-
Bounded transport is missing redirect control. The new
createBoundedFetchwrapper advertises bounded transport but forwards the fetch call without aredirectoption. A compromised or malicious PDS could redirect the client to arbitrary origins or force extra round trips before the byte limit kicks in. The siblingfetch.tsinregistry-verificationvalidates redirects and hosts; direct-PDS should at least not silently follow cross-origin redirects. -
The CID check re-encodes a JSON-deserialized record.
verifyRecordCidrecomputes the DAG-CBOR CID from the value returned by@atcute/lexicons/validationssafeParse. Unless@atcute/cbor encodecanonicalizes map key order exactly like the PDS's stored DAG-CBOR, this can reject legitimate records when the PDS JSON response orders fields differently or when numeric CBOR types don't round-trip through JSON's float64. Confirming this needs a real PDS round-trip, but it's the kind of subtlety that is easy to miss in fixture-based tests. -
Test helpers are exported from production code.
provenance.tsexportsprovenanceTestInternalsfrom the public module surface. Test-only utilities should live in a test module or be marked@internalso they don't become part of the published API.
None of these are severe enough to block merge, but (1) in particular is a security/contract gap for a feature that emphasizes bounded transport.
Findings
-
[needs fixing]
packages/registry-client/src/direct-pds/index.ts:390The bounded fetch wrapper forwards the caller's
inittofetchImplementationwithout settingredirect, so the client silently follows any redirects returned by the configured PDS. This undermines the "bounded transport" goal: a compromised publisher PDS could redirect the request off-origin or cause extra round trips before the byte limit is reached. Either setredirect: "manual"and treat redirects as errors, or track and validate redirect locations likeregistry-verification/src/fetch.tsdoes.fetchImplementation(input, { ...init, signal: controller.signal, redirect: "manual" }), -
[suggestion]
packages/registry-client/src/direct-pds/index.ts:351The CID is recomputed from the JSON-deserialized,
safeParse-validated record value. This only matches the original record CID if@atcute/cbor encodecanonicalizes map keys exactly like the PDS's stored DAG-CBOR and if every numeric value survives the JSON float64 round-trip. With fixture data the test passes by construction; verify that this works against a real atproto PDS response where key order and numeric types may differ, otherwise valid records could be rejected. -
[suggestion]
packages/registry-verification/src/provenance.ts:389provenanceTestInternalsexposes DER-decoding helpers in the production public API surface purely for tests. Move these test helpers into a test-only module (or mark them@internal) so they don't become accidental public API.
What does this PR do?
Implements W2.6 and W2.7 from the delegated release plan. It adds shared signed record, policy, artifact, and provenance verification plus authoritative direct-PDS profile and release reads with bounded transport, canonical CID checks, complete enumeration, and deterministic semver baseline selection.
Part of #1908 and implements the approved protocol in #1870.
Closes: N/A, integration work for #1908.
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs. N/A: no admin UI changes.AI-generated code disclosure
Screenshots / test output
No visual changes.
attwcrashes internally withCannot read properties of undefined (reading 'filename'); independent package/import checks pass.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/delegated-release-service-11-record-verification. Updated automatically when the playground redeploys.