diff --git a/AGENTS.md b/AGENTS.md index 47a6efacad..3052b0222a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -72,6 +72,8 @@ Use [.nvmrc](.nvmrc) and `package.json#packageManager` for the pinned toolchain. Use relevant checks for the change. The complete local gate, `npm run check:pr`, is optional for broad changes or CI diagnosis. See [CONTRIBUTING.md](CONTRIBUTING.md) for development, generated-file ownership, and release conventions. +Coordinate expensive checks across agents. If a test unexpectedly consumes heavy CPU, stop its owned process family and profile a bounded representative case before retrying. Inspect production work, fixture generation, subprocesses, and repeated setup; preserve regression coverage when optimizing. Follow the [test resource guidance](docs/testing.md#developer-commands). + `docs/public/product-catalog.json`, `docs/verification/managed-conformance-*.json`, and `skills/` are ignored outputs. Edit source contracts and `.agents/skills/reverse-engineer-anything/`, then regenerate as needed. `.cache/mcp-tool-catalog.json` is test metadata; runtime builds and source checking do not consume it. Never commit binaries, provider project documents, credentials, `dist/`, `node_modules/`, or local planning artifacts. ## Tool and Test Changes diff --git a/docs/testing.md b/docs/testing.md index ab69ac53a8..e44af7e0d6 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -168,6 +168,20 @@ Vitest worker limits do not bound subprocesses launched within a test. Bound those batches separately so repeated CLI validation cannot oversubscribe the runner. Preserve simultaneous launches where concurrency is itself under test. +Coordinate expensive checks across agents sharing a host. If a test unexpectedly +consumes heavy CPU, stop its owned process family, retain its log and revision, +and profile a bounded representative case before retrying. Separate production +work from fixture generation, schema compilation, subprocess startup and cleanup. +Choose elapsed, CPU and process-family memory limits before the run; a worker +count or test timeout alone does not enforce those limits. + +Remove demonstrated repeated work while preserving distinct assertions and +resource ownership. Share immutable fixture preparation where safe; keep fresh +sessions when lifecycle or concurrency is the behavior under test. Compare the +same completed workload before and after, report cache state and measurement +limits, and record interrupted runs separately from passes. Increasing a timeout +does not explain a CPU regression. + Build/documentation writers hold checkout-local output locks. Tests do not hold a broad command lock; `check:pr` finishes tests before document validation. Turbo caches deterministic preparation and static checks, but `test:run` always