Skip to content

docs(codex): 写清严格 rollout 解析器零生产调用却保留的跨 CLI 守卫理由 - #2097

Merged
deepcoldy merged 2 commits into
masterfrom
pr1650-comment-followup
Oct 21, 2026
Merged

deepcoldy merged 2 commits into
masterfrom
pr1650-comment-followup

Conversation

@deepcoldy

Copy link
Copy Markdown
Owner

背景

#1650 拆分出 Codex generation 感知解析器(codexGenerationSessionIdFromRolloutPath)后,原来的严格 codexSessionIdFromRolloutPath 生产调用归零,只被 structured-bridge-spec 的守卫测试引用。紧随其后的 #2059 清理「只被测试调用的死代码」,若不写明保留理由,后续很可能按同一口径把它删掉,#1854 的跨 CLI 不变量会静默失效。

改动(仅注释,无行为变化)

  • codexSessionIdFromRolloutPath 补完整 doc:① 当前生产调用为 0,但不是死代码,是 test/structured-bridge-spec.test.ts > pins the per-CLI differences 固定 fix(traex): 识别恢复会话的分段 rollout #1854 不变量的承重体(让正则接受 _<uuid> 后缀该守卫立即失败);② 守的是共享/有歧义 caller 不能把 -<sid>_<uuid>.jsonl 读成 Codex 会话,Codex 自己的 generation 场景只走 codexGenerationSessionIdFromRolloutPath(pid fd / CODEX_HOME 索引扫描 / 已绑定 bridge)。
  • 更正 findCodexRolloutByPid / matchCodexRolloutPath 上方已过时的说明(链路实际用 generation 解析器,非严格解析器)。
  • 测试侧补指向源码说明的双向索引。

验证

  • tsc 通过;structured-bridge-spec、codex-rollout-generation 46 项通过;
  • 纯注释与测试注释,不改任何生产逻辑。

- #1650 拆分出 generation 感知解析器后,严格 codexSessionIdFromRolloutPath
  生产调用归零;补注释说明它不是死代码,而是 structured-bridge-spec
  固定 #1854 跨 CLI 不变量的承重体,避免后续按死代码口径删除导致守卫静默失效
- 更正 findCodexRolloutByPid / matchCodexRolloutPath 上方已过时的解析器说明
- 测试侧补指向源码说明的双向索引

Co-Authored-By: Claude Code <[email protected]>
@deepcoldy
deepcoldy merged commit d044b6c into master Oct 21, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown

🚀 Released in v3.49.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant