Skip to content

Fix verbose progress leaking into redirected stdout#31

Merged
karamouche merged 1 commit into
mainfrom
fix/verbose-polluting-output
Jul 10, 2026
Merged

Fix verbose progress leaking into redirected stdout#31
karamouche merged 1 commit into
mainfrom
fix/verbose-polluting-output

Conversation

@karamouche

@karamouche karamouche commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Send -v progress/spinner messages to stderr instead of stdout
  • Keeps redirected output (> output.json) as clean JSON only

Test plan

  • gladia transcribe <url> -o json -v > output.json — file is valid JSON, progress still shows in the terminal
  • go test ./pkg/client/ -run TestPollForTranscriptionResult_verboseGoesToStderr

Summary by CodeRabbit

  • Bug Fixes
    • Verbose transcription progress, completion, and error messages are now sent to the error output stream instead of standard output.
    • Prevents status messages from interfering with normal command output.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Failed to post review comments.

GitHub was unavailable or timed out while CodeRabbit was posting the review. Please request a new review later if the pull request still needs one. This happened while posting 1 inline comment. Use @coderabbitai full review to retry the review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c467be82-6422-4258-98d2-4eb4e36dfcf3

📥 Commits

Reviewing files that changed from the base of the PR and between 620e728 and fb955b9.

📒 Files selected for processing (2)
  • pkg/client/transcribe.go
  • pkg/client/transcribe_test.go
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (actions)
🧰 Additional context used
🪛 golangci-lint (2.12.2)
pkg/client/transcribe_test.go

[error] 176-176: Error return value of stdoutW.Close is not checked

(errcheck)


[error] 177-177: Error return value of stderrW.Close is not checked

(errcheck)

📝 Walkthrough

Walkthrough

Verbose transcription progress, completion, and error messages are redirected from stdout to stderr. A new test verifies stderr output during a processing-to-completed polling sequence and confirms stdout remains empty.

Changes

Transcription output routing

Layer / File(s) Summary
Route verbose output to stderr
pkg/client/transcribe.go, pkg/client/transcribe_test.go
Verbose polling messages use os.Stderr, and a new test validates progress and completion output while confirming stdout is empty.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: jqueguiner

🚥 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: verbose progress output was moved off redirected stdout.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/verbose-polluting-output

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.

@karamouche karamouche requested review from egenthon-cmd and jqueguiner and removed request for egenthon-cmd July 10, 2026 16:31
@karamouche karamouche merged commit 70a8ca9 into main Jul 10, 2026
5 checks passed
@karamouche karamouche deleted the fix/verbose-polluting-output branch July 10, 2026 17:26
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.

2 participants