You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
quest: plan linear route show cost for lite-07 sessions - #8385
Plans Showing an identity's claims costs the claims that changed in the m2 routes epic. This is the follow-up moq-dev/moq#8352 suggested: its session bench measured lite-07 setup at 4096 broadcasts at 4.9 s of CPU, against 0.5 s for lite-06, and traced it to a quadratic route show for one identity with many claims. The quest re-measures after moq-dev/moq#8374 first, and deletes itself if that already fixed it.
Decisions
Settled in /quest-complete on 2026-11-09 by the maintainer:
Milestone: ✅ m2, under cluster-routing/routes (rejected: m4, dropping it).
Impact
Quests only. Wire: none.
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, high effort
Score: 10/10, The change only adds a scoped performance follow-up plan and links it from the parent quest, with no runtime changes or actionable defects.
No actionable findings in the two-file quest-plan change.
Direction: re-measuring before adding another optimization is appropriate. At this head, Router::show already uses the dirty-claim set when dirty.all is false, so the plan's explicit option to record the measurements and delete the quest avoids duplicating #8374's work. The claims-per-identity × claims-changed sweep makes any remaining cost measurable without expanding public API or wire scope.
Limits: GitHub-only static review of the changed documents, relevant route source, and linked PR context. Benchmarks, tests, and quest tooling were not run; the historical timing figures were not independently reproduced.
(Written by unknown model; model and effort are not exposed by this review environment.)
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ No critical issues — one plan-accuracy suggestion inline.
Reviewed changes
New m2 quest show-cost.md — plans making lite-07 session setup/teardown linear in broadcasts, and deletes itself if the re-measure shows #8374 already fixed it.
Routes index entry — adds the quest to quest/m2/cluster-routing/routes/README.md under ## Required. The title, size ([M]), ## Goal/## Plan sections, and Public API/Wire closer match the tree's conventions, and the epic membership is valid.
The only concern is that the plan's diagnosis and fallback may already be implemented; details are on the added lines.
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
Re-measure on current main first. If #8374 already made it linear, record the
numbers in the PR and delete this quest. Otherwise keep what `show` derives up
to date per changed claim instead of recomputing it, and add a route-bench
case swept over claims per identity and claims changed.
Re-measure on current main first. If #8374 already made it linear, record the
numbers in the PR and delete this quest. Otherwise locate the hot path with the
existing route-bench sweeps (and a profile if they stay flat) before changing
`show`, then add a case only if none of the current sweeps covers it.
The fallback here describes work that already exists: Router::show takes the Dirty { all, claims } short-circuit and recomputes only dirty.claims unless the identity's context changed, and the existing route bench already sweeps both relevant shapes (watched/unwatched over claims × streams, received over claims × changes). Because #8374 merged before this commit, its published received numbers (10,000 claims × 1: 4.77 ms → 1.58 µs) suggest the re-measure may be the whole task. If the cost survives, the plan should name how to find the real hot path (Node::home and the view merge are the other candidates) rather than prescribe code that already ships.
Technical details
# `show` is already incremental; `routes` already has both sweeps## Affected sites-`rs/moq-net/src/route/mod.rs:348` — `Dirty { all, claims }`, the state that makes `show` per claim.
-`rs/moq-net/src/route/mod.rs:1450` — `update` sets `dirty.all` only when the identity's `Ctx` changed.
-`rs/moq-net/src/route/mod.rs:1779` — `show` computes `shown_now` only over `dirty.claims` unless `all` is set.
-`rs/moq-net/benches/routes.rs:3` — `watched`/`unwatched` already sweep one origin claim change over claims × streams.
-`rs/moq-net/benches/routes.rs:9` — `received` already sweeps claims × changes, added by #8374.
-`rs/moq-net/benches/session/mod.rs:1976` — the `broadcasts` shape (16/256/4096) the plan cites.
## Required outcome- If the re-measure is still superlinear, identify the actual hot path before prescribing a fix, and update the fallback so it does not repeat behavior that already ships.
- If the re-measure is linear, the plan's own instruction says to delete the quest; recording the measurement here and doing that avoids adding a cut-blocking m2 child for work #8374 may have finished.
## Open questions for the human- Is #8374's `routes/received` result enough to close this without a fresh session-bench run, or does the session bench exercise a path the route bench does not?
Adds a required entry to the routes README that links to a new document about lite-07 session setup and teardown costs. The document records prior benchmark measurements and describes a conditional plan to re-measure current behavior. It states that no public API or wire changes are expected.
Merge Risk: Minimal · up to 4229d
The change adds a benchmarking plan without changing runtime behavior. No material merge risk is established.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly describes the quest to plan a linear route show cost for lite-07 sessions.
Description check
The description explains the performance issue, the planned re-measurement, and the quest’s scope.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
Finishing Touches
Simplify code
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Update the proposed fix for the current implementation.
show in rs/moq-net/src/route/mod.rs already recomputes only dirty.claims when dirty.all is false; it scans all claims when dirty.all is true. If the re-measurement remains superlinear, profile the affected path and identify why it scans all claims instead of directing the implementer to add the existing incremental path. (raw.githubusercontent.com)
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 6aaa5ad8-734a-4d68-aa7e-ca4a50e697ab
Commits
Reviewing files that changed from the base of the PR and between 56902e9 and 4229dc1.
Files selected for processing: 2
quest/m2/cluster-routing/routes/README.md
quest/m2/cluster-routing/routes/show-cost.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plans Showing an identity's claims costs the claims that changed in the m2 routes epic. This is the follow-up moq-dev/moq#8352 suggested: its session bench measured lite-07 setup at 4096 broadcasts at 4.9 s of CPU, against 0.5 s for lite-06, and traced it to a quadratic route
showfor one identity with many claims. The quest re-measures after moq-dev/moq#8374 first, and deletes itself if that already fixed it.Decisions
Settled in /quest-complete on 2026-11-09 by the maintainer:
cluster-routing/routes(rejected: m4, dropping it).Impact
Quests only. Wire: none.
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, high effort
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with high effort)
Review
Rewritten by
quest reviewafter each round.01a1c1f5-9365-7980-ae1b-75aaf8f2b636, round 1The change only adds a scoped performance follow-up plan and links it from the parent quest, with no runtime changes or actionable defects.