Skip to content

Commit 1771e5e

Browse files
committed
test(packaging): give the shared-detector fixtures the LICENSE the checkers now require
The clean-content case in forbidden-content.test.ts exits 1 on "Missing required file in MCP package: LICENSE" instead of reaching the content read, because this change gave the MCP checker a required-file guard it never had. REACHABLE_FILES documents itself as "a minimal file list that passes each checker's path/allowlist/required-file guards, so the run reaches the shared secret-content read" -- LICENSE now belongs in it. Added to the miner list too, so the list stays honest about the guards it claims to satisfy rather than depending on that checker reading content before it checks required files.
1 parent 86de616 commit 1771e5e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

test/unit/forbidden-content.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ const PACKAGE_CHECKERS = ["scripts/check-miner-package.ts", "scripts/check-mcp-p
1313

1414
// A minimal file list that passes each checker's path/allowlist/required-file guards, so the run reaches the
1515
// shared secret-content read. Mirrors the file lists each checker's own "rejects secret-like content" test uses.
16+
// LICENSE is in both lists because both checkers now REQUIRE it (#9787): a published package that declares
17+
// a license in package.json but ships no LICENSE file is the drift that change exists to catch. Without it
18+
// the MCP checker exits on "Missing required file" before it ever reads content, and this file's clean-content
19+
// case would be asserting the required-file guard rather than the shared detector.
1620
const REACHABLE_FILES: Record<string, string[]> = {
17-
"scripts/check-miner-package.ts": ["package.json", "dist/bin/loopover-miner.js", "dist/lib/cli.js"],
18-
"scripts/check-mcp-package.ts": ["package.json", "dist/bin/loopover-mcp.js"],
21+
"scripts/check-miner-package.ts": ["package.json", "LICENSE", "dist/bin/loopover-miner.js", "dist/lib/cli.js"],
22+
"scripts/check-mcp-package.ts": ["package.json", "LICENSE", "dist/bin/loopover-mcp.js"],
1923
};
2024

2125
// Assembled from fragments so this file never itself contains a credential-shaped literal -- the same

0 commit comments

Comments
 (0)