Skip to content

fix(release): stabilize live model qualification - #5022

Merged
huangruiteng merged 1 commit into
mainfrom
codex/release-model-qualification-boundary
Sep 24, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/release-model-qualification-boundary

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

The v1.2.0 live default-model release gate exposed three failures: onboarding chose the right route but returned an extra command ID; required-vision closeout exceeded the ordinary 90-second provider wait or spent its tool budget on verbose vision drafts; and a successful CLI response without a durable run row crashed the isolated host instead of giving the agent a correctable error.

This change closes onboarding command IDs to the four existing contract keys, gives only the required-vision actor a 180-second default while other actors remain at 90 seconds, and guides the vision actor to use the live compact authoring contract and ordered writeback/settlement actions. The host now returns vision_closeout_durable_writeback_missing when no run receipt exists. Shell-level tests cover error feedback and a successful retry; a script-level test proves timeout scoping across all seven actors. No authority, model acceptance rule, or tool-call limit is relaxed.

At exact head 2a3251b6450cce6bf58eb531a76a9c17b3a7861e, 65 focused tests, Ruff, targeted mypy, the six-file public-boundary scan, change-quality verification, and all 18 premerge canaries passed. The actual-default Doubao portfolio passed 21 scenarios and 6 contrasts with zero failures or skips; its source receipt names this clean commit. The release remains held until this PR is reviewed and merged, then the merged release commit independently passes package, install, public smoke, live-model and publication checks.

@huangruiteng
huangruiteng marked this pull request as ready for review September 24, 2026 21:37

@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.

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

PR #5022 评审(exact head 665c500a39a7fd3667e60586ec987ed26434982b)

动机

这次改动针对 v1.2.0 的实际默认模型资格门禁:一次 onboarding 决策选对了路线却多报命令 ID;一次 required-vision 工具调用超过原来的 90 秒 provider 等待;无持久 run 行的成功 CLI 输出使隔离宿主抛出 IndexError。目标是让失败可诊断、可重试,同时仍按既有语义合同验收,而不是放宽入门或写入权限。就范围而言,这是有用的 release-gate 修复,但目前还不能把它等同于整个 live portfolio 已经合格。

改动思路

入口 qualify-doubao-model-behavior-live.py 将超时传给七类模型 actor;onboarding actor 的指令约束模型只复制现有四个命令键,实际判定仍归 onboarding_entry_semantic_contract 与资格校验器。required-vision 路径由模型调用隔离 shell、宿主监督真实 CLI,再从 run index 核对回执;缺行时改为有代码和修正提示的拒绝,由 shell 返回非零结果供模型调整,而不是宿主自身崩溃。正常路径仍要求语义 ACK、vision checkpoint、settlement identity 与单次 quota spend,这些条件没有放松。更小的替代方案是只提高已观测变慢的 required-vision actor 超时,其他 portfolio actor 保持原预算;当前 PR 尚未给出全局加倍的必要性。

具体改动

关键代码讲解

  • _onboarding_decision_instruction:明确 action_command_ids 为 JSON 数组,按固定四键顺序从顶层 commands 或命令包读取,拒绝额外键或命令正文;校验端原有常量与精确顺序仍是裁决者。
  • _parser:把脚本默认 provider 超时从 90 秒改成 180 秒。这个值并非只给 required-vision,而是传给 onboarding、turn、selected-todo、replan、scoped-gate、capability-repair 和 terminal-settlement 全部 actor。
  • _rows 与 dispatch_vision_closeout:不存在 index 时返回空行列表;刷新后无行则报 vision_closeout_durable_writeback_missing。有行时继续核对义务、checkpoint 和 settlement identity,避免把 CLI 输出文字误认为持久成功。
  • test_successful_cli_output_without_durable_receipt_is_correctable:用临时 fixture 和假 execute 覆盖缺行拒绝。它证明直接分派的错误码,但没有独立证明隔离 shell 收到该错误后模型能在同次工具会话中修正并完成真实回执。

