screen-locker/stronglift_replacement/workout_app/lib/services
Krzysztof kuhy Rudnicki 0921146044 Tests can no longer write the live desktop Firebase credential
`flutter test` runs on a Linux host, so credentialStore()'s Platform.isLinux
branch wrote $HOME/.config/screen_locker/firebase_auth.json -- the refresh
token the screen-locker daemon signs in with. firebase_backend_google_test's
"stores the account under the email Firebase reports" case overwrote it with
the fixture token 'refresh' on every local run; the daemon only survived by
self-healing from a cached token.

Dart:
- lib/services/desktop_config_dir.dart: one resolver, desktopConfigRoot(),
  for every desktop path (the credential file's read/write/delete and the
  ~/.config/crdt-sync account read). @visibleForTesting override; under
  FLUTTER_TEST it throws StateError if the root is, or is inside, the real
  $HOME/.config -- so a test that bypasses the override fails loudly instead
  of writing. HOME unset now yields null instead of a cwd-relative .config.
- The crdt-sync read resolves the root outside its catch-all, so the guard
  cannot be swallowed as "not connected".
- test/flutter_test_config.dart gives every test its own temp config root.
- The Google sign-in test now asserts the token landed in that temp root.
- path_provider is unbound under flutter test (MissingPluginException), so
  the getApplicationSupportDirectory callers cannot reach live dirs.

Python (tests only): isolate_sync_token now patches every import-time
binding of SYNC_TOKEN_FILE (_constants, _manual_push, _sync_status were
missed), and test_home_isolation scans all runtime modules for any Path
still bound inside the real ~/.config/screen_locker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFwA9nymhUdTrVF65kigTV
2026-09-27 08:35:18 +02:00
..
backup_service_session.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
backup_service.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
break_clock.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
break_intent_queue.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
break_intent_store.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
break_notification_text.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
break_service_controller.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
break_service_port_flutter.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
break_service_port.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
break_task_handler.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
desktop_config_dir.dart Tests can no longer write the live desktop Firebase credential 2026-09-27 08:35:18 +02:00
firebase_backend_desktop.dart Tests can no longer write the live desktop Firebase credential 2026-09-27 08:35:18 +02:00
firebase_backend_google.dart Run the workout app on Linux, and let it hold the screen lock 2026-08-22 11:18:48 +02:00
firebase_backend.dart Tests can no longer write the live desktop Firebase credential 2026-09-27 08:35:18 +02:00
foreground_break_client_flutter.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
foreground_break_client.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
github_device_auth.dart Carry progression through Firebase, and stop demanding storage permission 2026-08-10 16:54:21 +02:00
google_platform_io.dart workout_app: add Google sign-in support for the Firebase sync account 2026-08-14 10:56:16 +02:00
google_platform_web.dart workout_app: add Google sign-in support for the Firebase sync account 2026-08-14 10:56:16 +02:00
google_platform.dart workout_app: add Google sign-in support for the Firebase sync account 2026-08-14 10:56:16 +02:00
google_sign_in_backend.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
http_server_service.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
lock_mode.dart Run the workout app on Linux, and let it hold the screen lock 2026-08-22 11:18:48 +02:00
progression_sync_service_pull.dart Split progression_sync_service.dart (433) into four 2026-08-15 21:44:43 +02:00
progression_sync_service_push.dart Split progression_sync_service.dart (433) into four 2026-08-15 21:44:43 +02:00
progression_sync_service_session.dart Split progression_sync_service.dart (433) into four 2026-08-15 21:44:43 +02:00
progression_sync_service.dart Split progression_sync_service.dart (433) into four 2026-08-15 21:44:43 +02:00
storage_service_backup.dart Split storage_service.dart (781) into part extensions 2026-08-15 21:12:08 +02:00
storage_service_exercises.dart Split storage_service.dart (781) into part extensions 2026-08-15 21:12:08 +02:00
storage_service_sandbox.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
storage_service_schema.dart Bring the workout app and status web UI up to latest stable 2026-09-07 15:46:07 +02:00
storage_service_sessions.dart Split storage_service.dart (781) into part extensions 2026-08-15 21:12:08 +02:00
storage_service.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
sync_device_id.dart Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:31:15 +02:00
sync_service.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
sync_settings.dart Carry progression through Firebase, and stop demanding storage permission 2026-08-10 16:54:21 +02:00
sync_state_factory.dart Sync workouts through Firebase, mirroring to GitHub during the cutover 2026-08-05 08:12:40 +02:00
sync_status.dart Add sync-status card and duration-threshold fixture 2026-08-15 18:41:31 +02:00
workout_sync_service_read.dart Stop the phone counting deleted and empty manual workouts 2026-08-27 20:13:12 +02:00
workout_sync_service.dart Bring the workout app and status web UI up to latest stable 2026-09-07 15:46:07 +02:00
workout_sync_session.dart Extract WorkoutSyncSession from workout_sync_service.dart (322 -> 218) 2026-08-15 22:28:02 +02:00