wake-alarm/wake_alarm/tests
Krzysztof kuhy Rudnicki c3c129b068 Make the morning session the carrot: earn 11:00 by finishing it in time
On 2026-09-19 the phone was powered off after the bathroom tag and nothing
on the PC noticed: every finished session was published and nothing read
it. Now wake-alarm distils the phone's morning into an HMAC-signed
~/.local/state/wake_alarm/morning_session.json (wake-alarm-session.timer,
07:00-11:00 every 2 min) that screen-locker and leetcode-guard read to
defer their locks -- provisionally until min(start + 90 min, 09:30) while
the session is live, until 11:00 once it completed inside that cutoff,
and not at all for a session finished later (the phone switched on at
noon completes the legs then; that must un-lock nothing).

The phone publishes the session at start as well as at finish
(current_session, cleared with the finish stamp), so the PC can tell
"started, not finished" from "never started". A required 1-5 energy tap
joins the weigh-in and ships as latest_energy with a PC reader mirroring
_weight (the shared half is _field_reader).

Also fixes the vmbox harness, red since the 2026-09-11 home-tidy: the
guest tree lives at ~/wake-alarm, and the INSTALL-OK grep matched vm's
echo of the command line. Takes Flutter 3.47.5.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tp54ewdXRLaimUuT8LgYyn
2026-09-19 16:40:51 +02:00
..
__init__.py Add tests and fix pre-commit issues across all projects 2026-04-12 20:45:24 +02:00
conftest.py Make the morning session the carrot: earn 11:00 by finishing it in time 2026-09-19 16:40:51 +02:00
test_alarm_payload.py Stop trusting an alarm the phone published months ago 2026-08-30 16:37:13 +02:00
test_energy.py Make the morning session the carrot: earn 11:00 by finishing it in time 2026-09-19 16:40:51 +02:00
test_log_dedupe.py Phase 1: structured JSONL logging with cross-process dedupe 2026-08-26 23:00:08 +02:00
test_log_sink.py Phase 1: structured JSONL logging with cross-process dedupe 2026-08-26 23:00:08 +02:00
test_logging_setup.py Phase 1: structured JSONL logging with cross-process dedupe 2026-08-26 23:00:08 +02:00
test_session_payload.py Make the morning session the carrot: earn 11:00 by finishing it in time 2026-09-19 16:40:51 +02:00
test_session.py Make the morning session the carrot: earn 11:00 by finishing it in time 2026-09-19 16:40:51 +02:00
test_state_queries.py Retire the PC's waking role; keep the trigger 2026-08-30 15:24:02 +02:00
test_state.py Retire the PC's waking role; keep the trigger 2026-08-30 15:24:02 +02:00
test_sync_backends.py Stop trusting an alarm the phone published months ago 2026-08-30 16:37:13 +02:00
test_sync_cli.py Split _sync.py along the transport/resolution seam item 8 needs 2026-08-27 23:44:24 +02:00
test_sync_dispatch.py Stop trusting an alarm the phone published months ago 2026-08-30 16:37:13 +02:00
test_sync_lapsed.py Stop trusting an alarm the phone published months ago 2026-08-30 16:37:13 +02:00
test_sync_token.py Split _sync.py along the transport/resolution seam item 8 needs 2026-08-27 23:44:24 +02:00
test_sync.py Stop trusting an alarm the phone published months ago 2026-08-30 16:37:13 +02:00
test_trigger_clamp.py Retire the PC's waking role; keep the trigger 2026-08-30 15:24:02 +02:00
test_trigger_main.py Retire the PC's waking role; keep the trigger 2026-08-30 15:24:02 +02:00
test_trigger.py Do not ring at all on a shared free day 2026-09-07 15:28:54 +02:00
test_weight.py Make the morning session the carrot: earn 11:00 by finishing it in time 2026-09-19 16:40:51 +02:00