Skip to content

[CLD-2462]: feat(deployment): new changeset output builder#1021

Open
graham-chainlink wants to merge 1 commit into
mainfrom
ggoh/cld-2462/output-builder
Open

[CLD-2462]: feat(deployment): new changeset output builder#1021
graham-chainlink wants to merge 1 commit into
mainfrom
ggoh/cld-2462/output-builder

Conversation

@graham-chainlink
Copy link
Copy Markdown
Collaborator

@graham-chainlink graham-chainlink commented Jun 3, 2026

In deployment package, implemented an changeset output builder util which simplify how users can construct changeset output which also includes mcms proposals. This was taken from CCIP tooling api and refactored to suit CLDF.

	return ccipdcs.NewOutputBuilder(env, datastore).
		WithOperationsReports(r.ExecutionReports).
		WithBatchOps(r.Output.GetPlans()).
		WithMCMSTimelockProposalInput(input).
		Build()

JIRA: https://smartcontract-it.atlassian.net/browse/CLD-2462

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 3, 2026

⚠️ No Changeset found

Latest commit: 38b6d74

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

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

Adds a fluent OutputBuilder utility to the deployment package to simplify constructing ChangesetOutput, and to optionally build an MCMS timelock proposal when batch operations are provided.

Changes:

  • Introduces OutputBuilder with chaining methods to set reports, batch operations, MCMS registry override, and timelock proposal input.
  • Implements optional per-chain batch op merging (MergeBatchOpsPerChain) and filtering of empty batch ops.
  • Adds comprehensive unit tests covering success paths and error cases (nil datastore, invalid MCMS input, registry failures, per-chain deduping, merge behavior).

Reviewed changes

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

File Description
deployment/output_builder.go Adds the OutputBuilder implementation, including batch-op filtering/merging and MCMS timelock proposal construction.
deployment/output_builder_test.go Adds unit tests validating builder behavior, error handling, and batch-op merge/filter semantics.

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

@graham-chainlink graham-chainlink force-pushed the ggoh/cld-2462/output-builder branch from 64fbc2f to 5c685ad Compare June 3, 2026 04:32
@graham-chainlink graham-chainlink marked this pull request as ready for review June 3, 2026 04:49
@graham-chainlink graham-chainlink requested a review from a team as a code owner June 3, 2026 04:49
Copilot AI review requested due to automatic review settings June 3, 2026 04:49
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

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

Comment thread deployment/output_builder.go Outdated
Comment thread deployment/output_builder.go
In deployment package, implemented an changeset output builder util which simplify how users can construct changeset output which also includes mcms proposals.

JIRA: https://smartcontract-it.atlassian.net/browse/CLD-2462
@graham-chainlink graham-chainlink force-pushed the ggoh/cld-2462/output-builder branch from 5c685ad to 38b6d74 Compare June 3, 2026 05:08
@cl-sonarqube-production
Copy link
Copy Markdown

}

proposal, err := mcms.NewTimelockProposalBuilder().
SetVersion("v1").
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just courious, why is this version hardcoded?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because i dont think there is ever a v2. From the code

Version              string                                      `json:"version" validate:"required,oneof=v1"`

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.

3 participants