Skip to content

fix(release): repair state-route fixtures and restore architecture budgets - #5465

Merged
huangruiteng merged 8 commits into
mainfrom
codex/release-qualification-repairs
Oct 2, 2026
Merged

huangruiteng merged 8 commits into
mainfrom
codex/release-qualification-repairs

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Release qualification exposed stale state-route fixtures and an extra top-level Chat display module. This maintenance diff restores existing contracts without changing runtime behavior or raising budgets.

  • Move the byte-identical Codex Turn-step display into the existing presentation layer and update its two imports.
  • Correct six existing route/hook/diagram smokes, preserving registered legacy paths and duplicate-state/competing-root rejection.
  • Document the existing explicitly invoked local performance diagnosis command in maintainer help and the generated manpage.

Upstream #5380 now owns Turn extraction; all overlapping Turn edits were removed from this PR.

Validation on the current integrated head:66 focused Chat/CLI-budget/profile/architecture tests,50 intake/display tests,16 import-boundary tests,9 relevant public smokes and help/manpage pass. All19 native risk checks pass with zero failures or holds; exact change-quality scope is passing. Ruff, mypy19files, semantic and public-boundary checks pass. Original full-release sweep failures remain retained; the final merged-source qualification will be rerun before publication.

No UI/config companion or migration is needed: display bytes and user state behavior are unchanged. Related refactoring uses the existing display owner and retires the redundant top-level seam.

Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Reviewed exact head: 8859e092cd87cf85e249c748f0f79674bf04f64a; base: 3c50e59c0c3da96ac00b1715e7978440030c13a9.

动机

用户恢复 v1.2.4 发布。精确候选验证发现顶层模块数 148 超过 147 上限、Turn adapter 1135 行超过 1114 上限,以及六个公开 smoke 的目录、测试钩子和文档标题落后于已接受契约。本 PR 修复这些实际阻断,不提高预算、不搬动用户状态,也不声明完整 release 已通过。

改动思路

沿用已有 presentation 显示层与 typed settlement owner。CodexActivitySteps 逐字节移动,唯一生产和测试 import 随迁;四个相同 exact readback/None guard 改用局部 read_exact_settlement()。Python 保留既有 CLI/host 适配职责,TS 状态和效果权威不变。相关小重构已去掉重复 identity/guard 知识与额外顶层 seam,没有新增框架或兼容 shim。

具体改动

  • chat_agent.py、presentation/codex_activity.py、test_chat_activity.py 和 presentation README:类实现与事件字段、脱敏、失败状态及 replay 规则完全相同。顶层模块恢复 147;内部类没有公开 import 或序列化类兼容契约。
  • cli_commands/turn.py:复用既有 QuotaSettlementReadback,局部 helper 传入相同 runtime、Goal、Agent、Todo、Turn 和 replan identity,保留缺失 readback 的错误类型与文本。spend、writeback recovery、spend recovery、terminal closeout 四处保留原 effect-ref guard、分支与错误处理。文件降至 1105 行。
  • 六个现有 smokes:fresh clone 与 force-bootstrap 验证 .loopx;真实 Chat HTTP 新 Goal 按其登记路径回读,已有旧 Goal 仍用原路径;多 Goal 重复状态文件反例指向实际已登记文件;共享 runtime 反例配置现有候选 root owner;diagram 检查当前规范章节。没有删除拒绝分支或放松断言。

语义与 CI 对齐

差异 advisory 的三个 step vocabulary 来自逐字节移动,继续复用既有显示契约;没有新增词汇、状态权威或 obligation。完整语义检查通过,既有 frontend mirror 和严格预算保持原值。

对主干的风险

