screen-locker/screen_locker
Krzysztof kuhy Rudnicki 76a4c6a0a7 Finish the Python side: scripts, conftest, and the last test modules
verify_lock_popup_safety.py (318) -> _xvfb_reexec.py      shared re-exec
                                       _popup_form_check.py HostileLock, ticks,
                                                            the real-form check
  verify_screen_fits.py (266)       -> uses _xvfb_reexec too
  conftest.py (329)                 -> _tk_mocks.py         the tk mock + the
                                                            module patch list
                                       _opt_in_fixtures.py  requestable fixtures
  three test modules                -> _part4/_part5/_part15 siblings

conftest keeps every autouse fixture. pytest applies autouse fixtures from
conftest only, so one moved to a sibling would silently stop running and take
its safety guard with it -- verified by asserting the fixtures are still
listed, not just that the suite is green. The five near-identical _isolate_*
fixtures collapse into one table-driven _isolate_state_files, which also picks
up the _shutdown_sick_state binding an earlier split created.

scripts/ becomes a real package so the shared helpers are importable. Both
gates now run as `python3 -m scripts.<name>`, including CI -- the path form put
scripts/ on sys.path instead of the repo root, and the alternative was a
try/except ImportError that this repo's no-silent-failures hook rightly
rejects. Each gate was run in its exact invocation form.

Note: verify_lock_popup_safety still fails on
`RecoveryLoop.__init__() takes 3 positional arguments but 6 were given`. That
is pre-existing -- confirmed by running it at HEAD in a clean worktree before
touching it -- a gatelock API drift, not this refactor. Left as found.

978 tests at 100% branch coverage. Gate: 41 -> 22 files, all remaining ones
Dart plus DESIGN_AUDIT_TODO.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EveB813BQ8abAP68VSqZ5Y
2026-08-15 20:57:29 +02:00
..
tests Finish the Python side: scripts, conftest, and the last test modules 2026-08-15 20:57:29 +02:00
__init__.py Fix test discovery and coverage for python_pkg modules 2025-12-02 22:33:34 +01:00
_adb_transport.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_auto_upgrade.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
_cli.py Split screen_lock.py under the 250-line cap 2026-08-15 19:01:18 +02:00
_compliance_predicates.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
_compliance_state.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
_compliance_trace.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
_constants.py Add sync-status card and duration-threshold fixture 2026-08-15 18:41:31 +02:00
_device.py Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:31:15 +02:00
_early_bird.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_extra_benefits.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
_heat_skip.py Stop the lock screen scrolling itself, and make every screen fit 768px 2026-08-03 15:57:48 +02:00
_http_workout_fetch.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_log_io.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
_log_mixin.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
_manual_push.py Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:31:15 +02:00
_manual_sync.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
_manual_workout_dialog.py Split _manual_workout_dialog.py and _manual_workout.py 2026-08-15 20:16:33 +02:00
_manual_workout_sport_fields.py Split _manual_workout_dialog.py and _manual_workout.py 2026-08-15 20:16:33 +02:00
_manual_workout_types.py Split _manual_workout_dialog.py and _manual_workout.py 2026-08-15 20:16:33 +02:00
_manual_workout_widgets.py Split _manual_workout_dialog.py and _manual_workout.py 2026-08-15 20:16:33 +02:00
_manual_workout.py Split _manual_workout_dialog.py and _manual_workout.py 2026-08-15 20:16:33 +02:00
_mcp.py Port the MCP server to mcp 2.x, and say what each tool is allowed to do 2026-08-03 19:48:07 +02:00
_phone_verification.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_runnerup_backfill.py Split _runnerup_verification, _ui_widgets and _sick_dialog 2026-08-15 20:37:15 +02:00
_runnerup_db.py Retry RunnerUp verification every 15 min, and stop hiding why it fails 2026-08-12 19:17:29 +02:00
_runnerup_tcx.py Split _runnerup_verification, _ui_widgets and _sick_dialog 2026-08-15 20:37:15 +02:00
_runnerup_verification.py Split _runnerup_verification, _ui_widgets and _sick_dialog 2026-08-15 20:37:15 +02:00
_shutdown_base.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
_shutdown_sick_state.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_shutdown.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_sick_budget.py Split _workout_sync.py and _sick_tracker.py 2026-08-15 20:30:42 +02:00
_sick_commitment.py Split _runnerup_verification, _ui_widgets and _sick_dialog 2026-08-15 20:37:15 +02:00
_sick_dialog.py Split _runnerup_verification, _ui_widgets and _sick_dialog 2026-08-15 20:37:15 +02:00
_sick_tracker.py Split _workout_sync.py and _sick_tracker.py 2026-08-15 20:30:42 +02:00
_startup_checks.py Split screen_lock.py under the 250-line cap 2026-08-15 19:01:18 +02:00
_status_data.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_status_projection.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_status_sections.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
_status_types.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_status_view_verify.py Make Check Phone week-aware; add RunnerUp GPS tolerance; fix CLI weekly count 2026-07-18 06:55:55 +02:00
_status.py Make Check Phone week-aware; add RunnerUp GPS tolerance; fix CLI weekly count 2026-07-18 06:55:55 +02:00
_surface_group.py Type the surface groups properly and exempt the test helpers by name 2026-07-25 16:56:59 +02:00
_sync_client.py Split _workout_sync.py and _sick_tracker.py 2026-08-15 20:30:42 +02:00
_sync_mixin.py Split screen_lock.py under the 250-line cap 2026-08-15 19:01:18 +02:00
_sync_records.py Split _workout_sync.py and _sick_tracker.py 2026-08-15 20:30:42 +02:00
_sync_retry.py Let the PC see phone workouts again, and stop losing progression on reinstall 2026-08-10 14:39:02 +02:00
_sync_status.py Show which sync backend the PC uses in the status window 2026-08-09 21:20:02 +02:00
_temperature_status_mixin.py Stop the lock screen scrolling itself, and make every screen fit 768px 2026-08-03 15:57:48 +02:00
_temperature.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
_time_check.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
_ui_flows_lockout.py Split _ui_flows.py into sick-day and lockout flow mixins 2026-08-15 19:56:16 +02:00
_ui_flows_relaxed.py Stop the lock screen scrolling itself, and make every screen fit 768px 2026-08-03 15:57:48 +02:00
_ui_flows_sick.py Split _ui_flows.py into sick-day and lockout flow mixins 2026-08-15 19:56:16 +02:00
_ui_flows.py Split _ui_flows.py into sick-day and lockout flow mixins 2026-08-15 19:56:16 +02:00
_ui_form_fields.py Split _runnerup_verification, _ui_widgets and _sick_dialog 2026-08-15 20:37:15 +02:00
_ui_widgets.py Split _runnerup_verification, _ui_widgets and _sick_dialog 2026-08-15 20:37:15 +02:00
_unlock_view.py Stop the lock screen scrolling itself, and make every screen fit 768px 2026-08-03 15:57:48 +02:00
_wake_alarm.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
_wake_state.py Migrate to the shared gatelock backend 2026-06-21 20:11:16 +02:00
_weekly_check.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
_window_setup.py Stop the lock screen scrolling itself, and make every screen fit 768px 2026-08-03 15:57:48 +02:00
_workout_credit.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
_workout_sync.py Split _workout_sync.py and _sick_tracker.py 2026-08-15 20:30:42 +02:00
adjust_shutdown_schedule.sh fix: resolve shutdown-schedule canonical path via guardctl dynamically 2026-07-04 11:48:39 +02:00
screen_lock.py Split screen_lock.py under the 250-line cap 2026-08-15 19:01:18 +02:00
status_view.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00