Parent: #649
Blocks merge of: every roadmap implementation issue
Outcome
Make the complete test suite a reliable, reproducible merge gate on supported environments.
No roadmap PR may be described as merge-ready while the complete suite can time out, fail to start workers, or fail to terminate for unexplained reasons.
Verified baseline evidence
At 06b373a447acfce895412ac10eb4e5228c5df0b7:
- build passed;
- typecheck passed;
- 206 focused tests passed;
- a broader run under Node
22.22.3 ended with one timeout and worker-start failures;
- 530 tests passed before the run ended;
- the timed-out benchmark test passed alone with
--maxWorkers=1 in roughly three seconds.
Observed affected tests included:
tests/unit/compare-native-agent.test.ts near the previously identified timeout;
tests/unit/extract-frameworks.test.ts worker startup;
tests/unit/retrieve.test.ts worker startup;
tests/unit/stdio-server.test.ts worker startup.
This points to suite-level resource pressure, worker scheduling, ordering/global state, filesystem/process contention, or a lingering handle. It is not yet proof of any one cause.
Reference environment
Use and record:
- Node
22.22.3 or a repository-supported equivalent recent Node 20/22 patch line;
- npm
12.0.1 or the lock-compatible package manager version;
- exact
package-lock.json;
- audited lock SHA-256:
0144eb0ddf92f78c69f10089d0e0414485594966ff5be4f36f655c7aa5cff53e.
Node 22.9.0 is not an acceptable qualification environment because locked tooling requires a newer patch line.
Scope
- Reproduce the failure on a clean checkout with exact logs, environment, process/memory observations, and test ordering.
- Determine whether the cause is:
- four-worker resource pressure;
- worker startup starvation;
- global state or ordering interaction;
- filesystem/process contention;
- lingering handles or child processes;
- benchmark harness behavior;
- platform-specific behavior;
- another evidenced cause.
- Add the smallest safe correction.
- Preserve or improve parallelism rather than hiding the defect globally.
- Add diagnostic output sufficient to identify future worker-start or nontermination failures.
- Verify protected CI on the supported Node/OS matrix.
Explicit non-goals
- Do not increase global timeouts merely to hide contention.
- Do not permanently force the entire suite to
--maxWorkers=1 without evidence that this is the correct supported policy.
- Do not skip, quarantine, or weaken assertions for the affected tests merely to produce green output.
- Do not retry until a run happens to pass and call the issue resolved.
- Do not mix graph, retrieval, Pack, extraction, or product behavior changes into this issue.
- Do not expand the supported Node claim beyond what the locked toolchain actually supports.
Investigation requirements
Capture for every failed attempt:
- exact commit;
- OS/architecture;
- Node/npm versions;
- lock checksum;
- command and Vitest options;
- worker count;
- peak memory/process observations where practical;
- full stderr/stdout;
- failed or unstarted test files;
- whether affected tests pass independently;
- whether order changes the result;
- whether the process exits cleanly.
Use binary-search or grouped test runs where useful. Any suspected open handle must be demonstrated rather than inferred from nontermination alone.
Acceptance criteria
Validation
At minimum run:
npm ci
npm run typecheck
npm run build
npm run test:run
npm run test:coverage
npm run verify:pack-parity
npm pack --dry-run
npm run registry:validate
npm run release:verify
Also run the affected files alone and in the grouping that originally reproduced the failure.
Agent execution contract
- Begin from a clean supported environment.
- Do not modify product semantics.
- Stop and report when the evidence contradicts the working hypothesis.
- Return exact commands, logs, files changed, before/after behavior, and remaining uncertainty.
Closure rule
Close only when the complete suite is a trustworthy protected merge gate, not merely when one local run passes.
Parent: #649
Blocks merge of: every roadmap implementation issue
Outcome
Make the complete test suite a reliable, reproducible merge gate on supported environments.
No roadmap PR may be described as merge-ready while the complete suite can time out, fail to start workers, or fail to terminate for unexplained reasons.
Verified baseline evidence
At
06b373a447acfce895412ac10eb4e5228c5df0b7:22.22.3ended with one timeout and worker-start failures;--maxWorkers=1in roughly three seconds.Observed affected tests included:
tests/unit/compare-native-agent.test.tsnear the previously identified timeout;tests/unit/extract-frameworks.test.tsworker startup;tests/unit/retrieve.test.tsworker startup;tests/unit/stdio-server.test.tsworker startup.This points to suite-level resource pressure, worker scheduling, ordering/global state, filesystem/process contention, or a lingering handle. It is not yet proof of any one cause.
Reference environment
Use and record:
22.22.3or a repository-supported equivalent recent Node 20/22 patch line;12.0.1or the lock-compatible package manager version;package-lock.json;0144eb0ddf92f78c69f10089d0e0414485594966ff5be4f36f655c7aa5cff53e.Node
22.9.0is not an acceptable qualification environment because locked tooling requires a newer patch line.Scope
Explicit non-goals
--maxWorkers=1without evidence that this is the correct supported policy.Investigation requirements
Capture for every failed attempt:
Use binary-search or grouped test runs where useful. Any suspected open handle must be demonstrated rather than inferred from nontermination alone.
Acceptance criteria
Validation
At minimum run:
Also run the affected files alone and in the grouping that originally reproduced the failure.
Agent execution contract
Closure rule
Close only when the complete suite is a trustworthy protected merge gate, not merely when one local run passes.