Strip consumed compress pairs from the upstream wire (kernel >=0.0.32 compat) - #185
Open
ranxianglei wants to merge 1 commit into
Open
Strip consumed compress pairs from the upstream wire (kernel >=0.0.32 compat)#185ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
… >=0.0.32
Kernel 0.0.32 restores KEEP_LAST_ORPHANED=2: the newest orphaned
compress call+result pairs stay in processTurn output so models can
observe their own failures (billion-context-pi#9). The proxy wants
consumed calls OFF the upstream wire: stripKernelSummaries now also
drops compress pairs that are neither active-block-linked (their args
carry the live summary) nor failures ("FAILED" marker) — rejections
stay visible. Core tool-result messages carry no toolName, so calls
and results are paired by toolCallId.
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.
Why
acp-kernel 0.0.32 (kernel #104/#105,
KEEP_LAST_ORPHANED0 → 2) keeps the newest orphaned compress call+result pairs visible inprocessTurnoutput. The proxy's upstream contract requires consumed compress calls to stay off the wire.What
src/server.ts:stripKernelSummaries(messages, state)now also drops compress call+result pairs that are neither active-block-linked (their args carry the live summary) nor failures (FAILEDmarker) — rejections stay visible to the model. Core tool-results carry notoolName, so calls and results are paired bytoolCallIdacross all four strip sites (anthropic / openai / responses / count_tokens).Tests
npm run typecheckFollow-up
A separate bump-only release PR (acp-kernel 0.0.32 → v0.1.45) will follow after this merges — no version changes in this PR.