Repository navigation
Crash-safe credentials, safer Garmin relogin, Eufy and Strava host fallbacks; 1.14.0 - #74
Merged
Merged
Conversation
Chunked vaults are written under a fresh generation (vault:<gen>:<i>) and the header is switched last, so a save killed at any step leaves the old or the new vault readable. The header carries a checksum, and the next save sweeps leftovers from the neighbouring generations. A damaged vault (bad JSON, missing or mismatched chunk, corrupt credentials file) now raises VaultCorruptError instead of reading as empty, so the next store can no longer save an empty vault over stored passwords. Released single-entry and vault:<i> layouts are still read and migrate on the next save.
--status and --history now resolve passwords without migrating legacy keychain items or YAML passwords, and the sync path migrates after it takes the lock, so an unlocked process never writes the credential vault.
…over Chunk names now carry a random suffix recorded in the header, a save re-reads the header before committing and aborts with a retryable error if another process switched it, and a journal entry lists every tag that may still hold chunks so later saves and --use-file-store can delete leftovers from any number of interrupted saves.
A later 401 or 403 in the same run now raises the stored relogin error or the call's own error instead of running another full login, so a Cloudflare block on the API no longer costs a login per call.
Every credential change (store, delete, migration, store switches, uninstall cleanup) now holds an exclusive OS lock on vault.lock in the data dir from load to sweep. The lock is reentrant within a process, waits up to 30 s, and refuses to write if it cannot be opened or acquired. With writers serialized, the journal grace period and the header re-check are gone: any journal tag the live header does not name is a leftover and is deleted by the next save. - Uninstall deletes each lock file while still holding it on POSIX, and a lock taken on a file that was unlinked meanwhile is retried on the new one. Windows keeps release-then-delete. - A present but wrong-typed passwords/tokens section raises VaultCorruptError instead of reading as empty. - Keychain saves refuse more than MAX_CHUNKS chunks before writing anything, so use_keychain_store keeps the file. Released-layout vaults of any size still read. - An existing credentials file that cannot be read or parsed raises during backend selection instead of silently falling back to the keychain; doctor reports it as a failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reliability release.
--setup-strava,--use-file-store,--use-keychain,--select-profile,--update,--uninstall, first-run setup) take the sync lock. Password migrations run only under it;--statusand--historyread without writing.--update-passwordchecks each new password with a real login before storing it.--updaterefreshes the package index under uv; the end-of-run summary and doctor label the latest weigh-in accurately; headless docs cover setting TZ; pytest and ruff are declared as a dev group.681 tests pass locally.