Repository navigation
feat(id): id-import-atproto — verified AT Protocol read slice - #16783
Conversation
…13787) New leaf crate pkgs/id/crates/id-import-atproto (no id-* deps, transport injected, the id-import-notion shape): - DID resolution: did:plc via audit-log chain verification (entry CIDs, prev links, rotation-key signatures; document derived from the final op; legacy create genesis supported), did:web via /.well-known/did.json, handle resolution via DNS TXT / well-known with the bidirectional alsoKnownAs check. - Verified repo ingest: CAR v1 reader, per-block hash checks, commit signature verification against the DID document's repo key, rev monotonicity, full MST walk (prefix reconstruction, fanout-4 layer checks, in-order keys), record-block presence. - Provenance manifests with deletion marks (diff emits last-known-CID tombstones for records that vanish upstream). - Light PDS reads (describeRepo/listRecords/getRecord/getRepo) kept as a separate, explicitly unverified path. - Hand-rolled CIDv1/dag-cbor, canonical DAG-CBOR codec, and base32/58 primitives; signing via k256/p256 on the ecdsa 0.16 line they use. Oracle-named tests throughout, all offline (injected fakes). Refs #13787. Remainder on the issue: CLI/store application of ingested records, live follow, blob fetching.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Verification dispatched at exact head |
|
Run 46265072133 attribution (CI log read): FAILURE was environmental, before any compilation — cargo could not open |
- mst::collect_records: name the block-source lifetime ('a) — E0106.
- cbor Decoder tag-42 branch: copy the link bytes out of the decoder
borrow before error handling borrows it again — E0502.
- pds::PdsClient: manual Debug impl (a dyn Fetcher is not Debug) and
scope the test's client so the fetcher borrow ends before asserting
on it — E0277/E0609.
Run 46267438160 (fresh CARGO_HOME) reached compilation and reported
exactly these; the earlier run 46265072133 never compiled (poisoned
shared cargo cache slot for ecdsa-0.16.9.crate).
|
Run 46267438160 attribution: with a fresh CARGO_HOME the build reached compilation and failed on four real errors in the new crate (missing lifetime on mst::collect_records, a borrow conflict in the CBOR tag-42 branch, PdsClient Debug over a trait object, and the pds test asserting through the client borrow). All four fixed in 5afc713, pushed. Re-dispatched at exact head 5afc713: run 46272942359 (https://github.com/developing-today/fleet/actions/runs/46272942359). |
|
Post-merge verification status (lane 0647-L10R): this PR merged at 5afc713 while run 46272942359 was still queued; that run then failed at checkout (branch deleted on merge — command never ran). Post-merge runs against main: 46278177479 and 46281309620 both died in nix flake evaluation before the command ran (the runner checkout's .git/fleet-credentials.config is locked/permissions-blocked for the vscode user — a fleet-runner venue defect, reproduced twice). Workaround dispatched as run 46283942741 (copies pkgs/id out of the git tree before nix develop, fresh CARGO_HOME): it is still QUEUED — as of this comment the fleet-command queue shows 30 runs queued and zero in progress, i.e. the runner pool is stalled fleet-side. When the pool recovers, 46283942741's conclusion is the verification of record for this crate on main; if it is red, lane 0647-L10R (or the on-duty lane) fixes forward with a follow-up PR. The compile fixes in 5afc713 were written directly from run 46267438160's compiler errors (E0106/E0502/E0277/E0609), but the test suite has not yet had a completed run — stated plainly so nobody reads this merge as test-verified. |
First slice of #13787 (AT Protocol read compatibility), scoped in the claim comment on the issue: the verified read path as a new leaf crate,
pkgs/id/crates/id-import-atproto.What's in
did:plcby audit-log chain verification (entry CIDs recomputed,prevlinks, rotation-key signatures; the DID document is derived from the final verified op; legacycreategenesis ops supported). This is the issue's open question 1 answered with its own recommendation: (b) verify the chain, trust plc.directory only for availability.did:webvia/.well-known/did.jsonwith id match. Handle resolution via DNS TXT / well-known with the bidirectionalalsoKnownAscheck.revmonotonicity against the caller's last accepted rev; full MST walk (prefix reconstruction, fanout-4 layer checks, strictly-increasing keys); every record block present. Unknown lexicons stay opaque verbatim records.diffemits deletion marks (last known CID,deleted: true) for records that vanish upstream, so mirrors honour deletions deliberately rather than by silence.describeRepo/listRecords/getRecord/getRepoas a separate, explicitly unverified path, so a light read can never be mistaken for a verified one.id-import-notionpattern): the crate does no network I/O and every test runs offline against fakes, with oracle-named tests for each verification property (tampered block, wrong key, broken PLC prev link, high-S signature, rev regression, …).Remainder on #13787 (not this PR): applying ingested records into id's store/events and a CLI surface; live follow (
subscribeRepos/Jetstream-shaped); blob fetching/referencing policy.Verification: remote dispatch of
cargo test -p id-import-atprotoat the exact head; results posted on this PR before merge.Refs #13787
{ "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-29T12:59:10Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch/workspace/github-work/w0647-l10", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch/workspace/github-work/w0647-l10", "repo": "developing-today/code", "branch": "xaltha/13787-atproto-read", "sha": "9fc482badb1f253e2a748256d06634a0b2b0c7f7" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.