report compressed ranges in the success panel (#335) - #337
Open
ranxianglei wants to merge 1 commit into
Open
Conversation
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-337Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr337.tgz
pi install ./packageThis comment is automatically updated on each push. |
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.
Fixes #335
Problem
The
compresssuccess panel only reported token stats:The model never learned which refs were consumed, so it could re-issue the same (or overlapping) ranges. The kernel rejects those as "already compressed" no-ops, but the model has no signal in the success path telling it the range is gone.
Fix
When
blocksCreated > 0, the panel now appends the consumed ranges (the kernel already recordsstartRef/endRefon every new block, and the tool passes the model's refs through verbatim atsrc/compress-tool.ts:350):compressPanelBlocks,isCompressSuccessText,isCompressNoopText) only read line 1, so no behavior change for floor-stale / replay classification.blocksCreated === 0) and rejection panels are unchanged.Errors:for the rejected ranges.Tests
New regression test
tests/compress-tool.test.ts— "compress success panel reports the compressed ranges" — asserts the panel containsCompressed: b1 (m00001..m00002)after a successful compress.npm run typecheck && npm test && npm run build— all green (624 pass, 0 fail).