Skip to content

Copy calm server to a separate package calm-server.#2167

Merged
rocketstack-matt merged 22 commits intofinos:mainfrom
markscott-ms:issues/2051-calm-server
Feb 28, 2026
Merged

Copy calm server to a separate package calm-server.#2167
rocketstack-matt merged 22 commits intofinos:mainfrom
markscott-ms:issues/2051-calm-server

Conversation

@markscott-ms
Copy link
Contributor

@markscott-ms markscott-ms commented Feb 25, 2026

Partially implements #2051

Description

This pull request introduces the new @finos/calm-server package, providing a standalone HTTP server for CALM architecture validation. It includes server implementation, configuration, API endpoints, documentation, and testing setup. The most important changes are grouped below.

This PR does NOT remove calm server functionality yet, nor mark it deprecated. The PR does not yet introduce a publishing job for calm-server. The calm server will be deprecated once the publish job is introduced. I want the PR with the provenance publishing of the CLI to be successfully run before introducing publishing of calm-server.


CALM Server Implementation

  • Added new calm-server module with an Express-based server and CLI entry point in src/index.ts, supporting bundled/dynamic CALM schemas, health check, validation endpoint, and rate limiting. [1] [2] [3] [4]
  • Introduced server routing structure, including /health and /calm/validate endpoints, with schema validation logic shared via @finos/calm-shared. [1] [2]

Build, Test, and Lint Setup

  • Added GitHub Actions workflow .github/workflows/build-calm-server.yml for automated build, lint, and test of the CALM Server module.
  • Added ESLint configuration in eslint.config.mjs and Vitest unit tests for server entry point and routes. [1] [2] [3] [4] [5]

Documentation

  • Added comprehensive documentation in README.md and AGENTS.md describing features, usage, endpoints, security, development, and relationship to CLI. [1] [2]

Configuration and Packaging

  • Added package.json with scripts for build, test, lint, schema copying, and global linking; defined dependencies and devDependencies.

These changes collectively establish the CALM Server as a standalone, testable, and documented module for CALM architecture validation.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Shared (shared/)
  • CALM Server (calm-server/)
  • CALM Widgets (calm-widgets/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • Documentation (docs/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

@markscott-ms markscott-ms marked this pull request as ready for review February 25, 2026 08:59
@markscott-ms markscott-ms requested a review from a team as a code owner February 25, 2026 08:59
Copy link
Contributor

Copilot AI left a comment

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 introduces a new calm-server workspace package (@finos/calm-server) that provides a standalone Express HTTP server and CLI entrypoint for CALM architecture validation, alongside build/test/lint/CI wiring and documentation.

Changes:

  • Added the calm-server workspace package with Express server startup, routing (/health, /calm/validate), and a CLI entrypoint.
  • Added Vitest + ESLint + tsup configuration and initial test fixtures/specs for the server package.
  • Added a dedicated GitHub Actions workflow plus root workspace scripts to build/test the new package.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
package.json Adds calm-server to workspaces and introduces build/test/link scripts for it.
package-lock.json Locks new workspace and dependency tree for @finos/calm-server.
calm-server/package.json Defines the new package, its build/test/lint scripts, and runtime dependencies.
calm-server/src/index.ts Implements the calm-server CLI entrypoint and server bootstrap.
calm-server/src/server/cli-server.ts Starts the Express server and mounts routes.
calm-server/src/server/routes/routes.ts Wires health + validation routers under their endpoints.
calm-server/src/server/routes/health-route.ts (+ spec) Adds /health endpoint and tests.
calm-server/src/server/routes/validation-route.ts (+ spec) Adds /calm/validate endpoint and tests/fixtures.
calm-server/vitest.config.ts Adds Vitest configuration (node env + coverage).
calm-server/tsup.config.ts Adds build bundling configuration and CLI shebang.
calm-server/tsconfig*.json Adds TypeScript config for the new package.
calm-server/eslint.config.mjs Adds ESLint flat config for the new package.
calm-server/README.md / AGENTS.md Documents features, usage, endpoints, and developer workflow.
.github/workflows/build-calm-server.yml Adds CI job to lint/build/test the new workspace.
.github/pull_request_template.md Updates component checklist to include calm-server and other items.

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@rocketstack-matt
Copy link
Member

rocketstack-matt commented Feb 26, 2026

We should also add this project to the top level README and add CODEOWNERS

@markscott-ms
Copy link
Contributor Author

@rocketstack-matt I've addressed all feedback

Copy link
Member

@rocketstack-matt rocketstack-matt left a comment

Choose a reason for hiding this comment

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

Two references to shared dist folder to still clean up

@markscott-ms
Copy link
Contributor Author

@rocketstack-matt that's all dist references fixed in calm-server. We can/should fix other ones in vscode etc, but I'm thinking a separate PR for that.

I also enabled strict mode compilation for calm-server.

@rocketstack-matt rocketstack-matt merged commit 5fb3295 into finos:main Feb 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants