Repository navigation
fix: BPS 保护当前密文任务并取消固定压缩阈值 - #857
Merged
Merged
Conversation
12 tasks done
This was referenced Nov 14, 2026
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.
解决的问题与行为变化
可选密文历史省略会把最后一条用户消息或工具结果中的密文替换成占位提示;当前加密 agent_message 后面出现 reasoning 时,也可能被误认为旧历史。现在按最后一个有效输入判断当前任务,忽略尾部 reasoning、工具目录和 compaction 元数据,当前密文任务明确拒绝并提示使用原始明文。
同时取消 BPS 请求自动注入固定 920000 压缩阈值。客户端明确提供的 context_management 数组保持原值,包含空数组;没有声明时交由上游默认策略处理。这与 CPA 取消默认固定阈值的方向一致,但本项目旧值为 920000,并非其文档中的 200000。
关联记录与来源
84aca0133285700017bb4d22f4a90f78929f322daa5243c841bf6bece34447a7。依据说明和静态分支重新实现,无第三方源码提交。production@aa8e596e6d6f3e4648d6beba73b39b240dd5357a。管理员新功能提示
NewFeatureBadge展示位置:不适用,无 UI 改动。context_boundaries_test.go,CI 已通过(固定 head 60870a2)。复现与验收
协议、调度或传输改动补充
实际验证
60870a2e85b61f63059bdf4851c5f09610b04258兼容性与运行影响
文档与用户可见变化
BPS README 说明压缩默认值变化、显式保留旧值的方法及当前密文任务拒绝边界。无 UI,不适用截图。尚未发布或部署。
Agent 使用声明
提交前自查
最终审查:当前输入拒绝发生在上游发送前;reasoning 尾项不改变任务身份;显式压缩数组逐值保留。核对最终 head 与 production 基线,无未解决审查意见。真实上游与生产尚未验证。