utils/crdt-sync/crdt_sync
Krzysztof kuhy Rudnicki 3589d166cd
Some checks are pending
crdt-sync pre-commit / pre-commit (push) Waiting to run
crdt-sync tests / test (3.10) (push) Waiting to run
crdt-sync tests / test (3.11) (push) Waiting to run
crdt-sync tests / test (3.12) (push) Waiting to run
gatelock pre-commit / pre-commit (push) Waiting to run
gatelock tests / test (3.10) (push) Waiting to run
gatelock tests / test (3.11) (push) Waiting to run
gatelock tests / test (3.12) (push) Waiting to run
palette drift / palette (push) Waiting to run
crdt-sync: split five source files — package now fully under the cap
_sync.py         456 -> 245 + _syncstate 131 + _pull 106 + _revisions 34
  _firebase_auth   412 -> 242 + _credentials 146 + _autherrors 69
  _firebase.py     336 -> 250 + _fbkeys 100
  google_id_token  316 -> 232 + tool/_oauth_callback 105
  _github.py       255 -> 238 + _gherrors 30

revision_of became its own leaf module because both the push and pull halves
need it; without that the two would have imported each other. _fbkeys holds
the RTDB key escaping — the escape tables moved with the functions that read
them, since the pair has to round-trip exactly or a device silently stops
seeing its own writes.

crdt-sync/tool/ is outside the coverage source, so the split there has no test
net: verified by running it the documented way instead
(`python3 -m tool.google_id_token --help` prints its usage, and
`from tool.google_id_token import TokenError, fetch_id_token` — what
seed_session.py does — still resolves).

An AST pass over each pair caught what the suite would not have: _is_revoked
needs the error type, so it stayed with it rather than following the
credentials; _TERMINAL_AUTH_REASONS and _CONSENT_TIMEOUT_SECONDS had to be
carried to their new callers.

259 passed at 100% branch coverage. crdt-sync/tool/seed_session.py and
firebase-debug.log are pre-existing local changes and are deliberately not in
this commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG
2026-08-22 15:30:52 +02:00
..
tests crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
__init__.py Group sync_log's 11 arguments into three bundles 2026-08-21 14:22:25 +02:00
_autherrors.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_config.py Pool HTTP connections, and let callers set the Firebase timeout 2026-08-21 13:55:01 +02:00
_credentials.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_device.py Add DeviceIdentity and a legacy device id for the uuid migration 2026-08-09 16:54:33 +02:00
_fbkeys.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_firebase_auth.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_firebase.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_gherrors.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_github.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_hlc.py Initial implementation: unified CRDT merge scheme + GitHub sync transport 2026-07-05 20:40:09 +02:00
_http.py Pool HTTP connections, and let callers set the Firebase timeout 2026-08-21 13:55:01 +02:00
_log.py Initial implementation: unified CRDT merge scheme + GitHub sync transport 2026-07-05 20:40:09 +02:00
_mirror.py Let a mirror read survive the primary being down 2026-08-10 14:30:29 +02:00
_pull.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_record.py Initial implementation: unified CRDT merge scheme + GitHub sync transport 2026-07-05 20:40:09 +02:00
_remote.py crdt_sync: add a Firebase Realtime Database transport behind a RemoteStore seam 2026-08-03 18:14:25 +02:00
_revisions.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_store.py Add LogStore local-persistence layer to crdt_sync (v0.2.0) 2026-07-11 22:19:34 +02:00
_sync.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00
_syncstate.py crdt-sync: split five source files — package now fully under the cap 2026-08-22 15:30:52 +02:00