utils/crdt-sync/crdt_sync/tests
Krzysztof kuhy Rudnicki 6d64f9e3c9 Cover tool/seed_session.py and put all of tool/ under the coverage gate
Finishes the tool/ coverage task. seed_session.py is the seventh and last
module, split into seed_apps and main() at 224 and 222 lines.

The tests pin the two structural decisions the module's docstring argues for,
since neither is visible from its output: each app gets its own exchange and
its own credential store (one session copied across them would have every app
refreshing the same rotated token and invalidating the others), and
verification runs as a *second pass* after all sessions exist -- checking each
app as it is written would pass one that a later exchange then invalidates,
which is the exact failure being guarded against. Asserted by recording the
call order and requiring seed,seed,verify,verify.

Also covers the partial-failure path, which is the difference between a
copy-pasteable rerun and a hunt through ~/.config: SeedError carries the apps
that verified, and the rerun line lists the remaining ones and only those.

With every module at 100%, the config flip lands last as planned:

    addopts += "--cov=tool"
    source = ["crdt_sync", "tool"]

Done condition met -- 432 passed, 1333 statements and 234 branches at 100%,
tool/__init__.py included. `import crdt_sync` and `python3 -m
tool.google_id_token --help` both still work after the ruff autofixes, and
`pre-commit --all-files` is clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG
2026-08-22 16:46:40 +02:00
..
__init__.py Initial implementation: unified CRDT merge scheme + GitHub sync transport 2026-07-05 20:40:09 +02:00
conftest.py Group sync_log's 11 arguments into three bundles 2026-08-21 14:22:25 +02:00
test_config_client.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_config_credentials.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_config.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_device.py Add DeviceIdentity and a legacy device id for the uuid migration 2026-08-09 16:54:33 +02:00
test_firebase_auth_google.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_firebase_auth_session.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_firebase_auth_tokens.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_firebase_auth.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_firebase_writes.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_firebase.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_github_writes.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_github.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_hlc.py Document every test, taking pylint from 8.58 to 9.90 2026-08-21 14:10:23 +02:00
test_log.py Document every test, taking pylint from 8.58 to 9.90 2026-08-21 14:10:23 +02:00
test_mirror_fallback.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_mirror.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_record.py Group sync_log's 11 arguments into three bundles 2026-08-21 14:22:25 +02:00
test_store.py Document every test, taking pylint from 8.58 to 9.90 2026-08-21 14:10:23 +02:00
test_sync_revisions_backends.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_sync_revisions_peers.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_sync_revisions.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_sync_skips.py Fix the cap hook in CI, and the re-exports its --all-files run exposed 2026-08-22 15:52:59 +02:00
test_sync.py crdt-sync: split seven oversized test files by test group 2026-08-22 14:47:58 +02:00
test_tool_google_id_token_cli.py Apply the ruff fix CI's --unsafe-fixes run wanted 2026-08-22 16:34:27 +02:00
test_tool_google_id_token.py Cover tool/google_id_token.py at 100% branch 2026-08-22 16:32:08 +02:00
test_tool_interop_seed.py Cover tool/interop_seed.py at 100% branch 2026-08-22 16:35:40 +02:00
test_tool_link_google_main.py Cover tool/seed_session.py and put all of tool/ under the coverage gate 2026-08-22 16:46:40 +02:00
test_tool_link_google.py Cover tool/link_google.py at 100% branch 2026-08-22 16:43:18 +02:00
test_tool_migrate_github_main.py Cover tool/migrate_github_to_firebase.py at 100% branch 2026-08-22 16:41:13 +02:00
test_tool_migrate_github.py Cover tool/migrate_github_to_firebase.py at 100% branch 2026-08-22 16:41:13 +02:00
test_tool_oauth_callback.py Cover tool/google_id_token.py at 100% branch 2026-08-22 16:32:08 +02:00
test_tool_preflight_firebase_main.py Cover tool/migrate_github_to_firebase.py at 100% branch 2026-08-22 16:41:13 +02:00
test_tool_preflight_firebase.py Cover tool/migrate_github_to_firebase.py at 100% branch 2026-08-22 16:41:13 +02:00
test_tool_seed_session_main.py Cover tool/seed_session.py and put all of tool/ under the coverage gate 2026-08-22 16:46:40 +02:00
test_tool_seed_session.py Cover tool/seed_session.py and put all of tool/ under the coverage gate 2026-08-22 16:46:40 +02:00