source-contract-tests
Run or extend the host-side static source-contract tests without mistaking them for dynamic firmware tests.
SKILL.mdskills/source-contract-tests/SKILL.md
GitHubSource Contract Tests
Use when
Safety-relevant code integration, rollover helpers, EEPROM ordering, fallback behavior, or their host-side checks change.
Procedure
- Read
tools/source_contract_test.pyand identify the specific production-code contract under test. - Run
python tools/source_contract_test.pyfrom the repository root. - If adding a test, make it specific to a stable source contract; avoid brittle whole-file snapshots and unrelated formatting checks.
- Run both AVR builds after production C++ changes.
- Report what the test proves and what it does not prove.
Constraints
- Current tests inspect source structure/order; they do not emulate the MCU, EEPROM electrical behavior, ISR timing, or motor controller.
- Never describe a source-contract test as a hardware or runtime test.
- Do not add a fake test that merely repeats a hardcoded expected string without binding it to the production path.
Done when
All relevant tests pass, or failures identify a precise source contract that is absent or violated. Residual behavior questions are documented separately.