fix(context): provider-safe assembly after history trim (supersedes #55) - #62
Merged
Merged
Conversation
jordanauge
force-pushed
the
feat/kernel-outbound-wait-assembly
branch
from
September 11, 2026 12:07
493f26e to
c16cbfc
Compare
- Repair committed history at assembly via sanitize_provider_messages - Pin in-turn working memory with token-budget pin_tail - Add per-session kernel outbound-waits ledger (MODEL/TOOL/HITL) - Fix assembler to retain tool messages and skip live-turn sanitize - Fix pre-existing driver.py lint issues; document zero-tolerance for failures in AGENTS.md Signed-off-by: Jordan Augé <augjorda@cisco.com>
jordanauge
force-pushed
the
feat/kernel-outbound-wait-assembly
branch
from
September 11, 2026 12:13
c16cbfc to
ee54f43
Compare
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.
Problem
When conversation history is trimmed (
max_messages, sliding window, or token budget), cuts can land between an assistant tool-call message and its tool result. Bedrock and similar APIs reject that payload.Supersedes #55 with a different layering: repair at assembly instead of shape-aware trimmers.
Changes
sanitize_provider_messagespin_tailtoolmessages and skip live-turn sanitizedriver.pylint; addAGENTS.mdzero-tolerance rule for open failuresRationale
Test plan
library-standard/tests/test_provider_payload.py(PR fix: keep tool_calls/tool_result pairs when trimming conversation #55 regressions)runtime/tests/test_outbound_waits.pyruntime/tests/test_outbound_wait_assembly.pytask verifyTracking: cisco-eti/ioc-core-mas-lab#46