Skip to content

test(collaboration): keep delivery fixtures on an active source Turn - #7835

Merged
huangruiteng merged 1 commit into
mainfrom
codex/peer-source-fixture-release220-20261101
Nov 1, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/peer-source-fixture-release220-20261101

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

The peer source-store fixture marked its source Turn as stopped while trying to suppress worker execution. The production handoff correctly rejected that stopped source before the existing revocation and return-path tests could exercise their intended behavior.

Keep the fixture source active and assert that no worker is submitted without an execution binding. Add a regression across File, SQLite and source-session stores proving that a stopped source cannot republish a previous delivery or mutate coordination/inbox state. Production handoff, authorization and execution rules are unchanged.

Validation: the complete module passed (90 tests), Ruff and diff hygiene passed, and the standard premerge gate passed. The premerge selector chose no additional catalog/risk smoke for this test-only diff; the full module supplies the decisive source lifecycle, revocation, adoption and result-return coverage. No benchmark run, installed qualification or final release qualification is claimed.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

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

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning effort: max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

协作维护者需要验证来源撤销、交付重放和结果返回,但公共夹具在准备阶段就拒绝了来源。

基线把仍用于交付的来源标成不可执行,86 项测试取不到回执;候选将来源有效与另行授权的 worker 启动区分开,使原有撤销和恢复断言能够运行。

候选完整模块 90 项通过;来源不再有效时仍不得重新交付或启动 worker,也不得修改协调目录中的文件。

本 PR 只修复测试前提和增加停止分支的回归保护,不修改生产授权、执行、调度或结果返回规则。

改动思路 / Approach

先判断来源仍有效,再交付材料;worker 是否启动继续由独立的 execution_binding_id 决定。这里复用了真实 handoff 和存储路径,只修正公共夹具给 host 回调的输入,没有放松生产检查。单改 False 虽能修复准备阶段,却不能防止以后误把“来源有效”理解成“可以启动 worker”,因此保留一组最小停止重放反例有实际价值。

具体改动 / Changes

审查完整 head b395f725d67b113083f0a056857f02d97b176870,实际合并基线 a098263f4fba407f4ee9c9b6f4c3b3d8bfe1c377。按变更前的 docs/development/good-smokes.md(版本 a098263f4fba407f4ee9c9b6f4c3b3d8bfe1c377)核对:Start With The Contract、Prefer Semantic Pressure、Consolidate Without Losing Coverage 均 implemented,分别对应真实边界、可反证的停止规则和复用现有夹具。

关键内容讲解

与现有 test_handoff_scope_revocation_stops_before_inbox_delivery 比较,后者用禁止调用的 mock 检查首次拒绝,没有覆盖已交付回执的跨存储重放。当前相邻 #7836 是归档关联任务的运行时修复,两者不存在应合并的重复断言;无需新增 smoke 框架或拆出另一份 fixture。

对主干的风险 / Risks

PASS:完整模块 uv run --extra test python -m pytest -q tests/control_plane/test_peer_source_store.py --tb=short 为 90 passed。相同命令在独立基线上为 86 failed / 1 passed,失败点均在旧夹具提取缺失的 context_handoff_receipt,未把这些旧失败当作候选成功。另在真实入口适配器故意忽略来源有效回调,三种存储的新反例都触发断言,证明它能发现该权限边界被绕过。

PASS:Ruff、diff hygiene、编译和 standard premerge;此测试 diff 没有选中额外 catalog/risk smoke,完整模块提供主要证据。host 授权观察仍是 synthetic fixture;不声称验证了真实模型、安装后会话或执行器。未查询、轮询或等待 CI。

我的整体评价 / Verdict

APPROVE:完成了有明确消费者的测试维修,生产长程行为和用户流程保持原样;增加的反例能保护恢复链路,并非用测试数量证明产品收益。当前无需抽取或扩大重构。完整 diff 只涉及 tests/control_plane/test_peer_source_store.py;Chat 和 App 的渲染、布局、文案与生产返回值均未修改。未验证 installed 使用、真实模型采纳或长期收益;这些不属于此测试修复的交付范围。合并仍须独立授权与当前 head 的 readiness,本文不授予 merge 权限。

English verdict: APPROVE — the fixture repair restores meaningful source-lifecycle coverage without changing production authority.

@huangruiteng
huangruiteng merged commit 639878b into main Nov 1, 2026
27 of 34 checks passed
@huangruiteng
huangruiteng deleted the codex/peer-source-fixture-release220-20261101 branch November 1, 2026 21:34
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.

2 participants