Repository navigation
perf(moq-net): a lite-07 SUBSCRIBE_UPDATE edits ranges by Range ID - #9134
Conversation
Quest-Claim: 85e72a0a315bab29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The publisher hands the model the edit it received, keyed by Range ID, instead of re-pinning every range and replacing the whole subscription. The model keeps each subscriber's ranges by key with a change log, so the cursor, its window, the misses, and the aggregate under the shared lock each move only the ranges an edit touched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Formats the edit path and quiets two clippy lints in the cover tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropping the per-update pin let a relay's copies re-resolve a retained relative start against newer groups, and let the read cursor's floor take a time start as given rather than the group containing it. The publisher pins each range once again, into the model, as soon as the latest group could have resolved it, so the cost stays with the ranges still waiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…utions in one batch A time start above every group held resolves to the latest group, so the pin asks every range still waiting on a start once a group is there. Each batch of resolutions settles the window once rather than once per range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`Cover::runs` walks the treap in key order and skips each subtree holding no run's edge, instead of three descents per run, and `lowest`/`highest` read the first and last edge. `Cursor::look_up` indexes the window's lookups and its own by time, so a pass costs O(L log L) rather than O(L²): ranges_fills_out at 16384 ranges drops from 292 ms to 11 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-cost Takes main's failed-copy check in the front's demand fold (#9127) on the keyed preferences, and moves its new tests to `resolved_range`. 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 11 seconds. 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. |
|
Merge pick (maintainer away, granted the coordinator merges it confidently recommends): ✅ /quest-merge, accepting the decisions listed in the PR body (the plain-path-only split with the rest left in the quest, the (Written by Claude Opus 5.5 with high) |
There was a problem hiding this comment.
ℹ️ No correctness issues found. One minor suggestion inline: some doc comments are stale.
Approach: Sound. Keying the model's ranges by the caller's ID makes a lite-07 SUBSCRIBE_UPDATE cost about its edit: Prefs keeps a bounded change log, the cursor's Window places one range at a time, and a persistent Cover lets each consumer diff snapshots instead of refolding all n ranges. The relay front, the Live index, and JS are scoped out to the quest on purpose.
Reviewed changes
All 15 files at ecd4663. I also ran the full moq-net lib suite (--features async) on this head: 3361 passed, 28 ignored.
lite::Appliedandthen:LiveRanges::applyresolves a received edit to retired IDs and added(id, Range)pairs. Updates that arrive before the reply starts fold into one edit; an ID added and then retired cancels out, so the fold stays bounded by the initial and live ranges.TrackRunedits by Range ID:Requestedkeeps the start, end, and open counts current per edit, so the floor, cap, andboundedvalues match the oldSubscription::start/end/Bounds::ends.pin()andUnpinnedpin each retained range once, only when it comes due, still on the update after it resolves.PrefsandPreferences::edit: each subscriber's ranges are keyed and carry a revision and a change log capped at 2n+64 entries. A trimmed log or a wholereplacesends readers to a full re-resolve. The shared aggregate moves only the ranges that left or arrived.subscription::Cover: a persistent counted treap, with priorities from a per-processRandomState, replacesRuns/Layered(runs.rsis gone, with no references left).movedskips shared subtrees, anddiffalso stays correct for unrelated covers. The property test checks it againstRangeInclusiveSet.- Keyed
Window:editretires and places per key, andcount/uncountkeep thegroups/missablecovers and the named-start counts in step. The cursor'ssyncreplaysPrefs::changes(Change::Edit) or rebuilds after a refusal (stale). - Consumers diff snapshots:
Admitted::gainednow works across floor and cap moves.Missesalways diffs its old and new view.Servablereuses theLiveindex only for a pointer-equal cover.Cursor::look_upis indexed by time. - Relay front: the reader keeps
keys/revision, soresolved_keysanswers by Range ID. The positional alignment inresolve()holds because the window keys,mirrored.ranges, and each copy'sresolved_ranges()are all in ascending key order.
claude-opus-5-5 | 𝕏
|
quest land watch: ended this pull request's pick, disarming its auto-merge, since its head ecd4663 is held by finding by pullfrog[bot]: Several doc comments still describe the removed (written by quest land watch) |
Rename Servable::layered to covering and its test, since nothing is layered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge pick (maintainer away, granted the coordinator merges it confidently recommends): ✅ /quest-merge at 6766bf8 (doc comments and crate-private renames since the earlier pick), accepting the decisions listed in the PR body. (Written by Claude Opus 5.5 with high) |
There was a problem hiding this comment.
✅ No new issues found. The stale-docs finding from the last review is fixed.
Reviewed changes
These commits change only docs and names since ecd4663. They don't change behavior.
- Rewrote the
Coverdocs:Admitted,Servable::Runs/Several,Live/Indexed,Servable::of, andMisses::viewnow describe a persistent cover diffed by snapshot. TheLiveindex is kept only while the cover is pointer-equal. - Renamed the leftover
Layerednames:Servable::layeredis nowServable::covering. The index'sfixedparameters are nowgroups, theMisseslocal is nowdiffed, and the test is nowlive_index_searches_match_a_scan_of_every_live_group. NoLayered,fixed runs, orshares_fixedtext remains underrs/moq-net/src/model.
claude-opus-5-5 | 𝕏
|
quest land watch: the merge queue removed this pull request at 6766bf8 because its The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.
…1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-audio)
Documenting moq-gst v0.4.12 (/var/cache/github-runner-work/moq/moq/rs/moq-gst)
Documenting libmoq v0.7.0 (/var/cache/github-runner-work/moq/moq/rs/libmoq)
Documenting moq-transcode v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-transcode)
Documenting moq-ffi v0.4.12 (/var/cache/github-runner-work/moq/moq/rs/moq-ffi)
Documenting moq-rtmp v0.3.11 (/var/cache/github-runner-work/moq/moq/rs/moq-rtmp)
Documenting moq-webrtc v0.3.12 (/var/cache/github-runner-work/moq/moq/rs/moq-webrtc)
Documenting moq-video v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-video)
Finished `dev` profile [unoptimized] target(s) in 54.61s
Generated /var/cache/github-runner-work/moq/moq/target/doc/hang/index.html and 22 other files
mbx[cache]: object cache: 1 hits, 10 misses, 23 bypassed; 0 B downloaded, 0 B uploaded, 30.6 MiB stored locally
mbx[cache]: 56.01s session; 0s estimated compiler time avoided (summed across compilations)
mbx[cache]: bypass reasons: 23 rustdoc
mbx[cache]: Cargo artifact reuse and CI cache archive transfers are not included above
mbx[savings]: disposed of 2.8 TiB logical without being asked. that is rather the point.
cargo shear --deny-warnings
# The workspace-hack's table order is `cargo hakari`'s, which `cargo sort` disagrees with.
cargo sort --check --no-format . $(cargo metadata --locked --no-deps --format-version 1 | jq -r '.packages[] | select(.name != "workspace-hack") | .manifest_path | rtrimstr("/Cargo.toml")')
Checking ....
Checking bench-harness...
Checking hang...
Checking kio...
Checking macros...
Checking test-env...
Checking moq-json...
Checking moq-net...
Checking moq-pattern...
Checking moq-mux...
Checking moq-loc...
Checking moq-msf...
Checking moq-tokio...
Checking moq-congestion...
Checking moq-crypto...
Checking moq-quic...
Checking moq-sock...
Checking qmux...
Checking moq-shaper...
Checking libmoq...
Checking moq-audio...
Checking moq-hls...
Checking moq-archive...
Checking moq-video...
Checking moq-nvenc...
Checking moq-v4l...
Checking moq-vaapi...
Checking moq-auth...
Checking moq-bench...
Checking moq-boy...
Checking moq-cli...
Checking moq-relay...
Checking moq-stats...
Checking moq-uring...
Checking moq-rtmp...
Checking moq-rtsp...
Checking moq-srt...
Checking moq-transcode...
Checking moq-webrtc...
Checking moq-e2ee...
Checking moq-ffi...
Checking moq-gst...
Checking moq-net-tests...
Checking uniffi-bindgen...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
cargo hakari generate --diff
python3 sh/rs/hakari.py
python3 sh/rs/crypto.py
no C crypto on 12 targets: aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim aarch64-linux-android aarch64-unknown-linux-gnu armv7-linux-androideabi armv7-unknown-linux-gnueabihf x86_64-apple-darwin x86_64-apple-ios x86_64-linux-android x86_64-pc-windows-msvc x86_64-unknown-linux-gnu
bash sh/local.sh cargo clippy --locked -p moq-audio -p moq-video --tests -- -D warnings
Checking moq-net v0.3.10 (/var/cache/github-runner-work/moq/moq/rs/moq-net)
Checking moq-json v0.5.8 (/var/cache/github-runner-work/moq/moq/rs/moq-json)
Checking moq-loc v0.2.19 (/var/cache/github-runner-work/moq/moq/rs/moq-loc)
Checking hang v0.21.11 (/var/cache/github-runner-work/moq/moq/rs/hang)
Checking moq-mux v0.10.11 (/var/cache/github-runner-work/moq/moq/rs/moq-mux)
mbx[progress]: 15s elapsed; 0 hits, 3 misses, 0 bypassed, 0 not looked up; ~0s compiler work saved
Checking moq-hls v0.5.11 (/var/cache/github-runner-work/moq/moq/rs/moq-hls)
Checking moq-audio v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-audio)
Checking moq-video v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-video)
mbx[progress]: 30s elapsed; 0 hits, 8 misses, 0 bypassed, 0 not looked up; ~0s compiler work saved
Finished `dev` profile [unoptimized] target(s) in 31.69s
mbx[cache]: object cache: 0 hits, 9 misses; 0 B downloaded, 0 B uploaded, 21.5 MiB stored locally
mbx[cache]: 33.38s session; 0s estimated compiler time avoided (summed across compilations)
mbx[cache]: Cargo artifact reuse and CI cache archive transfers are not included above
mbx[savings]: has saved 2d 11h across 5227 builds. this line is the only thanks it needs.
bash sh/local.sh cargo clippy --locked -p moq-net --no-default-features --lib --tests -- -D warnings
Checking moq-net v0.3.10 (/var/cache/github-runner-work/moq/moq/rs/moq-net)
error[E0277]: the trait bound `Preferences: From<Producer<Subscription>>` is not satisfied
--> rs/moq-net/src/model/resume.rs:4722:59
|
4722 | .subscribe(kio::Producer::new(Subscription::default()).into());
| ^^^^ unsatisfied trait bound
|
help: the trait `From<kio::Producer<model::subscription::Subscription>>` is not implemented for `model::track::demand::Preferences`
but trait `From<model::subscription::Subscription>` is implemented for it
--> rs/moq-net/src/model/track/demand.rs:631:1
|
631 | impl From<Subscription> for Preferences {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for that trait implementation, expected `model::subscription::Subscription`, found `kio::Producer<model::subscription::Subscription>`
= note: required for `kio::Producer<model::subscription::Subscription>` to implement `std::convert::Into<model::track::demand::Preferences>`
= note: the full name for the type has been written to '/var/cache/github-runner-work/moq/moq/target/check/debug/deps/moq_net-45291aa4c350085a.long-type-3953708805406358253.txt'
= note: consider using `--verbose` to print the full type name to the console
error[E0277]: the trait bound `Preferences: From<Producer<Subscription>>` is not satisfied
--> rs/moq-net/src/model/resume.rs:7874:74
|
7874 | let sub = routes.consume().subscribe(kio::Producer::new(subscription).into());
| ^^^^ unsatisfied trait bound
|
help: the trait `From<kio::Producer<model::subscription::Subscription>>` is not implemented for `model::track::demand::Preferences`
but trait `From<model::subscription::Subscription>` is implemented for it
--> rs/moq-net/src/model/track/demand.rs:631:1
|
631 | impl From<Subscription> for Preferences {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for that trait implementation, expected `model::subscription::Subscription`, found `kio::Producer<model::subscription::Subscription>`
= note: required for `kio::Producer<model::subscription::Subscription>` to implement `std::convert::Into<model::track::demand::Preferences>`
= note: the full name for the type has been written to '/var/cache/github-runner-work/moq/moq/target/check/debug/deps/moq_net-45291aa4c350085a.long-type-3953708805406358253.txt'
= note: consider using `--verbose` to print the full type name to the console
For more information about this error, try `rustc --explain E0277`.
error: could not compile `moq-net` (lib test) due to 2 previous errors
mbx[cache]: object cache: 0 hits, 3 misses; 0 B downloaded, 0 B uploaded, 6.4 MiB stored locally
mbx[cache]: 14.27s session; 0s estimated compiler time avoided (summed across compilations)
mbx[cache]: Cargo artifact reuse and CI cache archive transfers are not included above
mbx[savings]: the running total stands at 2d 11h across 5228 builds. nobody is counting except the box.
error: recipe `no-async` failed on line 170 with exit code 101
error: recipe `lint-changed` failed on line 87 with exit code 101
##[endgroup]
ci: wall and CPU seconds per module
123 150 check rs (failed)
4 37 check biome
16 8 check markdown
16 22 check gh
76 67 check carla_bridge
0 0 check drill
2 2 check quest
16 15 check shell
0 0 check large_files
1 0 check text
1 0 check coverage_tables
1 0 check toml
2 2 check nix
0 0 check justfile
123 309 whole run
##[error]ci: check rs failed
error: recipe `ci` failed on line 120 with exit code 101
##[error]Process completed with exit code 101.
##[group]Run actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: cargo-timings
path: target/cargo-timings/cargo-timing-*.html
if-no-files-found: ignore
retention-days: 14
compression-level: 6
overwrite: false
include-hidden-files: false
archive: true
env:
BASE: 6b239b29974142a49868a05cf665bf949a08ba7d
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
MBX_CACHE_LINKS: 1
MBX_REMOTE_URL:
##[endgroup]
With the provided path, there will be 2 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: cargo-timings.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 125159
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 5c47888cde11188bd9dae8e3728cf7888d3c5b141b8953285f620149a8ce4525
Finalizing artifact upload
Artifact cargo-timings successfully finalized. Artifact ID 14526163616
Artifact cargo-timings has been successfully uploaded! Final size is 125159 bytes. Artifact ID is 14526163616
Artifact download URL: https://github.com/moq-dev/moq/actions/runs/44518657208/artifacts/14526163616
Post job cleanup.
##[start-action display=Run jdx/mr-boxington-action@88acf2bb50552c7c508cbac13e5f8c576b95b1de;id=__85314c5b-591b-46f0-9e07-369a64b0197e.mbx]
##[end-action id=__85314c5b-591b-46f0-9e07-369a64b0197e.mbx;outcome=skipped;conclusion=skipped;duration_ms=0]
Post job cleanup.
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git version
git version 2.56.0
Temporarily overriding HOME='/var/cache/github-runner-work/_temp/a1addaf7-6e60-4532-9001-6c206127057f' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --global --add safe.directory /var/cache/github-runner-work/moq/moq
Removing SSH command configuration
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir:
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
A job completed hook has been configured by the self-hosted runner administrator
##[group]Run '/nix/store/qrn6ds64bzvwbm5nwf245ifz2c6jb9xw-ci-cache-gc.sh/bin/ci-cache-gc.sh'
shell: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash --noprofile --norc -e -o pipefail {0}
##[endgroup]
evicted 26 objects and 31 action results (468.6 MiB logical); 49.9 GiB logical remain
dropped 9 session event streams
evicted 0 objects and 0 action results (0 B logical); 49.9 GiB logical remain
Cleaning up orphan processes
(written by quest land watch) |
|
codex, gpt-6.1-sol, medium effort land fixer note:
(written by codex, gpt-6.1-sol, medium effort) |
|
quest land watch: armed auto-merge on this pull request at 1f4b369, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix ( (written by quest land watch) |
There was a problem hiding this comment.
✅ No new issues found. Since the last review, only a merge of
mainand a test adaptation have landed.
Reviewed changes
Since 6766bf8, this merges main and adapts two tests that came in from main to this PR's preferences channel.
- Adapted the base-added
resume.rstests: two tests now callSubscription::into()where they wrapped the subscription inkio::Producer::new(...). The channel now carries the keyed preferences that this PR introduced. This is a test-only change with no behavior change.
claude-opus-5-5 | 𝕏
#9134 replaced Runs/Layered with the persistent Cover treap and keyed the Window, which already diffs snapshots and counts named starts. What it left, and this PR still needs, is ported onto it: - Window: waiting spans keyed by (time, key) and tried only outside Holdings::unplaced, under its placing mark. - DropCursor: when only the window and coverage grew, fold in Cover::gained and the stale runs a wider coverage now settles. Cover gains open_from. - An unfloored relative span keeps main's rule, its missable reach fixed at placement, which the JS window now mirrors (the lowest-since-placement rule is dropped, with CodeRabbit's two findings about it). - TrackState::unplaced leaves u64::MAX placed when a run from it is empty, as dropped_cover does (CodeRabbit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports the resume aggregate into #9134's Prefs, and keeps a lite-07 edit's frame starts per Range ID so a SUBSCRIBE_UPDATE adding or retiring a Position moves its group's frame start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Works on quest/m2/lite07-update-cost.md and rewrites it to what remains: a relay's front, the servable index, and JS.
A lite-07 SUBSCRIBE_UPDATE that edits k ranges of an n-range subscription now costs about its edit on a Rust publisher serving a plain track, in the session's task and under the track's shared lock. Before,
TrackRun::updatere-pinned every range, rebuilt its Range ID positions andBounds, and replaced the model's wholeSubscription, and the cursor, its window, the misses, the servable runs, and the aggregate each refolded all n ranges.lite::LiveRanges::applyreturns the edit by Range ID (Applied::Edit, orApplied::Replacebefore lite-07). Updates that arrive before the reply starts fold into one (Applied::then).TrackRunhands the edit to a new crate-privatetrack::Subscriber::edit(retired ids, added(id, Range)pairs, preferences). The publicupdate(Subscription)stays a whole-set replacement, andsubscription()returns ranges in the order last given.track::Preferenceskeeps each subscriber's ranges keyed (by Range ID after an edit, by position after a whole update), with a revision and a bounded change log. The shared aggregate (Subscriptions) moves only the ranges an edit touched, under the lock.Window, which places, retires, and counts one range at a time.subscription::CoverreplacesRuns/Layered. It is a persistent counted treap: a snapshot is a pointer clone, andmoved/gaineddiff two snapshots by skipping shared subtrees. So the misses,Admitted::gained, and the servable runs follow an edit without refolding.resolved_keysanswers by Range ID there too (SUBSCRIBE_STARTED for a range an update added). It settles the window once per batch, so reporting k starts costs O(k log n).TrackRun::pinpins each retained range's resolved anchors into the model, as before, but once per range rather than all of them on every update (see Decisions).Cursor::look_upindexes lookups by time: O(L log L) per pass instead of O(L²).Decisions
model/resume.rs), the servableLiveindex, and JS to the rewritten quest. Each is a rework of its own size. The front's copies resolve positionally and get whole updates, so making them incremental means keyingCopy::from/resolved_rangesand clamping an edit per copy. JS has no keyed window to edit yet. Landing the Rust core first lets that work build on a reviewed shape. A reviewer who wants it whole can say so, and I'll extend this PR.Admitted, and the servable runs, with no per-consumer change tracking. The cost is anArcper node and path copying on write.RandomStatehash of the key, so the shape is canonical (equal sets are equal trees, which keeps the diff small) and a peer can't pick keys that unbalance it.updaterekeys by position only when the ranges changed. A preference-only whole update keeps the keys, so it moves no range.TrackRunstill pins a retained range's resolved anchors into the model, but pins each range only once. Review found that dropping the pin broke two things. A relay's copies, which get the whole preferences, re-resolved a retainedRelative(2)against newer groups. And the read cursor's floor used a time start as given rather than the group containing it. Ranges with an anchor that may still move wait inUnpinned, indexed by when they could resolve. A start can resolve once any group exists; an end, once a group starts past it. Each update asks only those ranges, in one batch, and lets each go once it settles. As before this PR, a range is pinned on the update after it resolves, not on the update that adds it:held_first_group_keeps_an_updated_floorrelies on that for a time start the latest group holds only provisionally.Liveindex is reused while the groups' cover is unchanged (pointer-equal), and rebuilt from the cache arrivals when it moves. That rebuild costs the cache held, not the ranges, and is listed in the quest.ranges_time_cappays about 1.4 µs per window move at 16384 ranges (+45%). A cap moving twice per group edits the persistent cover, which copies O(log n) nodes along the path a snapshot still shares. That is the price of every consumer diffing snapshots instead of refolding. The other per-group benches are within noise of base (medians below).Cursor::look_upis fixed here rather than as a follow-up. It was already O(L²) on main (ranges_fills_outat 16384 ranges took 292 ms), and the keyed window made each comparison a tree lookup, so leaving it would have regressed it further.just test interop --all.Public API and wire impact
None.
track::Subscriber::edit,resolved_keys,track::Edit, andlite::Appliedare crate-private.Subscription,Range,update, andsubscription()keep their shapes. No moq-ffi or @moq/net change.Validation
All on fedora, under load from other sessions (load average around 40 on 32 cores). Each comparison runs the base binary (merge base
77dd8fe393) and head three times, alternating, and takes the median.publisher_update: n live ranges, an update retires the k oldest and adds k (editK), or moves only the priority (steer):Small edits on small subscriptions pay the treap's allocations (edit16/16, +7 µs). From 512 ranges on, an edit costs about its own ranges.
ranges(per group delivered, fixed subscription):time_end,sparse, andtime_gapsare within ±20% of base at every size, with run-to-run spread about that wide.time_capis +21% at 64, +31% at 1024, and +45% at 16384 (3.25 to 4.71 µs; see Decisions).fills_outis -77% at 1024 (1.24 ms to 0.27 ms) and -96% at 16384 (292 ms to 10.7 ms).demand,track_subscriber_churn,track_fanout,track_range_widening: single A/B runs against base, mixed within ±15% in both directions with no trend across sizes, so noise at this load.Tests:
cargo test -p moq-net --features fuzz: all pass (3347 lib tests and the integration suites).just check: passes.edited_ranges_match_the_same_ranges_given_whole: 400 random keyed edits, each checked against a fresh subscription to the same ranges given whole (resolutions by key, and the runs owed).lite07_a_time_start_floors_at_the_group_it_resolved_toandlite07_a_time_start_in_the_latest_group_floors_there.lite07_an_added_range_reports_its_start_and_keeps_itnow also checks that the model holds the pinned anchor. With pinning disabled, the first and third fail.runs(from)at every probe point, pluslowestandhighest, against aRangeInclusiveSet.Follow-ups
Liveindex rebuild, and JS.Window::start_waitingre-checks every time start still waiting on a group on each settle (O(w)). Indexing the waiting spans by time would make a settle cost only the ones a new group can place.Caused by
None: whole-set updates predate lite-07's RangeEdit, and the range union fix (#9045) deferred this work on purpose rather than introducing it.
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, high effort
Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, M)
Review
mechanical fix by codex, gpt-6.1-sol, medium effort:
Merged base and mechanically adapted two base-added resume tests to the PR subscription conversion; ran cargo fmt --all --check, just ci base (full rerun passed), and just rs test -p moq-uring --test integration -E 'test(web::an_offset_stays_acknowledged_through_a_reset)' in nix develop --no-update-lock-file.(head 1f4b369)Rewritten by
quest reviewafter each round.Head: 6766bf8
Base: origin/main at be79705
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a1f1d7-c9af-7443-b312-7a606b4e0249, round 5Score: 10/10,
The incremental changes only clarify comments and consistently rename internal identifiers, with no behavior changes or new findings.Rounds: 6; first round 2 (high 1, medium 1); findings 2 (medium 2): fixed 2, refuted 0, open 0
Findings: none