Skip to content

Remove --sse-buffer flag, default to large buffer sizes - #74

Merged
christianhelle merged 5 commits into
mainfrom
default-large-sse-buffer-sizes
Jul 30, 2026
Merged

Remove --sse-buffer flag, default to large buffer sizes#74
christianhelle merged 5 commits into
mainfrom
default-large-sse-buffer-sizes

Conversation

@christianhelle

@christianhelle christianhelle commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Remove the --sse-buffer CLI flag and SseBufferMode enum. The generated SSE parser now always uses large buffer sizes (256KB lines, 1MB events) instead of defaulting to small (8KB lines, 64KB events).

Motivation

Puny (https://github.com/christianhelle/puny) was hitting the 8KB/64KB SSE buffer limit when parsing server-sent events. Rather than adding --sse-buffer large to Puny's openapi2zig invocation, the rational default for all generated clients is the large buffer.

Changes

  • Removed SseBufferMode enum, --sse-buffer arg parsing, parseSseBufferMode(), and usage text from cli.zig
  • Removed sse_buffer field from CliArgs
  • Hardcoded SSE buffer constants to 262144 (line) / 1048576 (event) in both runtime_generator.zig and api_generator.zig
  • Removed sse_buffer parameter from RuntimeGenerator.init() calls in generator.zig and lib.zig
  • Updated README.md and docs/index.html to remove --sse-buffer references

Test seams

  • Existing tests pass: zig build test
  • New test: parse generate silently ignores --sse-buffer flag documents the removal
  • Generated output compiles successfully

Summary by CodeRabbit

  • Documentation

    • Updated CLI and usage documentation to remove the --sse-buffer option.
    • Documented fixed SSE parsing limits of 256 KB per line and 1 MB per event.
  • Bug Fixes

    • SSE parsing and generated runtime code now consistently use fixed size limits.
    • The removed option no longer affects command-line argument parsing.

@christianhelle christianhelle added the enhancement New feature or request label Jul 30, 2026
@christianhelle christianhelle self-assigned this Jul 30, 2026
@christianhelle christianhelle added the enhancement New feature or request label Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@christianhelle, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0ddda803-89e7-4ab3-8ca0-96331d284ebf

📥 Commits

Reviewing files that changed from the base of the PR and between 67b1dca and 0cf1480.

📒 Files selected for processing (3)
  • README.md
  • src/generators/unified/api_generator.zig
  • src/generators/unified/runtime_generator.zig
📝 Walkthrough

Walkthrough

The --sse-buffer CLI option and SseBufferMode plumbing were removed. Generated SSE helpers now use fixed 256KB line and 1MB event limits, with corresponding generator wiring, tests, and documentation updates.

Changes

SSE buffer configuration removal

Layer / File(s) Summary
Remove SSE CLI configuration
src/cli.zig
Removes SseBufferMode, the CliArgs.sse_buffer field, explicit flag parsing, usage documentation, and adds coverage for silently ignored legacy arguments.
Simplify runtime generator wiring
src/generators/unified/runtime_generator.zig, src/lib.zig, src/generator.zig
Changes RuntimeGenerator.init and its call sites to use only the allocator, and emits fixed SSE size constants.
Fix generated output and documentation
src/generators/unified/api_generator.zig, README.md, docs/index.html
Emits fixed SSE limits and updates CLI and capability documentation; unrelated formatting changes are also included.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: removing --sse-buffer and switching generated SSE parsing to large fixed buffers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch default-large-sse-buffer-sizes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@christianhelle
christianhelle merged commit ac9e5bf into main Jul 30, 2026
20 checks passed
@christianhelle
christianhelle deleted the default-large-sse-buffer-sizes branch July 30, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant