utils/crdt-sync/crdt_sync/tests
Krzysztof kuhy Rudnicki 223b57eb87
Some checks are pending
crdt-sync pre-commit / pre-commit (push) Waiting to run
crdt-sync tests / test (push) Waiting to run
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
crdt-sync 0.9.2: per-write temp file for the Firebase credential cache
**FileCredentialStore.save wrote every save through one fixed `<cache>.tmp`.**
Two processes share a credential cache (a long-running stream and a periodic
sync), so one could rename the other's half-written temp file into place and
leave a truncated refresh token behind. Each save now gets its own mkstemp
file in the same directory -- created 0600 from the outset, so the token is
never world-readable -- and replaces the cache atomically. A failed write
unlinks its temp file and leaves the previous cache untouched.

Tests cover: no temp file left after a save, distinct temp names per write,
and an interrupted write keeping the old credentials with no leaked temp.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RHwVPyiiQMPh4M3JQwQku
2026-10-09 19:05:10 +02:00
..
__init__.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
conftest.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_config_client.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_config_credentials.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_config.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_device.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_firebase_auth_google.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_firebase_auth_session.py crdt-sync 0.9.2: per-write temp file for the Firebase credential cache 2026-10-09 19:05:10 +02:00
test_firebase_auth_tokens.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_firebase_auth.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_firebase_writes.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_firebase.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_github_writes.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_github.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_hlc.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_log.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_mirror_fallback.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_mirror.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_record.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_store.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_sync_revisions_backends.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_sync_revisions_peers.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_sync_revisions.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_sync_skips.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_sync.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_google_id_token_cli.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_google_id_token.py crdt-sync: pylint --fail-under=10, scoped to source, on pylint 4.0.8 2026-09-12 19:06:30 +02:00
test_tool_interop_seed.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_link_google_main.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_link_google_token.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_link_google.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_migrate_github_main.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_migrate_github.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_oauth_callback.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_preflight_firebase_main.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_preflight_firebase.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00
test_tool_seed_session_main.py crdt-sync: pylint --fail-under=10, scoped to source, on pylint 4.0.8 2026-09-12 19:06:30 +02:00
test_tool_seed_session.py Pin pre-commit's ruff to 0.16.7 and satisfy the CPY001 it brings 2026-09-12 18:11:24 +02:00