Repository navigation
fix(cache-warming): Compact on idle when the request snapshot is too large to store - #3921
Merged
Merged
Conversation
…large to store An idle period whose request snapshot was over a limit got no warmup slot, so a large prefix never compacted on idle. Compaction on idle needs no snapshot. At or above the background compaction mark, such a period now keeps its first slot. That slot chooses only between compact and stop and sends no warmup. Refs #3913 Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 21, 2026
BYK
enabled auto-merge (squash)
November 21, 2026 08:12
…arge-snapshot Co-Authored-By: BYK <[email protected]> # Conflicts: # design/context-compaction.md # packages/junior/src/chat/cache-warming/warmup.ts
The merge of main put warmup.ts over the 1,000-line limit. The recorder of one agent run is its own boundary: it sees the run's model requests and hands finished calls to the idle period that warmup.ts owns. Co-Authored-By: BYK <[email protected]>
Contributor
|
Found 4 test failures on Blacksmith runners: Failures
|
22 tasks done
This branch was successfully 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.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-v2-3x.png)
Fixes #3913.
Compaction on idle runs at a warmup slot. Before this change, an idle period whose request snapshot was over a limit (
snapshot_too_largeorimages_too_large) got no warm state, so it got no slot and never compacted on idle. Those are the largest prefixes. Compaction on idle needs only the prefix tokens, the model, and the request overhead. It does not need the snapshot.What changes:
snapshotSkipReason).compactOnIdleruns withcanWarm: false, sochooseIdleCompactionchooses only between compact and stop. When the slot does not compact, it skips with the snapshot skip reason, and the idle period stops. No warmup is sent, and no later slot is scheduled. Without a warmup, the cache expires after that slot.design/context-compaction.mdmoves this from Gaps to Rules. The public config reference adds one sentence about it.via @BYK.
--
View Session [Sentry]