Repository navigation
fix(smoke): match the compact host-selection compatibility contract - #8867
Conversation
03ca26f to
904c725
Compare
Signed-off-by: Seyamalam <seyamalam41@gmail.com>
904c725 to
fac696b
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
动机 / Motivation
运行 bootstrap 命令包完整 smoke 的贡献者会遇到这次失败。未指定 Host 时,CLI 的 compact 选择包保留完整 choices,因此 legacy_fields_retained 和 compact_projection_default 都为 true;旧 smoke 把两者当成互斥,合法输出也会失败。完整 smoke 现在接受这组合法兼容标志,同时继续拒绝字段错误;产品输出和读写权限保持原样。本次只修复测试断言,不改变启动流程、Host 选择、默认权限或公开命令。
改动思路 / Approach
兼容字段的语义来自既有 producer 和协议,而不是这次测试自己的布尔推导。保留共享 helper 的精确字典比较,只允许调用方分别表达 compact 默认值和 legacy 保留值,便能覆盖两者同时为真的合法组合。既有调用继续采用原先推导,只有未指定 Host 的选择包显式声明 legacy=true。删除断言会减弱保护,复制整套检查则没有必要;此处局部参数足够。
具体改动 / Changes
评审提交 fac696b1f6c60de2781d42f4cc32745dcef9d8be,相对基线 d0ca48db02846be61a9b683f0efcd5c706381b66 仅一个既有 smoke 文件,+6/-1;没有产品代码改动。
关键内容讲解
assert_packet_summary_refs 在参数缺省时仍以 compact 值推导 legacy 预期;显式值只改变预期,不跳过 schema、兼容字典或 detail_refs 检查。host-selection 调用传入 true,符合真实输出同时保留完整 choices 和 compact identity gate 的状态。其他 bootstrap、guided 和 detail 组合继续由原路径检查。
独立依据为 docs/reference/protocols/codex-app-host-command-registry-v0.md,固定规范修订 d0ca48db02846be61a9b683f0efcd5c706381b66:host-selection-readonly 要求未指定 Host 的完整只读 choices;compact-detail-compatibility 要求 compact/detail 的兼容声明一致。两项均在真实 CLI 调用中验证,未改变启动授权。检查既有 producer 测试与平台命令测试,没有发现应合并的重复 smoke;作者返回的三项 PR 中,另外两项为文档链接修复。
对主干的风险 / Risks
最需要防的是修正预期时把兼容断言整体放松。完整 smoke 在基线上复现原失败,在此提交通过;另外从四种真实 CLI 响应分别变异 legacy、compact 与 removal_gate,12个错误组合全部被同一 helper 拒绝。调用前后 registry 和 Goal 来源未变,既有 host-selection 只读测试也通过。Ruff 已通过;本地 premerge 已通过并读回 exact-scope CQR 有效。未读取、轮询或等待 GitHub CI。
没有新增运行时、配置、权限或持久状态;回滚只需撤销这一测试修改。Windows 实机、已安装 Host 和完整 UI 未在本次检查,不能由本地 smoke 推定已验证。
我的整体评价 / Verdict
未发现阻塞问题。此修改关闭了可复现的测试假失败,保留了真实错误的检测能力;long_horizon 与 user_experience 均保持原运行时语义,贡献者执行既有验证时无需额外输入或确认。已检查 examples/bootstrap-command-pack-smoke.py 及其实际 CLI 输出;没有渲染页面或可视布局改动。Windows 实机、已安装 Host 和完整 UI 未在本次检查。此结论是 exact-head 代码评审,不授予合并或发布权限。
English verdict: APPROVE at fac696b; the corrected smoke matches the existing compatibility contract and retains negative sensitivity.
Goal And Delivered Outcome
main— a shipped public smoke fails deterministically.Reproduction (before, on
cac86bbad):Nightly
Full Public Smokesrun43772785063(2026-11-15, shard 0) is red on this check.After:
56402b7a4, 2026-11-11) made theguided_start_host_surface_selectionpacket's default view compact —compact_projection_default=not include_command_pack_detail— while still retaining the packet's legacy fields. It updatedtests/control_plane/test_start_goal_compact_projection.py(which now pinscompact_projection_default is Truefor this packet at:2257) but not this smoke, whose helper assumedlegacy_fields_retainedandcompact_projection_defaultare always opposites. The emitted triple{legacy_fields_retained: True, compact_projection_default: True, removal_gate: "explicit_host_shadow_parity"}is legitimate for this packet: every legacy field is retained while the gate'schoicesdefault to the compact subset (withfull_choices_detail_commandas the escape).legacy_fields_retainedexplicitly at the one call site where they coexist.main.Author Declaration
Implemented against
tests/control_plane/test_start_goal_compact_projection.py:2257atmaincac86bbad(the reviewed expectation for this packet kind), and the producer contract inloopx/bootstrap_command_pack.py:534-544.--include-command-pack-detailis the compact default viewpacket_summary.compatibility.compact_projection_default == Truepython3 examples/bootstrap-command-pack-smoke.pypacket_summary.compatibility.legacy_fields_retained == Trueassert_packet_summary_refsdefaultlegacy_fields_retained = not compact_projection_defaultmain, traced the drift to56402b7a4(code + unit test updated, smoke not), verified the emitted compatibility dict for the selection packet, ran the full smoke to green after the change,git diff --checkandruff checkclean. The three unrelated red smokes in the same nightly shard (blocker-push-runtime-smoke,cli-command-module-size-ownership-command-modularization-smoke,agent-scope-projection-characterization-smoke) are separate defects left out of scope.Scope And Continuation
Validation
fac696b1f6c60de2781d42f4cc32745dcef9d8be(rebased ontod0ca48db0; smoke re-verified on this head)regression_paritypassedpython3 examples/bootstrap-command-pack-smoke.pyfails oncac86bbad(assertion atassert_packet_summary_refs, packet_kindguided_start_host_surface_selection) and passes on the head (bootstrap command pack smoke passed); same failure visible in scheduled run43772785063.staticpassedruff checkon the edited file;git diff --checkclean.unitnot_runassert_packet_summary_refscall site (both packet kinds, detail and compact paths).tests/control_plane/test_start_goal_compact_projection.pyalready pins the unit contract and is unchanged.Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).python3 scripts/check_rfc_bilingual.py --base origin/main --head HEADpasses, or no paired RFC changed.none.Signed-off-bytrailer (git commit -s).