Files
reverse-engineering-anything/tsconfig.scripts.json
RRFZ d5b4c4bb61 fix(verify): bound concurrent file reads in architecture and limit guards (#14720)
* fix(verify): bound concurrent file reads in architecture and limit guards

`scripts/verify/architecture-guards.mjs` reads every `.ts`, `.mts`, `.mjs`,
and `.py` file under `src/`, `tests/`, `scripts/`, and `bridge/` (8,203 files
on current `main`) via unbounded `Promise.all(paths.map(readFile))`. On
Windows, queuing all `open()` calls at once exceeds the UCRT 8,192 file
descriptor ceiling and deterministically fails `npm run verify:architecture-guards`,
`npm run check:fast`, and the pre-push hook with `EMFILE: too many open files`.

Add a zero-dependency JSDoc-typed `mapWithConcurrency` helper in
`scripts/verify/bounded-file-reads.mjs` (default cap 64, registered in
`tsconfig.scripts.json` so it runs before `npm ci`), apply it across all four
bulk `readFile` loops in `scripts/verify/architecture-guards.mjs` and the
sibling `src/` scan in `scripts/verify/rea-numeric-limits.mjs`, and add unit
coverage in `tests/evaluation/boundedFileReads.test.ts`.

* test(verify): copy bounded-file-reads helper in numericLimitGuardPermission fixture

`scripts/verify/rea-numeric-limits.mjs` now imports
`./bounded-file-reads.mjs`. Copy both scripts into the temporary checkout
in `tests/boundary/process/numericLimitGuardPermission.test.ts` so the
copied verifier starts cleanly on non-root Linux/macOS runs instead of
failing with `ERR_MODULE_NOT_FOUND`.
2026-11-26 23:25:32 +08:00

39 lines
1.3 KiB
JSON

{
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true,
"paths": {
"#dist/*": ["./src/*"]
}
},
"files": [
"scripts/fixtures/managed/function-dossier.mjs",
"scripts/fixtures/managed/pe.mjs",
"scripts/lib/canonical-temporary-directory.mjs",
"scripts/lib/catalog-cli.mjs",
"scripts/lib/mcp-verifier-results.mjs",
"scripts/lib/real-ghidra-snapshot-lifecycle.mjs",
"scripts/lib/verifier-artifact-scope.mjs",
"scripts/lib/verifier-cleanup.mjs",
"scripts/lib/verifier-fixture.mjs",
"scripts/lib/verifier-run.mjs",
"scripts/lib/verifier-source-loader.mjs",
"scripts/verify-package-evidence.mjs",
"scripts/verify/bounded-file-reads.mjs",
"scripts/verify/completeness-ternary-guard.mjs",
"scripts/verify/javascript/digests.mjs",
"scripts/verify/javascript/output.mjs",
"scripts/verify/managed/completion-report.mjs",
"scripts/verify/managed/config.mjs",
"scripts/verify/managed/conformance.mjs",
"scripts/verify/managed/manifest-parser.mjs",
"scripts/verify/managed/manifest.mjs",
"scripts/verify/managed/oracles.mjs",
"scripts/verify/managed/support.mjs",
"scripts/verify/typed-script-declarations-guard.mjs"
],
"include": []
}