mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-10 20:27:13 +01:00
The counting fix made the numbers right; the history still read as though 2026-08-24 held two gym sessions. This annotates the pairs instead of deleting one of each, for two independent reasons. Deleting is self-undoing: every re-ingest path dedups against log.json's own contents rather than a remote ledger, so _session_sync re-pulls a removed pc_workout_verified from the CRDT store on the next 15-minute tick and re-applies its shutdown credit on the way in. And mutating signed history is against the position revoke_sick_day.py already states -- the correction belongs beside the record, not on top of it. Scanning the real log found six shared credits, not the three spotted by hand: 2026-07-17, 07-27, 08-10, 08-21, 08-24, 08-28. This has been happening since July. check_ledger_agrees refuses to write a ledger whose arithmetic disagrees with count_day_credits, so the ledger cannot come to describe a rule the locker does not use. The file is gitignored with the other state JSONs -- it names workout dates. The guard's test needs a fixture restoring sys.exit. conftest's autouse _block_real_tk_and_exit patches "screen_locker.screen_lock.sys.exit", and that attribute path resolves to the global sys module, so sys.exit is stubbed process-wide for every test in the suite. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fcwu78wk17FWMHbbfbyicc
33 lines
757 B
Plaintext
33 lines
757 B
Plaintext
__pycache__/
|
|
*.py[cod]
|
|
.Python
|
|
build/
|
|
dist/
|
|
*.egg-info/
|
|
.env
|
|
.venv/
|
|
.pytest_cache/
|
|
.mypy_cache/
|
|
.ruff_cache/
|
|
.coverage
|
|
coverage.lcov
|
|
htmlcov/
|
|
*.log
|
|
.DS_Store
|
|
|
|
# Runtime state files — personal workout/health data, never public.
|
|
screen_locker/log.json
|
|
# ...and the ledger naming which of its entries record the same workout.
|
|
screen_locker/duplicate_credits.json
|
|
# ...including the timestamped backups a correction script leaves behind.
|
|
screen_locker/*.json.bak-*
|
|
screen_locker/sick_history.json
|
|
screen_locker/extra_benefits_state.json
|
|
screen_locker/scheduled_skips.json
|
|
screen_locker/shutdown_base.json
|
|
screen_locker/sick_day_state.json
|
|
screen_locker/early_bird_pending.json
|
|
|
|
# ci_mirror.sh cached requirements.txt venv (rebuilt on demand)
|
|
.ci-mirror-venv/
|