Instruction file imported from shifulegend/project-zero (
.github/instructions/tests.instructions.md). Copyright stays with the author.
Copilot scoped rules: tests (adapter for docs/ai/engineering-rules.md verification)
make testbuilds & runs everytests/*.cunder ASan/UBSan, aborting on first failure. The bar is a full green run on gcc and clang.- Zero structs before partial init in test setup (
memsetbeforeweights_alloc_pointers; zero feature-selecting fields likeVisionProjector.scale_factor). - Asset/CPU/env-dependent tests must skip gracefully, never hard-fail on a missing optional asset.
- Verify the full CI sequence locally (release+test+debug, gcc+clang); a step only validates what it reaches — expect a cascade when unblocking the first failing test.
- Add a golden-output check for behavior changes (e.g. "capital of France" → "Paris").
make testbuilds the library as thedebug(ASan/UBSan) variant, so engine code is sanitized too (2026-10-21); it replaces a release./pz— runmake releaseagain before benchmarking. The build stamp also tracks compiler and host ISA, so CPU/compiler changes force a clean rebuild.