对主干的风险

[P1] 超时预算扩散到整个 portfolio(scripts/qualify-doubao-model-behavior-live.py:54):证据只指向 required-vision 的一次慢调用,脚本却把七类 actor 的默认等待全部加倍。当前 catalog 有 21 个场景、每个重复两次,工具场景还可能发起多次 provider 请求;在 provider 停滞时,单次失败可额外等待 90 秒,累计 release-gate 延迟没有上界说明。请优先只给 required-vision actor 180 秒,保留其他 actor 的 90 秒默认值,并加入传参/预算回归测试;若确实需要全局 180 秒,请给出相同工作负载的时延分布、总耗时界限与恢复依据。

[P1] exact-head live 资格证据尚未闭合:PR 正文自己说明完整 portfolio 与 risk canary 仍在重跑。我的本地 114 个相关测试和 36 个 required-vision/replan 测试通过,Ruff、仓库配置的 mypy(23 文件)及四文件 public-boundary scan 也通过;但这些只证明确定性合同和宿主路径,不证明真实 Doubao 在全部场景、两次重复和对照组里稳定通过。请在此 head 附上公开安全的完整 portfolio 与 risk canary 回执摘要(场景/对照通过数、失败码、来源 commit、运行时间),不要贴原始 prompt、响应或密钥,再作最终合并判断。额外的手动两次 onboarding 与一次 vision 成功主张不能替代完整结果。

[P2] 新增缺回执测试只调用 dispatch_vision_closeout。建议加一个隔离 shell 级回归:模拟 CLI 返回成功但无 index,断言工具向模型返回非零且含该错误码,再验证后续有效写回可以完成;这会锁住“correctable”而非仅“抛出自定义异常”的承诺。现有 shell 测试覆盖其他 CLI 拒绝后的修正,不覆盖这一新分支。

我的整体评价

改动范围小,缺行拒绝仍保留真实回执与身份核对,未见新增权限旁路;它改善了诊断与恢复体验。当前阻塞不是测试数,而是整体效果和运行成本:全局超时扩大了手动 release gate 的最坏等待,且 exact-head 完整 live 证据尚待回读。配置内的 mypy 通过;我额外对两个文件强制执行全导入 mypy 时触发数千个仓库既有类型错误,不能把那次非标准命令当成此 PR 的新增失败。完成上述两个 P1 最小修复或证据说明后,应重新核对整个 PR 的四处改动和最新 head;相关的保守重构机会是让模型指令从已有命令 ID 常量派生,避免未来双处改规则,但这可在有测试保证时再做。

English verdict: REQUEST_CHANGES - head 665c500; narrow or justify the portfolio-wide 180s default and provide the complete exact-head live portfolio/risk-canary receipts. Local deterministic tests: 150 passed; configured mypy, Ruff and public-boundary scan passed.

@huangruiteng
huangruiteng force-pushed the codex/release-model-qualification-boundary branch 2 times, most recently from 21eded3 to 80d08d8 Compare September 24, 2026 22:22

@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.

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

PR #5022 复审(exact head 80d08d871a9d5923b0221f6573603a1699d28aba;对照上次已发布的 665c500a39a7fd3667e60586ec987ed26434982b 结论)

动机

本 PR 要修复 v1.2.0 手动真实模型资格门禁的三种实际失败:onboarding 虽选择正确路线却多给命令 ID,required-vision 的一次 provider 调用超过原 90 秒,以及 CLI 报成功却没有持久 run 行时隔离宿主抛出 IndexError。这些都是发布前的可用性和诊断问题;目标是让模型按既有合同完成或收到可纠正的错误,不是降低授权或语义门槛。相较上一轮评审,新 head 已处理两个代码/测试意见;整个 release gate 是否通过,仍取决于本 head 的完整真实模型证据。

改动思路

