mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 20:27:15 +01:00
|
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
file length / file-length (push) Waiting to run
palette drift / palette (push) Waiting to run
CI caught this: 8 tests failed on the runner with "/home/runner/.config/ crdt-sync/password could not be read". They passed here for the worst possible reason -- that file exists on this machine, so the tests were reading the user's actual sync password. _CONFIG is a real FirebaseConfig, and link_google() calls config.read_password(), which falls back to PASSWORD_FILE when given no path. The linking tests now pass a MagicMock(spec=FirebaseConfig) with read_password stubbed, which is what the one test that already asserted on the password was doing; that test now shares the helper instead of keeping its own copy. Adding the helper pushed the file to 265 lines, so the token-inspection tests move into test_tool_link_google_token.py -- a three-way split matching the module's three concerns (inspect / link / CLI) at 196, 82 and 223 lines. Also fixes a mypy finding in the seed_session ordering test, which used `list.append(...) or "value"` to record call order in a lambda. append returns None, so the expression only worked by accident; replaced with named functions. Verified the way the earlier local run could not: HOME pointed at an empty temp directory, reproducing the runner. 432 passed, 1333 statements and 234 branches at 100%. ~/.config/crdt-sync/password untouched (mtime still Aug 4). Worth keeping as a rule: for code that reads ~/.config, a green local run proves nothing unless HOME is redirected first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| _autherrors.py | ||
| _config.py | ||
| _credentials.py | ||
| _device.py | ||
| _fberrors.py | ||
| _fbkeys.py | ||
| _firebase_auth.py | ||
| _firebase.py | ||
| _gherrors.py | ||
| _github.py | ||
| _hlc.py | ||
| _http.py | ||
| _log.py | ||
| _mirror.py | ||
| _pull.py | ||
| _record.py | ||
| _remote.py | ||
| _revisions.py | ||
| _store.py | ||
| _sync.py | ||
| _syncargs.py | ||
| _syncstate.py | ||