## 背景 #2824 把 `test/workflow-node-daemon.test.ts` 里 `second-review-pass` 与 §15.4 两个 describe 的固定睡眠统一换成了 `eventually(() => vi.waitFor(assertion,{timeout:10s,interval:10ms}))`,但**第一个 describe「workflow node daemon wiring」里还有两处内联 `await new Promise(r=>setTimeout(r,10))`** 没扫到: - 约 :211「registration and the handoff turn's idle notify the main bot; a submitted handoff stays quiet」 - 约 :224「P3-8: only the handoff's own turn can stall it; a later turn starting reports the bot active again」 两处都是同步触发 `onRegistered/onTurnSettled/onInputCommitted` 后等 fire-and-forget `notify`(accepted/stalled/active 经 `postDaemon` 发出),再断言 `target.posted`。 ## 触发条件(Pure(pi) 探针) - 只给 `recordWorkflowHandoffRefusal` 加 300ms 延迟:32/32 绿(这两处不经该链路)。 - 同时把该用例的内存 fake `postDaemon` 拖到 250ms:**2 条红**(`expected [] to equal ['accepted','stalled']` / `['active','accepted']`)。 - 把同样双压施加到上游 b9794198 本身(不含任何其它 PR):**同样 2 条红**——确认是 #2824 范围遗留,非引入回归。 fake postDaemon 是内存调用,CI 现实中很少慢到 250ms,故为低概率 P3,不阻断任何在途 PR。 ## 建议修法 与 #2824 同源、机械:两处 `setTimeout(10)` 换成 `await eventually(() => expect(target.posted.map(p=>p.body.kind)).toEqual([...]))`(eventually 已在该文件顶部定义),并补「拖慢 postDaemon 后不等待即红、等待即绿」的变异确认。 _自动评审记录,来自 #2806 双审过程(最终以维护者判断为准)。_
Activity