Skip to content

test(control-plane): restore stale CI contracts - #5049

Merged
huangruiteng merged 5 commits into
mainfrom
codex/retired-observation-e2e-0925
Sep 25, 2026
Merged

huangruiteng merged 5 commits into
mainfrom
codex/retired-observation-e2e-0925

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Mainline CI was failing on stale validation contracts after authority-observation retirement, registry refactors, peer delivery-workspace enforcement, and recent projection changes. This PR aligns the existing checks with shipped behavior without changing runtime, permission, or authority rules.

  • Stage2c verifies that the retired observation switch is rejected in preview and execution while primary state and subsequent Todo access remain intact.
  • The project-registry I/O manifest is regenerated from the current source. It adds one compliant codec read, preserves every previous direct-I/O classification, and refreshes moved source positions.
  • Canonical lease renewal stops patching a deleted legacy helper while retaining the guard against legacy authority facts and real file/SQLite receipt checks.
  • Two-Agent acceptance recovery runs from a synthetic independent Git worktree, preserving the peer workspace rule and verifying the recorded workspace kind, replay, and quota settlement.
  • Completion replay tests both declaration copies missing before accepting the canonical digest's prepared blob as recovery input; validation does not run twice. Shared Goal alignment appends a fresh Todo event so the event log is valid, and the vision request assertion includes its existing blocked_retry field.

The stale checks were reproduced locally and in baseline CI. The changes keep the negative paths and strengthen the recovery assertion instead of disabling tests.

Validation on the rebased exact scope: 72 terminal/alignment/vision tests with the packaged Chat bundle, 9 registry architecture tests, and 2 independent-worktree acceptance recovery variants passed; Ruff, public-boundary scan (zero errors), and diff hygiene passed. Exact-scope change-quality receipt cqr_d197500a7135df5ed829 is valid. Risk-based premerge passed all six selected checks without failures, skips, or manual holds. Merge still requires an unchanged head and LoopX exact-head readiness.

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

动机

当前产品已经明确退役“提交后 authority observation”,旧 CLI 开启参数会返回 local_authority_shadow_retired。Stage2c 的同一测试却仍要求开启成功,导致主线在三种 fixture 模式下稳定失败。这项修复让持续集成重新检验真实契约,也保留“拒绝旧配置后任务仍能继续”的价值;它不改用户实际使用的运行代码。

改动思路

沿用原有 Stage2c 测试和 Caller 子进程入口,在 runtime shadow 缺席、关闭、启用三种模式下分别检查旧参数的预览与执行结果。预期是明确拒绝且主状态字节不变,随后照旧添加并读回 Todo。对照已发布的 authority observation 退役说明和现有 CLI 直接测试,最小修复是更新这一处过时断言,而不是重新开放有一致性缺陷的旧 observer,也不是删除整个场景。

具体改动

test_shadow_observable_e2e.py 将测试名改为“退役请求不影响 runtime capture”,用一个两次迭代检查无 --execute 和有 --execute 的返回值、错误码与主状态;再检查没有新建旧 observer 目录。原来要求写入并保留 snapshot、随后清理旧配置的断言被删除,因为这个功能已不可启用。原有 Todo 添加与读取仍在,因此不仅检验拒绝,还检验正常工作可继续。此次只有一个测试文件,新增 6 行、删除 12 行,无产品行为、配置格式或权限变更。

关键内容讲解

  • 三种 runtime-shadow 模式共用同一测试,分别覆盖退役参数的预览和执行路径。
  • w.primary() 比较调用前后的主状态,Todo 读回则检验拒绝之后的实际继续工作。

对主干的风险

主要风险是修测试时掩盖真正的 runtime 退化。这里没有放宽错误条件或移除 Todo 后续断言;若旧参数被意外接受、修改了主状态、创建了旧 observer,测试会失败。最新提交上 3 个针对性模式通过,另外 11 个退役 CLI/配置测试、Ruff、公开边界检查通过;精确范围质量收据 cqr_5311db6b92a2febaf056 有效,风险分级 premerge 无失败、跳过或人工 hold。完整远端 Python Tests 仍应单独作为合并门槛。相关的未来向整理已在本 PR 完成:移除过时 snapshot 期望,没有新增测试框架。

我的整体评价

在精确提交 a0c36411c5a3e2782d8f9a6538d24d74927c4c1f 上给出 APPROVE。长期维护价值是让 CI 对准当前 authority 规则,同时继续证明拒绝旧配置不会阻断任务;用户体验保持不变。现有直接退役测试和这项三模式持续执行测试各有边界,不属于重复造 smoke。合并前仍需读取此提交的远端检查与 LoopX readiness。

English verdict: APPROVE - Head a0c3641; the existing Stage2c scenario now checks terminal retired-setting rejection in preview and execution, unchanged primary state, and Todo continuation. Three targeted variants, 11 retirement tests, Ruff, public scan and premerge passed; remote CI remains a separate merge gate.

