Skip to content

fix: stop status line before dry-run output corruption#273

Merged
cboone merged 3 commits intomainfrom
feature/improve-image-names
Feb 12, 2026
Merged

fix: stop status line before dry-run output corruption#273
cboone merged 3 commits intomainfrom
feature/improve-image-names

Conversation

@cboone
Copy link
Owner

@cboone cboone commented Feb 12, 2026

Summary

  • Stop the global status line before output.DryRun() writes to stdout to prevent spinner frame interleaving with dry-run logs.
  • Add a regression test that reproduces the scanner flow and verifies the status line is inactive after a dry-run message.
  • Keep behavior aligned with existing scanner findings flow that already stops the status line before direct output.

Testing

  • go test ./internal/output -count=1
  • go test ./... -count=1

DryRun() wrote directly to stdout via the logger while the bubbletea
status line was still rendering inline spinner frames to the same fd.
This caused output interleaving where the status line animation
concatenated with dry-run messages (e.g. the image name appearing
joined with a scanner path fragment).

Stop the global status line in DryRun() before writing, matching the
pattern already used by reviewFindings() in the scanner flow.
Copilot AI review requested due to automatic review settings February 12, 2026 04:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Stops the global Bubble Tea status line before emitting dry-run output to stdout, preventing spinner frames from interleaving with [dry-run] log lines in default TTY mode.

Changes:

  • Call stopStatusLine() inside output.DryRun() before logging to stdout.
  • Add a regression test that simulates the scanner/status-line flow and asserts the status line is stopped after DryRun().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
internal/output/output.go Ensures the global status line is stopped before DryRun() writes to stdout.
internal/output/statusline_test.go Adds a regression test covering the status-line + dry-run interaction.

… line test

- Remove unnecessary time.Sleep calls in TestDryRunStopsStatusLine since
  both startStatusLine() and stopStatusLine() are synchronous
- Add stopStatusLine() to test cleanup to prevent goroutine leaks if an
  assertion fails before DryRun() runs
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@cboone cboone merged commit 31d0329 into main Feb 12, 2026
11 checks passed
@cboone cboone deleted the feature/improve-image-names branch February 12, 2026 14:23
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