Repository navigation
fix(llmloop): charge frozen zone in compression budget and keep latest round - #1473
Closed
Hiro-hunter-dev-job wants to merge 1 commit into
Closed
Hiro-hunter-dev-job wants to merge 1 commit into
Hiro-hunter-dev-job wants to merge 1 commit into
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
Hiro-hunter-dev-job
force-pushed
the
fix/compression-frozen-zone
branch
from
September 20, 2026 11:46
eaea268 to
fee403f
Compare
Hiro-hunter-dev-job
marked this pull request as ready for review
September 20, 2026 18:00
Author
|
Closing this one. It came out of an audit I ran on the project, and I am not able to see it through review the way CONTRIBUTING asks — answering maintainer questions myself, without AI. Rather than leave it unanswered, I would rather close it. The work is not lost if it is useful to you: the branch stays on my fork at https://github.com/Hiro-Mati/open-code-review/tree/fix/compression-frozen-zone, with the regression test that fails without the fix. Feel free to take it over or reuse it under the project's license; no attribution needed. Sorry for the volume, and thanks for your time. |
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.
Description
partitionMessagessized the kept recent rounds as 80% ofmax_tokenswithout charging the always-kept head (system + first user prompt, which holds the group's diffs and earlier summaries):StopCompressionalthough compressing more would have fit;The head's tokens are now subtracted from the budget. The most recent round is protected when it fits next to the head; if it does not fit, it is summarized as before and the review continues.
TestScanAgent_WaitBackground_NoLeakOnRunrelied on summarizing the only, just-executed round; its mock now produces an older round for the async job to compress.Type of Change
How Has This Been Tested?
mainand pass with this change (verified both ways).make checkpasses; full unit suite passes on Windows 11 (Go 1.27) and in agolang:1.26.5Linux container replaying the CI job (go test -race, coverage >= 90%).Checklist
go fmt,go vet)AI disclosure: found and fixed with Claude Code (model: Claude Opus 5) during an audit where every finding had to be proven by a failing test.
🤖 Generated with Claude Code