utils/crdt-sync/crdt_sync
Krzysztof kuhy Rudnicki d8e962fdf0 Cover tool/migrate_github_to_firebase.py at 100% branch
Fifth module of the tool/ coverage task, split into the GitHub-reading half
and main() at 216 and 248 lines.

This is a one-shot migration whose worst outcome is reporting success while
having moved the wrong bytes, so the tests pin the decisions that prevent
exactly that: reading blobs by sha rather than by path (the contents API
would return whatever is at that path *now*, which need not be what the tree
listing described), refusing a truncated tree instead of migrating part of
the repo, never fetching a skipped path, emitting the report before the first
write, and failing the run when the byte-for-byte read-back disagrees --
including the partial case, where one bad file out of two is a failed
migration rather than a 50% success.

Also fixes the S105 finding the previous commit's preflight tests carried:
`_PASSWORD` trips the hardcoded-credential rule on the binding name, the same
trap this task's notes already record. Renamed rather than suppressed. The
blanket rename briefly caught the module attribute `_PASSWORD_FILE` too,
which the suite caught immediately.

crdt_sync 333 -> 365 passed, still 100%. 5 of 7 tool/ modules done; the two
remaining are link_google.py and seed_session.py.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG
2026-08-22 16:41:13 +02:00
..
tests Cover tool/migrate_github_to_firebase.py at 100% branch 2026-08-22 16:41:13 +02:00
__init__.py Group sync_log's 11 arguments into three bundles 2026-08-21 14:22:25 +02:00
_autherrors.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
_config.py Pool HTTP connections, and let callers set the Firebase timeout 2026-08-21 13:55:01 +02:00
_credentials.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
_device.py Add DeviceIdentity and a legacy device id for the uuid migration 2026-08-09 16:54:33 +02:00
_fberrors.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +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 Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
_firebase.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +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 Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +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 Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +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 Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +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 Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
_syncargs.py crdt-sync: clear the ruff 0.15.2 findings CI reported 2026-08-22 15:56:08 +02:00
_syncstate.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00