mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 09:56:23 +00:00
* 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`.