完整差异 11 个文件,37 行增加、58 行删除,另有逐字节重命名。风险集中在 recovery identity 被替换、import/真实 transport 失效或 fixture 更新掩盖实际错误。87 项 Chat/projection/budget 测试、16 项 import-boundary 测试和 107 项 settlement CLI/parity/replay 测试全部通过;错误、终态、重放、同文件重复和 competing runtime 反例保留。真实 Codex app-server 以 read-only 公共 fixture 完成命令 running/completed steps 和 READY 答案,没有使用旧 session;HTTP apply、文件 store 与 reopen replay 均实际执行。

六个修复 smoke 通过。原完整公开 sweep 执行 516 项,有 10 项失败、零超时、零 tracked side effect,未改记为通过。两个 prompt 检查在隔离 fresh home 下按原断言通过;性能检查顺序回放达到 status 0.515s、quota 0.793s,原 3.5s 上限不变。Ruff、diff、完整语义扫描和公开边界检查通过。native premerge 19 项 selected checks 全通过、零 run failure、零 manual hold;首次最终 gate 仅因尚未写入质量凭据停止,随后精确 scope cqr_9d677328cfdfb6816b8d 为 pass。没有权限、默认行为、首屏、配置入口或 PostgreSQL provider 重构,因此无 companion UI 或真实 PG 改动验证要求。

我的整体评价

APPROVE:这是有真实反例和生产入口验证的可回退维护修复。预算保持原值,运行时决策、迁移和用户交互不变,可按已授权发布流程在精确 head readiness 为 ready 后合入。最终 merged commit 仍要完整 release qualification;API intake 模型此前未通过的结果继续保持 unqualified,不由这次代码维护代替。当前 Goal 不查询或等待 PR CI。

English verdict: APPROVE - exact head 8859e09. Behavior-preserving presentation move and typed readback deduplication restore unchanged budgets; six existing fixtures follow canonical fresh/registered routes. 210 focused tests, real Codex app-server readback, repaired smokes, semantic/static/boundary checks and 19 risk checks pass. Original fleet/model failures remain disclosed; final merged-source release qualification is still required.

…cation-repairs

Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
…cation-repairs

Signed-off-by: huangruiteng <huangrt01@163.com>

# Conflicts:
#	loopx/cli_commands/turn.py
Signed-off-by: huangruiteng <huangrt01@163.com>
…cation-repairs

Signed-off-by: huangruiteng <huangrt01@163.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; GPT-6; OpenAI; runtime_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Reviewed exact head: 82727c1169f865d259602cc5be8ea6097252a16a; base: 295c3988d0460a902dd68286c7648e43fed9e628.

动机

恢复 v1.2.4 发布时,完整候选验证发现顶层模块数148超过既有147上限,以及六个 smoke 的目录、运行时钩子和文档标题落后于当前契约。该 PR 消除可复现的发布阻断,不提高预算、不自动迁移用户状态,也不把局部修复称为完整 release 达标。主线 #5380 已提供 Turn 专属 owner,原先重叠的 Turn 改动已全部移除。

审阅依据为 docs/product/migrations/local-state-path-migration.md,固定在 295c3988d0460a902dd68286c7648e43fed9e628。文档没有编号,以下用要求名称标识:Fresh-install-routes 已实现,由 fresh-clone 和真实 HTTP 新 Goal 用例核验新 .loopx 路径及现有路由保留;Registered-state-preservation 已实现,由已登记 state_file 回读、force-bootstrap 和实际同文件重复反例验证。离线迁移的复制、回滚实现不在本维护差异中,没有修改规范来迎合实现。

改动思路

把 Codex 原生 item 的人类可见步骤投影放回现有 presentation 显示层。类实现逐字节相同,仅调整生产与测试 import;没有新增 decision owner、字段、状态或兼容 shim。bootstrap 与 registry 继续决定实际 state_file,smoke 消费既有结果,而不按另一个旧 Goal 的目录推断新 Goal 路径。新性能诊断命令在已有 maintainer 帮助组和生成 manpage 中列出,它仍需显式调用,不变成 recurring agent 决策入口。

