Repository navigation
Use the same C1 prepared capture for quota aliases - #9017
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, max)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
仍用旧 guard 参数的 Codex Host 在准备 C1 工作上下文时,需要能通过同一条已绑定 Todo 和 Turn 的读取路径。旧代码只在 prepared capture 路径拒绝 --turn-envelope。默认与 --complete-turn 可用,相同持久化后端和呈现方式下因此出现不一致。候选让三个入口接受同一完整契约,writer digest 与原结算身份读回一致,重复结算返回原回执。本次评审聚焦 Host 准备和 CLI 读、回写路径。正式发行的已装 Host 采用独立验证。
改动思路 / Approach
编排只移除私有 prepared 入口对旧别名的拒绝。默认 guard 和两个参数现在进入同一个 C1 决策写入器,Host 仍凭 writer digest 读同一次捕获,回写与扣额继续走已有结算 owner。只改 prepared capture 参数入口、thin guard 帮助和契约测试。实际 C1 原决策、显式 Off 和延迟呈现沿用原所有者。先在两种真实本地持久化后端上重放基线,再用独立构建的 wheel 运行同一组 CLI 读回、损坏摘要和原 Turn 重试。
具体改动 / Changes
精确 head 79bb77e240d8260ad662bcaef6fb19200fefff16,diff base 648d06db542075dc023caeeb11ea368b35ef7ab7,6 个文件 +91/-26。逐项复核 same-prepared-contract、unchanged-transport-guard、original-turn-integrity。验收约定
关键代码讲解
- 基线的四组实际 CLI 运行都在准入前拒绝 --turn-envelope,另外八条对照能生成完整决策。当前源码与独立安装的 wheel 中,三个入口都在四种 File/SQLite 和传输组合返回完整 v1 捕获。源码
- 显式 Off 保持原写入路径。native on 必须明确延迟呈现,带 socket 的组合仍在写入前被拒绝。原文件增加一个空格也会被 writer digest 拒绝,恢复原字节才能读取同一身份。源码
- Goal 配置的命令仍可查看,实际 primary action 来自原准入。验证、回写和扣额的三个原回执在重复 refresh 时逐项相同,只扣一次。源码
- 在实际 wheel 帮助中确认两个名字描述为兼容方式,并保留默认完整契约。原始契约身份和当前呈现的相等性在 checkpoint 的 File 与 SQLite 测试中同时核对。源码
对主干的风险 / Risks
重点测试 183 项通过,14 项因本机未配置原生 Codex 可执行入口跳过。扩大验证得到 358 项通过、14 项跳过和两项失败,两个失败均在相同 base 复现为 native reader 测试访问缺失的 command_template,独立实测原回执和扣额正常。标准预检 6 项直接检查、19 项选中检查通过。实际已装 App、模型效果和完整成本仍有独立验收。
语义与 CI 对齐
旧别名不应重新决定 Host 是否能进入既有完整 C1。仍以原请求身份、公开摘要和保存的原始字节核对结果,其他资格条件沿用既有 owner。
我的整体评价 / Verdict
通过本轮独立评审。基线旧别名拒绝、候选兼容、原摘要变化拒绝、原 Turn 结算重试均有实测。扩大测试的两项失败已用相同基线归因,候选交付仍限于 CLI 准备捕获和现有结算路径。
English verdict: APPROVE. The exact head passes review. All three prepared-capture spellings agree on source and isolated wheel; unsupported transport and changed bytes still fail, and the original Turn settles once.
Goal And Delivered Outcome
The C1 cutover made the default guard and its two compatibility spellings publish the same complete v1 work contract. Prepared capture still rejected
--turn-envelopeon File and SQLite, both with delivery off and with deferred native presentation.Remove that one check from prepared capture. Update the heartbeat help to describe the current default. The readiness response carries the original capture digest, and the digest-bound reader returns the original settlement identity. The authority and bounded checkpoint tests exercise the current contract and check its original receipts.
Related to the C1 contract cutover.
Author Declaration
Written by Codex (OpenAI GPT-6).
Implemented against Required Work Context at
648d06db54.Scope And Continuation
This slice covers quota readiness, the saved checkpoint reader and thin guard help. Native installed App adoption and matched single-session model outcomes and costs retain their own C1 acceptance.
Validation
Tested revision
79bb77e240d8260ad662bcaef6fb19200fefff16againstmain@648d06db54. Inputs are synthetic isolated Goal fixtures. Validation finished.Focused suite skipped 14 tests that require an explicitly configured native Codex executable. The packaged CLI proof uses a disposable wheel installation.
Frontend / Visual Evidence
CLI readiness and help text.
Type of Change
LoopX Area