Repository navigation
feat(id-import-atproto): live follow — subscribeRepos/Jetstream ingestion (slice 5 of #13787) - #17254
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Closed
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 5 of #13787 — live follow, the last named remainder. Slices 1–4 landed resolution + verified ingest (#16783), CLI/store application (#17081), blob references (#17116) and blob fetching (#17126); this slice adds the live piece and closes the issue.
What lands
New
livemodule inpkgs/id/crates/id-import-atproto(leaf pattern preserved — no new dependencies, no network I/O in the crate):parse_firehose_frameparses relaycom.atproto.sync.subscribeReposDAG-CBOR frames (header + body;#commitops recovered with their record bytes from the frame's CAR slice, whose block hashes the CAR reader verifies;#identity/#account/#infocarried as informational events).parse_jetstream_eventparses Jetstream JSON events, reversing the atproto JSON conventions ($link/$bytessingleton objects) at any depth so record CIDs can be checked against the canonical DAG-CBOR encoding.LiveFollow(followed DID + lastrev+ last relayseq) applies commit ops into the slice-2RecordStore: creates/updates put verbatim record bytes only after the bytes hash to the op's CID, deletes remove the local copy (the deletion-honouring policy), non-commit and other-DID events are filtered (not trusted to the subscription'swantedDids),rev/seqregressions are rejected before the store is touched, and atooBigcommit is refused with a fall-back-to-full-ingest error.subscribeReposwith cursor/wantedDids; Jetstream with wantedDids/cursor) — the caller drives whatever websocket transport it has and feeds frames in, exactly as callers fetch CAR/PLC inputs today.followsubcommand: applies a captured frames file (Jetstream JSON-lines or concatenated firehose frames) into a file store, resumingrevstate from the store's last full-ingest manifest, and prints the follow report (events/filtered/put/deleted, final rev, resume cursor) as JSON.Trust posture, stated plainly (also in the module docs): live ops are CID-hash-verified — content is bound to its CID exactly as in slices 1/4 — but are not commit-signature/MST verified per diff. That remains the full CAR ingest's job, and its
revmonotonicity refuses to roll back past anything a follow accepted. Live follow is a light path in the same sense as the PDS light reads: timely, CID-checked, periodically anchored by a verified snapshot. This answers the issue's open question 4: live follow is in scope as a filtered per-account follow in both shapes, not a relay-scale programme.Test-oracle repair included (pre-existing breakage on main)
cargo test -p id-import-atprotodid not compile on current main: the recent ecdsa/elliptic-curve bump (#17130 lock reunify + deps bump) renamedVerifyingKey::to_encoded_point→to_sec1_point(7 test sites) and madeSignature::normalize_sreturn the signature directly instead of anOption(2 test sites). Control run on plainmain(fleet-run 46446993350) failed with the identical 9 errors. This PR repairs those 9 test-only call sites so the crate's suite runs again; no production code changes.Verification
cargo fmt --checkclean,cargo test -p id-import-atproto52 passed / 0 failed (45 pre-existing + 7 new live-follow tests: Jetstream create/link-roundtrip/update-delete-filtering/forged-CID, firehose apply + cursor + replay, tooBig refusal, URL builders).--all-targetsemits warn-level lints across the whole crate (pre-existing files included — e.g. cbor.rs 71, apply.rs 47, live.rs 60, same lint classes); no errors. The crate's lints are warn-level by its own Cargo config; a crate-wide clippy-drift cleanup is separate work from this slice.Closes #13787 — with this slice every named piece is landed: DID resolution + verified repo/record ingest, CLI/store application, blob references, blob fetching, and live follow.
{ "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-30T16:10:36Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch/workspace/github-work/code-13787-live", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch/workspace/github-work/code-13787-live", "repo": "developing-today/code", "branch": "xaltha/13787-live-follow", "sha": "8eebebace0e2b7dad069f70911a5ca2463280c8b" }, "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.