screen-locker/screen_locker/tests
Krzysztof kuhy Rudnicki 233536d275 Manual-workout phone sync P3: PC pushes its manual entries to pc/log.json
Two-way sync: the PC now publishes its own manual workouts so the phone can see
them for the shared budget. Reverses the old "the PC never pushes" invariant.

- _manual_push.py (new): a small crdt-sync store of PC-originated manuals
  (manual_sync_log.json, next to workout_log.json). record_pc_manual() appends
  the form's entry (wrapped as the shared kind/date payload under a stable
  manual: id, monotonic HLC); push_pc_manuals() runs one sync_log tick to
  devices/pc/log.json. Best-effort: no token, empty store, or a 403 from a
  read-only token is swallowed so the local form still works.
- _manual_workout_dialog.py: record the manual locally on form save (fast, both
  hosts) — published on the next lock startup.
- screen_lock.py: push_pc_manuals() runs in the startup sync step (also retries
  any manual a previous push failed to publish).
- Updated the now-false "PC only ever reads, never pushes" docstrings in
  _workout_sync.py and _constants.py; noted the contents:write PAT requirement.

A PC-pushed record round-trips through the same ingestion decoder, so it is
ingestable by any device. Full suite green at 100% coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PM3auNTifaVgcXWDizZrjH
2026-07-13 11:29:41 +02:00
..
__init__.py Add comprehensive tests for stockfish_analysis (100% coverage) 2025-12-02 22:58:06 +01:00
_status_view_helpers.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
conftest.py Redesign manual-workout form: two-column grid, drop phone-only fields 2026-07-13 10:09:18 +02:00
test_adb_and_phone.py Restore consistency with WORKOUT_APP_JSON_REMOTES rename in _constants.py 2026-06-22 07:05:07 +02:00
test_compliance_state_part2.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_compliance_state.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_early_bird_part2.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
test_early_bird.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_extra_benefits.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_heat_skip.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_init_and_log_part2.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_init_and_log.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_manual_push.py Manual-workout phone sync P3: PC pushes its manual entries to pc/log.json 2026-07-13 11:29:41 +02:00
test_manual_sync.py Manual-workout phone sync P2: PC ingestion (multi-record + manual branch) 2026-07-13 11:15:07 +02:00
test_manual_workout_dialog.py Redesign manual-workout form: two-column grid, drop phone-only fields 2026-07-13 10:09:18 +02:00
test_manual_workout_features.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_manual_workout_status_view.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_manual_workout.py Manual-workout phone sync P1: wire format + shared constants + fixture 2026-07-13 10:52:00 +02:00
test_mcp.py Add read-only MCP server exposing workout/lock status 2026-07-10 21:28:09 +02:00
test_phone_check_unlock_part2.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_phone_check_unlock_part3.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_phone_verification_part2.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_phone_verification_part3.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_phone_verification_part4.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_runnerup_verification_part1.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_runnerup_verification_part2.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_runnerup_verification_part3.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_runnerup_verification_part4.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_runnerup_verification_part5.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_scheduled_skip.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_screen_lock_coverage_part1.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
test_screen_lock_coverage_part2.py Manual-workout phone sync P2: PC ingestion (multi-record + manual branch) 2026-07-13 11:15:07 +02:00
test_shutdown_base.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_shutdown_part2.py refactor: enforce 400-line file limit with pre-commit hook and split outliers 2026-05-28 21:19:18 +02:00
test_shutdown_part3.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_shutdown_part4.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_sick_features_part2.py refactor: enforce 400-line file limit with pre-commit hook and split outliers 2026-05-28 21:19:18 +02:00
test_sick_features.py refactor: enforce 400-line file limit with pre-commit hook and split outliers 2026-05-28 21:19:18 +02:00
test_sick_tracker.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_status_data.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_status_part2.py Fix pre-existing CI failures (crdt_sync dep, dead type:ignore, ruff) 2026-07-11 17:05:03 +02:00
test_status_view_part2.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_status_view.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_status.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_sync_fixtures.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_temperature.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_time_check.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_ui_and_timers_part2.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_ui_and_timers.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_ui_flows_part2.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_verify_workout.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
test_vt_switching.py Migrate to the shared gatelock backend 2026-06-21 20:11:16 +02:00
test_wake_shutdown.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_wake_skip.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_wake_state.py fix: apply pre-commit formatting fixes to unblock CI 2026-05-28 20:59:35 +02:00
test_weekly_check.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_weekly_logic_part2.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_weekly_logic.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
test_workout_sync.py Manual-workout phone sync P2: PC ingestion (multi-record + manual branch) 2026-07-13 11:15:07 +02:00