Skip to content

Migrate LocalNet to @fairmint/canton-dev-tools (ENG-1635) - #308

Merged
HardlyDifficult merged 4 commits into
mainfrom
cursor/migrate-localnet-to-dev-tools-5279
Aug 10, 2026
Merged

Migrate LocalNet to @fairmint/canton-dev-tools (ENG-1635)#308
HardlyDifficult merged 4 commits into
mainfrom
cursor/migrate-localnet-to-dev-tools-5279

Conversation

@HardlyDifficult

@HardlyDifficult HardlyDifficult commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrate OCF LocalNet replay CI to published @fairmint/canton-dev-tools@0.1.1 (npm — not a git SHA dependency).

  • Add @fairmint/canton-dev-tools@0.1.1 as a pinned devDependency
  • Rewire .github/workflows/replay-ocf-database.yml from canton-localnetcanton-dev-tools
  • Bump @fairmint/canton-node-sdk 0.0.2290.0.232 to satisfy the Dev Tools peer (>=0.0.232)
  • Keep all domain localnet-replay scripts (replay-ocf:localnet, test:localnet-traffic, scripts/localnet-replay/**) unchanged

Cache path ~/.cache/fairmint/canton-localnet is intentionally unchanged — it matches the Dev Tools CLI default.

Part of ENG-1635 hard cutover. Companion: Fairmint/canton-node-sdk#398.

Test plan

  • npm install resolves @fairmint/canton-dev-tools@0.1.1 (peer-satisfied)
  • ./node_modules/.bin/canton-dev-tools --help
  • Workflow steps invoke ./node_modules/.bin/canton-dev-tools
  • Domain replay scripts remain intact
  • npm run lint (pre-existing warnings only)

Note

Low Risk
CI and dependency wiring only; no changes to replay business logic or database access patterns.

Overview
OCF LocalNet replay CI now uses the published @fairmint/canton-dev-tools@0.1.1 CLI instead of canton-localnet for start, smoke, logs, and stop.

package.json pins @fairmint/canton-dev-tools as a devDependency and bumps @fairmint/canton-node-sdk to 0.0.232 for the dev-tools peer requirement. The replay workflow adds an Ensure LocalNet CLI step that installs those packages on the runner and asserts canton-dev-tools is executable, so replays against older target_sha commits still get the new CLI without relying on npm 11 --no-save. LocalNet asset cache paths stay on ~/.cache/fairmint/canton-localnet; domain replay scripts are unchanged.

Reviewed by Cursor Bugbot for commit fa4cec0. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Chores
    • Updated the Canton Node SDK to a newer version.
    • Added Canton development tools for local testing workflows.
    • Improved automated LocalNet setup, validation, logging, and shutdown commands.
    • Ensured workflow tooling versions remain consistent regardless of the target commit.

Add canton-dev-tools as a devDependency and point the OCF LocalNet
replay workflow at the canton-dev-tools binary. Domain replay scripts
are unchanged.

Co-authored-by: HardlyDifficult <hardlydiff@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR pins the Canton LocalNet CLI and Node SDK packages. The replay workflow replaces canton-localnet commands with canton-dev-tools commands for startup, smoke tests, logs, and shutdown.

Changes

Canton tooling

Layer / File(s) Summary
Pinned Canton toolchain
.github/workflows/replay-ocf-database.yml, package.json
The project updates @fairmint/canton-node-sdk to 0.0.232 and adds @fairmint/canton-dev-tools version 0.1.1. The workflow installs both pinned packages.
LocalNet command migration
.github/workflows/replay-ocf-database.yml
The replay workflow uses canton-dev-tools for LocalNet startup, smoke tests, log collection, and shutdown.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the migration of LocalNet to the @fairmint/canton-dev-tools package.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/migrate-localnet-to-dev-tools-5279

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​fairmint/​canton-dev-tools@​0.1.17610010091100
Addednpm/​@​fairmint/​canton-node-sdk@​0.0.2328110079100100

View full report

@fairmint/canton-dev-tools@0.1.1 requires @fairmint/canton-node-sdk
>=0.0.232 so npm install succeeds without legacy-peer-deps.

Co-authored-by: HardlyDifficult <hardlydiff@gmail.com>
@HardlyDifficult
HardlyDifficult marked this pull request as ready for review August 10, 2026 21:42
@HardlyDifficult
HardlyDifficult requested a balanced review from Copilot August 10, 2026 21:42
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c8042f68c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


- name: Start LocalNet
run: ./node_modules/.bin/canton-localnet start
run: ./node_modules/.bin/canton-dev-tools start

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Install the CLI independently of the target checkout

When target_sha points to any commit before this migration, the checkout at line 63 replaces package.json with a manifest that does not declare @fairmint/canton-dev-tools, and the subsequent npm install therefore cannot create this binary. The workflow then fails here with No such file or directory, preventing its exact-SHA replay feature from testing historical contract commits; install the pinned workflow tool separately from the checked-out target's dependencies.

Useful? React with 👍 / 👎.

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

Migrates LocalNet replay CI to the published Canton Dev Tools package.

Changes:

  • Adds pinned Dev Tools and compatible Canton SDK dependencies.
  • Replaces LocalNet lifecycle commands with canton-dev-tools.
  • Preserves existing replay scripts and cache behavior.

Reviewed changes

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

File Description
package.json Updates pinned Canton dependencies.
.github/workflows/replay-ocf-database.yml Rewires LocalNet lifecycle commands.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


- name: Start LocalNet
run: ./node_modules/.bin/canton-localnet start
run: ./node_modules/.bin/canton-dev-tools start

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.

Fixed in 59814cc — replay workflow now npm install --no-save @fairmint/canton-dev-tools@0.1.1 (+ peer SDK) after the target_sha install so historical contract commits still get the LocalNet CLI.

Comment thread .github/workflows/replay-ocf-database.yml
Co-authored-by: HardlyDifficult <hardlydiff@gmail.com>

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 59814cc. Configure here.

Comment thread .github/workflows/replay-ocf-database.yml
Co-authored-by: HardlyDifficult <hardlydiff@gmail.com>
@HardlyDifficult
HardlyDifficult merged commit 09ea1b6 into main Aug 10, 2026
5 checks passed
@HardlyDifficult
HardlyDifficult deleted the cursor/migrate-localnet-to-dev-tools-5279 branch August 10, 2026 22:07
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