Repository navigation
fix(net): a live join takes the answer its cache ceiling capped - #9531
Conversation
A relay copy asks its upstream for a reader's live join capped by its cache ceiling, and records the answer under that cap. A reader asking more, such as an IETF subscriber's join with no limit, then never took the answer and waited forever. Judge the reader's budget capped the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No configured credential can serve this run. Your Claude subscription has hit its usage limit, which resets at 2026-11-25 06:00 UTC. Re-trigger after it resets, or add an API key for this provider, which Pullfrog falls back to automatically. The providers' responses
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|

Problem
A relay copy asks its upstream for each reader's live join with the join's
maxcapped by the copy's cache ceiling (broadcast::Info::cache_duration,clamp_combined). It then records the upstream's answer under that capped budget.TrackState::join_answerplaces a reader only by an answer whose budget is at least the reader's own, and it compared the reader's uncapped budget.So a reader asking more than the ceiling never took the answer. Nothing wider is ever asked, so it waited forever. A moq-transport subscriber hits this through any relay with a cache ceiling, because its SUBSCRIBE becomes a live join with no limit (
live_join). The relay answers SUBSCRIBE_OK, but a group that reached the copy before its SUBSCRIBE_START never reaches the subscriber. A sparse track such as a catalog then never delivers anything. Over a real network, the second relay's subscriber got nothing in about two runs of three.The relay simulator sets no cache ceiling (
sim::Net::options), so it never reached this path.Approach
Cap the reader's budget by the same ceiling before comparing it with the answer's budget, so the reader is judged by what its copy actually asked. Without a ceiling, nothing changes: a narrower answer still places only the readers within it.
The test is at the model layer, where the bug is. A copy with a 30s ceiling and a reader with no limit gets a group whose stream lands before the answer, and must read it. It fails on
mainand passes here. The other cases pin that an answer narrower than a reader's budget still places nothing when no ceiling capped the ask.Impact
js/nethas no cache ceiling on its aggregate demand, so itsjoinAnswermirror needs no change.Validation
cargo test -p moq-net --features async: all pass, including the newa_live_join_takes_the_answer_its_cache_ceiling_capped. It fails onmainwithleft: [] right: [3513]forceiling=Some(30s) max=None.just checkpasses.Alternatives
Follow-ups
sim::Neta production-like ceiling is worth a separate look.Caused by
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code