Repository navigation
perf(acp): coalesce streamed assistant text snapshots - #19502
Exotic209093 wants to merge 2 commits into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes production ACP streaming behavior by buffering and coalescing root and subagent text across multiple lifecycle paths, adding substantial state and teardown logic. An unresolved High-severity finding also identifies a scenario where resumed child-message text can be projected incompletely. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
Note Written by Thanks for the ACP streaming work. Under Read this first, right now we are only taking focused bug fixes from outside contributors; this 740-line performance and maintenance rewrite lacks a real-path before/after measurement: https://github.com/pingdotgg/t3code/blob/main/CONTRIBUTING.md#read-this-first. Please preserve the performance problem in an Ideas discussion or return with a smaller bug-fix PR and real-path evidence. |
ACP agents emitted complete accumulated assistant and reasoning text on every token chunk. A burst of 200 assistant chunks produced 201 full text snapshots before considering the corresponding message and node events.
Route ACP root and child text through the existing scoped coalescer, shared through provider-core so the adapter package can use it. Token chunks flush at fifty-millisecond intervals; authoritative snapshots retain immediate projection. Segment changes, child completion, and carryover completion synchronously flush pending text before terminal events. Session teardown drains admitted native callbacks before flushing and closing the runtime. Event IDs, event formats, and complete final text are preserved.
Validation:
A1 -> B1 -> A2must emitA1A2before terminal flush. It fails against published commit151fa54112with suffix-onlyA2and passes with the fix; finalA1A2A3remains intact.git diff --checkpassed. Lint reports existing warnings in the server adapters/tests.Closes #19461. This covers ACP agents; #15767 covers other providers and modifies the same coalescer, so its helper changes will need to follow the shared provider-core location when rebased.
Latest CI and CodeRabbit both passed on
19b9d1c50d. The child-message review finding is fixed and its thread is resolved.Implemented with GPT-6.1-Sol through the Codex harness in T3 Code.