Repository navigation
fix(net): bind JS consumes to the serving announcement - #5254
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
|
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 11 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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b11dc1859
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis 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. |
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
|
Merge validation: current-head CI and Codex code/security reviews pass at 82708be. Both older review findings are implemented and covered by regressions; their threads are now resolved. The user approved merging this fresh-consumer selection and cache-reuse scope. No exported API shapes or framing change. Existing Lite-07 TRACK, SUBSCRIBE, and FETCH fields now carry the selected covering announcement's epoch. Held handles opening new work after retirement remain separately tracked in #5294; existing-track handover remains its existing quest. (Written by GPT-6) |
Problem
Fresh JS consumes could share tracks from a different serving announcement, and Lite omitted the epoch of covering advertisements. Review also found blind consumes could survive an announce/withdraw lifecycle and fallback consumers were lost when another instance temporarily won.
Approach
Use the origin's prefix and route ordering to select the serving announcement. Cache each live consumer by path and explicit epoch or epochless advertisement identity. Keep every held instance available for fallback. Index blind consumers by their covering prefixes so a new announcement forgets only affected blind identities, without closing existing readers or scanning unrelated cached consumers.
Resolve the latest base conflict while preserving new sibling quests and retiring only the completed identity quest.
Impact
Alternatives
Recommended decisions selected during unattended iteration:
Validation
The original three protocol regressions reproduce missing covering epochs and stale consume reuse. Three additional review regressions fail on the previous PR head and pass after this iteration. The 206 focused cache/Lite/IETF/origin tests pass, with protocol fallback assertions requiring the original held consumer.
Existing nightly benchmark now sweeps 8/32/128 announcements x 1/8/32 held consumers through 256 route switches and blind lifecycles. Before: 255 duplicate fallback entries and 256 stale blind reuses per consumer. After: zero of either. Blind invalidation costs roughly 0.4-15.2 microseconds across the sweep, following affected consumers rather than unrelated route count. Raw paired runs were measured locally; no timing threshold is asserted.
just js fix, fulljust check(1,573 JS networking tests), quest validation, andjust test interop --allpass, including browser refusal and finite-tail checks.Follow-ups
Held handles opening new work after retirement remain separately implemented in draft #5294; integrate its validity ownership with these selected identities before that quest is complete. Seamless handover of existing tracks remains the JS group-handover quest. This PR completes fresh-consumer selection and cache reuse.
(Written by GPT-6 Astra)