Priority and scope
P2 — memory and response-size reliability. Follow-up to #666 and #600. Coordinate with production streaming #686, but keep streaming latency and retained-history bounds as separate acceptance criteria.
Audited commit: b435f7b9179271cbff81d3e40d14ee342cbd65dd.
Origin: owner-requested deep-dive, 2026-09-06. Expanded with the complete producer/final/history findings.
Evidence level: source inspection establishes that the replay limit does not bound all retained invocation data. The reviewer has not reproduced an out-of-memory failure or claimed that every renderer has no other internal limit.
Verified gap
The 256-render-event bound applies to one live replay buffer, not the whole invocation lifecycle:
The final envelope can therefore restore the history that replay eviction discarded. Limiting the number of completed invocations does not establish a bound on retained events or bytes inside each invocation.
Required behavior
Use one documented retention policy across producer collection, child IPC, live replay, completed invocations, history reads, final stream envelopes, and browser replay. Keep the latest/final document separately from disposable intermediate history. Preserve outcome, correlation, and an explicit truncation indication.
Address retained bytes as well as event counts. Handle oversized final documents separately and explicitly; do not silently truncate valid results or introduce an unjustified universal plugin-result limit merely to cap intermediate history.
Acceptance
Test owners
packages/agent-bundle/tests/route-invocation-service.test.ts
packages/agent-bundle/tests/route-invocation-dev-server.test.ts
packages/workbench/tests/invocation-model.test.ts
packages/workbench/tests/audiobook-curator.acceptance.e2e.test.ts
Non-goals
No durable trace database, remote telemetry, new orchestration layer, or changes to plugin business behavior. Executable selection is #680; production Flight delivery is #686.
Priority and scope
P2 — memory and response-size reliability. Follow-up to #666 and #600. Coordinate with production streaming #686, but keep streaming latency and retained-history bounds as separate acceptance criteria.
Audited commit:
b435f7b9179271cbff81d3e40d14ee342cbd65dd.Origin: owner-requested deep-dive, 2026-09-06. Expanded with the complete producer/final/history findings.
Evidence level: source inspection establishes that the replay limit does not bound all retained invocation data. The reviewer has not reproduced an out-of-memory failure or claimed that every renderer has no other internal limit.
Verified gap
The 256-render-event bound applies to one live replay buffer, not the whole invocation lifecycle:
renderCompiled()pushes render events into an array and returns that collection.events: child.events; completed history and the final stream envelope retain that result.#publishStream()only evicts live render messages.The final envelope can therefore restore the history that replay eviction discarded. Limiting the number of completed invocations does not establish a bound on retained events or bytes inside each invocation.
Required behavior
Use one documented retention policy across producer collection, child IPC, live replay, completed invocations, history reads, final stream envelopes, and browser replay. Keep the latest/final document separately from disposable intermediate history. Preserve outcome, correlation, and an explicit truncation indication.
Address retained bytes as well as event counts. Handle oversized final documents separately and explicitly; do not silently truncate valid results or introduce an unjustified universal plugin-result limit merely to cap intermediate history.
Acceptance
renderChildcallback.invocation.eventsremain bounded.Test owners
packages/agent-bundle/tests/route-invocation-service.test.tspackages/agent-bundle/tests/route-invocation-dev-server.test.tspackages/workbench/tests/invocation-model.test.tspackages/workbench/tests/audiobook-curator.acceptance.e2e.test.tsNon-goals
No durable trace database, remote telemetry, new orchestration layer, or changes to plugin business behavior. Executable selection is #680; production Flight delivery is #686.