Repository navigation
Description
The gap
src/mcp-server has a real test suite — 15 files, 269 tests, 62 suites — and no GitHub Actions workflow runs it.
$ grep -l 'mcp-server' .github/workflows/*.yml
.github/workflows/backend-image-smoke.yml # Dockerfile path-filter / image build
.github/workflows/container-security.yml # src/mcp-server/Dockerfile only
.github/workflows/deploy-dev.yml
.github/workflows/frontend-e2e.yml
.github/workflows/sync-docs-to-vertex.yml
Every hit is the Dockerfile or the deploy. Nothing invokes npm test in that directory. The frontend has npm run test:unit in frontend-build.yml; the backend has backend-unit-test.yml; the MCP server — the third surface of Invariant #13 — has neither.
Why this is P1 rather than housekeeping
The suite is not incidental coverage. It tests the parts with the worst failure mode when they break:
| file | what it pins |
|---|---|
tool-visibility.test.ts |
the OPERATOR_SCOPES allowlist — #848 replaced a !== "connector" deny-check that admitted every unknown scope, including a null auth context |
inline-auth-session.test.ts |
the #2035 memoized session store; without it verify_login succeeds and the next call answers login_required |
auth-challenge.test.ts |
#2322's deferred-grant shape |
connector.test.ts, inline-auth-scope.test.ts |
the connector fence and the per-email idempotency scope split |
log-redaction.test.ts |
credential redaction in MCP logs |
These are authorization and disclosure boundaries. Their failure mode is silent — a widened scope gate does not throw, it just serves a tool it should have hidden.
How it surfaced
#2271 (fastmcp 4.13.1 → 4.15.1) reported a fully green board and merged. Green meant the backend is fine; it said nothing about the package actually being bumped. #2035 is precisely a FastMCP minor-version behaviour change — FastMCPSession#updateAuth replacing rather than merging — that broke inline login with no error anywhere. #846's dynamic tool registration likewise depends on toolsListChanged semantics.
I ran the suite by hand before merging #2271 (269/269 pass, tsc clean at 4.15.1), so that specific bump is verified. The next one will not be, unless someone remembers.
Proposed fix
A mcp-server-test.yml mirroring frontend-build.yml, path-filtered on src/mcp-server/**:
- run: npm ci
working-directory: src/mcp-server
- run: npm test # node --import tsx --test src/*.test.ts src/tools/*.test.ts
- run: npm run build # tsc — typecheckNode pin should follow the same single-declaration rule as the Python pin (architecture.md, #1891): take it from src/mcp-server/Dockerfile, not a hardcoded literal, or add it to the parity test.
Consider making it a required context on dev and main. Today's four required checks (Analyze (python), Analyze (javascript-typescript), schema-parity, verify-non-root) run no tests at all, so "required green" already means less than it reads.
Done when
- A workflow runs
npm testandnpm run buildinsrc/mcp-serveron PRs touching it - It goes red on a deliberately broken
tool-visibilityassertion (anti-vacuity check — a job that runs zero tests also reports success) - Node version derives from the Dockerfile rather than a literal
- Decide whether it becomes a required context
Activity