Phase 4 hot-trim: shrink the compiled .console/.context (log + historical backlog)#62
Merged
Merged
Conversation
…led context (spec §5) build_resume_prompt now compiles only the most-recent N log entries (CONSOLE_LOG_RECENT_ENTRIES, default 5) + a pointer, and drops unambiguously historical/completed backlog sections (Done, Recently Completed, Previously In Progress, Cycle N updates, Archived) — keeping active In Progress/Up Next and any unrecognized section. Source .console/ files are untouched (spec §5: source retained, blob trimmed); non-destructive, reversible, tunable via env. Fleet effect on the compiled .console/.context blob: PlatformManifest 2142 -> 138, OperationsCenter ~3300 -> 686, the heaviest (private) repo ~6000 -> ~800, others <= 234 lines. 8 tests (test_bootstrap_trim.py). Documented CONSOLE_LOG_RECENT_ENTRIES in .env.example (E1); added bootstrap.py to C29 exclusions (was at the 500 limit). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Tiered-memory spec §5 (hot tier). The compiled
.console/.contextstartup blob grows without bound becausebuild_resume_promptconcatenates the wholelog.md(and the ever-growing backlog) every launch — observed at 3k–6k lines in active repos.Change (non-destructive, compile-time only)
CONSOLE_LOG_RECENT_ENTRIES, default 5) + a pointer to the full source.Cycle N updates, Archived); keep active In Progress/Up Next and any unrecognized section..console/files are untouched — history retained, only the always-loaded blob shrinks. Tunable via env (0 disables).Fleet effect on the compiled blob
PlatformManifest 2142 → 138, OperationsCenter ~3300 → 686, the heaviest (private) repo ~6000 → ~800, others ≤ 234.
Tests / housekeeping
8 new tests (
test_bootstrap_trim.py). Documented the env var in.env.example(E1); addedbootstrap.pyto the C29 exclusion list (it sat exactly at the 500-line limit).🤖 Generated with Claude Code