Skip to content

Print explicit dirty state in migration status - #11

Merged
intel352 merged 1 commit into
mainfrom
fix/explicit-migration-dirty-status
Apr 27, 2026
Merged

intel352 merged 1 commit into
mainfrom
fix/explicit-migration-dirty-status

Conversation

@intel352

Copy link
Copy Markdown
Contributor

Summary

  • refactor status output into a testable helper
  • always print Dirty: true/false so wfctl can fail closed on incomplete status output

Verification

  • GOWORK=off go test ./pkg/cli -count=1
  • GOWORK=off go test ./... -count=1
  • git diff --check

Copilot AI review requested due to automatic review settings April 27, 2026 18:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Refactors the migration status command output into a helper function and ensures the “Dirty” state is always printed explicitly (true/false) so downstream tooling can reliably fail closed when status output is incomplete.

Changes:

  • Extracted status rendering into a writeStatus(io.Writer, interfaces.MigrationStatus) helper.
  • Updated the status command to write via Cobra’s OutOrStdout() and always print Dirty: %t.
  • Added a unit test to assert Dirty: true/false is always present and that dirty state prints a warning.

Reviewed changes

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

File Description
pkg/cli/root.go Refactors status output into writeStatus and always prints explicit dirty state via the command’s writer.
pkg/cli/root_test.go Adds coverage to ensure status output includes Dirty: true/false and emits a warning when dirty.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@intel352
intel352 merged commit e004abc into main Apr 27, 2026
10 checks passed
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