For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /packs/shared/engineering/testing.md.
Quick start

Testing

Choose the test layer from the contract at risk.

Behavioral evidence

Why

A mocked writer cannot prove that an installation preserves unrelated files. Real disposable resources expose boundary mistakes.

Rules

  • MUST test consequential pure decisions, validation failures, and failure propagation. [review]
  • MUST exercise filesystem and process behavior with real disposable resources. [review]
  • MUST reserve test doubles for external services and inject them at the actual service boundary. [review]
  • MUST avoid replacing the internal behavior being tested with a fake. [review]
  • MUST give each test one observable behavior and a present-tense action name. [review]
  • MUST verify invariants as well as representative successful inputs. [review]
  • MUST keep paid services and nondeterministic model calls outside ordinary test runs. [review]
  • MUST report unavailable verification rather than claim it passed. [review]
  • MUST avoid tests that merely restate trivial wiring or a language guarantee. [review]

[review]

The consumer's test runner executes the cases. Review checks whether those cases exercise the behavior rather than a substitute for it.

Enforcement

The consumer's test runner executes the cases. Review checks whether those cases exercise the behavior rather than a substitute for it.