From 5b6c79299fc6fc101226dfd9aab7349a11bae890 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 8 Aug 2026 21:22:02 +0200 Subject: [PATCH] docs(server): record what the coverage gate does and does not measure PR #1844 went red with every suite green: the diff moved MCP tools from src/mcp/, which the gate ignores, into src/nest/**, which it measures. That did not change any behaviour - it revealed that airports.mcp.ts had never had a test in either world, and dragged the aggregate to 79.86%. Worth stating in the gotcha list, because journey.ts and _shared.ts still have to make the same move. --- server/src/nest/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/nest/README.md b/server/src/nest/README.md index 08d8d8980..64434f9c0 100644 --- a/server/src/nest/README.md +++ b/server/src/nest/README.md @@ -136,6 +136,12 @@ singleton rather than a second instance. webhook and ntfy without a failure. They are built from injected transports and registered in `NotificationsService`'s constructor now, so every path that can dispatch has them. +- **The coverage gate reads `src/nest/**` and nothing else.** Moving code in from + `src/mcp/` or `src/services/` does not just relocate it — it starts being + measured. PR #1844 landed `airports.mcp.ts` at 0% branches because + `search_airports`/`get_airport` had never had a test in either world, and the + aggregate fell to 79.86% with every suite green. Before pushing anything that + moves files into this tree, run `npm run test:coverage`, not just `npm test`. - A guard with a constructor dependency has to be a registered provider everywhere it is used. The three auth guards are dependency-free on purpose — 38 directories apply them and 21 do not import `AuthModule`, so giving them a