Skip to content

Commit d94d600

Browse files
committed
fix(calm-suite): tighten CalmArchitecture + downstream guards for calm-models adoption
Resolves the remaining tsc errors after pulling in @finos/calm-models: 1. CalmCoreSchema makes `nodes?` and `relationships?` optional. With exactOptionalPropertyTypes:true, every direct `arch.nodes` access errors. Studio's producers always populate both arrays (empty if blank), so the studio-side CalmArchitecture alias tightens both fields to required via `Omit<CalmCoreSchema, 'nodes' | 'relationships'> & { ... }`. Removes the flood of TS18048 errors across mcp-server, apps/studio, and validation.ts. 2. mcp-server/src/tools/render.ts: the variant-branch closures lose narrowing inside forEach because calm-models' nested `relationship-type` uses all-optional keys (not exclusive discriminated union). Bind narrowed branch to a local const before entering the closure. 3. mcp-server tests/aigf-helpers.test.ts: 9 node literals missing the now-required `description` field — bulk add via the unique-id label as the description string. Workspace dep spec changed from "*" to "file:../../../../calm-models" because calm-suite/calm-studio is a sub-monorepo with its own workspaces array; npm in the sub-tree cannot resolve a "*" spec to the parent workspace. The file: path works in both the parent root workspace install and the sub-monorepo install. Test results: 419 + 78 + 51 + 80 + 10 + 21 + 17 = 676 passing + 1 todo across all 7 calm-suite/calm-studio workspaces. Signed-off-by: Gourav Shah <gjs@opsflow.sh>
1 parent de9795a commit d94d600

6 files changed

Lines changed: 18852 additions & 27 deletions

File tree

0 commit comments

Comments
 (0)