入口 scripts/qualify-doubao-model-behavior-live.py 仍构造同一套 actual-default portfolio:普通 actor 保持 90 秒默认值,只让 required-vision 使用新的 180 秒参数。doubao_model_behavior_actor.py 把四个允许的命令 ID 和 JSON 数组形式说清楚,但判定继续由现有 onboarding 语义校验负责。required-vision 路径则由隔离 shell 调用真实 CLI,宿主检查 run index、语义 ACK、vision checkpoint 和 settlement identity;缺 run 行返回非零、可重试的类型化错误。新 shell 测试验证模型收到该错误后能重新写回并只结算一次。最小替代方案(只扩大慢场景预算、补宿主错误和回归)现已基本是本 PR 的形状,没有新增权限或第二套状态权威。

具体改动

关键代码讲解

  • _onboarding_decision_instruction:固定只从 commands 或 command_pack.commands 取四个非空字符串键,按合同顺序生成 action_command_ids 数组,避免把额外可见命令误当成当前动作;正式 oracle 仍独立校验输出。
  • main 与 counted_transport:前者将 --required-vision-timeout-seconds 仅交给 replan semantic-action actor,其他六类仍使用 --timeout-seconds;后者用明确的 transport 签名记录调用数/模型后调用现有 Ark 传输,不改变 endpoint 或凭证边界。新增参数化测试覆盖默认值及显式覆盖值。
  • _rows 与 dispatch_vision_closeout:空缺 index 返回空列表,refresh 后无持久行报 vision_closeout_durable_writeback_missing;有行时仍逐项核对义务、checkpoint 与原 Turn 的结算身份。仅凭 CLI 输出文本不会形成成功回执。
  • test_successful_cli_output_without_durable_receipt_is_correctable 和 test_missing_durable_receipt_reaches_shell_and_can_be_retried:分别覆盖直接分派的缺行错误,以及隔离 shell 把第一次无回执的“成功”转成非零反馈、随后真实重试并单次 spend。连同超时接线测试,新增验证现在覆盖上轮指出的两个代码路径缺口。

对主干的风险

上轮的全局 90→180 秒扩散已修复:六类普通 actor 仍为 90 秒,只有已观测过慢的 required-vision 为 180 秒,参数化测试锁住两种传参方式。上轮缺失的 shell 级纠错路径也有回归测试;本地相关测试及 Ruff 通过。剩余 [P1] 是资格证据而非已复现代码缺陷:PR 正文仍明确写着完整 live portfolio 与 risk canary “being rerun”,而当前 head 尚无公开安全的完成回执。依据仓库的 model-behavior-qualification-v0 合同,脚本化 provider 和单独两次 onboarding、一次 vision 不能替代真实 provider 的 21 场景、42 次尝试及对照组。请在此 exact head 附上有 commit、时间、模型、场景/对照通过数、失败码的精简回执及 risk-canary 结果;不要公开原始 prompt、响应、密钥或本机路径。若重跑失败,应修复具体失败并在新 head 复审;若通过,当前代码审查的这一阻塞即可解除。当前没有取得完整真实调用证据,所以我不把本地绿色测试冒充发布资格。

我的整体评价

这是围绕真实发布障碍的一项合理、可回滚的修复:新 head 缩小了超时的影响面,隔离宿主缺回执时不再崩溃,并用 shell 重试测试证明错误反馈可操作。长期运行上普通场景的等待预算未变,用户侧能够看见可纠正的拒绝;新增的 180 秒只影响手动 required-vision 资格调用。代码仍局限于既有测试/资格边界,尚未看到默认生产权限或状态语义漂移。相关的将四个命令键从现有常量派生的去重可留给后续小重构,不应阻塞这次修复。结论是暂缓合并直到本 head 的完整 live portfolio 和 risk-canary 精简回执可核对;这是未完成证据,不是要求重复已经通过的确定性测试。

English verdict: REQUEST_CHANGES - head 80d08d8; the scoped timeout and shell retry fixes address prior code findings, but complete exact-head live portfolio and risk-canary receipts remain pending. Focused local tests and Ruff passed; no live provider run was performed by this reviewer.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng
huangruiteng force-pushed the codex/release-model-qualification-boundary branch from 80d08d8 to 2a3251b Compare September 24, 2026 22:55

