Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Make the test file's binding to the shipped parser unmistakable\n\nCodeRabbit read the import block as a file-local `parseAllList` helper and\ncalled the comment-stripping regression test vacuous. The finding is not\ncorrect — there is no local definition; line 18 is an import and lines 19-24\nare the rest of that same block — but the import list was untidy, because\ntwo names were inserted into the middle of it rather than in order, and that\nis a fair thing to misread.\n\nSorted, and stated outright above the block that every name is the shipped\nimplementation and nothing here re-implements it.\n\nThe substance was already sound, and this is how that is checked rather than\nargued: reverting the parser in `scripts/lib/module-pins.mjs` to the buggy\nform fails the test at line 329, which is only possible if the test binds to\nthe lib.\n\n actual: [ 'TINYWALLET', 'unlike the two codecs above.\n TINYMEMORY' ]\n expected: [ 'TINYDOCS', 'TINYWALLET', 'TINYMEMORY' ]\n\nTINYDOCS swallowed by the comment above it, TINYMEMORY fused with its own —\nthe exact corruption the fix removes.\n

M3gA-Mindad8cb0684632
diff --git a/scripts/__tests__/module-pins.test.mjs b/scripts/__tests__/module-pins.test.mjs
index 7af2e67903..5fb757ca55 100644
--- a/scripts/__tests__/module-pins.test.mjs
+++ b/scripts/__tests__/module-pins.test.mjs
@@ -10,10 +10,13 @@ import { dirname, join, resolve } from 'node:path';
import { test } from 'node:test';
import { fileURLToPath } from 'node:url';
+// Every name below is the SHIPPED implementation from scripts/lib/module-pins.mjs
+// — the same module the two CLIs in scripts/ci/ import. Nothing in this file
+// re-implements any of it, so a regression in the lib fails these tests rather
+// than passing against a local copy.
import {
checkPinMapCoverage,
classifyMove,
- toplevelProvesSubmodule,
classifyPin,
parseAllList,
parseArtifactCapabilitiesPin,
@@ -21,6 +24,7 @@ import {
parseRecords,
parseWorkflowMemoryBlocks,
rewindDeclared,
+ toplevelProvesSubmodule,
} from '../lib/module-pins.mjs';
const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..');