Repository navigation
fix: 保留加密恢复的历史摘要并接续可读旧压缩项 - #1137
Merged
Merged
Conversation
11 tasks done
10 of 17 tasks
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.
解决的问题与行为变化
400 加密恢复转换旧
agent_message时会遗漏它的可读summary;带可读摘要的旧compaction也被一概拒绝。此改动保留支持的 agent 摘要,并允许当前任务之前、带非空可读摘要及密文、状态已完成或缺省的旧压缩项转成带来源和内容缺失标记的历史。仅改善已有 400 Beta 的历史转换,不解密旧状态、不自动生成新摘要、不承诺所有跨账号历史可恢复。截图中的历史提示不能单独证明请求触发了本分支,本 PR 不声明已修复某个真实会话。
关联记录与来源
production@33ccaf48cba0105de45db42999ed644d2959bd01。无外部提交引入。管理员新功能提示
复现与验收
invalid_encrypted_contentHTTP 400,再返回完成响应。provider_compaction,没有恢复发送。openai_400_readable_checkpoint_test.go覆盖 agent 字符串/数组摘要、两种压缩项、JSON/SSE 转发、同账号/凭据、次数、大整数及工具结果保留。负例包括纯密文、当前压缩、未知字段、附件、未完成状态及部分转换后拒绝。协议、调度或传输补充
原生 HTTP Responses 的既有 400 Beta,包含 stream=true 在流开始前收到的 HTTP 400。仍受原有开关、当前可读任务、同账号/凭据/路线、输入快照、交付屏障及最多一次额外有损尝试约束。原生压缩端点、WebSocket、普通 400、HTTP 200 SSE 错误、已输出、取消、未知执行沿用现有处理。未扩大换号或自动重放边界。日志仍只记录固定类别,未导出摘要、密文或工具内容。
实际验证
最终合并核对:
37cf38c70f68c07aa061265622fb52884370f704的 35 个工作流及 91 项检查已结束,结果 {'success': 79, 'skipped': 12},没有失败、取消或待执行。Security Scan;Encrypted history 400 Beta;CI。已复核可读摘要转换、拒绝边界和时区夹具;production 新增的 #1136 仅测试/CI,整合树无冲突。git diff --checkgofmt -w backend/internal/service/openai_history_omission.go backend/internal/service/openai_400_readable_checkpoint_test.go37cf38c70f68c07aa061265622fb52884370f704;本次未重新运行本机测试/构建CI 发现已有峰时测试的全局时区初始化与计时器存在竞态。本 PR 将测试时间构造在配置时区,跨时区断言通过同一时刻的另一时区表示验证,取消测试对 time.Local 的写入;生产时区和计价逻辑不变。进一步修正峰时计费测试的固定UTC假设及SQLite租约夹具的非UTC文本比较,保持原断言;定向race在America/Los_Angeles通过4.462s,Asia/Shanghai通过6.178s。
兼容性与运行影响
文档与用户可见变化
更新
docs/encrypted-history-400-beta.md的历史摘要/压缩支持与拒绝边界。没有 UI 改动,截图不适用。合并不代表发版或生产部署。Agent 使用声明
本次最终合并核对:Codex,环境标识 GPT-6,具体变体及推理配置未知;源码和 CI 审查、base 整合核对、正文与合并,无子 Agent。
Agent:Codex,参与源码分析、实现、定向回归和 PR 说明;humanizer-cs 用于说明文字核对。无子 Agent。
模型:GPT-6(会话未暴露更具体型号 ID)。
推理强度:未知(会话工具未提供可验证配置)。
提交前自查