Skip to content

Improvements to feed-state command#522

Merged
irees merged 2 commits intomainfrom
fsm-improvements
Oct 24, 2025
Merged

Improvements to feed-state command#522
irees merged 2 commits intomainfrom
fsm-improvements

Conversation

@irees
Copy link
Copy Markdown
Contributor

@irees irees commented Oct 24, 2025

No description provided.

@irees irees requested a review from Copilot October 24, 2025 04:50
Copy link
Copy Markdown
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

This PR refactors the feed-state command to improve its structure and logging. The main change is replacing the SetActiveFeedVersions method with a new CalculateSetActiveChanges method that separates the calculation of changes from their execution.

  • Replaced SetActiveFeedVersions with CalculateSetActiveChanges to calculate activation/deactivation changes without executing them
  • Restructured the command execution to run all operations within a single transaction
  • Improved logging to show planned operations before execution and moved dry-run check after operation planning

Reviewed Changes

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

File Description
internal/feedstate/manager.go Removed SetActiveFeedVersions method and added CalculateSetActiveChanges method that returns a FeedVersionChanges struct instead of directly executing changes
cmds/feed_state_cmd.go Restructured command execution to calculate all changes upfront, moved transaction wrapping to encompass entire operation, and relocated dry-run check to after operation planning

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@irees irees marked this pull request as ready for review October 24, 2025 08:46
@irees irees merged commit 39f005e into main Oct 24, 2025
6 checks passed
@irees irees deleted the fsm-improvements branch October 24, 2025 08:46
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