Skip to content

fix(stats): end a stats track whose frame outgrows the cache - #5826

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/stats-frame-too-large
Oct 17, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/stats-frame-too-large

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

A stats frame over group::MAX_CACHE_BYTES (32 MB) used to be dropped with a debug log, leaving readers on the previous snapshot indefinitely. publisher.json near 50k paths is the likely first hit.

Now Snapshot::update aborts that flavor's track with FrameTooLarge (and any open delta group), so readers see the track end. Only the failing flavor ends: DEFLATE can shrink a frame too large for the plain track, so the .z sibling keeps updating. An ended flavor is skipped on later ticks (no repeated encode or log), and write failures now log at warn.

A re-request for an ended flavor is refused with NotFound by the existing live-pair branch in adopt_pair / adopt_presence. Those comments called the branch unreachable, so I updated them.

Quest: deletes quest/m1/stats-frame-too-large.md. Prefix tracks from #5811 get the same rule if they publish through TrackPair.

API / wire impact

  • Public API: none.
  • Wire: no format change. Behavior change: a stats track can now end with FrameTooLarge. Documented in doc/concept/stats.md.

Tests

  • produce::tests::oversized_frame_aborts_only_its_flavor: the plain reader ends with FrameTooLarge, and the compressed reader decodes the oversized value and then a later update. The test fails without the abort.
  • just check passes.

Follow-ups

  • Optionally reject a re-request for an ended flavor with its abort reason (FrameTooLarge) instead of NotFound.
  • Long term: split or page large stats frames so publisher.json scales past the cache limit, instead of only failing loudly.

(written by Claude Opus 5.5)

🤖 Generated with Claude Code

@kixelated

Copy link
Copy Markdown
Collaborator Author

Quest outcome: quest/m1/stats-frame-too-large.md is fully implemented and the PR is ready for review. Nothing is left for the maintainer to decide. just check passed locally, and the new regression test fails without the fix.

(written by Claude Opus 5.5)

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c054d4c-c5b9-4700-a2b4-448c2941fb2a
📥 Commits

Reviewing files that changed from the base of the PR and between 3789ee2 and b6aa429.

📒 Files selected for processing: 4
  • doc/concept/stats.md
  • quest/m1/README.md
  • quest/m1/stats-frame-too-large.md
  • rs/moq-stats/src/produce.rs
  • 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T02:40:32.671306Z b6aa429 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: a stats flavor whose frame is over the 32 MB cache limit now ends with FrameTooLarge, and its sibling flavor keeps updating. Readers no longer sit on a stale snapshot.

One choice made without asking: a new request for an ended flavor is refused with NotFound, using the existing path. Returning the abort reason is listed as a follow-up.

CI passed and Codex reviewed b6aa429 with no findings.

(written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit 681f7e6 Oct 17, 2026
8 checks passed
@kixelated
kixelated deleted the quest/m1/stats-frame-too-large branch October 17, 2026 04:38
kixelated added a commit that referenced this pull request Oct 17, 2026
Main's #5826 ends any stats track whose frame outgrows the cache, so the prefix-only abort_oversized opt-in and its duplicate test are dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant