test: 修正并行完成顺序断言 - #32
Merged
Merged
Conversation
This was referenced Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联:#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-b、read-a,导致 Linux CI 失败。修复的测试契约
tool_execution_end事件反映真实 completion order,因此可以是 b-before-a;ToolBatchResult.results必须稳定保持原始 ToolCall order;精确身份
fc85729b6bd10c84710ed4bb7686fc48158ae002e3cf13ed825809ee9225f93a1891525fc6ab4e6eb84a9d1a92cf9dbe5bc4578090dc6e1d2331b87b路径仅为:
tests/test_cli.pytests/test_tool_runtime.py验证
Windows:
官方
python:3.11-slimLinux:此外,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
33513019062exposed an incorrect test assumption: parallel completion events are allowed to arrive in completion order, while the model-visibleToolBatchResult.resultsmust 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, heade3cf13ed825809ee9225f93a1891525fc6ab4e6e, one commit, two files, 34 additions / 10 deletions, stable patch-idb84a9d1a92cf9dbe5bc4578090dc6e1d2331b87b.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.