From 453bf6c6f38356fa0a9138076bcc591a0b8a5023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 23 Oct 2026 15:54:10 +0200 Subject: [PATCH] test(guards): let the file-size floor follow the ratchet down The splits on this line took the files over 800 lines from 115 to 96, under the liveness floor of 100. The floor guards the matcher, so it moves to 80, below the real count. --- src/__tests__/source-size-ratchet.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/__tests__/source-size-ratchet.test.ts b/src/__tests__/source-size-ratchet.test.ts index e17e1fe8f..b1db6ba8c 100644 --- a/src/__tests__/source-size-ratchet.test.ts +++ b/src/__tests__/source-size-ratchet.test.ts @@ -92,7 +92,10 @@ describe("source size ratchet", () => { it("reads the whole tree", () => { expect(m.files).toBeGreaterThan(3000); expect(m.functionsSeen).toBeGreaterThan(20_000); - requireFloor("files over the cap", Object.keys(m.fileLines), 100); + // The floor follows the ratchet down: 115 files sat over the cap before + // the large-component splits, 96 after. It guards the matcher, so it sits + // under the real count, not at it. + requireFloor("files over the cap", Object.keys(m.fileLines), 80); requireFloor("functions over the cap", Object.keys(m.functionLines), 300); });