mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-11 11:47:45 +01:00
Sixth module of the tool/ coverage task, split into token inspection/linking and _read_token/main() at 249 and 224 lines. The failure this script exists to prevent is silent -- linking onto a new account succeeds at the auth layer and is then denied every read and write by rules that pin one uid -- so the two central assertions are made on the request body rather than inferred from the response: the existing account's idToken is always sent (omitting it turns accounts:signInWithIdp into "sign in or sign up"), and a mismatched localId is a hard error whose message names the console unlink step. Also pins the deliberate exception handling in main(): LinkError, ConfigError and FirebaseAuthError each return 1, while an unexpected RuntimeError is left to propagate. That is the stated reason the handler names three types instead of catching Exception -- a tidy "FAIL" line for an unanticipated bug would hide it -- and it is only a real guarantee if something asserts it. crdt_sync 365 -> 400 passed, still 100%. 6 of 7 tool/ modules done; only seed_session.py remains before the config flip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_config_client.py | ||
| test_config_credentials.py | ||
| test_config.py | ||
| test_device.py | ||
| test_firebase_auth_google.py | ||
| test_firebase_auth_session.py | ||
| test_firebase_auth_tokens.py | ||
| test_firebase_auth.py | ||
| test_firebase_writes.py | ||
| test_firebase.py | ||
| test_github_writes.py | ||
| test_github.py | ||
| test_hlc.py | ||
| test_log.py | ||
| test_mirror_fallback.py | ||
| test_mirror.py | ||
| test_record.py | ||
| test_store.py | ||
| test_sync_revisions_backends.py | ||
| test_sync_revisions_peers.py | ||
| test_sync_revisions.py | ||
| test_sync_skips.py | ||
| test_sync.py | ||
| test_tool_google_id_token_cli.py | ||
| test_tool_google_id_token.py | ||
| test_tool_interop_seed.py | ||
| test_tool_link_google_main.py | ||
| test_tool_link_google.py | ||
| test_tool_migrate_github_main.py | ||
| test_tool_migrate_github.py | ||
| test_tool_oauth_callback.py | ||
| test_tool_preflight_firebase_main.py | ||
| test_tool_preflight_firebase.py | ||