# Contributor handoff — mochajs/mocha

> Canonical page: https://codevetter.com/unpack/mocha/agent-handoff

# Contributor handoff — mochajs/mocha

Scanned commit 79db2ee53b863813b97bf2a74cafa1599115c074 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

This brief is pinned to the inspected commit and provides a bounded source map. Tests and CI were inspected, not executed; future changes need authorized validation against the exact scripts. Follow the executable package and workflow configuration when onboarding prose differs. Preserve generated-output boundaries, public return contracts, and the distinction between main-process and worker lifecycles.
- Read AGENTS.md and the affected package/workflow first; its playbook calls for minimal changes, compatibility preservation, and trusting executable script configuration when prose disagrees. — [AGENTS.md#L7-L20](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/AGENTS.md#L7-L20) [package.json#L48-L88](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/package.json#L48-L88)
- Tests and CI were inspected, not executed in this investigation; this bounded inventory is not proof of passing checks or exhaustive coverage, and smoke itself documents a package-content limitation. — [package.json#L61-L88](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/package.json#L61-L88) [.github/workflows/mocha.yml#L22-L108](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/.github/workflows/mocha.yml#L22-L108) [test/smoke/smoke.spec.cjs#L3-L7](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/test/smoke/smoke.spec.cjs#L3-L7)
- For CLI edits, read bin/mocha.js, cli.js, options.cjs, run.cjs, and run-helpers.cjs in execution order; required modules must load before legacy reporter/interface validation. — [bin/mocha.js#L33-L33](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/bin/mocha.js#L33-L33) [lib/cli/cli.js#L80-L97](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/cli/cli.js#L80-L97) [lib/cli/run.cjs#L125-L143](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/cli/run.cjs#L125-L143) [lib/cli/run-helpers.cjs#L251-L254](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/cli/run-helpers.cjs#L251-L254)
- For runner edits, preserve Mocha.run's immediate Runner return value and callback completion contract, lifecycle state guards, and event-driven stats/reporting. — [lib/mocha.cjs#L930-L945](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/mocha.cjs#L930-L945) [lib/mocha.cjs#L994-L1035](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/mocha.cjs#L994-L1035) [lib/mocha.cjs#L1066-L1071](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/mocha.cjs#L1066-L1071)
- For parallel edits, verify process-based pool configuration rather than thread terminology in comments; global fixture plugins are ignored in worker bootstrap, and serialized functions are omitted. — [lib/nodejs/buffered-worker-pool.cjs#L37-L44](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/nodejs/buffered-worker-pool.cjs#L37-L44) [lib/nodejs/worker.cjs#L49-L58](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/nodejs/worker.cjs#L49-L58) [lib/nodejs/buffered-worker-pool.cjs#L166-L171](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/nodejs/buffered-worker-pool.cjs#L166-L171)
- Never hand-edit mocha.js or mocha.js.map; Rollup owns them, and test-browser performs clean/build before browser checks. Runtime signature checks use tsc with noEmit over lib. — [AGENTS.md#L37-L41](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/AGENTS.md#L37-L41) [rollup.config.js#L13-L21](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/rollup.config.js#L13-L21) [package.json#L61-L64](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/package.json#L61-L64) [tsconfig.json#L2-L11](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/tsconfig.json#L2-L11)
- When execution is authorized, use smoke plus the nearest node suite for CLI/runtime changes, test-node:reporters or test-node:interfaces for those areas, and test-browser for browser changes; inspect integration's .spec.cjs-only glob before assuming a new .spec.js test runs. — [AGENTS.md#L62-L77](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/AGENTS.md#L62-L77) [package.json#L69-L86](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/package.json#L69-L86)
- Preserve captured timer references and named runtime ESM exports; keep docs work in its separate package, and recognize that the main test workflow ignores docs, Markdown, and .github-only changes. — [lib/runnable.js#L14-L20](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/lib/runnable.js#L14-L20) [eslint.config.cjs#L78-L112](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/eslint.config.cjs#L78-L112) [AGENTS.md#L132-L140](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/AGENTS.md#L132-L140) [docs/package.json#L5-L14](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/docs/package.json#L5-L14) [.github/workflows/mocha.yml#L3-L14](https://github.com/mochajs/mocha/blob/79db2ee53b863813b97bf2a74cafa1599115c074/.github/workflows/mocha.yml#L3-L14)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
