Summary
PR #598 (merged) introduced docs/adr/turn-boundary-batching.md. Two precision issues were identified during review but not resolved before merge.
Issues to fix
1. §6.4 Rule 1 — adapter-layer scope clarification
Rule 1 lists "broker expanding Discord <@123> mentions to @username strings" as a prohibited transformation. However, resolve_mentions() in discord.rs performs adapter-level preprocessing (stripping bot trigger mention, replacing role mentions) before {prompt} enters the broker pipeline.
Fix: Add a caveat clarifying Rule 1 applies to the broker/dispatcher layer, not adapter-level preprocessing. Example:
Note: Adapter-level preprocessing that runs before {prompt} is constructed (e.g. resolve_mentions()) is not subject to this rule.
References: obrutjack review, masami-agent re-review
2. §6.4 Rule 8 — scope to retry-failed case only
Rule 8 says SendError must surface immediately, but §2.5 designs a retry-once path where the first SendError triggers eviction + re-send silently. Only a failed retry should emit ❌ + ⚠️ + Err.
Fix: Scope Rule 8 to the retry-failed case. Keep the residual-loss note as-is.
Reference: chaodu-agent changes requested
Additional nits (optional)
- §3.2: Mark
slack_ts_to_iso8601 as "(proposed helper)"
- Metadata "Supersedes" field: reword self-reference
- §6.6 threshold formula: clarify units (count × tokens = overhead in tokens)
Context
Closes no existing issue — this is a follow-up from PR #598 review.
Summary
PR #598 (merged) introduced
docs/adr/turn-boundary-batching.md. Two precision issues were identified during review but not resolved before merge.Issues to fix
1. §6.4 Rule 1 — adapter-layer scope clarification
Rule 1 lists "broker expanding Discord
<@123>mentions to@usernamestrings" as a prohibited transformation. However,resolve_mentions()indiscord.rsperforms adapter-level preprocessing (stripping bot trigger mention, replacing role mentions) before{prompt}enters the broker pipeline.Fix: Add a caveat clarifying Rule 1 applies to the broker/dispatcher layer, not adapter-level preprocessing. Example:
References: obrutjack review, masami-agent re-review
2. §6.4 Rule 8 — scope to retry-failed case only
Rule 8 says SendError must surface immediately, but §2.5 designs a retry-once path where the first SendError triggers eviction + re-send silently. Only a failed retry should emit ❌ +⚠️ + Err.
Fix: Scope Rule 8 to the retry-failed case. Keep the residual-loss note as-is.
Reference: chaodu-agent changes requested
Additional nits (optional)
slack_ts_to_iso8601as "(proposed helper)"Context
docs/adr/turn-boundary-batching.mdCloses no existing issue — this is a follow-up from PR #598 review.