Skip to content

feat(id-core): fetch-side transport advertisement substrates (#8214 slice 3) - #11173

Merged
dezren39 merged 1 commit into
mainfrom
queue/20089-8214-fetch-substrates
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/20089-8214-fetch-substrates

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

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 Substrate trait to an injected fetch closure — a new FetchBytes seam implemented for any Fn(&str) -> Option<Vec<u8>> — owned by the eventual caller's HTTP stack.

What's in:

  • WellKnownSubstrate — fetches https://<host>/.well-known/id-transport-advertisement?subject=<fp> (Decision 2.2, the authoritative self-hosted substrate).
  • RendezvousSubstrate — fetches https://<rendezvous-host>/v1/advertisement/<H(subject)> (Decision 2.3); subject_hash defines 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()/AdCache against 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 failed
  • cargo test -p id-core --lib — 477 passed, 0 failed, 1 ignored
  • cargo fmt --check on the touched file — clean

With 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.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…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.
@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 09:29
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T09:29:23.277099Z
We couldn’t complete this review. Comment @codex review to try again.
30756b1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ea39bd21-b4b5-41ce-8af4-ddb5dcbcb075
Commits

Reviewing files that changed from the base of the PR and between c91a8ba and 30756b1.

Files selected for processing: 1

  • pkgs/id/crates/id-core/src/transport_advertisement.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@dezren39
dezren39 merged commit 4484882 into main Nov 17, 2026
1 check passed
@dezren39
dezren39 deleted the queue/20089-8214-fetch-substrates branch November 17, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant