You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[deep-report] Add io.Writer parameter to renderLogs* formatters in pkg/cli/ (kill captureOutput OS-swap) #47343
The six core renderLogs* formatters in pkg/cli/ (renderLogsTSV, renderLogsTSVVerbose, renderLogsCompact, renderLogsCompactVerbose, renderLogsJSON, renderLogsConsole) write directly to os.Stdout with no io.Writer parameter. Tests work around this via a captureOutput helper that swaps os.Stdout at the OS level and is annotated as unsafe for t.Parallel(). The correct pattern already exists in audit_cross_run_render.go (renderCrossRunReportMarkdownToWriter(w io.Writer, ...)) — extend it to the log formatters.
Expected Impact
Eliminates the captureOutput OS-pipe mutex, enables t.Parallel() across 5 formatter test files, allows callers to redirect output (cmd.OutOrStdout()), and aligns the log-rendering subsystem with the existing ...ToWriter convention. ~167 hardcoded os.Stdout refs in the package, concentrated in logs_format_compact.go (39) and logs_format_tsv.go (12).
Suggested Agent
Repository Quality Improvement / Code Simplifier, or a Copilot SWE Agent PR.
Estimated Effort
Medium (1-4 hours)
Data Source
DeepReport 2026-07-22 analysis of Repository Quality report #47310.
Generated by 🔬 Deep Report · age00 213.6 AIC · ⌖ 11 AIC · ⊞ 10.3K · ◷
Activity
github-actions commentedon Jul 22, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