Commit 22968c8
docs: add ADR for turn-boundary message batching (#598)
* docs: add ADR for batched turn packing in ACP session/prompt
Records the structural decision extracted from RFC #580 (Turn-boundary
message batching): how N concatenated arrival events are packed into
the Vec<ContentBlock> crossing the broker → ACP boundary.
Reuses the existing per-arrival-event <sender_context> template
repeated N times rather than introducing a parallel <message index=N>
wrapper schema, with one additive `timestamp` field on SenderContext.
Closes the attribution gap surfaced independently by Triage (T1.4)
and JARVIS/FRIDAY (B1) reviews.
* docs: supersede batched-turn-packing with turn-boundary batching ADR
Replaces the standalone packing ADR with the consolidated turn-boundary
message batching ADR, which folds RFC #580 mechanism, T1.x dispositions,
and the original packing design into a single document.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs(adr): sync turn-boundary-batching ADR with PR #686 Phase 1 implementation
Updates the ADR to match decisions made during PR #686 review:
- 3-valued MessageProcessingMode (per-message / per-thread / per-lane)
replacing the earlier 2-valued (per-message / batched) design. §4.1
documents per-mode (cap, dispatcher key, idle timeout) tuple; §4.4 Phase 1
bullets reflect the unified Dispatcher::submit path; legacy "batched"
alias is rejected at config parse.
- Standalone <sender_context> Text block (commit 072010c). §3.1 / §3.3 /
§3.4 / §3.5 / §3.6 + §6.4 rule 4 now describe the split-block layout:
delimiter + transcripts + prompt + images. Transcripts move from before
the envelope to inside the arrival event (between delimiter and prompt);
images stay after prompt as in the pre-batching adapter. Empty prompt is
omitted from the block stream.
- New §6.10 — per-mode consumer idle timeout (PER_MESSAGE = 10s,
DEFAULT = 300s) with Little's-Law rationale and sweep_stale eviction.
- New §6.11 — SendError manual staging smoke matrix (the entry deferred
out of CI in PR #686's first status update).
- §6.7 batch reactions now explicitly sequential (not join_all parallel)
so reaction-list ordering across a batch matches message-ID order.
- Frontmatter: drop the self-referential "Supersedes: PR #598" line; add
"Implementation PR: #686" so the ADR points at the wiring it documents.
* docs(adr): fact-check and tighten turn-boundary-batching ADR vs PR #686 head
Five rounds of fact-check + proofread against PR #686
(feature/turn-boundary-batching-v2 @ e119abf) caught two threads of drift:
- Design contract: §2.5 SendError handler now matches commit afd6fff —
proactive consumer.is_finished() check at submit head + transparent
retry once on SendError; ❌ + 1 parent 4f050e5 commit 22968c8
1 file changed
Lines changed: 1068 additions & 0 deletions
0 commit comments