Repository navigation
feat(id-core): fetch-side transport advertisement substrates (#8214 slice 3) - #11173
Conversation
…lice 3) Well-known and Workers-rendezvous HTTPS substrates bound to an injected FetchBytes closure (no HTTP client dependency in id-core; decision recorded on #8214), subject_hash H(subject) for rendezvous fetch, DNS _id.<host> TXT bootstrap-hint parsing (bootstrap-only, never authoritative), and revalidate() for background revalidation of degraded selections. Seven new substrate tests (oracle: the #5793 decision record, Decisions 2+3); transport_advertisement module 24/24 and full id-core lib suite 477 passed.
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
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 35 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. |
Slice 3 of #8214 (the final slice): fetch-side HTTPS substrates for signed transport advertisements, implementing Decision 2/3 of the #5793 record (
doc/2026-11-10_rendezvous_discovery_udp_denied_design.md).HTTP-stack decision (recorded on #8214 before implementation, per lane any-c's framing): id-core takes no HTTP client dependency. The substrates bind the existing
Substratetrait to an injected fetch closure — a newFetchBytesseam implemented for anyFn(&str) -> Option<Vec<u8>>— owned by the eventual caller's HTTP stack.What's in:
WellKnownSubstrate— fetcheshttps://<host>/.well-known/id-transport-advertisement?subject=<fp>(Decision 2.2, the authoritative self-hosted substrate).RendezvousSubstrate— fetcheshttps://<rendezvous-host>/v1/advertisement/<H(subject)>(Decision 2.3);subject_hashdefines H as the lowercase hex SHA-256 of the subject fingerprint string, so the rendezvous learns only the hash (Decision 3 privacy). The Workers component (out of scope, its own id: design: ID transport fallback for UDP-denied networks v1 #5671 ticket) must key blobs by the same H.parse_bootstrap_hints— DNS_id.<host>TXT bootstrap hints (well-known=<host>,rendezvous=<base>tokens). Bootstrap-only per Decision 2.4: hints name hosts, never carry or vouch for an ad.revalidate()— the background-revalidation entry point for degraded selections (Decision 3): re-walks every substrate and folds fresher valid ads into the cache.Substrates return the opaque signed object; verification stays in
resolve()/AdCacheagainst the pinned subject, so a hostile substrate still fails closed.Tests (oracle: the #5793 record, Decisions 2+3, invariants 1–3): 7 new substrate tests — well-known URL + parse, rendezvous by hash only (URL never contains the subject), hostile substrate fails closed through
resolve(), disagreement across both HTTPS substrates in both orders, unreachable/malformed substrate is empty not an error, bootstrap hints name hosts only, degraded selection upgraded by background revalidation.cargo test -p id-core --lib transport_advertisement— 24 passed, 0 failedcargo test -p id-core --lib— 477 passed, 0 failed, 1 ignoredcargo fmt --checkon the touched file — cleanWith slices 1, 2 and 4 already merged (PRs #10951, #10952, #11007), this completes the #8214 acceptance scope; the issue's four acceptance tests are covered at the type/cache level (slices 1+2), the handler level (slice 4), and now the substrate level.
Queue: task 20089, lane any-j.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.