Skip to content

Write Streaming - #11

Merged
mstdokumaci merged 2 commits into
mainfrom
write-streaming
Aug 5, 2026
Merged

mstdokumaci merged 2 commits into
mainfrom
write-streaming

Conversation

@mstdokumaci

@mstdokumaci mstdokumaci commented Aug 5, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Fixed corrupted redirected check/fix output by ensuring streaming writes append at the current output position instead of overwriting.
    • Kept output formatting consistent, including colored status/help, summaries, and error messages.
  • Tests
    • Added a compatibility test to confirm independently created streaming writers produce "aaabbb" in order.
    • Enabled the compatibility test in both standard test runs and compile-check workflows.
  • Documentation
    • Updated the [Unreleased] changelog entry with the redirected output fix.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 468208a8-1783-4f60-98c3-b580dfc0b2b1

📥 Commits

Reviewing files that changed from the base of the PR and between 8fb1e16 and 7f7e09a.

📒 Files selected for processing (1)
  • CHANGELOG.md

📝 Walkthrough

Walkthrough

This PR replaces compatibility output helpers with streaming writers, adds append-behavior coverage, wires the test into build steps, and moves zsort color and output helpers into src/zsort.zig.

Changes

Compatibility output refactor

Layer / File(s) Summary
Compat writer API and validation
src/compat.zig, src/compat_test.zig, build.zig, CHANGELOG.md
src/compat.zig adds FileWriter, stdoutWriter, and stderrWriter. The compatibility test verifies that separate writers append "aaa" and "bbb" to the same file. build.zig adds the test to test and check. The changelog records the output fix.
zsort local color and output helpers
src/zsort.zig
src/zsort.zig defines local ANSI constants and stdout/stderr helpers. Diff output, help, diagnostics, version output, fix messages, and summary output use the local helpers.

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 identifies the main change: replacing output helpers with streaming writers.
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 write-streaming

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

@mstdokumaci
mstdokumaci merged commit 1e953d1 into main Aug 5, 2026
11 checks passed
@mstdokumaci
mstdokumaci deleted the write-streaming branch August 5, 2026 13:24
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