mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-21 21:42:18 +01:00
`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 |
||
|---|---|---|
| .. | ||
| backup_service_session.dart | ||
| backup_service.dart | ||
| break_clock.dart | ||
| break_intent_queue.dart | ||
| break_intent_store.dart | ||
| break_notification_text.dart | ||
| break_service_controller.dart | ||
| break_service_port_flutter.dart | ||
| break_service_port.dart | ||
| break_task_handler.dart | ||
| desktop_config_dir.dart | ||
| firebase_backend_desktop.dart | ||
| firebase_backend_google.dart | ||
| firebase_backend.dart | ||
| foreground_break_client_flutter.dart | ||
| foreground_break_client.dart | ||
| github_device_auth.dart | ||
| google_platform_io.dart | ||
| google_platform_web.dart | ||
| google_platform.dart | ||
| google_sign_in_backend.dart | ||
| http_server_service.dart | ||
| lock_mode.dart | ||
| progression_sync_service_pull.dart | ||
| progression_sync_service_push.dart | ||
| progression_sync_service_session.dart | ||
| progression_sync_service.dart | ||
| storage_service_backup.dart | ||
| storage_service_exercises.dart | ||
| storage_service_sandbox.dart | ||
| storage_service_schema.dart | ||
| storage_service_sessions.dart | ||
| storage_service.dart | ||
| sync_device_id.dart | ||
| sync_service.dart | ||
| sync_settings.dart | ||
| sync_state_factory.dart | ||
| sync_status.dart | ||
| workout_sync_service_read.dart | ||
| workout_sync_service.dart | ||
| workout_sync_session.dart | ||