Skip to content

Exercise the complete C1 CLI settlement plan in regression tests - #8994

Merged
huangruiteng merged 1 commit into
mainfrom
codex/c1-settlement-cli-fixtures-20261118t053948
Nov 18, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/c1-settlement-cli-fixtures-20261118t053948

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

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

Criterion Disposition Evidence
Use the actual complete source through the current CLI Implemented Both guard requests return v1 and the same v2 settlement plan in three runtime profiles
Preserve the original effect, rejection and replay Implemented Independent writeback/debit counts, receipt identities and rejection cases
Retain historical signature coverage Implemented Existing malformed, changed and unbound v0 controls continue to pass

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 a326653951f9328b0f9de25290fbfecd971200df using public synthetic fixtures and the real CLI.

Check kind Result Evidence
Regression parity Passed Prior main produced 3 v0 assertion failures and 48 passes. The two test modules now pass all 51 cases on the final head.
Real entrypoint Passed Default and alias use identical plans. Premature spend, surface-only work and an advanced result labeled as an outcome gap cannot debit. The generated command and replay commit one original writeback and debit.
Recovery Passed On identical changed test bytes before the unrelated Lark rebase, 19 selected cases passed, including eight existing File/SQLite interrupted-spend and context-off checks.
Static and premerge Passed checks, held gate Changed-module Ruff, configured mypy, bilingual diff, public-boundary scan and five direct quick premerge checks pass. The change-quality receipt retains the repository-wide lint hold.
Repository-wide Ruff Failed The same F811 occurs on the exact base and head in the unchanged steward fixture. The targeted file in the existing #8988 candidate passes Ruff. Repository-wide validation remains held until the fix lands.

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.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent 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.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 huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@huangruiteng
huangruiteng merged commit 2f20175 into main Nov 18, 2026
20 of 25 checks passed
@huangruiteng
huangruiteng deleted the codex/c1-settlement-cli-fixtures-20261118t053948 branch November 18, 2026 08:48
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.

2 participants