utils/sickdays/systemd/sickdays-sync.service
Krzysztof kuhy Rudnicki 894d76f811 sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor
sickdays: per-date pool, no cap or reason, add/remove today or later only,
import_legacy for the migration. LWW state flip per date (no tombstones),
Firebase RTDB sickdays-sync/devices/<uuid>/sick_days.json, HMAC audit trail.
Readers fail closed (unreadable pool = not sick, logged); writers refuse a
corrupt pool. Free-day cross-check via a lazily imported freedays predicate.

earned_time: resolve(..., sick=True) floors the final shutdown at 20:00
(capped at the ceiling); gaming, terms and base unchanged. Result dataclasses
moved to _resolution.py for the line cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xfj1sxKH9VBPqpcAni8Jry
2026-10-16 08:23:00 +02:00

20 lines
745 B
Desktop File

[Unit]
Description=Pull and push the shared sick-day pool
Documentation=file:///home/kuhy/src/utils/sickdays/README.md
# Without a network this exits 0 having done nothing, by design -- the gates
# read the last-merged local file and a stale pool is never a reason to fail.
After=network-online.target
[Service]
Type=oneshot
# `sync-quiet` rather than `sync`: this unit must never report failure just
# because the machine is offline or the credential has not been set up yet.
# A real bug still shows up in the journal via the library's own logging.
ExecStart=%h/.local/share/sickdays/venv/bin/sickdays sync-quiet
# A hung network call must not leave a unit running until the next tick.
TimeoutStartSec=120
[Install]
WantedBy=default.target