Skip to content

fix streamed response corruption in generation logs - #39

Merged
laceyp99 merged 2 commits into
mainfrom
fix/stream-log-response-corruption
Aug 6, 2026
Merged

laceyp99 merged 2 commits into
mainfrom
fix/stream-log-response-corruption

Conversation

@laceyp99

@laceyp99 laceyp99 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep streamed delta accumulation authoritative for final_response so UI decorations cannot corrupt generation logs
  • render provider errors, interrupted-generation errors, and reasoning warnings as distinct completed status messages with metadata
  • cover partial-response failures, warnings, and concurrent background stream failures with regression tests

Closes #24

Testing

  • py -3.13 -m ruff format --check . - passed
  • py -3.13 -m ruff check . - passed
  • py -3.13 -m pytest -q - passed (113 tests)

@laceyp99
laceyp99 marked this pull request as ready for review August 6, 2026 04:16
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Agent PR review

Validation

Validation passed: python -m ruff format --check ., python -m ruff check ., and python -m pytest all completed successfully.

Summary

The PR changes streamed generation logging so final_response is accumulated only from streamed deltas, while warnings/errors are rendered as separate completed status messages. It also updates serialization and adds regression coverage for partial-response failures, unsupported reasoning warnings, and background stream failures.

Issues and risks

No blocking issues found.

I reviewed README.md, confirmed no AGENTS.md exists, read codex-review-context.md, and compared origin/pr/39 against origin/main. The changed paths in arena/app.py and arena/ui/display.py appear consistent with the stated intent: UI status messages no longer overwrite or contaminate the logged model response.

Test coverage

The PR adds focused coverage for:

  • preserving partial streamed output after an error
  • storing warning/error messages as metadata-bearing completed messages
  • preserving accumulated final_response
  • handling concurrent background stream failures

The review context reports these checks passed: python -m ruff format --check ., python -m ruff check ., and python -m pytest. I did not rerun them locally because the workspace is read-only.

Remaining non-blocking gap: there does not appear to be a browser-level Gradio smoke test proving the new gr.ChatMessage metadata renders exactly as intended after serialization/reload.

Recommendation

Looks safe to continue review.


This is an automated review. Please treat it as advisory; human review is still required.

@laceyp99
laceyp99 merged commit 765d7e4 into main Aug 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: streamed [Error] text is appended into the assistant message and corrupts final_response in generation logs

1 participant