You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the existing contextcompression.RequestIR and MessageIR with one ordered transformation plan and protected-segment contract so reset, deduplication, turn selection, and compression cannot independently mutate the same request history.
Proposed Workgroup
Agentic & Context
Background
Current request preparation already applies RAG, then Router Memory, then the context-compression stage before provider encoding. The active children of #2984 add topic evidence, optional history reset, deduplication, prior-turn selection, and summarization around that shared path. A second IR or another raw-message mutation pipeline would make ordering and protected-content behavior diverge.
Work item shape and dependency
This is the shared integration seam for behavior-changing context work. #3342 signal-contract work and #3345 research can proceed independently. #3343, #3344, and #3346 may develop bounded policy and fixtures in parallel, but their request-pipeline integration must use this seam after it lands.
Scope
Extend, rather than replace, pkg/contextcompression.RequestIR and MessageIR with typed source, eligibility, protection, and complete-turn/tool-exchange identity.
Protect system/developer instructions, the live user turn, multimodal blocks, authorization/safety context, and atomic assistant/tool exchanges throughout the plan.
Give each step declared inputs, outputs, protected invariants, skip/failure behavior, and a content-minimized receipt.
Add unit and property tests for baseline preservation, ordering, idempotency, protected content, RAG/Memory provenance, tool-exchange atomicity, and protocol-neutral round trips.
Configuration and API impact
This is an internal refactor. It adds no public configuration or client protocol and preserves current RAG, Memory, and compression behavior until an existing child policy explicitly enables a new step.
Non-goals
Create a second context IR or compression framework.
Goal
Extend the existing
contextcompression.RequestIRandMessageIRwith one ordered transformation plan and protected-segment contract so reset, deduplication, turn selection, and compression cannot independently mutate the same request history.Proposed Workgroup
Agentic & Context
Background
Current request preparation already applies RAG, then Router Memory, then the context-compression stage before provider encoding. The active children of #2984 add topic evidence, optional history reset, deduplication, prior-turn selection, and summarization around that shared path. A second IR or another raw-message mutation pipeline would make ordering and protected-content behavior diverge.
Work item shape and dependency
This is the shared integration seam for behavior-changing context work. #3342 signal-contract work and #3345 research can proceed independently. #3343, #3344, and #3346 may develop bounded policy and fixtures in parallel, but their request-pipeline integration must use this seam after it lands.
Scope
pkg/contextcompression.RequestIRandMessageIRwith typed source, eligibility, protection, and complete-turn/tool-exchange identity.Configuration and API impact
This is an internal refactor. It adds no public configuration or client protocol and preserves current RAG, Memory, and compression behavior until an existing child policy explicitly enables a new step.
Non-goals
Completion signal
RequestIR/MessageIRown the ordered plan and protected invariants.