Repository navigation
fix(net): report a JS IETF FETCH group evicted after listing as unknown - #7150
Conversation
Quest-Claim: 5a62fc18faf9e7fa
A group the cache evicts between listing it for a JS IETF FETCH answer or fill and writing it now goes out as End of Unknown Range (0x10C) on drafts 18 and 22, instead of a silent skip that reads as the group not existing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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 17 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 |
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: ae4cbc7.
No actionable bugs found in the changed paths. Reporting a listed-but-evicted group as Unknown corrects the wire meaning without changing FETCH_OK's boundary. Reusing the existing gap writer is simpler than separate marker logic and preserves the NonExistent prefix before an unknown slice. The tests cover both FETCH drafts/orders and draft-22 fill using actual cache aging. The Rust parity issue documented in the PR remains outside this JS change.
Verification: static review of the diff, FETCH resolution/answer and fill loops, slice calculations, and marker writer. I did not run tests or interop.
…cted-unknown Keep this PR's deletion of quest/m1/js-fetch-evicted-unknown.md over main's Plan rewording, and point the one-group quest's link to it at the landed FetchWriter.unknown() instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge summary:
(Written by Claude Opus 5.5) |
Finishes
quest/m1/js-fetch-evicted-unknown.md, and deletes it along with its link from the m1 README.Summary
Sometimes the cache evicts a group after a JS IETF FETCH answer or a draft-22 fill has listed it but before it gets written. The publisher used to skip that group without saying anything, and a skip on a fetch stream means the group does not exist. It now sends End of Unknown Range (
0x10C) covering the group's whole slice, on both drafts 18 and 22.js/net/src/ietf/publisher.ts:FetchWritergets anunknown()marker next totimedOut(). Both now go through one#gap(reason, ...)helper, so the evicted group gets the same treatment a timed-out one already did. If nothing went out since the prior marker, the groups skipped before it are first marked nonexistent (0x8C), because a marker covers every Location since the prior one.#answerFetch(the "Gone since it was listed" path) and#runFill(the!grouppath) call it in place ofcontinue. Nothing ends the FETCH early, and FETCH_OK's end is unchanged.fetch.test.ts"a group evicted after it was listed is unknown": drafts 18 and 22, both orders. It includes a never-existing group 0, to check that it still reads as nonexistent ahead of the Unknown marker.publisher.test.ts"draft-22: a fill marks a group evicted after it was listed unknown": only draft 22, because only draft 22 has fills.Impact
0x10C) instead of being left out. The marker and framing already exist in both drafts, so no IETF draft text changes.Rust IETF publisher has the same skip (not changed here)
Per triage, I did not touch the Rust IETF publisher because moq-dev/moq#6999, moq-dev/moq#7038 and moq-dev/moq#7085 are working in it. It skips in both matching places:
rs/moq-net/src/ietf/publisher.rs, the FETCH answer loop inserve_fetch_stream:Err(Error::NotFound | Error::NotFetchable | Error::Unsupported | Error::Old) => continue, with the same "Gone since it was listed ... absent from the answer" comment.rs/moq-net/src/ietf/publisher.rs,run_fill: afetch_groupfailure with those errors on a range fill also hitscontinue.Rust re-reads through
fetch_groupand can refetch upstream, so for Rust a skip comes from a failed refetch rather than only from eviction. The same fix still fits there:NotFound/Oldon a listed group becomes0x10C.Unsupported/NotFetchablemay deserve their own reading. This looks like a follow-up quest once those PRs land.Choices made without asking
just test interop --all. Nothing about the framing changes, and interop does not exercise eviction.Checks
bun testinjs/net: 2587 pass.bun run check(tsc) and biome on the changed files: clean.just check: passes.quest check: ok.Suggested follow-ups
fetch_groupcan no longer serve as End of Unknown Range, inserve_fetch_streamandrun_fill. Do it after moq-dev/moq#6999, moq-dev/moq#7038 and moq-dev/moq#7085 settle.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code