Repository navigation
Conversation
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Human comments
What was wrong
The standard timeline loaded large raw diagnostic payloads for a whole turn before it knew which rows would fit on the page. Applying the byte floor to the turn itself changes collapsed summaries and can drop context.
What changed
Project large unhandled diagnostic events with their metadata. The page sizer reads the raw payload only when it needs the exact size of that row. The timeline still returns the full detail for rows on the page. It keeps all event sequences, turn context and scrollback cursors. Model fallbacks and item-completion events keep their full data during projection.
How you verified
On Linux x64 with Node 22.23.5, run from the repo root after installing workspace dependencies.
To reproduce on base
5b6a9962635b96a87b2c354d0a03d28caa1b78f3, copy the regression test file and run the same command. Both cases failed the read budget on base and pass on this branch. They walk all pages of a turn with 700 diagnostics of 16 KiB each in flat and collapsed views and check each payload and sequence, the final reply, and the collapsed summary count.Timeline HTTP request timing
Median full-response time in milliseconds, with min and max in brackets. Each result uses 16 timed requests over two runs per revision. The response byte counts, row counts and page endpoints match across revisions.
The fixture starts BB on a loopback port. It seeds an archived turn with 16 KiB per diagnostic and enables diagnostic rows. Requests use
deferContent=trueand vary the segment limit to miss the timeline cache. Timing stops before JSON parsing. This measures cold full-response time on synthetic data. The production heap failure remains unverified.Runnable HTTP fixture
Save the fixture as
apps/server/test/services/threads/timeline-audit-http.test.ts. Run the command twice on base5b6a9962635b96a87b2c354d0a03d28caa1b78f3and twice on PR head3d6820b700d77f4decdb7755004d451a02d92e7c. Pool the eightmssamples from eachTIMELINE_AUDITline by revision, diagnostic count and display.Also ran 54 focused server tests, 819 database tests, 566 thread-view tests, and typecheck and type-aware lint.
Docs: Timeline settings, response fields and cursor format are unchanged. The fixture reproduces the read cost. It does not attribute the production heap failure.
Fixes #8302