fix(context): strip invalidated signed thinking from replay - #47
Open
Brian Krabach (bkrabach) wants to merge 2 commits into
Open
Brian Krabach (bkrabach) wants to merge 2 commits into
Brian Krabach (bkrabach) wants to merge 2 commits into
Conversation
Strip provider-signed thinking from compacted outbound views after their prefix changes, while preserving canonical history and structured tool pairing. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Collaborator
Author
|
Review-readiness evidence (not a GitHub formal approval):
No CODEOWNERS or clear public prior reviewer assignment was found, and no reviewer is currently requested. Please use the repository's normal human approval gate. |
Brian Krabach (bkrabach)
marked this pull request as ready for review
September 30, 2026 12:10
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.
What does this change?
Fix signed-thinking replay across context compaction while preserving canonical history and transaction boundaries.
ContextLengthError; canonical history and compaction transactions remain unchanged.Type of change
Testing
38cf5f9e819cc1f9f4a6da0d182b10edd8976d05commit.uvx ruff format --check .anduvx ruff check .pass locallyEvidence checklist
GUARD_MEASUREDflag toTrue.Live signed-history evidence
A genuine Sonnet 5.5 signed-thinking response was obtained with explicit binding-error enforcement enabled:
Partially completed tool-turn guard
The newly qualified boundary keeps the sticky outbound view and whole thinking block while a tool turn is incomplete. If the raw budget fits, it does not compact again; if the hard budget cannot fit, it fails closed with the existing
ContextLengthErrorwithout changing canonical history or compaction transactions. Completed-tool-turn stripping still resumes normally.Anything reviewers should focus on
Breaking changes
None. Canonical admitted history, public configuration, and completed-turn behavior remain unchanged except that invalidated signed-thinking blocks are omitted from compacted provider-facing replay.