Repository navigation
fix(auto-reply): keep verbose commentary ahead of answers - #168345
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR deduplicates flushed verbose preambles and delivers pending progress before answer previews. Example: With verbose enabled, preamble item inspect emits an update, a tool starts, and the completed snapshot repeats inspect.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this focused fix restores the existing commentary ordering contract, remains necessary on current main, and introduces no definite correctness defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherShared reply dispatch receives model item events, tool results, and partial answers, then coordinates standalone progress messages and channel-owned answer previews. flowchart TD
A[Model events] --> B[Shared reply dispatch]
B --> C[Commentary buffer]
B --> D[Tool progress]
C --> E[Reply dispatcher]
D --> E
E --> F[Channel delivery]
B --> G[Answer preview barrier]
E --> G
G --> F
Technical reviewBest possible solution: Retain the shared-dispatch repair while preserving existing verbose visibility and channel-owned commentary behavior. Do we have a high-confidence way to reproduce the issue? Current-main source permits a flushed item to re-enter the buffer and forwards previews independently of queued progress; the body also supplies targeted Test Server observations, but no target code was executed during this review. Is this the best way to solve the issue? The repair belongs in shared dispatch, reuses its delivery queue, and preserves the existing channel commentary owner rather than adding transport-specific ordering logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b04bf1bb6966. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +24, Tests +95, Docs +4. Total +123 across 4 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 10, 2026, 4:37 AM ET / 08:37 UTC. |
|
CI on
ClawSweeper reviewed this exact head: no findings; ready for maintainer review. Runtime proof and before/after timelines remain in the PR body. |
|
Maintainer override: after replaying the failed and cancelled jobs, every selected job is green except checks-ui-e2e (1/2), where the same two session-dashboard pin cases fail because |
|
Landed in 96a361a. Verbose commentary now arrives once and before the answer; Test Server before/after evidence is in the PR body. |
…68345) With /verbose on and partial streaming, durable commentary was re-buffered after a tool-boundary flush and sent twice, and queued tool summaries and commentary drained after the final answer. Flushed commentary items are now remembered so later snapshots of the same item are not resent, text-only progress is dropped once final delivery starts, and the answer preview waits for earlier progress to settle. Shared dispatch, so Telegram, Discord and Slack all benefit. Found by our Telegram Test Server bug hunt. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes repeated commentary and tool-progress messages arriving after the answer when verbose logging is enabled with streaming previews.
User Impact
Each preamble is delivered once, and pending verbose progress lands before the answer preview. Verbose-off delivery and channel-owned progress drafts keep their existing behavior. No configuration or SDK changes.
Why This Change Was Made
A completed item snapshot could re-enter the commentary buffer after its earlier snapshot had already been flushed. Meanwhile, answer previews bypass the dispatcher queue, allowing queued commentary and tool summaries to appear afterward. Remember flushed item identities for the turn and settle earlier verbose progress before forwarding the preview.
The fix is in shared reply dispatch, not the Telegram adapter. The regression covers Telegram, Discord, and Slack. Checked #116548: its explicit
NO_REPLYhandling is unchanged. Quiet channel-owned progress does not enter the new barrier.Evidence
Telegram Test Server timelines, using the same four-tool scenario:
2790eea27fbApply Patch75859 and commentary 75860 at 41.599s.The baseline source matches its built artifacts. There are no commits touching
src/auto-reply/reply/dispatch-from-config*between that baseline and the candidate's main base; #168225 only changed the Telegram progress adapter and is included in the candidate.node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.commentary.test.ts: 49.66s including compilation, 1.1s test execution, in isolated Linux Docker.gpt-5-miniTelegram turn: authored preamble 76348,Exec76349, finalVERBOSE_REAL_OK76350; two successful provider requests, no late messages.Two-way door: reverting restores the prior delivery behavior without state or configuration migration. Blast radius is standalone verbose commentary and answer-preview ordering in shared channel reply dispatch.