mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 20:47:15 +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 |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| _autherrors.py | ||
| _config.py | ||
| _credentials.py | ||
| _device.py | ||
| _fberrors.py | ||
| _fbkeys.py | ||
| _firebase_auth.py | ||
| _firebase.py | ||
| _gherrors.py | ||
| _github.py | ||
| _hlc.py | ||
| _http.py | ||
| _log.py | ||
| _mirror.py | ||
| _pull.py | ||
| _record.py | ||
| _remote.py | ||
| _revisions.py | ||
| _store.py | ||
| _sync.py | ||
| _syncargs.py | ||
| _syncstate.py | ||