Skip to content

Refactor SSE parser coordination - #1118

Merged
Kludex merged 1 commit into
mainfrom
agent/refactor-sse-parser
Aug 6, 2026
Merged

Refactor SSE parser coordination#1118
Kludex merged 1 commit into
mainfrom
agent/refactor-sse-parser

Conversation

@Kludex

@Kludex Kludex commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Rename the line-to-event decoder to _SSEEventDecoder.
  • Introduce _SSEParser to own line framing, event decoding, and pending-size coordination.
  • Simplify the synchronous and asynchronous EventSource loops to consume a single parser abstraction.

Motivation

Keep SSE parsing responsibilities encapsulated and remove duplicated orchestration from EventSource. This is a behavior-preserving internal refactor with no public API changes.

Validation

  • pytest tests/httpx2/test_sse.py -q
  • Ruff formatting and lint checks
  • mypy
  • git diff --check

Review in cubic

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

@codspeed-hq

codspeed-hq Bot commented Aug 6, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 16 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing agent/refactor-sse-parser (119476b) with main (9849196)

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@Kludex
Kludex merged commit ad141d8 into main Aug 6, 2026
17 checks passed
@Kludex
Kludex deleted the agent/refactor-sse-parser branch August 6, 2026 08:51
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.

1 participant