fix(report): group acp_status uncompressed ranges by conversation turn - #165
Open
ranxianglei wants to merge 1 commit into
Open
fix(report): group acp_status uncompressed ranges by conversation turn#165ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
renderUncompressedRanges collapsed the whole visible window into one giant range whenever refs were dense, because it only merged consecutive ref numbers. Split ranges at user-message boundaries once a group has >= 3 messages (same condition as buildCompressibleRanges), sort ranges by size by default (sort:"time" keeps chronological order), and honor the limit option instead of a hardcoded 30.
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)In your adapter project: npm install acp-kernel@pr-165Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf acp-kernel-pr165.tgz
npm install ./packageThis comment is automatically updated on each push. |
This was referenced Aug 26, 2026
Open
Owner
Author
|
[bot] Reviewed branch Verified locally (fresh clone,
Code review:
Reviewer 1: LGTM. Per AGENTS.md this needs a second agent review before merge, and merging is human-only — I won't merge it. |
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.
Problem
acp_status({scope:"uncompressed"})(the default ranges view) collapsed the entire visible window into ONE giant range whenever message refs were dense, becauserenderUncompressedRangesonly merged consecutive ref numbers and never split at conversation boundaries. The output stopped being actionable, and models fell back toview:"messages"(the per-message firehose) - see ranxianglei/billion-context-pi#193.Fix (src/report.ts)
buildCompressibleRangesalready uses (recommend.ts), so each range aligns to roughly one conversation turn.sort:"time"keeps chronological order. ASorted by size|timeheader makes the ordering explicit.limitoption instead of a hardcoded 30.Tests
4 new tests in tests/decompress-report.test.ts: turn-boundary splitting, size sort + tie-break, sort=time order, limit truncation. Full suite: 544 pass, 0 fail. typecheck + build clean.
Note: repo-wide format:check fails on 89 files on master (pre-existing; files use 4-space indent vs prettier default 2). New code matches the file's existing style.