Repository navigation
Exercise the complete C1 CLI settlement plan in regression tests - #8994
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
评审提交 a326653951f9328b0f9de25290fbfecd971200df,基线 71b66f2980e199a5a26568bf7d11ceb7a343751e。精确差异
动机 / Motivation
依赖现行 CLI 持续推进任务的人,需要知道兼容参数不会切走原来的任务记录或多扣额。基线的三个结算用例在读取默认响应时仍期待旧格式,实际已经收到 C1,因此在写回、拒绝和重放前就停止。这次更新让三个测试走到真实结算,能发现同一轮重复写回、重复扣额,以及观察结果被误算成进展。本次只更新测试,验证范围是本地实际 CLI 及隔离的 File、SQLite。正式安装端的真实模型采用、匹配结果和完整成本仍由 C1 原验收跟踪。
改动思路 / Approach
测试沿用生产 CLI 生成的结算计划。过去断言由调用方另发扣额命令,现在执行同一个 refresh-state --settle-turn --settlement-receipt,由运行时以原来的 Goal、Agent、Todo 和 Turn 身份提交。现有测试夹具和独立历史签名样例继续覆盖各自的入口。真实调用 历史样例
具体改动 / Changes
精确差异只有一个测试文件,+36/-31。以 C1 接受规范 的 71b66f2980e199a5a26568bf7d11ceb7a343751e 为依据,GitHub 文件和比较接口与本地 Git 对象一致。
默认版本与别名。用三个 CLI profile 独立执行默认、--turn-envelope、--complete-turn,都返回loopx_turn_envelope_v1和相同的 v2 计划,每组只准入一次。版本和身份断言原身份及一次结算。手工提前扣额、纯观察和标成 advanced 的 outcome_gap 均被拒绝,每次直接回读都是零写回、零扣额。有效进展写回并扣额各一次,重放返回相同的三条原回执,计数保持各一次。拒绝和重放历史签名。原有的签名变异检查和缺少历史计划的兼容检查仍运行。本地宽测基线 53 过、4 失败,候选 56 过、1 失败。三个消失的失败都可定位到先前期待 v0。历史覆盖实际采用与成本仍需按原 C1 验收继续。已复跑的是隔离的本地 File、SQLite CLI profile。所选文件的 Ruff、Git 差异检查及 quick premerge 通过。 补跑结算模块、完成后重入和支出来源后,17 passed in 205.61s (0:03:25)。
对主干的风险 / Risks
同一条仓库 Ruff 命令在基线和候选各复现一项 F811,都是未改动的 tests/test_chat_manager_model_adoption.py:416。宽测共有的一项失败是旧 fallback 用例给 quota_presentation.build_turn_envelope 打补丁时触发 AttributeError,两个修订的目标与报错相同。这两项仓库故障仍在。SSH 夹具本身用 heartbeat 试扣,会先触发来源检查。我用正确的 visible-goal 单独复验,触发的是缺少原写回的拒绝,仍为零写回、零扣额。SSH 断言
我的整体评价 / Verdict
同意这个测试增量。它恢复了真实 CLI 上的拒绝和重放覆盖,保留独立历史用例。仅改 Python 测试夹具和断言,实际 diff 没有渲染入口或布局改动。
English verdict: APPROVE. The C1 CLI paths preserve original identity and single-effect settlement. The two reproduced baseline failures remain outside this test change.
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI (self_reported)
Approval conclusion
评审提交 a326653951f9328b0f9de25290fbfecd971200df,基线 71b66f2980e199a5a26568bf7d11ceb7a343751e。精确差异
动机 / Motivation
依赖现行 CLI 持续推进任务的人,需要知道兼容参数不会切走原来的任务记录或多扣额。基线的三个结算用例在读取默认响应时仍期待旧格式,实际已经收到 C1,因此在写回、拒绝和重放前就停止。这次更新让三个测试走到真实结算,能发现同一轮重复写回、重复扣额,以及观察结果被误算成进展。本次只更新测试,验证范围是本地实际 CLI 及隔离的 File、SQLite。正式安装端的真实模型采用、匹配结果和完整成本仍由 C1 原验收跟踪。
改动思路 / Approach
测试沿用生产 CLI 生成的结算计划。过去断言由调用方另发扣额命令,现在执行同一个 refresh-state --settle-turn --settlement-receipt,由运行时以原来的 Goal、Agent、Todo 和 Turn 身份提交。现有测试夹具和独立历史签名样例继续覆盖各自的入口。真实调用 历史样例
具体改动 / Changes
精确差异只有一个测试文件,+36/-31。以 C1 接受规范 的 71b66f2980e199a5a26568bf7d11ceb7a343751e 为依据,GitHub 文件和比较接口与本地 Git 对象一致。
默认版本与别名。用三个 CLI profile 独立执行默认、--turn-envelope、--complete-turn,都返回loopx_turn_envelope_v1和相同的 v2 计划,每组只准入一次。版本和身份断言原身份及一次结算。手工提前扣额、纯观察和标成 advanced 的 outcome_gap 均被拒绝,每次直接回读都是零写回、零扣额。有效进展写回并扣额各一次,重放返回相同的三条原回执,计数保持各一次。拒绝和重放历史签名。原有的签名变异检查和缺少历史计划的兼容检查仍运行。本地宽测基线 53 过、4 失败,候选 56 过、1 失败。三个消失的失败都可定位到先前期待 v0。历史覆盖实际采用与成本仍需按原 C1 验收继续。已复跑的是隔离的本地 File、SQLite CLI profile。所选文件的 Ruff、Git 差异检查及 quick premerge 通过。 补跑结算模块、完成后重入和支出来源后,17 passed in 205.61s (0:03:25)。
对主干的风险 / Risks
同一条仓库 Ruff 命令在基线和候选各复现一项 F811,都是未改动的 tests/test_chat_manager_model_adoption.py:416。宽测共有的一项失败是旧 fallback 用例给 quota_presentation.build_turn_envelope 打补丁时触发 AttributeError,两个修订的目标与报错相同。这两项仓库故障仍在。SSH 夹具本身用 heartbeat 试扣,会先触发来源检查。我用正确的 visible-goal 单独复验,触发的是缺少原写回的拒绝,仍为零写回、零扣额。SSH 断言
我的整体评价 / Verdict
同意这个测试增量。它恢复了真实 CLI 上的拒绝和重放覆盖,保留独立历史用例。仅改 Python 测试夹具和断言,实际 diff 没有渲染入口或布局改动。
English verdict: APPROVE. The C1 CLI paths preserve original identity and single-effect settlement. The two reproduced baseline failures remain outside this test change.
Goal And Delivered Outcome
Three real CLI settlement regressions still expected the historical v0 projection. They failed at the version assertion before reaching the original refusal and replay checks on main. The tests now use the C1 plan emitted by the ordinary and compatibility-alias entries for Codex App, generic CLI and Codex SSH Goal.
The fixtures check that both entries preserve the same settlement identity, reject a premature manual spend, reject invalid progress, and settle with one writeback and one debit after replay. Historical v0 signature tests continue to check their original inputs. Related exact-head review on #8981
Author Declaration
Written by: model_agent, OpenAI GPT-6 family (Codex).
Implemented against
C1 consumer migration and original recovery at the PR base
Scope And Continuation
This proposal restores one active settlement regression that exercises three runtime profiles. Current CLI/runtime logic and frozen historical data are outside the diff. Installed adoption, remaining test consumers, and matched single-session outcomes and complete costs remain part of C1.
Validation
Tested head
a326653951f9328b0f9de25290fbfecd971200dfusing public synthetic fixtures and the real CLI.Frontend / Visual Evidence
The changed file is an existing CLI regression fixture.
Review And Merge
Please verify the original identity and independent counts through the emitted C1 plan. Integration remains subject to the current validation and maintainer decision.