testsAndMisc/docs/superpowers/contracts/wake-alarm-refactor-2026-05-30.json
Krzysztof kuhy Rudnicki 07792e75d2 refactor: split wake_alarm modules, fix ruff violations, enforce global coverage
- Split _alarm.py (1059 lines) into _alarm.py + _audio.py + _challenges.py
- Split test files (1305 / 725 lines) into 6 files, all under 500 lines
- Replace random.* with secrets.* (S311); fix RUF001, SIM117, E501 ruff errors
- Rewrite pytest_changed_packages.py to always run all packages with global
  --cov python_pkg coverage (100% branch coverage enforced across whole tree)
- Add DISMISS_ROUNDS_REQUIRED=2 and DISMISS_FLASH_SECONDS=4 to _constants.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 22:13:32 +02:00

16 lines
809 B
JSON

{
"title": "wake_alarm: split modules, fix ruff violations, enforce global coverage",
"objective": "Resolve 500-line file limit violations by splitting _alarm.py and test files into focused modules. Fix all ruff lint violations (S311 random->secrets, RUF001, SIM117, E501). Rewrite pytest_changed_packages.py to enforce 100% branch coverage across all python_pkg subpackages on every commit.",
"acceptance_criteria": [
"All Python source files under 500 lines",
"All wake_alarm modules at 100% branch coverage",
"pre-commit passes cleanly on all changed files",
"165 tests pass"
],
"out_of_scope": [
"Changing alarm runtime behaviour",
"Other python_pkg subpackages"
],
"verifier": "pre-commit run --files <changed-files> && python -m pytest python_pkg/wake_alarm/ -q"
}