Skip to content

fix(freshness): repair Chat runtime routing and checkpoint recovery - #7744

Closed
songoow wants to merge 3 commits into
loopx-project:codex/pr5677-fix-base-ebb837579from
songoow:codex/pr5677-review-fixes
Closed

songoow wants to merge 3 commits into
loopx-project:codex/pr5677-fix-base-ebb837579from
songoow:codex/pr5677-review-fixes

Conversation

@songoow

@songoow songoow commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

修复目标

基于 loopx-project/loopx#5677 的当前提交 ebb8375797936aea79a0f3de04fd007aa30d2e26,修复 本轮 review 已复现的三个 P2。此补丁仅包含 3 个 DCO 签署提交、8 个文件,+228/-53。

原 PR 的作者 fork 对当前 GitHub integration 的 Git tree 写入和 PR 创建均返回 403。修复提交已发布在 songoow/loopx:codex/pr5677-review-fixes;本 PR 使用主库审阅基线 codex/pr5677-fix-base-ebb837579,该分支精确指向原 head ebb837579,因此差异仅包含本次补丁。原 PR 分支尚未改变,作者可将下面三个提交整合回原分支;本 PR 合入审阅基线也不会自动更新 #5677 或 main。

  • 6bfb611f841f0fa6f5c5315ba41ff001f3de41ae — Chat runtime routing
  • f4b66a193415a24255bb2bd373b40123a1c727ca — checkpoint history indexes
  • eaea1d4ed6ed7efa3d521a059bafb6d4ce0ac084 — Windows-only test scope

改动与行为

1. Chat checkpoint 始终使用选定的 runtime

在既有 MCP control plane 内复用 effective_runtime_root,使原 Turn、checkpoint policy、terminal intent、cadence、journal reconciliation 和 Chat CLI 选择一致。

显式 transport override 与解析后的 runtime 分开:普通 MCP 保留 None,因此仍沿 global registry 的 source_registry 读取源 provider。Chat 使用已经选定的 root,不再因为缺少 common_runtime_root 而误读默认 runtime。

复用真实 File/SQLite 回归,覆盖注册 root、独立 Chat root、实际 Chat snapshot、read→resume→repeat、原始 identity/结果/journal 保留及一次扣额。额外验证隐式 source 路由不创建第二份 authority。

2. 缺失读取凭据的历史恢复只建立一次索引

在单次捕获的 history 内构造 receipt-name→proof 和 effect/purpose→attempt rows 索引,消除每张待恢复回执重复扫描整段历史的平方增长。

保留 first-proof 顺序、全部竞争记录、完整 identity 与 artifact 核验。合法 proof 与非 null attempt 的判定继续分开,损坏的竞争行不会被过滤或覆盖。没有全局缓存、历史截断、读取时修写或 timeout 调整。

新增回归同时覆盖 work/direction 两类回执删除或损坏、原身份恢复、重复和 malformed 竞争行拒绝、只读观察,以及 1/100/1,000 Turn 下受历史行数常数倍约束的实际属性访问。相同新增增长回归在原 head 两项均失败;修复后通过。

3. Windows sharing 测试精准声明平台

只为直接调用 Windows sharing helper 的三个测试函数添加平台条件,覆盖其展开后的 10 个节点。其余 12 个跨平台用例继续在 Linux 执行。

验证

范围 实际结果
完整 TypeScript control-plane suite 5,917 passed / 78 skipped / 0 failed
Chat checkpoint + native journal + source runtime route 26 passed,真实 File/SQLite
普通 MCP default/terminal 兼容检查 11 passed
Python checkpoint history / observation / faults 28 passed / 0 skipped,真实 File/SQLite CLI/RPC
queued-write recovery 12 passed / 10 Windows-only skipped;collection 保持 22 节点
TypeScript typecheck、全配置范围 Ruff、mypy 通过;mypy 为配置内 17 文件
本次增量的 standard premerge 6 direct checks + 13 selected checks 全部通过,0 failures
CLI output budget regression 使用已核实的 upstream/main 作为 main/base 通过
RFC bilingual diff、diff whitespace、公开边界扫描 通过;全树扫描为 0 errors,保留其既有 46 warnings

测试范围存在重叠,以上结果不累加成总体通过数。公开边界扫描的 warnings 包括未配置本地 registry 和非字面量 credential 引用;本次新增行未包含凭据、私人状态或本机绝对路径。

原失败 workload 的性能对照

沿用同一份 4,000 个已结算 Turn 的合成持久化历史、artifacts 和 rollout,调用真实生产 observer/RPC:

路径 原 head 修复后
直接 observer,read receipts 删除 20.895 s 0.769 s
Python→TypeScript RPC,read receipts 删除 默认 10 s 预算后超时,10.021 s 1.950 s 正常返回 null
Python→TypeScript RPC,receipts 完整 0.610 s 0.500 s

没有增加默认请求预算。探针结束后两个隔离 daemon 均确认停止。这是 synthetic history 上的真实 source/RPC 对照,不代表 4,000 次实际 provider/CLI 工作或长期生产负载资格。

保留的失败与验证边界

完整 Python 尝试使用 --maxfail=3,在 4,197 passed / 599 skipped / 1,903 subtests passed 后因三项失败停止:

  • test_only_the_owner_module_states_a_whole_value_digest_shape:heartbeat_receipt.py:849 的 digest literal 冲突;已在干净原 head ebb837579 单独复现同一失败,本次未修改该路径。
  • 两个 test_native_codex_profile_skill_versions.py 安装用例:保存的 npm 日志均显示隔离 HOME 内依赖 tarball 下载连续 EAI_AGAIN registry.npmjs.org,最终安装退出 1。相关 installer、profile、测试和 package/lock 相对原 head 均未改动;核心 skill-version/runtime-shutdown 断言尚未执行。

因此 不宣称完整 Python suite 全绿。本轮没有执行原生 Windows、完整 real PostgreSQL、真实模型或安装后的 UI 旅程;该补丁不改变页面布局/文案,已验证实际 Chat controller 与原生 checkpoint/CLI backend。原 PR 的平台前置拆分及与 main 的整合仍保持原来的边界。

三个提交分别对应 runtime routing、history recovery 和 Windows test scope;发布内容树 dedddcfec2759dfd6134b8bad68fef027e3d6e23 已逐次与本地验证提交的树校验一致。最终补丁 head:eaea1d4ed6ed7efa3d521a059bafb6d4ce0ac084。

Route inherited checkpoint reads, terminal intent and journal reconciliation
through the transport's selected runtime, matching its CLI calls. Keep implicit
source-registry routing when ordinary MCP has no explicit runtime override.

Cover File/SQLite read, resume and replay with an independent Chat root,
retaining the original result, journal and single quota debit.

Signed-off-by: song <22676124+songoow@users.noreply.github.com>
Build receipt-proof and effect/purpose indexes once per captured history so
missing read receipts do not repeatedly scan every historical row.

Preserve first-proof ordering, all competing attempts, artifact verification,
original identities and read-only observation. Cover bounded traversal,
missing work/direction reads and duplicate or malformed competing rows.

Signed-off-by: song <22676124+songoow@users.noreply.github.com>
Mark the three functions that directly use the Windows sharing helper,
covering ten parameterized cases while retaining twelve portable cases
on non-Windows platforms.

Signed-off-by: song <22676124+songoow@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-30T13:34:22.100260Z
We couldn’t complete this review. Comment @codex review to try again.
eaea1d4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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