Skip to content

test: 修正并行完成顺序断言 - #32

Merged
Ev3rGan merged 1 commit into
mainfrom
codex/parent-1-ci-ordering-hotfix
Sep 1, 2026
Merged

test: 修正并行完成顺序断言#32
Ev3rGan merged 1 commit into
mainfrom
codex/parent-1-ci-ordering-hotfix

Conversation

@Ev3rGan

@Ev3rGan Ev3rGan commented Sep 1, 2026

Copy link
Copy Markdown
Owner

关联:#1#3(Relates to #1 and Relates to #3

背景

Parent #1 标准化 PR 合并后的 main push CI run 33513019062 提供了明确的红灯证据:tests/test_cli.py::test_mixed_batch_cli_exposes_both_modes_and_ordered_results 把 parallel Tool 的完成事件硬编码为 ToolCall 原始顺序,但实际合法完成顺序为 read-bread-a,导致 Linux CI 失败。

修复的测试契约

  • parallel tool_execution_end 事件反映真实 completion order,因此可以是 b-before-a;
  • 模型可见的 ToolBatchResult.results 必须稳定保持原始 ToolCall order;
  • 测试使用确定性 barrier 强制 b-before-a,同时分别证明上述两个事实;
  • sequential batch 的事件与结果顺序继续按调用顺序;
  • 不修改生产代码,不增加 skip/ignore,不缩窄 CI,也不掩盖并行行为。

精确身份

  • Base:fc85729b6bd10c84710ed4bb7686fc48158ae002
  • Head:e3cf13ed825809ee9225f93a1891525fc6ab4e6e
  • 1 个提交,2 个路径
  • Diffstat:34 additions / 10 deletions
  • Stable patch-id:b84a9d1a92cf9dbe5bc4578090dc6e1d2331b87b

路径仅为:

  • tests/test_cli.py
  • tests/test_tool_runtime.py

验证

Windows:

  • focused suite 连续 30 次通过
  • full pytest 两次:334 passed,1 个 network-contract skip
  • Ruff lint/format、strict mypy:PASS

官方 python:3.11-slim Linux:

  • focused suite 连续 20 次通过
  • full pytest:331 passed,4 个预期 platform/network skips
  • Ruff lint/format、strict mypy:PASS

此外,build、git diff --check、Standards review 与 Issue #3/CI Spec review 均通过且 0 findings。未读取环境凭据,未调用 Provider 或 Harness。

本 PR 不自动关闭 #1#3;合并必须等待 exact head 的 GitHub Actions SUCCESS。合并后的 main SHA 还必须再次通过 push CI,之后才能恢复被冻结的仓库配置阶段。


English appendix

Relates to #1 and Relates to #3. Main push CI run 33513019062 exposed an incorrect test assumption: parallel completion events are allowed to arrive in completion order, while the model-visible ToolBatchResult.results must remain in original ToolCall order.

This test-only hotfix uses a deterministic barrier to force b-before-a and proves both contracts independently. It changes no production code, adds no skip/ignore, and does not narrow CI.

Exact identity: base fc85729b6bd10c84710ed4bb7686fc48158ae002, head e3cf13ed825809ee9225f93a1891525fc6ab4e6e, one commit, two files, 34 additions / 10 deletions, stable patch-id b84a9d1a92cf9dbe5bc4578090dc6e1d2331b87b.

The same tree passed repeated focused and full suites on Windows and the official Python 3.11 slim Linux image, plus Ruff, strict mypy, build, diff checks, and fixed-point Standards/Spec reviews. Merge is gated on successful CI for both the exact PR head and the resulting main merge SHA.

@Ev3rGan
Ev3rGan merged commit dae4237 into main Sep 1, 2026
1 check passed
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