fix: inactive block decompress + acp_status visibility - #193
Open
ranxianglei wants to merge 5 commits into
Open
Conversation
Removed the "not active" rejection in resolveBlockTarget. Standalone inactive blocks (user-decompressed, GC'd, orphaned) can now be decompressed. The nested-redirect for consumed blocks (inside an active parent) is kept — decompressing a consumed child directly would restore 0 messages. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Previously scope:compressed only iterated activeBlockIds, hiding consumed/GC'd blocks entirely. Now shows all blocks from blocksById with an [inactive] marker on the metadata line (not the topic). Adds a summary line when inactive blocks are present. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…s refactor) Dual-agent review (Oracle + General) found that the shared allBlocks variable was passed to both renderCompressedDrilldown (wants all blocks) and renderOverview (wants active only). The overview showed inflated counts and token totals, listed inactive blocks without marker. Now filters to active for the overview path. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Round 2 review findings: (1) toFile on inactive blocks wrote literal placeholder because activeBlocks was empty — now uses targets[0].blocks[0].summary. (2) /acp decompress slash command still had the old 'not active' rejection — applied same fix as the tool. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
7 tests exercising the actual decompress tool (not just helpers): standalone inactive succeeds, consumed redirects, active control, toFile writes summary, fully-inactive chain. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
4 tasks
ranxianglei
commented
Jul 25, 2026
| return | ||
| } | ||
|
|
||
| await sendIgnoredMessage( |
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.
Summary
Two fixes for inactive (consumed/GC'd/user-decompressed) compression blocks, addressing Gitea #20 feedback:
1. Allow decompress of inactive standalone blocks
resolveBlockTargetinlib/compress/decompress.tspreviously rejected any block whereactiveBlocks.length === 0with "not active. It may have already been decompressed." — even for standalone inactive blocks that are safe to decompress. The model could see the block's compress call in context but couldn't decompress it.Fix: Removed the "not active" rejection. Standalone inactive blocks (user-decompressed, GC'd, orphaned) can now be decompressed. The nested-redirect for consumed blocks (inside an active parent) is kept — decompressing a consumed child directly would restore 0 messages since the parent still claims them.
2. Show inactive/consumed blocks in acp_status
scope:"compressed"previously only iteratedactiveBlockIds, completely hiding consumed/GC'd blocks. The model couldn't discover blocks consumed by secondary compression.Fix: Now shows all blocks from
blocksByIdwith an[inactive]marker on the metadata line (not the topic line, per user feedback). Adds a summary line when inactive blocks are present.Files
lib/compress/decompress.ts— remove "not active" rejectionlib/compress/status.ts— show all blocks, add inactive markertests/acp-status.test.ts— 3 new teststests/decompress-logic.test.ts— 2 new testsVerification