mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-26 22:47:24 +01:00
|
Some checks failed
crdt-sync pre-commit / pre-commit (push) Has been cancelled
crdt-sync tests / test (push) Has been cancelled
dependency freshness / dependencies on newest stable (push) Has been cancelled
file length / file-length (push) Has been cancelled
freedays pre-commit / pre-commit (push) Has been cancelled
freedays tests / test (push) Has been cancelled
md-naming / markdown naming convention (push) Has been cancelled
palette drift / palette (push) Has been cancelled
shared gate tests / gate unit tests (push) Has been cancelled
sync_quietly exists so a background timer stays green when the pool cannot be synced. It caught only SyncUnavailableError, which meant the contract held only because of an upstream class hierarchy: today FirebaseAuthError happens to subclass RemoteSyncError, and requests' JSONDecodeError happens to subclass RequestException, so an expired refresh token or a malformed payload does get wrapped and caught. That is a coincidence, not a promise to this package -- and it is exactly the kind that goes quiet the day upstream reorganises its exceptions. The symptom would be a unit going red every 15 minutes, which is the outcome this function's own docstring says the design exists to prevent. It now also catches anything unexpected and logs it with a traceback, so a real bug is loud in the journal while the timer stays green. The narrow handler stays first and stays at debug level: offline is normal on a laptop and must not fill the journal. Two tests, neither of which the old suite could have failed on -- the existing one monkeypatched get_client to raise the one exception already known to be handled. One raises FirebaseAuthError *mid-sync* (a token expiring during the tick rather than at client construction, which is the realistic case per seed_session.py's own docstring), the other raises a RuntimeError that no hierarchy covers. 111 tests, 100% branch coverage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_api.py | ||
| test_audit.py | ||
| test_cli.py | ||
| test_day.py | ||
| test_hmac.py | ||
| test_model.py | ||
| test_paths.py | ||
| test_sync.py | ||