@huangruiteng huangruiteng changed the title test(control-plane): follow retired observation contract in Stage2c test(control-plane): restore authority CI after contract changes Sep 25, 2026
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng
huangruiteng force-pushed the codex/retired-observation-e2e-0925 branch from 31f4daa to 9742232 Compare September 25, 2026 11:20
@huangruiteng huangruiteng changed the title test(control-plane): restore authority CI after contract changes test(control-plane): restore stale CI contracts Sep 25, 2026

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

动机

当前主线的几组测试与已生效的产品契约不一致:退役开关仍被当作可启用功能;registry 清单遗漏合规读取且源码位置过时;租约测试补丁指向已删除函数;双 Agent 恢复夹具没有独立 worktree;结算重放、共享 Goal 事件和 vision 请求也留着过期预期。这些失配让 CI 在检验真实回归前失败。本 PR 的可验收结果是恢复这些现有检查,不声称完成管家路由或协作产品旅程。

改动思路

CLI、registry codec、canonical file/SQLite provider、peer workspace guard 和 TypeScript vision 合同继续拥有行为与状态权威。七个变更文件只修复已有测试或由源码生成的清单。负路径仍明确拒绝退役开关、非独立 peer 交付和缺失的验证声明;恢复路径仍要读回回执,不新增第二套运行规则。

具体改动

  • project_registry_io_manifest_v1.json 从 232 个站点更新为 233 个,新增 agent_page 的 decode_registry_snapshot 合规读取,并刷新源码位置;原有 direct-I/O 分类全部保留。
  • test_shadow_observable_e2e.py 检查退役配置在预览和执行时均被拒绝,主状态字节不变、旧 observer 目录不出现,随后 Todo 仍可读。
  • test_canonical_lease_renew.py 删除对不存在的 _attach_local_authority_shadow 的补丁,保留对旧 authority-facts 路径的禁止断言与真实回执测试。
  • test_acceptance_restoration.py 用合成 Git 仓库的独立链接 worktree 执行双 Agent file/SQLite 恢复,读回 delivery_workspace.workspace_kind,保留重放和 quota 结算。
  • test_reviewed_terminal_actions.py 同时移除 per-Todo 声明和按摘要保存的 prepared blob,验证两者缺失时结算投影仍失败且不会再次执行验证;恢复原 blob 后可完成。
  • test_shared_goal_alignment.py 给追加事件使用新的 Todo ID,使事件日志有效后再检验 frontier 落后;test_vision_checkpoint_runtime.py 补齐请求合同中已有的 blocked_retry: None。

关键代码讲解

agent_page 只通过现有 codec 读取注册源。验收恢复测试的 Git worktree 是合成输入,不授予新权限;产品侧独立交付要求保持原样。结算重放的两个声明文件是同一 canonical digest 的可读副本,测试现在能区分“两个副本都丢失”和“仍有合法 prepared blob”。

对主干的风险

最强反例是借“修测试”掩盖产品回归。我逐项核对:清单只有一个新增 codec 站点,没有 direct-I/O 重分类;退役开关拒绝后仍可继续 Todo;canonical lease 对旧权威路径的守卫保留;双 Agent 恢复必须在独立 worktree 中结算;声明双副本缺失时失败,恢复与 canonical digest 匹配的副本才成功。变更不碰 runtime、权限、持久化产品状态或默认值。已跑打包 Chat 的终止动作/共享对齐/vision 72 项、registry 架构 9 项、双 Agent 恢复 2 项,以及 Ruff、公开边界扫描和差异校验;公开扫描零错误。精确范围质量凭据 cqr_d197500a7135df5ed829 有效;风险分级 premerge 选中的 6 项全部通过,无失败、跳过或人工 hold。远端检查按 Goal 当前 CI 等待策略与合并就绪读回处理,不把旧提交的状态冒充本次结果。

我的整体评价

对精确提交 9742232fc25448cc58b95a6ee08ee634d62ba76e 给出 APPROVE:改动局限于一个派生清单和六个既有测试文件,保留真实 CLI、provider、事件序列与 peer 隔离的验证价值。它解除可复现的基线阻塞,不增加产品运行设施。合并前仍需远端 head 回读和 LoopX exact-head merge readiness;若头部变化,本结论失效。

English verdict: APPROVE - Head 9742232; seven stale validation surfaces now follow existing CLI, codec, canonical authority and peer-worktree contracts without runtime changes. Packaged Chat-related 72/72, registry 9/9, acceptance recovery 2/2, Ruff, public scan, diff hygiene and premerge 6/6 passed; exact-head readiness remains the merge gate.

@huangruiteng
huangruiteng merged commit 18ed2c1 into main Sep 25, 2026
19 of 21 checks passed
@huangruiteng
huangruiteng deleted the codex/retired-observation-e2e-0925 branch September 25, 2026 11:29
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