Migrate LocalNet to @fairmint/canton-dev-tools (ENG-1635) - #308
Conversation
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>
📝 WalkthroughWalkthroughThe PR pins the Canton LocalNet CLI and Node SDK packages. The replay workflow replaces ChangesCanton tooling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
@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>
|
@copilot review |
|
@coderabbitai review |
|
@cursor review |
|
There was a problem hiding this comment.
💡 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 |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Co-authored-by: HardlyDifficult <hardlydiff@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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.
Co-authored-by: HardlyDifficult <hardlydiff@gmail.com>

Summary
Migrate OCF LocalNet replay CI to published
@fairmint/canton-dev-tools@0.1.1(npm — not a git SHA dependency).@fairmint/canton-dev-tools@0.1.1as a pinneddevDependency.github/workflows/replay-ocf-database.ymlfromcanton-localnet→canton-dev-tools@fairmint/canton-node-sdk0.0.229→0.0.232to satisfy the Dev Tools peer (>=0.0.232)replay-ocf:localnet,test:localnet-traffic,scripts/localnet-replay/**) unchangedCache path
~/.cache/fairmint/canton-localnetis intentionally unchanged — it matches the Dev Tools CLI default.Part of ENG-1635 hard cutover. Companion: Fairmint/canton-node-sdk#398.
Test plan
npm installresolves@fairmint/canton-dev-tools@0.1.1(peer-satisfied)./node_modules/.bin/canton-dev-tools --help./node_modules/.bin/canton-dev-toolsnpm 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.1CLI instead ofcanton-localnetfor start, smoke, logs, and stop.package.jsonpins@fairmint/canton-dev-toolsas a devDependency and bumps@fairmint/canton-node-sdkto 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 assertscanton-dev-toolsis executable, so replays against oldertarget_shacommits 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