Why: Mutual exclusion alone does not preserve order. With parallel
execution the host cannot keep order-sensitive tools (card streaming
begin/append/commit, plan updates) correct by locking a mutex, because
whichever goroutine grabs the lock first is not necessarily the first
declared call - a real failure observed in the backend card-stream test.
Evidence: go test ./... green; TestLoopSerialToolsKeepOrder asserts the
serial calls execute in declaration order (s1->s2->s3) while parallel
calls still fan out.
Impact: New Config.SerialTools set. In parallel mode, matching calls run
sequentially on the caller goroutine in model-declared order; others
stay concurrent. Empty set keeps the previous all-parallel behavior;
sequential mode is untouched.
Refs: Dev task feature/agent-e1-parallel-fixes (F5).
weichen
merged commit c348441691 into main2026-10-10 09:01:03 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
并行执行下仅靠互斥不保序(backend 流式卡测试实测乱序)。新增 Config.SerialTools:并行模式中命中集合的调用按模型声明顺序在调用方 goroutine 逐个执行,其余并发;空集合=原全并行,sequential 模式不变。附保序回归测试(s1→s2→s3);go test ./... 全绿。
Refs: Dev 任务 feature/agent-e1-parallel-fixes(F5)。