test(scheduler): align Codex regression with canonical state authority - #5225
Conversation
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewed exact head 5225@076ac2a44e5269eec496317a1f7ccf02693e2d3c.
动机
#5219 已明确兼容投影携带当前选中的 scheduler 权威键,避免 ACK 误写另一份状态。既有 runtime-profile 回归仍断言旧 Codex 键,造成全量 Python CI 失败;同一失败在不可变 base 上也实际复现。
改动思路
依据既有课程文档的“Compatibility preserves state authority”合同调整原测试,不从当前输出猜测新规则。保留旧 schema label 和 RRULE 的兼容表示,状态归属及 ACK 参数沿用 canonical proposal。未修改运行时、预算、状态机或任何权限。
具体改动
单个既有测试文件,5 行增加、2 行删除:测试名补充 authority,将新建 Codex profile 的状态键期待改为 canonical App 键,补充两份投影的 ACK 参数使用同一键的断言。原 schema、RRULE、间隔、reset token 和 cold-path 检查全部保留。完整 execution-context 和 compatibility-state-key 两套测试共 227 项通过,涵盖真实 native/Python CLI 的 ACK/failure、canonical/legacy/coexisting 存储与错误显式键拒绝;旧单项在 base 上失败。Ruff、diff、公开边界、精确质量及全部 4 项 native premerge 通过,零失败、无人工 hold。
对主干的风险
风险是把已有 runtime 缺陷误当旧测试而弱化验收。独立合同要求投影不改权威;现有真实入口矩阵验证合法 legacy-only 状态仍保留 legacy 键,错误显式键仍拒绝,canonical/coexisting 状态不会误写旧文件。这项测试针对新 profile 的 canonical 路径,不取消其他负向检查。生产目录与 base 完全相同,没有 timer 更新、模型调用或前端设置变更;不涉及首屏。PR 评审按配置使用本地证据,完整最终合入提交的发行 CI 仍需通过。
我的整体评价
批准当前精确 head。它修复真实 CI 阻塞并在原有回归中保持 ACK 权威检查,无新增 fixture、smoke 或抽象。相邻边界的未来改动应继续由既有 compatibility owner 和真实入口矩阵覆盖;当前无须伴随运行时重构。完整发布资格和公开产物读回由本次发行继续完成。
English verdict: APPROVE
The existing Codex runtime-profile regression still expected the legacy scheduler state key after #5219 made compatibility projections retain the selected canonical authority. The full Python CI therefore failed on an unchanged runtime contract.
Update that existing regression to expect the canonical key and assert that compatibility ACK arguments preserve the same authority. Retain the old schema labels, RRULE projection, cadence and reset-token assertions. No production code, scheduler state or host update changes.
Validation: the old assertion reproduces locally; both complete execution-context and compatibility-state-key suites pass (227 tests), including real native/Python CLI and durable canonical/legacy/coexisting state. Ruff, whitespace, boundary and exact quality pass; all four selected native premerge checks pass with no failures or manual holds. Production code is byte-identical to base.