Repository navigation
feat(id-sync): native one-shot HTTPS legs for the bridge (#3818) - #13031
Merged
Merged
Conversation
The hosted signed-object bridge's one-shot routes — GET /v1/bridge/challenge, GET /v1/bridge/heads, POST /v1/bridge/push, POST /v1/bridge/pull — as native calls in crates/id-sync/src/bridge_http.rs, the remainder the dialer PR (#12993) named on #3818. BridgeHttpClient (one binding, one ID key, one front-door base URL) over a BridgeHttp request/response seam — reqwest over rustls in production (ReqwestHttp), the workspace's existing HTTPS stack. Every leg but challenge fetches a fresh single-use nonce and signs the bridge-auth transcript over the exact body, sent as x-id-nonce / x-id-proof; a refusal surfaces the server's named {error, message} as BridgeHttpError::Refused. Push is bound-checked client-side in the hosted codec's terms before anything is sent; pull decodes its batch with the receipt bounds and reads heads/more from the response headers. Tests run the legs against an in-memory mirror of the hosted routes over a native EventStore: heads on an empty store, wrong-key refusal by name, nonce replay refusal (consumed on first use), push/heads/pull round trip with duplicate re-push, pull pagination at max_events, a malformed event as a refused outcome, and the over-bound batch that never leaves the client. Design record updated to match; #3818 stays open on the live native-against-hosted session test.
|
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 33 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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 23, 2026
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.
Refs #3818 — remainder 1 of Lane FQ's done record: the one-shot HTTPS legs as native calls. (Not a closing PR: #3818 stays open on remainder 2, the live native-against-hosted session test.)
What landed
pkgs/id/crates/id-sync/src/bridge_http.rs— the native client for the hosted bridge's one-shot routes (GET /v1/bridge/challenge,GET /v1/bridge/heads,POST /v1/bridge/push,POST /v1/bridge/pull):BridgeHttpClient(one binding, one ID key, one front-door base URL) over aBridgeHttprequest/response seam; production transport isReqwestHttp(reqwest over rustls — the workspace's existing HTTPS stack, via id-worlds; one new dependency edge for id-sync plus its Cargo.lock entry).auth_transcript/body_hash_hexthe dialer uses — sent asx-id-nonce/x-id-proofheaders, matchingbridgeProofinuser-do.ts.x-bridge-heads/x-bridge-more. A non-success answer surfaces asBridgeHttpError::Refusedwith the server's status and named{error, message}code.Verification (laptop worktree off origin/main,
nix developin pkgs/id)cargo test -p id-sync bridge_http— 7 passed / 0 failed. The tests run the legs against an in-memory mirror of the hosted routes over a nativeEventStore(nonce mint/consume semantics, proof verify, ingest, position-cut pull): heads on an empty store; wrong-key proof refused as403 bridge_proof_invalid; a nonce proves exactly one call (replay → 403); push/heads/pull round trip with a duplicate re-push; pull pagination atmax_events=1; a malformed event as a refused outcome; an over-bound batch refused locally with zero requests sent.cargo test -p id-sync --lib— 238 passed / 0 failed (the crate's full lib suite, including the dialer's session tests).cargo fmt --check -p id-sync— clean.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.