正向旅程为原生 command item → running/completed 显示步骤 → 原 session store/reopen replay,以及真实 HTTP 创建 Goal → canonical bootstrap → 登记路径回读。反向旅程保留私有字段脱敏、两个 runtime root 的歧义拒绝和两个 Goal 指向同一个真实 state_file 的拒绝,未删除生产 guard 或反例。

具体改动

关键代码讲解

  • CodexActivitySteps 位于 loopx/presentation/codex_activity.py,实现 blob 与原顶层文件完全一致。chat_agent.py 和 test_chat_activity.py 的两个 import 随迁;presentation README 说明其显示与权限边界。结构预算回到147,事件、脱敏、错误和 replay 字节不变。
  • assert_http_action_api 读取新建 Goal 的 registry state_file,验证 fresh .loopx;原已有 Goal 仍验证其旧路径。fresh-clone-quickstart 与 bootstrap-force-preserve-todos 使用实际 bootstrap 结果,后者仅 resolve macOS 路径别名,不吞掉不同目录。
  • exercise_route_edges 通过当前 paths.DEFAULT_RUNTIME_ROOT owner 设置竞争 root 并恢复;多 Goal fixture 修改实际已登记主 Goal 的 state_file。两者继续要求 route_ambiguous / duplicate-state 拒绝。diagram 用例检查当前正式章节标题。
  • COMMAND_GROUPS 和 man/loopx.1 复用 renderer,补充既有 performance-diagnosis 的显式 plan/inspect 帮助说明。没有新增命令、改变分类预算或默认开关。完整差异12路径,26增加/10删除及100%文件移动。

语义与 CI 对齐

diff advisory 中的显示 vocabulary 继续复用相同闭集和 frontend mirror,完整语义检查保持原 owner;无新增共享协议、关键词分类或机器义务。按 Goal 策略不查询或等待 PR CI,采用精确本地验证与远端 head/thread readback。

对主干的风险

风险主要是漏掉 import 消费者或用例修正掩盖真实状态路由问题。当前 head 的 Chat、CLI 输出预算、性能诊断和顶层预算66项测试通过,真实 subprocess、文件持久化和 reopen replay 均包含在内;import-boundary、六个修复 smoke、fresh-home prompt 反例和帮助/manpage检查通过。原始 display blob 相同,因此此前真实只读 Codex app-server running/completed/READY 观察可作为不变边界的补充证据,明确不改记为新 head 的模型执行。Ruff零违规、mypy19文件通过,diff与公开边界清洁,native risk checks 全通过,无 manual hold。无 PostgreSQL provider、首屏、配置 editor 或产品 UI 变更;无需额外 companion UI。

原完整 sweep 执行516项并有10失败,历史结果保留,不改称成功。初次帮助分组触发 recurring-output 分类断言,已按维护用途移到 maintainer 组并重新通过,严格上限未动。完整发布验证将对最终实际 merged SHA 重新执行;本 PR 不解决也不认证此前失败的 API intake 模型 profile。

我的整体评价

APPROVE。该差异是可回退的内部显示归位、既有 fixture 修正与命令文档维护。邻近小重构采用既有 presentation owner;Turn 重构已由主线提供并从此 PR 撤掉,避免重复权威或叠加实现。现有运行时状态、配额、权限、用户路径和默认行为全部保持,可在未变 head 的 native readiness 返回 ready 后按已授权发布流程合入。Tag、PyPI、桌面发布及 stable 仍须完整最终源码资格通过后进行。

English verdict: APPROVE - exact head 82727c1. Byte-identical presentation move, six canonical-route fixture corrections and existing command documentation preserve runtime behavior and strict budgets. Current focused tests, real HTTP/replay smokes, static/semantic/boundary and risk checks pass. Final merged-source qualification remains required; prior model/fleet failures remain disclosed.

@huangruiteng
huangruiteng merged commit edb78b9 into main Oct 2, 2026
3 checks passed
@huangruiteng
huangruiteng deleted the codex/release-qualification-repairs branch October 2, 2026 12:35
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