utils/sickdays/sickdays/tests
Krzysztof kuhy Rudnicki 7f2443ce48
Some checks failed
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
sickdays pre-commit / pre-commit (push) Has been cancelled
sickdays tests / test (push) Has been cancelled
sickdays.gui: refuse a write while a background sync is in flight
sync() reads the pool, waits on the network, then writes its merged copy
back without a lock. A second write landing inside that window was
silently overwritten. Marking day A and then clearing day B within a
second or two lost the clear, so B stayed a sick day.

Every background sync now holds a module lock, and each write tries it
without blocking. A click that lands mid-sync shows "Syncing -- try again
in a moment." in the panel and calls on_saved with nothing. The phone's
picker avoids the same race by making the grid inert while it syncs.

The red-first test pins the lost write with a sync stub that reads, waits,
then writes back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PAhbNszs5JKdtnD4uBi3xp
2026-10-17 13:51:26 +02:00
..
__init__.py sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor 2026-10-16 08:23:00 +02:00
conftest.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
test_api.py sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor 2026-10-16 08:23:00 +02:00
test_audit.py sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor 2026-10-16 08:23:00 +02:00
test_cli.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
test_conflict.py sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor 2026-10-16 08:23:00 +02:00
test_day.py sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor 2026-10-16 08:23:00 +02:00
test_gui_panel.py sickdays.gui: refuse a write while a background sync is in flight 2026-10-17 13:51:26 +02:00
test_gui_text.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
test_gui_window.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
test_hmac.py freedays 0.4.0: mark refuses a sick day (call-time sickdays import, allow+warn if absent) 2026-10-16 08:28:44 +02:00
test_keep_api.py sickdays 0.2.0: per-locker keep set on a sick day 2026-10-16 15:08:06 +02:00
test_keep.py sickdays 0.2.0: per-locker keep set on a sick day 2026-10-16 15:08:06 +02:00
test_model.py sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor 2026-10-16 08:23:00 +02:00
test_paths.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
test_store.py sickdays: a non-UTF-8 pool file fails closed instead of raising 2026-10-16 08:25:00 +02:00
test_sync.py sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor 2026-10-16 08:23:00 +02:00