Repository navigation
Conversation
Quest-Claim: 28df5f47dbbd4714
…s it goes Every append_group (and every GROUP_END on a received copy) skips the keys between consecutive group starts, so each live reader reports one skip per group. Its record folded only under pool debt or when its ranges moved, and a pool with room to spare never owes, so the relay, `import ts --passthrough` and `export ts --passthrough` grew one record entry (and one given-up miss) per group for as long as the broadcast ran. Record::settle now also runs a lossless fold (Fold::Final) whenever the record has doubled since its last fold: it folds delivered keys and Skip/Settled reports only, stopping at drops a skip may still replace, stale skips, written-off runs, stale miss verdicts, pending runs, and the group being handed out. Checkpoint of quest/m1/steady-broadcast-growth: the Nightly steady run and the long re-profile remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Maintainer decision (/quest-run pick, 2026-11-24):
(Written by Claude Opus 5.5) |
Fold::Final folded delivered keys, which in key order include keys passed but not handed out, so a group landing there late lost its Old report (a_front_reports_a_late_arrival_as_a_gap). It now folds only skips and settled reports. moq-tokio's jemalloc handler logs the exact allocated and resident bytes on each SIGUSR1, which test/steady samples alongside VmRSS and judges with test/lib/growth.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final no longer jumps past delivered runs, so walking stretch starts with next_told crawled key by key through a huge run (a_debt_folds_the_final_prefix, a_huge_run_settles_in_one_step timed out). It now starts only at reports and passes a whole report it cannot fold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wers SIGUSR1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Profiling the passthrough chain showed three readers still growing a run a group under the reports-only Final fold: - a front's copy, which never tells the groups it hands out: Final now passes a delivered key that a skip reported from the next key on proves landed; - a reader whose drop of a group (stale under load) waits for a skip: a single dropped group the next skip proves produced folds too, as no skip covers it; - a key-order read of a front, whose drop poll never reports the skips it read past: Ordered::read settles passed keys the publisher skipped with the group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tacks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/growth.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…seeded leak The fixed build's worst slope over 300-900 s was +9.3 B/group and the seeded leak's mildest +73.0; RSS couldn't separate them, so it is recorded but not judged. lite-06 still grows in the relay and export: its own quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Applied the run-length decision on 5d9f912: I seeded the leak with (Written by Claude Opus 5.5) |
…FO before upload From review round 1: the stall guard averaged the whole window and could pass on the sampler's own dump I/O, so every interval after warm-up must now move 32 KiB/s (the media moves about 130). An exited child lingers as a zombie with no VmRSS, now reported as an exit. A kept run directory no longer holds a FIFO for the artifact upload to block on. Docs say only allocated heap is judged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Design change: proposed, not built, pending the maintainer's pick (listed under Waiting). Problem, stated without the current code: a live reader's record of per-key outcomes has to stay bounded on an unending sparse-key track, without changing anything a reader delivers or reports. The current Recommended design: fold a key together with its group's span only when the track holds that group whole with that span. The span is the publisher's own declaration, and no group starts inside a whole span, so this is a proof rather than an inference. Consecutive groups' spans abut and merge into one run. The neighbor-Skip rules then go away. Never fold while a start is unresolved (finding 11). The reviewer proposed the lossy Debt fold on the doubling trigger below a horizon instead. It is simpler, but in normal operation it settles keys whose verdict can still change. (Written by Claude Opus 5.5) |
…cast-growth # Conflicts: # .claude/skills/verify-subscribe/SKILL.md
Fold::Final no longer infers that a skip at K+1 proves group K arrived, which fails on a relay copy where SUBSCRIBE_SKIP arrives apart from K's stream. A group handed out or reported dropped is final once the track holds it whole with its declared span, and so are the drops reported inside that span. Handed-out runs take in each whole span, misses inside one are forgotten, and stale drops report as their own kind so no fold settles them. Nothing folds while a publisher's start is unresolved or the reader's ranges are unplaced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A key-order read counts every key it passes as handed out, so the span fold could prove none of its groups final, and a front's copy, which reports none, kept one skip run per group: the steady export grew 37 B/group. Such a read now also records the groups it handed out itself, which fold with their whole spans; a key it only passed stays open for a late arrival's report. The front test now bills the copy to the shared pool, which it never measured, and reads each group open with its end arriving at the live edge, as the export does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…settles A reader that polls what it missed no longer takes a whole span into `delivered` as it grows, which kept a relay from reporting a skip it had yet to poll. Every final stretch now merges what was handed out in it, so a key-order read of a track without spans keeps one run, while a debt forgets what a reader gave up beside it only where it settled the stretch. The publisher holds its record until every report taken back at resolve, since polling the track there may fold. A front's fold reads the serving copy once rather than per key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A drop that starts inside a whole group's span named only starts there, as a relay forwards an upstream drop while the group is still open, so it stays for the skip the group's end implies instead of folding as settled. A final stretch merges handed-out runs only where it holds one, so an isolated report adds none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Maintainer decision (relayed from the maintainer's /quest-run round, 2026-11-26):
Then a new /quest-review round and the steady run. (Written by Claude Opus 5.5) |
…cast-growth main (#9686) reports nothing twice: a skip no longer goes out over a drop. Drop `Report::blocks`, and with it the reason Fold::Final kept a drop inside a whole span for its skip: a drop now folds anywhere inside a span the track holds whole, where no other group can land late. The test that a skip replaces a received drop is gone with that behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A short final stretch merges what was handed out in it, but forgot what the reader gave up beside it even where `delivered` gained no run, so a bounded read whose fill skip already expired could stay pending after its fills answered. Forget only where `delivered` now covers the stretch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Applied the 2026-11-26 decision (#9579 (comment)) on 2e11b6e:
The steady run passes on this head. A fresh review round raised a redesign finding and three concrete ones, so the PR stays a draft with that choice under (Written by Claude Opus 5.5) |
Replace Fold::Final with structural coalescing across Rust (moq-net) and JS (@moq/net):
- Collapse Report to Final and Withdrawable (only an Ordered reader's unreturned
stale gap stays withdrawable). Served groups, declared skips, final drops, and
wire-final stale OLD drops all coalesce directly in Record::reported.
- Absorb declared Hole::Skip runs into Record::delivered only where they extend
an existing run rightward (or start at 0), clipped to local cursor bounds, so
arrival-order readers stay bounded without leaking dropped keys into delivered
or adding disjoint runs for lagging viewers.
- Prune Misses only on ranges covered by Record::delivered once drops are polled,
preserving uncovered fill verdicts.
- Settle handed-out keys on front copies when drops are polled and exempt
Hole::Skip from delivered filtering in resume::Reader::poll_drop.
- Delete Fold::Final, Record::handed, Record::hold, Beside::held/next_stale,
Spans/whole, and Logical::{ordered, reports}.
- Mirror structural coalescing in js/net and add regression and differential
property tests on both sides.
|
Iterated to structural coalescing (Approach 3) on
Verified with (Written by Gemini 4 Neon) |
…kips, scan untold gaps lazily
… and lazy drop pull
…ports, revisit newly declared skips
Finishes
quest/m1/steady-broadcast-growth.md(deleted here). Addsquest/m1/lite06-sparse-skips.mdfor the remaining lite-06 work (export warnings, full 900 s steady check, and Nightly lane).Closes #9539
Summary
On a steady live broadcast over moq-lite-07,
moq-relay,moq import ts --passthroughandmoq export ts --passthroughnow level off instead of growing by about 75 to 100 bytes a group. A Nightly steady run fails if that growth comes back.Cause. Every
append_group, and everyGROUP_ENDon a received copy, skips the keys between consecutive group starts. Each live reader grew one run per group acrossRecord::reported(distinctSettled/Dropped/Skipvariants never merged inRangeMap),Record::delivered(arrival-order readers never absorbed declared skips), front copies (resume::Reader::takenever settled handed-out keys in the copy'sreportedmap, andresume::Reader::poll_dropfiltered outHole::Skipusingdelivered), andMisses(never pruned covered runs). Records folded only under pool debt, which a stock pool never reaches.Fix (
moq-netand@moq/net). Structural coalescing replacesFold::Finaland removes all retroactive fold heuristics (Fold::Final,Record::handed,Record::hold,Beside::held/next_stale,Spans/whole, andLogical::{ordered, reports}):Report(Final|Withdrawable). Only anOrderedreader's unreturned stale gap staysReport::Withdrawable(so a wider budget can withdraw it inCursor::rejudge). Every wire report (served groups, declared skips, final drops, and staleOLDdrops) and every returned gap isReport::Final, so adjacent final runs coalesce directly insideRangeMap.Record::delivered. DeclaredHole::Skipruns (keys never produced) are absorbed intodeliveredviaDelivered::absorb_skiponly where they extend an existing run rightward (or start at 0), clipped to local cursor bounds (floor..end_key). Drops (Hole::Drop) are never inserted intodelivered, so a group reported dropped that arrives whole later is never skipped, and a lagging viewer skipping groups as stale never creates disjoint runs indelivered.Missespruning.Misses::forgetruns only on ranges covered byRecord::deliveredonce drops are polled (self.drops.is_some()), so uncovered fill verdicts are never lost and pre-poll_dropmisses stay intact.resume).resume::Reader::takecallssub.settle_if_dropping(group.start)so copies that poll drops coalesce handed-out keys with surrounding skips, andresume::Reader::poll_dropexemptsHole::Skipfromdeliveredfiltering sological.record.reportedalways receives and coalesces skips.js/net). Mirrors structural coalescing inDelivered::absorbSkip,Subscriber(#reportedcoalescing all final reports,#absorbSkips,#stoppedReading),ResumeSource(settleIfDropping,absorbSkips, skip-exempt#tryDrop), andlite/publisher.ts(skipSettled).Nightly steady run (
just test steady,test/steady/).import ts --passthrough-> relay ->export ts --passthrough, over lite-07, built with theprofilingprofile and jemalloc.test/lib/growth.pysamples each process every 5 s: VmRSS,/procI/O, and the exact jemallocallocated/resident, whichmoq_tokio::jemallocnow logs on every SIGUSR1 alongside its heap dump.Decisions
Fold::Finalwith structural coalescing (Approach 3:Report::{Final, Withdrawable}, rightward skip-only absorption intodelivered, delivered-gatedMissespruning, front-copy settlement, and JS mirror) instead of patchingFold::Finalor settling spans retroactively. Applied in06350da963(mergedorigin/mainatdc0eb1a2f7including feat(net)!: remove FETCH from lite-07 and serve fetches via bounded SUBSCRIBE #9687).record.rs:690, coalesced drops lose a skip upgrade): accept it (rejected: fix with a newReportvariant). Applied: the merge ofmainmade it moot. moq-dev/moq#9686 reports nothing twice, so a skip no longer goes out over a drop, and the guard it named is gone (af56870).record.rs:517, fill verdicts): fix as Codex recommends, forgetting misses only where the fold records replacement coverage indeliveredor raises the floor, with a unit test (rejected: accept). Applied in 2e11b6e and preserved structurally in06350da963(misses_keep_uncovered_fill_verdicts_and_prune_covered_ones).quest/m1/lite06-sparse-skips.mdin m1.test/steady/README.md.Report::Final, lite-06'sreportedmap now coalesces too (a 30-120 s lite-06 check ran +22 B/group on relay and +10 B/group on export, down from ~75 B/group), while the export's per-group "media skipped upstream" warning, full 900 s steady check, and Nightly lane stay withquest/m1/lite06-sparse-skips.md.tikv-jemalloc-ctl'sstatsfeature, logged on SIGUSR1. Sampled dump totals swung by 9 MB between dumps while the exact heap moved 1 MB.profilingcargo profile (release with line tables), so a failing Nightly's heap dumps name their stacks.Validation
On
06350da963(structural coalescing, mergedorigin/maindc0eb1a2f7):just rs test -p moq-net --features async: 3,931 unit + 665 integration + 5 send + 16 doctests passed.just rs test -p moq-net --no-default-features: 1,721 unit + 2 integration + 15 doctests passed.just check: all Rust checks,rs_cross,cargo_nix,biome,dead_code,flake,carla_bridge,markdown,gh,tooling,quest,coverage_tables, and 11,658 Rust workspace tests passed.just js checkandjust js test: all 35 JS packages typecheck, build, API reports, Node.js load tests, and unit tests (3,952+@moq/nettests) passed./verify-subscribe:CutGroupEnd.cfgpassed (28,943 distinct states, 0 errors);SubscribeAccounting.tlaitself is unchanged fromorigin/main(83.9M distinct states on main).model::record::test::final_reports_coalesce_and_skips_never_fragment_deliveredmodel::record::test::withdrawable_report_stays_distinct_and_untell_preserves_deliveredmodel::record::test::structural_coalescing_matches_reference_model(64-seed x 250-step differential property test against key-by-key reference model, includingAccounted::first_gap)model::track::test::a_late_whole_group_after_a_reported_drop_is_still_delivered(Finding 1, both arrival-order and ordered)model::track::test::misses_keep_uncovered_fill_verdicts_and_prune_covered_ones(Finding 2)model::track::test::lagging_stale_drops_and_late_group_end_keep_a_bounded_record(Finding 3 + out-of-orderGROUP_ENDunderStart::Oldest)model::resume::tests::a_front_ordered_read_of_a_sparse_track_keeps_a_bounded_recordanda_front_arrival_read_of_a_sparse_track_keeps_a_bounded_recordjs/net/src/track.test.ts(a sparse live track keeps a bounded record) andjs/net/src/resume.test.ts(a front read of a sparse live track keeps a bounded record)just test steady(900 s, judged after 300 s, 32 B/group limit), lite-07 at 60 groups/s, allocated slope per group:06350da963(structural coalescing, this head)2e11b6e490(previousFold::Final)c312ffe1e2eb8b03a8fdd25c7ca44967be54a4a6(spans, withouthanded)34db207763(skip-based)Earlier, on the skip-based fold: 3,600 s judged after 120 s grew +1.5, +2.2, +0.7 B/group, and the seeded leak (
main's record) +78.1, +75.6, +98.4. The sizing table is intest/steady/README.md.Nightly fit, for the 60-minute
testsjob on the hosted arm runner: last night's Mesh replay builtmoq-relay,moq-benchandmoq-shaperwith fat LTO in 6m51s there, with dependencies cached. Here, with plain cargo at-j4, that build took 193 s and the steady build 381 s with dependencies built, 493 s fully cold. At the same 2.13x ratio, the steady build takes about 13.5 min on the runner, 17.5 min cold. With about 1.5 min of setup and the 15.5-minute run, the job takes about 31 min, 35 min cold, so the timeout stays and the profile keeps its fat LTO.Quick 120 s (judged after 30 s) lite-06 check on
06350da963: import -7.0 B/group, relay +22.2 B/group, export +9.9 B/group (down from ~75 B/group beforeReport::Final).Public API / wire
moq-tokio'sjemallocfeature now also enablestikv-jemalloc-ctl/statsand logsjemalloc heap allocated=... resident=...on each SIGUSR1. No public API change.Report::{Final, Withdrawable},Delivered::absorb_skip,Record::absorb_skip,track::Subscriber::{skip_settled, settle_if_dropping}, andPool::recorded(test-only) are crate-private; JS mirrors (Delivered.absorbSkip,WireRecord.skipSettled,hooks.{settleIfDropping, absorbSkips}) are package-internal.Caused by
moq-relayandmoq export ts --passthroughkeep growing over 72 h on one 25 Mb/s passthrough broadcast #9539).Follow-ups
quest/m1/lite06-sparse-skips.md: verify full 900 s steady behavior on lite-06, suppress the export's per-group "media skipped upstream" warning on inter-group gaps, and add a lite-06 lane to the steady Nightly.Models
Size: L
Implementer: Claude Code, claude-opus-5-5, unknown
Implementer: Claude Code, claude-opus-5-5, unknown (iterate, L)
Implementer: Claude Code, claude-opus-5-5, unknown (iterate, L)
Implementer: Claude Code, claude-opus-5-5, unknown (iterate, M)
Implementer: Antigravity, gemini-4-neon, unknown (iterate, L)
(Written by Gemini 4 Neon)
Review
Rewritten by
quest reviewafter each round.Head: c73d522, named in full once no reviewer reports a finding
Base: origin/main at 7279350
Risk: high,
it changes .github/workflows/nightly.yml, which is always high: workflows run with the repository's secretsClassified: high by the always-high paths
Risk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, xhigh effort
Session:
01a21b0c-2bc6-74f3-9f13-42722c3cc036, round 3Score: 6/10,
The head needs rework because a range widening can lose a queued skip under cache debt and nested JavaScript fronts can still grow delivery records indefinitely.Rounds: 8; first round 2 (medium 2); findings 13 (medium 13): fixed 11, refuted 0, open 2
Findings, open until the next round settles them:
rs/moq-net/src/model/resume.rs:3564:Preserve skip remainders folded into the serving copy’s report floorjs/net/src/track.ts:5519:Follow nested fronts when looking up skips to bridgeThe last round's findings, at c1af778:
rs/moq-net/src/model/resume.rs:3496:Check current range coverage before returning a queued skip;The coverage check at rs/moq-net/src/model/resume.rs:3527 prevents retired skips from escaping, but the revocation at line 3571 cannot replay a remainder already folded into the serving copy’s report floor.rs/moq-net/src/model/track.rs:11654:Keep unreported skip bridges out of the report floor;The hand-out path at rs/moq-net/src/model/track.rs:11702 requires tracked reports to cover the gap before bridging it, and untracked readers require current range coverage.js/net/src/delivered.ts:110:Revisit declared skips behind multiple open gaps;The revision scan at js/net/src/track.ts:3548 revisits newly declared skips even when several newer gaps remain open, fixing the original single-front overlap case.Reviewer: Claude Code, claude-opus-5-5, high effort, second
Session:
22348feb-68ef-4b28-9957-7a6d04f8480a, round 3Score: 6/10,
Last round deleted the per-reader skip copy-and-revoke machinery, and this round's fixes bring it back under new names; the approach is overbuilt again even though I found no definite user-facing bug in it.Recommendation:
Stop moving declared skips into each reader's `delivered`. Make the run accounting read the track's own skips instead. Wherever `Delivered` or `Record::final_end` counts a gap (billing, `forget_past_budget`, and the debt fold), treat a gap that `TrackState::skip_end` fully covers as no gap. A declared skip is a property of the track, and every reader sees it at the moment of counting. The result does not depend on when a skip was declared relative to hand-out, on how many groups overlap, on whether the reader reports, on its range, or on its route. That removes `bridge_skip(s)`, `tell_skip`, the revision rescans (`drops_bridged`), the `has_reports` mode, and the revoke/untell paths. It leaves only `Report::Final` coalescing, which already bounds `reported`.Rounds: 8; first round 4 (medium 4); findings 8 (medium 8): fixed 6, refuted 1, open 1
Findings, open until the next round settles them:
rs/moq-net/src/model/resume.rs:3527:Fixes for skip bridging rebuild the copy-and-revoke machinery the last round deleted