## 当前目标 让事件索引区分“可用于接续判断的执行证据”和“无语义或高噪声的内部事件”,避免 encrypted reasoning、token_count、空 reasoning 等内容挤占摘要与搜索预算。 ## 当前范围 - reasoning 事件只有存在明文 summary/text 时才进入可检索内容;仅有 `encrypted_content` 时不写入正文索引。 - token_count、心跳类和无文本事件默认只保留结构化计数,不进入普通文本搜索和 context-pack 正文。 - tool call、tool output、命令输出、失败原因等执行证据保留可检索摘要,并在 read/context 输出中可被预算化选取。 - 增加事件类型分层测试,覆盖 encrypted reasoning、token_count、function_call、function_call_output、agent_message。 ## 依赖 - 依赖 #37 完成角色与正文来源边界。 ## 验收口径 - 搜索 encrypted reasoning 片段不再命中正文结果。 - `threads read` 或 context 输出能包含关键 tool/command 证据,而不是只返回 assistant/user messages。 - 真实最近会话同步后的事件统计仍完整,正文索引噪声明显下降。 - `cargo test` 通过,并包含事件分层回归测试。
Activity
fanbuz commentedon Jun 17, 2026
阶段验证
已完成事件噪声第一轮收口:
reasoning事件只有存在明文 summary/text 时才进入可检索摘要;仅有encrypted_content时保留事件类型但 summary 为空,不再写入 aggregate/search 正文。验证结果:
parser_does_not_index_encrypted_reasoning_as_searchable_text先失败于 reasoning JSON fallback。cargo test --test parser_samples通过,3 个测试。cargo test通过,64 个测试。target/debug/codex-threads --sessions-dir /Users/fanpeng/.codex/sessions --index-dir /tmp/codex-threads-latest-compat-index-fresh sync --recent 5 --force,失败文件 0。events search "encrypted_content" --event-type reasoning:0 命中。events search "function_call_output" --event-type function_call_output:仍有命中,执行证据保留。说明:
messages search "permissions instructions"后续可能命中 assistant 自己对验证结果的描述,这属于真实对话正文,不是 developer 权限上下文入库。最新 Codex 兼容与上下文压缩专项
fanbuz commentedon Jun 17, 2026
最终验收
本 issue 范围已纳入 PR #42,并随
v0.0.6发布。完成状态:
main。v0.0.6GitHub Release 已发布。cargo test通过,68 个测试;cargo build通过。~/.codex/sessions同步失败文件 0。encrypted_content的 reasoning 事件不再写入可检索摘要;function_call/function_call_output等执行证据仍可用于 context-pack 和事件检索。剩余边界:无语义事件保留事件类型但不进入摘要正文,后续如需更细粒度事件归类可另开专项。