fix(streaming): defer round log serialization - #40
Conversation
Agent PR reviewValidationValidation passed: SummaryPR #40 defers Issues and risksNo blocking correctness, security, performance, or maintainability issues found in the changed files. Review evidence:
Test coverageThe PR updates integration coverage for:
Remaining gap: there is no explicit end-to-end assertion that a submitted vote after a streamed round writes The review context reports that RecommendationLooks safe to continue review. This is an automated review. Please treat it as advisory; human review is still required. |
Summary
Root cause
Every streaming delta serialized all panel histories, which made log bookkeeping grow with accumulated response length. The resulting repeated full-history work was quadratic over a generation.
Impact
Streaming updates now retain incremental response state without repeatedly copying every panel's history. Vote persistence and final generation state retain their complete serialized histories.
Validation
py -3.13 -m pytestpy -3.13 -m ruff format --check arena/app.py tests/integration/test_generation_flow.pypy -3.13 -m ruff check arena/app.py tests/integration/test_generation_flow.py