CL-9007: ship shared summary-plus-small-tail pipeline for automatic and manual compaction - #1177
Merged
TheGreatAxios merged 3 commits intoSep 27, 2026
Conversation
Red state for the shared summary-plus-small-tail pipeline: tail budget with shortened tool outputs, pair-safe cuts, whole newest user messages, repeat folds updating the prior summary, and archive retrievability. These fail against the last-N-verbatim keep window.
Route every pruning-compactor fold through one budgeted tail selector: the tail holds at least the last keepRecentTurns turns and extends older while the next whole pick fits tailBudgetTokens. Tail tool outputs ride head/tail excerpted with a sentinel; cuts never split a tool pair; newest user messages stay whole; prior spines fold into the next handoff while the summary updates them via priorSummary.
A keep-set that covers every foldable turn still has to ship the excerpted live copies the tail selector already paid for. Returning the unexcerpted turns keeps the occupancy that armed the compact. Skip re-excerpting only on the structured marker so a body that merely mentions the prefix is still shortened.
TheGreatAxios
deleted the
cl-9007-ship-shared-summary-plus-small-tail-pipeline-for-automatic
branch
September 27, 2026 22:27
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.
Shared budgeted-tail pipeline for automatic and manual compaction: both funnel through capabilities.compact(pruning-compactor), so one pipeline change covers both.
What changes:
[tail-shortened N→marker, not a raw prefix substring.Not in scope (per brief): governor thresholds/arming untouched, no per-family tuning, no archive storage migration, no second compactor.
Verification:
Fixes CL-9007