RUL-039 — the promotion gate runs functionality tests only; rehearsal-class tests never run in it
Ruling
Mohamed, 2026-10-19, verbatim:
"promotion gate = functionality tests only; rehearsal-class (real deploy/ship/incus/terraform/tofu/load) tests exist but NEVER in the gate."
The rehearsal class is the set of tests exercising real deploy surfaces — deploy/ship/install scripts, the Incus daemon, terraform/tofu, load. They are legitimate tests; they are just never the promotion gate's job. The gate answers "is this change safe to promote", and a real-machine rehearsal is not a safety proof, it is a costly side effect.
Enforcement
- gate scripts/derive_test_categories.py RUL-039
- gate scripts/run_tests.py RUL-039
The category is computed, never hand-set (RUL-036's own words):
scripts/derive_test_categories.py— the AST derivation pass. A test module is rehearsal-class when it carries file:line evidence of a real deploy surface: a subprocess argv intodeploy/*.sh/ship/install-*, an@pytest.mark.*_livemarker, anINCUS_HARNESS_IT-style live-run env guard, or anincus/lxc/docker/terraform/tofuargv literal in execution position. It writesreports/rehearsal-class-modules.json(fingerprinted;--checkexits non-zero on drift).scripts/run_tests.py— the gate consumption. Gate-mode runs (the promotion--json,--affected, the plain suite) exclude the derived rehearsal modules and report them (🎭 rehearsal-class excluded: N module(s)), and--jsoncarries the named set.--include-rehearsalor explicitly naming a rehearsal module runs it (a deliberate rehearsal). A missing, unparsable, version-mismatched or fingerprint-mismatched artifact fails closed — never a silent exclusion.
Evidence
Founding incident — dead run 906142 (2026-10-19, docs/lessons/L23-exoneration.md): 20 reds, of which
14 were rehearsal-class deploy tests dragged into a gate run by an exaggerated blast radius — 6×
tests/cli/test_cli*.py deploy install/verify assertions, 5× codetools verify_venv_sync DeployError,
3× codetools PrologGatesError. The class Mohamed ruled must never run in the promotion gate. Sibling
doctrine: RUL-038 (container-CREATING tests leave the tree for rehearsals/; ADR-0111) and ADR-0110.