@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)

PR #5022 评审,精确版本 2a3251b6450cce6bf58eb531a76a9c17b3a7861e。

动机

v1.2.0 的真实默认模型验收暴露三处问题:入门步骤多报命令 ID;必需的视觉修订在普通 90 秒 provider 等待或冗长草稿中失败;CLI 返回看似成功但没有持久 run 行时,隔离宿主抛出 IndexError。旧行为既挡住发布,也可能把未落盘的结果误读成成功。这个 PR 只修发布验收和宿主反馈,不改变产品的权限或写入裁决。

改动思路

最小可用边界是沿用已有 onboarding 四键语义合同、vision authoring contract 和真实 CLI 回执。模型仍自己读来源、写决策、执行 refresh-state 和一次 spend-slot;宿主只检验真实行与身份。将 180 秒等待限定到已证实变慢的 required-vision actor,其他六路维持 90 秒。做过“维持现状”和“全局加倍”的反向判断:前者保持红色发布门,后者放大所有故障等待;自动补决策、自动记账或加大工具预算都会弱化验收,所以未采用。

具体改动

  • _onboarding_decision_instruction 明确 action_command_ids 是按固定顺序排列的 JSON 数组,只允许现有四个非空命令键;最终判断仍由原有语义校验器负责。
  • VISION_HOST_INSTRUCTION 指向当前 authoring contract 和投影的两步 CLI 操作,要求简洁、证据关联的草稿,并在错误后修正。_rows 与 dispatch_vision_closeout 对空 run index 返回 vision_closeout_durable_writeback_missing;有行时继续核对 ACK、checkpoint 与 settlement identity。
  • 发布脚本增加 --required-vision-timeout-seconds,只向该 actor 传 180 秒,普通 actor 仍走 --timeout-seconds 的 90 秒默认;传输包装明确了类型。
  • 新测试分别证明缺回执的直接拒绝、隔离 shell 的错误反馈与随后成功重试,以及七路 actor 在默认和显式参数下的超时分流。

同一合成输入的前后对照:基线抛 IndexError,此 head 返回可恢复的错误码。该 head 的 65 项聚焦测试通过;Ruff、目标源 mypy、六文件公开边界扫描均通过;change-quality 回执有效,premerge canary 18 项通过、零失败和人工 hold。真实 Doubao 一臂组合通过 21 个场景、6 个对照,失败与跳过均为零。评审配置 wait_for_ci=false,未查询或等待 PR CI。

对主干的风险

主要风险是模型输出和延迟仍有波动。现有硬门继续要求真实来源、持久回执、同一 settlement identity 和恰好一次记账;这次通过只证明该精确 head 的完整组合,合并后的 main 仍须重新完成发布级构建、安装升级、全量检查和最终资格回读。改动没有新增持久状态、权限、调度规则或自动接受路径。原评审的全局超时 P1 已收窄,缺回执 P2 已用 shell 级负例覆盖;相邻代码没有值得再抽象的新共享规则。

我的整体评价

这一版解决了观察到的发布阻塞,并保持原有裁决边界。验证同时覆盖真实模型的成功路径和缺回执的拒绝/重试,范围与收益相称。结论:可在当前精确 head 完成 merge-readiness 后,按维护者已授权的 admin bypass 合并;合并并不等于可立即发布,release 仍取决于合并 commit 的独立验收。

English verdict: APPROVE - head 2a3251b; scoped timeout and correctable durable-receipt admission are validated by 65 focused tests, 18 canaries, and an exact-head 21-scenario/6-contrast live model portfolio with zero failures or skips.

@huangruiteng
huangruiteng merged commit c9b3c56 into main Sep 24, 2026
23 checks passed
@huangruiteng
huangruiteng deleted the codex/release-model-qualification-boundary branch September 24, 2026 23:08
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