Skip to content

feat: Canton MCMS proposal analyzer#1031

Merged
JohnChangUK merged 2 commits into
mainfrom
canton-analyzer
Jun 9, 2026
Merged

feat: Canton MCMS proposal analyzer#1031
JohnChangUK merged 2 commits into
mainfrom
canton-analyzer

Conversation

@JohnChangUK

@JohnChangUK JohnChangUK commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Desc

Canton MCMS proposal analyzer

Todos

When MCMS get's new release, change go mod to point to that release: smartcontractkit/mcms#779

@JohnChangUK JohnChangUK requested a review from stackman27 June 8, 2026 19:49
@JohnChangUK JohnChangUK requested a review from a team as a code owner June 8, 2026 19:49
Copilot AI review requested due to automatic review settings June 8, 2026 19:49
@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1802611

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Minor

Not sure what this means? Click here to learn what changesets are.

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

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

👋 JohnChangUK, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copilot AI left a comment

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.

Pull request overview

This PR adds Canton chain-family support to the experimental proposal analyzer/UPF conversion pipeline, enabling decoding and rendering of Canton MCMS transactions (including nested Daml record args) into reviewer-friendly Markdown/YAML outputs.

Changes:

  • Add a Canton analyzer (AnalyzeCantonTransaction(s)) and wire it into the family dispatch paths (report builder + UPF conversion).
  • Improve rendering of nested Canton/Daml record arguments by converting decoded map[string]any into structured fields with deterministic ordering.
  • Add end-to-end tests and a real Canton proposal fixture to validate decode + render output.

Reviewed changes

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

Show a summary per file
File Description
experimental/analyzer/utils.go Adds map[string]any handling for Canton decoded args via mapToStructField.
experimental/analyzer/canton_analyzer.go Implements Canton transaction decoding into DecodedCall.
experimental/analyzer/canton_analyzer_test.go Adds unit + pipeline tests for Canton decode/render behavior.
experimental/analyzer/report_builder.go Dispatches Canton transactions to the new analyzer.
experimental/analyzer/renderer_markdown.go Improves compact previews for StructField (now shows {key: value} hint / {} when empty).
experimental/analyzer/renderer_markdown_test.go Updates tests for the new struct compact preview behavior.
experimental/analyzer/upf/upf.go Adds Canton support in UPF batch decode + single-transaction analysis.
experimental/analyzer/upf/upf_test.go Adds an end-to-end UPF conversion test using a real Canton proposal fixture.
experimental/analyzer/upf/upf_canton_test.go Adds a focused test ensuring UPF batch decode yields decoded Canton calls.
experimental/analyzer/testdata/canton_test_proposal.json Adds a real Canton timelock proposal fixture for tests.
.changeset/canton-proposal-analyzer.md Declares a minor release for the new analyzer feature.

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

Comment thread experimental/analyzer/utils.go Outdated
Comment thread experimental/analyzer/renderer_markdown_test.go Outdated
Comment thread experimental/analyzer/renderer_markdown_test.go Outdated
Comment thread experimental/analyzer/testdata/canton_test_proposal.json
Comment thread experimental/analyzer/testdata/canton_test_proposal.json
stackman27
stackman27 previously approved these changes Jun 8, 2026
Copilot AI review requested due to automatic review settings June 8, 2026 22:21

Copilot AI left a comment

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.

Pull request overview

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

ecPablo
ecPablo previously approved these changes Jun 8, 2026

Copilot AI left a comment

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.

Pull request overview

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

@JohnChangUK JohnChangUK requested a review from ecPablo June 8, 2026 23:18
Comment thread experimental/analyzer/utils.go Outdated
Copilot AI review requested due to automatic review settings June 9, 2026 10:07

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.

Comment thread experimental/analyzer/canton_analyzer.go
@cl-sonarqube-production

Copy link
Copy Markdown

@JohnChangUK JohnChangUK requested a review from ecPablo June 9, 2026 14:44
@JohnChangUK JohnChangUK enabled auto-merge June 9, 2026 15:41
@JohnChangUK JohnChangUK added this pull request to the merge queue Jun 9, 2026
Merged via the queue into main with commit ca31efb Jun 9, 2026
29 checks passed
@JohnChangUK JohnChangUK deleted the canton-analyzer branch June 9, 2026 15:51
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