review fix: pin ordinary-send batching removal

This commit is contained in:
pku-xht
2026-07-20 11:53:49 +08:00
parent 0891465ee0
commit a6e96c47f3
18 changed files with 118 additions and 94 deletions
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
2026-07-17-one-send-one-turn.md: 232e91b1d13ed07f230ffc2d0a190adafb29c6e2
2026-07-17-one-send-one-turn.zh.md: c533e0fa35a73056b2bb5ae6ca8a53e5757c55cf
2026-07-17-one-send-one-turn.md: 41c2eff49e45e649fd773f02656b799bae8dbaf1
2026-07-17-one-send-one-turn.zh.md: 69b091aca5c8aeb71b8312b8b4f888fd3742c610
@@ -1,4 +1,4 @@
# Agent Note: Give each ordinary send its own turn
# Agent Note: Remove implicit batching from ordinary sends
Status: implemented
@@ -27,6 +27,7 @@ Running `steer()` appends to the active turn's steering FIFO. Idle `steer()` del
## Verification
- Unit and property coverage pins same-stack, neighboring-microtask, differently sourced, and reentrant sends as one FIFO-ordered message per turn.
- A real-composition test pipes two lines through the built stdio binary and observes two model requests and two turn boundaries.
- A deferred first-turn flush proves the next queued turn cannot start before the checkpoint settles and that its request sees the preceding assistant result; a rejected flush still settles before the next turn starts.
- Prompt veto and listener failure, broad cancellation, disposal, and pre-commit `turn/start` failure preserve balanced recorded turns and do not merge or strand surviving queued work.
- Running and idle `steer()`, `inject()`, whole-agent status, and `whenIdle()` retain their existing coverage.
@@ -1,4 +1,4 @@
# Agent Note: 让每次普通 send 独占一个轮次
# Agent Note: 移除普通 send 的隐式批处理
Status: implemented
@@ -27,6 +27,7 @@ Status: implemented
## 验证
- 单元与性质覆盖固定了同一调用栈、相邻微任务、不同来源和重入 `send()` 的行为:每个轮次只有一条消息,并按 FIFO 排序。
- 真实组合测试会通过 stdio 构建产物同时写入两行,并观察两个模型请求和两个轮次边界。
- 延迟第一个轮次的持久化刷新可以证明下一个排队轮次不能在检查点处理结束前开始,且其请求能看到前一条助手结果;刷新即使失败,下一轮次也要等它结束后才会开始。
- 提示词否决、监听器失败、广义取消、dispose 和 `turn/start` 提交前失败都会保持已记录轮次边界平衡,不会合并消息或让仍应处理的排队工作滞留。
- 运行中与空闲时的 `steer()``inject()`、面向整个 agent 的状态和 `whenIdle()` 保持原有覆盖。