Repository navigation
Description
Consideration
Drew (2026-11-23): "we should probably at least support it for compatibility layer — allow reading bsky in id natively, consider."
Scope: a read-only AT Protocol ingestion path for pkgs/id — resolve atproto identities, fetch their public repositories, verify them cryptographically, and surface the records inside id with provenance. No write support, no account creation, no Spaces/permissioned data, no AppView ambitions. Full research note: ~/workspace/p2panda-investigation/research/bluesky-atproto.md (Part B); filed from the auth+transport investigation #13779, for the id epic #2056.
What it decomposes into
- Handle → DID: DNS TXT (
_atproto.<handle>) or/.well-known/atproto-did, verified bidirectionally against the DID document. - DID resolution:
did:plcvia plc.directory (strong form: fetch and verify the audit-log operation chain — each op signed by the prior op's rotation keys, so the directory is trusted only for availability/fork choice);did:webvia/.well-known/did.json(trust = DNS+TLS). From the document: the#atprotorepo signing key and the#atproto_pdsendpoint. - Light record reads:
com.atproto.repo.describeRepo/listRecords/getRecordagainst the account's PDS, unauthenticated. Trusts the PDS for completeness — acceptable for display, not for verification claims. - Verifiable repo ingest:
com.atproto.sync.getRepo→ CAR v1 (signed commit + MST nodes + records). Verification: DAG-CBOR/CID discipline, MST reconstruction (SHA-256 key-depth, fanout 4, prefix-compressed nodes) with root equality against the commit'sdataCID, commit signature check (SHA-256 over the unsigned commit; secp256k1 or P-256 key from the DID document),revmonotonicity. This is the slice that makes "reads bsky natively" mean something more than "calls Bluesky's AppView". - Optional live follow (later): relay
com.atproto.sync.subscribeRepos;#commitdiffs verify cheaply via op-inversion againstprevData(per-repo state = rev + root CID). Full-network firehose is AppView-scale — a filtered/per-account shape is the realistic form.
Where it would sit
Precedent: pkgs/id/crates/id-import-notion — importer-shaped work already lives in its own crate. Proposal: a new read-only importer crate (working name id-import-atproto): resolve → fetch → verify → emit foreign records with provenance (DID, collection, rkey, CID, commit rev) into id's existing store/events shapes. Explicitly not id-core (no core model change for a foreign protocol) and not id-sync (id's own log-sync/meta protocol — a different thing that happens to share a word).
Rust library state: atrium (MIT, actively released; atrium-identity, atrium-repo MST, codegen'd XRPC types — the default candidate, though its centre of gravity is client sessions); jacquard (MPL-2.0, jacquard-repo MST/CAR, zero-copy, but single-maintainer-shaped and pre-1.0 with frequent breaking releases); atproto-crates (MIT, separable primitives incl. CAR reading and identity, 0.14.x). Rolling our own MST/CAR verifier is bounded, spec-complete fallback work, not the plan.
Costs, stated plainly
- MST/CAR/commit verification is real work — and is also the entire value over proxying an AppView.
- Unknown lexicons must ingest as opaque verbatim records; interpreting
app.bsky.*is a separate opt-in layer. - Deletion/takedown handling is a policy choice: repos are tombstone-free and mirrors are expected to honour deletions; verbatim retention must be a deliberate decision, not a default.
- Scale scoping: per-account ingest is tractable; "the network" is an indexing programme. This issue is about accounts.
Open questions
- PLC trust posture: (a) trust plc.directory HTTPS, (b) verify the audit-log chain per DID, (c) consume a PLC replica. Recommendation: (b).
- Record modelling: verbatim DAG-CBOR with provenance index (recommended first slice) vs mapping into id's object model.
- Which accounts/collections are in scope for a first slice — a named seed set, or any DID on demand?
- Live follow: in scope at all, and if so filtered (per-account polling / Jetstream-shaped) vs relay subscription?
- Blobs: reference-only, or fetch-and-store?
- Does the importer emit into
id-events/id-storedirectly, or land in a staging shape the atlas source-registry work (atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 line) consumes?
Links
- Epic: epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056 · Investigation: investigation: capability auth + p2p transport — p2panda-first, honestly compared #13779 · AT Protocol repository spec: https://atproto.com/specs/repository · Sync spec: https://atproto.com/specs/sync · did:plc spec v0.3.0: https://github.com/did-method-plc/did-method-plc
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-23T21:43:42Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activity
developing-today commentedon Nov 23, 2026
CODE-5065