fix: resolve test pollution from freeze_saves and fix os_listener toggle
All checks were successful
Lint & Test / test (push) Successful in 27s

- Add unfreeze_saves() to base_store.py and call it in e2e cleanup.
  The backup restore flow calls freeze_saves() which sets a module-level
  flag that silently disables all store _save() calls. Without reset,
  this poisoned all subsequent persistence tests (9 failures).
- Fix os_listener toggle to use toggle-switch/toggle-slider CSS classes
  instead of nonexistent switch/slider classes (was showing plain checkbox).
- Add mandatory test run to CLAUDE.md pre-commit checks.

All 341 tests now pass.
This commit is contained in:
2026-03-24 22:26:57 +03:00
parent ea5dc47641
commit 29fb944494
4 changed files with 16 additions and 4 deletions

View File

@@ -76,13 +76,14 @@ Plain HTML selects break the visual consistency of the UI.
## Pre-Commit Checks (MANDATORY)
Before every commit, run the relevant linters and fix any issues:
Before every commit, run the relevant checks and fix any issues:
- **Python changes**: `cd server && ruff check src/ tests/ --fix`
- **TypeScript changes**: `cd server && npx tsc --noEmit && npm run build`
- **Both**: Run both checks
- **Always run tests**: `cd server && py -3.13 -m pytest tests/ --no-cov -q` — all tests MUST pass before committing. Do NOT commit code that fails tests.
Do NOT commit code that fails linting. Fix the issues first.
Do NOT commit code that fails linting or tests. Fix the issues first.
## General Guidelines