Skip to content

refactor(modular-cmds): introduce mcms cmds#727

Merged
ajaskolski merged 6 commits intomainfrom
refactor-mcms-modular-cmds
Feb 13, 2026
Merged

refactor(modular-cmds): introduce mcms cmds#727
ajaskolski merged 6 commits intomainfrom
refactor-mcms-modular-cmds

Conversation

@ajaskolski
Copy link
Contributor

@ajaskolski ajaskolski commented Feb 12, 2026

MCMS Commands Migration

Migrated to Modular Commands (engine/cld/commands/mcms/)

The following commands have been fully migrated to the new modular architecture:

Command Description
analyze-proposal Analyzes MCMS proposals
convert-upf Converts proposals to Universal Proposal Format
execute-fork Executes proposals on forked environments (Anvil)
error-decode-evm Decodes EVM transaction errors

These commands are delegated from the legacy mcmsv2 for backward compatibility.

All deprecated code is removed.
Code is now split into several files for better readibility.

https://smartcontract-it.atlassian.net/browse/CLD-1159

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

⚠️ No Changeset found

Latest commit: c5e702d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ajaskolski ajaskolski force-pushed the refactor-mcms-modular-cmds branch 3 times, most recently from df93eeb to 1c32ebc Compare February 12, 2026 11:59
@ajaskolski ajaskolski force-pushed the refactor-mcms-modular-cmds branch from f710efa to e32b344 Compare February 12, 2026 18:33
@ajaskolski ajaskolski force-pushed the refactor-mcms-modular-cmds branch from e32b344 to 15a7148 Compare February 12, 2026 18:48
Copy link
Contributor

@ecPablo ecPablo left a comment

Choose a reason for hiding this comment

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

Looks good! Added a couple comments but nothing too big

@@ -0,0 +1,400 @@
package mcms
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if this file is still needed? I think most of these are already on mcms-tools, maybe we can take the opportunity to remove them as it has been several months already since we've added the deprecation warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm yea this is used in fork command, I would like to avoid changing this in this PR but valid point to switch the logic for mcms tools. I will create ticket for it.

@ajaskolski ajaskolski requested a review from ecPablo February 13, 2026 08:41
@ajaskolski ajaskolski marked this pull request as ready for review February 13, 2026 08:41
@ajaskolski ajaskolski requested a review from a team as a code owner February 13, 2026 08:41
Copilot AI review requested due to automatic review settings February 13, 2026 08:41
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

This PR refactors legacy MCMS commands by migrating them to a modular architecture in engine/cld/commands/mcms/, while maintaining backward compatibility through the legacy mcmsv2 package. The refactored commands include analyze-proposal, convert-upf, execute-fork, and error-decode-evm, with all deprecated code removed and functionality split across multiple files for improved maintainability.

Changes:

  • Migrated four MCMS commands to modular architecture in engine/cld/commands/mcms/
  • Removed deprecated execution commands (now in mcms-tools)
  • Created backward compatibility layer in legacy package
  • Split implementation across multiple focused files

Reviewed changes

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

Show a summary per file
File Description
engine/cld/legacy/cli/mcmsv2/retry.go Removed deprecated retry logic
engine/cld/legacy/cli/mcmsv2/mocks_test.go Removed test mocks
engine/cld/legacy/cli/mcmsv2/mcms_v2_test.go Simplified to delegation tests only
engine/cld/legacy/cli/mcmsv2/mcms_v2.go Refactored to delegate to modular commands
engine/cld/legacy/cli/mcmsv2/helpers.go Removed deprecated helper functions
engine/cld/legacy/cli/mcmsv2/execute_fork_test.go Moved to engine/cld/commands/mcms/ with renamed helpers
engine/cld/legacy/cli/mcmsv2/execute_fork.go Moved to engine/cld/commands/mcms/ with modular structure
engine/cld/legacy/cli/mcmsv2/err_decode_helpers_test.go Removed legacy error decoding tests
engine/cld/legacy/cli/mcmsv2/err_decode_helpers.go Removed legacy error decoding implementation
engine/cld/commands/mcms/types.go Added forkConfig type definition
engine/cld/commands/mcms/proposal_config.go Added proposal configuration loading logic
engine/cld/commands/mcms/operations.go Added proposal execution operations
engine/cld/commands/mcms/execute_fork_test.go Added tests for execute-fork command
engine/cld/commands/mcms/error_diagnosis.go Added error diagnosis utilities
engine/cld/commands/mcms/err_decode_helpers.go Added error decoding implementation
engine/cld/commands/mcms/deps.go Added dependency injection structure
engine/cld/commands/mcms/command_test.go Added command structure tests
engine/cld/commands/mcms/command.go Added main command builder
engine/cld/commands/mcms/cmd_error_decode.go Added error-decode-evm command
engine/cld/commands/mcms/cmd_convert_upf.go Added convert-upf command
engine/cld/commands/mcms/cmd_analyze_proposal.go Added analyze-proposal command
engine/cld/commands/mcms/chain_helpers_ton.go Added TON-specific helpers
engine/cld/commands/mcms/chain_helpers_sui.go Added Sui-specific helpers
engine/cld/commands/mcms/chain_helpers_aptos.go Added Aptos-specific helpers
engine/cld/commands/mcms/chain_helpers.go Added multi-chain support helpers
engine/cld/commands/flags/flags.go Added MCMS-specific flag helpers
engine/cld/commands/commands.go Added MCMS command integration

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

@graham-chainlink
Copy link
Collaborator

Looks like tests is failing, race detected?

@ajaskolski
Copy link
Contributor Author

Looks like tests is failing, race detected?

Yea, seems find mutated the flag, isolated.

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
27.3% Coverage on New Code (required ≥ 80%)
2 New Critical Issues (required ≤ 0)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube IDE SonarQube IDE

@ajaskolski ajaskolski added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit e130c59 Feb 13, 2026
20 of 21 checks passed
@ajaskolski ajaskolski deleted the refactor-mcms-modular-cmds branch February 13, 2026 13:15
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.

4 participants