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.
This commit is contained in:
Maurice
2026-08-08 21:22:02 +02:00
committed by Maurice
parent 67c1633155
commit 5b6c79299f
+6
View File
@@ -136,6 +136,12 @@ singleton rather than a second instance.
webhook and ntfy without a failure. They are built from injected transports and webhook and ntfy without a failure. They are built from injected transports and
registered in `NotificationsService`'s constructor now, so every path that can registered in `NotificationsService`'s constructor now, so every path that can
dispatch has them. 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 - 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 — 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 38 directories apply them and 21 do not import `AuthModule`, so giving them a