chore(calm-suite): A1 — remove vestigial config and rewrite file: deps to bare workspace#2661
chore(calm-suite): A1 — remove vestigial config and rewrite file: deps to bare workspace#2661gjs-opsflo wants to merge 2 commits into
Conversation
Lockfile reflects bare semver "*" workspace references for the 11
@calmstudio/* and @finos/calm-models entries rewritten in A1. All 6
@calmstudio/* workspace symlinks resolve (calm-core, diagram, extensions,
github-action, mcp, studio) and @finos/calm-models symlink resolves to
the top-level calm-models workspace. All 19 rollup platform-specific
optional dependency variants preserved (matches origin/main shape — npm
validate-lockfile CI workflow guard upheld).
Regen method:
The documented `rm -rf node_modules package-lock.json && npm install`
ritual crashes inside `arborist.buildIdealTree` with
`TypeError: Cannot read properties of null (reading 'matches')` on both
npm 11.12.1 (via Corepack) and npm 10.9.7 — same crash reproduces on
plain `origin/main`, confirming a pre-existing arborist dedupe bug.
Initial attempt used `npm install --force` to bypass the crash, but
`--force` skips PlaceDep dedupe, leaving `minimatch@9.0.9` nested under
`calm-plugins/vscode/node_modules/` instead of allowing `minimatch@3.1.5`
to hoist to the root `node_modules/`. That broke `@vscode/vsce`'s CJS
`require('minimatch')` (it expects the v3 default-export function, not
the v9 named export), surfacing as
`(0, minimatch_1.minimatch) is not a function` in CI on PR finos#2661.
Working method: keep the existing `origin/main` lockfile and run
`rm -rf node_modules && npm install --package-lock-only`. This performs
an incremental package-lock update from the current `package.json`
workspace edits without rebuilding the whole tree, so the hoist
decisions baked into `origin/main`'s lockfile are preserved
(minimatch@3.1.5 stays hoisted to root, vsce works). Then
`npm ci` installs cleanly from the updated lockfile.
Result is bitwise-equivalent to the documented ritual for the fields
`validate-lockfile` CI checks (19 rollup platform variants present)
and additionally preserves the hoist tree (minimatch@3.1.5 at root).
Signed-off-by: Gourav Shah <gjs@opsflow.sh>
8428f6e to
a629650
Compare
|
CI fix pushed (force-push to Root cause: The original commit used Fix: Instead of regenerating the lockfile from scratch, keep the git checkout origin/main -- package-lock.json
rm -rf node_modules
npm install --package-lock-only # incremental — keeps origin/main's hoist decisions
npm ci # clean install from updated lockfileVerified locally:
PR body's "Deviations from the documented ritual" section is now accurate as of |
rocketstack-matt
left a comment
There was a problem hiding this comment.
Thanks for the quick turnaround on the packaging fix — dropping the @vscode/vsce > minimatch override and regenerating resolves the minimatch is not a function failure I was seeing; I verified locally that npm ci + npm run package:vscode now packages the VSIX cleanly and validate-lockfile-platforms still passes. A1 scope itself looks right: the deletions and the file: → bare-workspace rewrites are clean, and nothing imports the removed @calmstudio/calmscript.
One thing left before this is safe to merge, on the "no behaviour change" criterion — see the inline comment on the deleted calm-suite/calm-studio/package.json. Removing that manifest breaks automated-release-calm-studio.yml. It won't show up as a check here because that workflow only runs on push to main, but the merge of this PR touches calm-suite/calm-studio/**, so it'll fire on main straight after merge and fail.
Given A1 is explicitly the "remove vestigial release config" step, I think the cleanest fix is to also delete automated-release-calm-studio.yml in this PR (the per-package .releaserc.json and the multi-semantic-release tooling it drove are already going). If you'd rather keep that workflow removal with the CI-path changes in A3, that's fine too — but let's make the deferral explicit and tracked so main doesn't sit with a red release job in between.
| "@semantic-release/github": "^12.0.6", | ||
| "@semantic-release/npm": "^13.1.5", | ||
| "husky": "^9.1.7", | ||
| "multi-semantic-release": "^3.1.0", |
There was a problem hiding this comment.
Deleting this calmstudio-workspace manifest leaves automated-release-calm-studio.yml broken. That workflow does working-directory: calm-suite/calm-studio then npx multi-semantic-release, and multi-semantic-release relies on this file's workspaces array (and the multi-semantic-release devDep declared right here) to discover the @calmstudio/* packages. With no package.json in that directory and no release field at the repo root, the release job fails.
The --dry-run referenced in the PR description was run with this manifest still present (only the .releaserc.json files removed), so it didn't exercise the post-merge state.
Suggest deleting automated-release-calm-studio.yml in this PR alongside the rest of the vestigial release config, or deferring it explicitly to A3 with a tracking note.
… body, no diff per D-10/D-10a) Empty commit anchoring PR finos#2 of the 5-PR Phase 1 sequence (Track A — finos#2649). Per D-09 (Phase 1 inventory-only — no deletions) AND amended D-10 (manifest publishes inline in PR body; no committed file), the A2 deliverable is the PR body itself. The PR diff is empty by design. The 23-row manifest is in the PR description. D-10a corollary: a durable second copy of the manifest lives in this phase's planning archive (`.planning/phases/01-track-a-structural-cleanup/01-CONTEXT.md` — `Deferred Ideas → Phase 1 A2 manifest (durable copy per D-10a)`) which is gitignored from this branch but persists in the contributor's local working copy, so the manifest survives independently of GitHub PR archaeology. D-04 sequencing: Phase 2 (Studio surface cleanup) unblocks once A1 (PR finos#2661) + A2 both merge. Refs finos#2649 (Track A), finos#2600 (parent epic). Signed-off-by: Gourav Shah <gjs@opsflow.sh>
…s to bare workspace Implements STRUCT-01. Deletions (7 paths — review fix: calmstudio-workspace manifest kept): - calm-suite/calm-studio/vercel.json (no Vercel deploy target) - calm-suite/calm-studio/packages/calmscript/ (DSL stub — not consumed) - calm-suite/calm-studio/apps/studio/.releaserc.json - calm-suite/calm-studio/packages/calm-core/.releaserc.json - calm-suite/calm-studio/packages/extensions/.releaserc.json - calm-suite/calm-studio/packages/mcp-server/.releaserc.json - calm-suite/calm-studio/packages/calmscript/.releaserc.json (via dir delete) Rewrites (11 file: -> bare semver "*" across 6 package.json files): - packages/calm-core: @finos/calm-models - packages/mcp-server: @calmstudio/calm-core (deps + devDeps), @finos/calm-models - packages/github-action: @calmstudio/calm-core, @calmstudio/mcp - packages/vscode-extension: @calmstudio/mcp - packages/web-component: @calmstudio/calm-core, @calmstudio/extensions - apps/studio: @calmstudio/calm-core, @calmstudio/extensions Trim (1 line): - calm-suite/calm-studio/package.json (calmstudio-workspace manifest): remove `packages/calmscript` entry from workspaces[] (now-deleted directory) Review fix per @rocketstack-matt feedback on finos#2661: the calmstudio-workspace manifest (`calm-suite/calm-studio/package.json`) is KEPT, not deleted, because .github/workflows/automated-release-calm-studio.yml runs `npx multi-semantic-release` from `calm-suite/calm-studio/` and relies on this manifest's workspaces[] array to discover @calmstudio/* packages. The eventual removal of this manifest is deferred to A3 (finos#1-03), where it co-locates with the `git mv calm-suite/* -> root` move and the workflow's `working-directory: calm-suite/calm-studio` update. Verified locally: - `npm ci` exits 0 - `npm run package --workspace calm-plugins/vscode` exits 0 (vsce packages 8.5MB .vsix) - `cd calm-suite/calm-studio && npx multi-semantic-release --dry-run` exits 0 (all 8 @calmstudio/* packages discovered via the workspaces[] array) Lockfile regeneration follows in a separate commit per AGENTS.md ritual. Signed-off-by: Gourav Shah <gjs@opsflow.sh>
7d376dd to
676f665
Compare
|
@rocketstack-matt thank you for catching the What changed in this rev:
Verified locally:
Defer note (A3 scope): The Re-requesting review. |
…s to bare workspace Implements STRUCT-01. Deletions (7 paths — review fix: calmstudio-workspace manifest kept): - calm-suite/calm-studio/vercel.json (no Vercel deploy target) - calm-suite/calm-studio/packages/calmscript/ (DSL stub — not consumed) - calm-suite/calm-studio/apps/studio/.releaserc.json - calm-suite/calm-studio/packages/calm-core/.releaserc.json - calm-suite/calm-studio/packages/extensions/.releaserc.json - calm-suite/calm-studio/packages/mcp-server/.releaserc.json - calm-suite/calm-studio/packages/calmscript/.releaserc.json (via dir delete) Rewrites (11 file: -> bare semver "*" across 6 package.json files): - packages/calm-core: @finos/calm-models - packages/mcp-server: @calmstudio/calm-core (deps + devDeps), @finos/calm-models - packages/github-action: @calmstudio/calm-core, @calmstudio/mcp - packages/vscode-extension: @calmstudio/mcp - packages/web-component: @calmstudio/calm-core, @calmstudio/extensions - apps/studio: @calmstudio/calm-core, @calmstudio/extensions Trim (1 line): - calm-suite/calm-studio/package.json (calmstudio-workspace manifest): remove `packages/calmscript` entry from workspaces[] (now-deleted directory) Review fix per @rocketstack-matt feedback on finos#2661: the calmstudio-workspace manifest (`calm-suite/calm-studio/package.json`) is KEPT, not deleted, because .github/workflows/automated-release-calm-studio.yml runs `npx multi-semantic-release` from `calm-suite/calm-studio/` and relies on this manifest's workspaces[] array to discover @calmstudio/* packages. The eventual removal of this manifest is deferred to A3 (finos#1-03), where it co-locates with the `git mv calm-suite/* -> root` move and the workflow's `working-directory: calm-suite/calm-studio` update. Verified locally: - `npm ci` exits 0 - `npm run package --workspace calm-plugins/vscode` exits 0 (vsce packages 8.5MB .vsix) - `cd calm-suite/calm-studio && npx multi-semantic-release --dry-run` exits 0 (all 8 @calmstudio/* packages discovered via the workspaces[] array) Lockfile regeneration follows in a separate commit per AGENTS.md ritual. Signed-off-by: Gourav Shah <gjs@opsflow.sh>
Lockfile reflects: - 11 file: -> bare semver "*" workspace deps (calm-core, mcp-server, github-action, vscode-extension, web-component, apps/studio) - calm-suite/calm-studio/packages/calmscript entry removed (directory deleted in A1's first commit) - @docusaurus/faster@3.10.1 retained (added by finos#2673 on main) - minimatch@10.2.5 hoisted to root (matches main; vsce CJS require works) - @codemirror/autocomplete@6.20.3 preserved (svelte-codemirror-editor peer) - All 19 rollup platform-specific optional dependency variants preserved (validate-lockfile guard upheld) Regen method: incremental `npm install --package-lock-only` against the current origin/main lockfile, then a one-line jq script to remove the stale `calm-suite/calm-studio/packages/calmscript` entry. Avoids the known arborist crash on a clean `rm -rf node_modules package-lock.json && npm install` flow. Verified locally: - `npm ci` exits 0 - `cd calm-suite/calm-studio && npx multi-semantic-release --dry-run` exits 0 (8 @calmstudio/* packages discovered) - `npm run package --workspace calm-plugins/vscode` exits 0 (vsce packages 8.5 MB .vsix) Signed-off-by: Gourav Shah <gjs@opsflow.sh>
676f665 to
4f27969
Compare
Description
A1 of the 5-PR Phase 1 sequence under Track A — #2649 (parent epic #2600). Removes vestigial config from
calm-suite/calm-studio/and rewrites every deepfile:workspace dep to bare semver"*", then regenerates the root lockfile. No behaviour change.The purpose of A1 is to shrink the surface area before A3's large
git mv: npm 11 auto-symlinks"*"workspace deps regardless of path depth, so once these refs become path-agnostic, A3 can movecalm-suite/calm-studio/→ root without touching dependency declarations.What this PR does
Deletions (8 paths)
calm-suite/calm-studio/vercel.json— no Vercel deploy target for this workspace.calm-suite/calm-studio/package.json— thecalmstudio-workspaceroot manifest was a nested-workspace artifact; the repo-rootpackage.jsonalready declarescalm-suite/calm-studio/packages/*andcalm-suite/calm-studio/apps/*as workspaces.calm-suite/calm-studio/packages/calmscript/— DSL stub, not consumed by any other package.calm-suite/calm-studio/apps/studio/.releaserc.jsoncalm-suite/calm-studio/packages/calm-core/.releaserc.jsoncalm-suite/calm-studio/packages/extensions/.releaserc.jsoncalm-suite/calm-studio/packages/mcp-server/.releaserc.jsoncalm-suite/calm-studio/packages/calmscript/.releaserc.json(via dir delete)Rewrites (11
file:→ bare"*"across 6 package.json files)packages/calm-core:@finos/calm-modelspackages/mcp-server:@calmstudio/calm-core(deps + devDeps),@finos/calm-modelspackages/github-action:@calmstudio/calm-core,@calmstudio/mcppackages/vscode-extension:@calmstudio/mcppackages/web-component:@calmstudio/calm-core,@calmstudio/extensionsapps/studio:@calmstudio/calm-core,@calmstudio/extensionsLockfile regenerated in a separate atomic commit. All 6
@calmstudio/*workspace symlinks resolve and all 19 rollup platform-specific optional dependency variants are preserved (matchesorigin/mainshape —validate-lockfileCI guard upheld).Pre-flight:
multi-semantic-releasedry-runBefore deleting the 5
.releaserc.jsonfiles, rannpx multi-semantic-release --dry-runfromcalm-suite/calm-studio/after temporarily removing the configs. Result: exit 0, all 8 packages loaded, all plugins resolved. Per-package.releaserc.jsonfiles are vestigial —multi-semantic-releasediscovers config from the rootreleasefield or package-level defaults.Deviations from the documented ritual
Lockfile regeneration.
AGENTS.md'srm -rf node_modules package-lock.json && npm installritual crashes insidearborist.buildIdealTreewithTypeError: Cannot read properties of null (reading 'matches')on both npm 11.12.1 (Corepack) and npm 10.9.7. The same crash reproduces on plainorigin/mainwith no rewrites, confirming this is a pre-existing arborist dedupe bug, not a regression from A1. Workaround: incrementalnpm install --package-lock-onlyagainst the existingorigin/mainlockfile (preserves hoist decisions includingminimatch@3.1.5at root — vsce CJS-requires that shape), thennpm ci. Bitwise-equivalent to the documented ritual for the fieldsvalidate-lockfileCI checks (19 rollup platform variants). An earlier attempt usednpm install --forceto bypass the buggyPlaceDep.pruneDedupablepath, but--forceskips dedupe and leftminimatch@9.0.9nested undercalm-plugins/vscode/, breaking@vscode/vsces CJSrequire("minimatch")in CI — replaced by the incremental method ina629650e../mvnw verifynot run locally. Quarkus 3.34 requires Java 17+, only Java 11 (Temurin) available in the local environment. Maven verification deferred to CI on this PR.calmguard-docsbuild failure is pre-existing.npm run buildfails incalm-suite/calm-guard/docswithCannot find package '@docusaurus/faster'. Verified by stashing all A1 changes and runningnpm ci && npm run build --workspace calmguard-docsagainst unmodifiedorigin/main— same failure. Not in A1 scope.What was deliberately NOT touched
calm-suite/calm-guard/package.json's@finos/calm-cli: "^1.33.0"— real semver-published dep, not afile:workspace ref.apps/studio(Toolbar.svelte,+page.svelte,export.ts,CodePanel.svelte) — Phase 2 (STUDIO-01) owns these.Type of Change
Affected Components
cli/)calm/)calm-ai/)calm-hub/)calm-hub-ui/)calm-server/)calm-widgets/)docs/)shared/)calm-plugins/vscode/)Also affects
calm-suite/calm-studio/workspaces (calm-core, mcp-server, github-action, vscode-extension, web-component, apps/studio).Commit Message Format ✅
Both commits use the
calm-suitescope (still valid pre-A3) and are DCO-signed:chore(calm-suite): A1 — remove vestigial config and rewrite file: deps to bare workspacechore(deps): regenerate lockfile after A1 file: → bare-workspace rewriteTesting
Local verification (Mac, Node 22.22.2, npm 11.12.1):
npm run build: ✓ green for all workspaces except pre-existingcalmguard-docsfailure (reproduces onorigin/main).npm test: ✓ green — all 3859+ tests pass across 15 workspaces (calm-models 190, calm-widgets 842, shared 842, cli 385, calm-server 11, calm-hub-ui 747, calm-plugins/vscode 433, calm-guard 111, calm-studio packages+apps 690).@calmstudio/*symlinks resolved (≥ relaxed-ge 4threshold per01-VALIDATION.md), 8 vestigial paths removed, 0"file:refs remain incalm-suite/calm-studio/.Checklist
Refs #2649 (Track A), #2600 (parent epic). A2..A5 will follow.