pnpm build now writes the short HEAD hash to web/dist/version.txt
(web/stamp-version.mjs). The web server serves it at GET /version as
text/plain and answers 404 when the stamp is missing, so an unstamped
build never passes a live-build check. Docstring now says Astro.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gatelock error_report: uncaught, thread and Tk callback errors plus a
frozen lock window over 1 s go to the app-errors spool. The pre-commit
pylint env moves to gatelock 0.16.0, the version requirements pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kuhy, 2026-11-18: shutdown 18:00, a run ending 19:58 must give 20:00
and the book's +1h 21:00 -- what the daily reset derives. The
late-credit rule (credit's own time + reward, 2026-10-17) made it
21:58 and 22:58. Unpaid gates now hold the PC behind the evening
chain until 23:00 instead, so the rule and its credit-time plumbing
go: _late_credit, the at= anchors, _done_at. The preview flags any
live-vs-derived MISMATCH again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWWLoUxxSPf1m8KUVo8
A late credit moves shutdown from an hour already past to the run's
end plus its reward, so the toast read "+3h58m" for a 2h run
(18:00 -> 21:58, 2026-11-18). The delta is now capped at the reward
the credit earned: still the real move when the ceiling cut it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWWLoUxxSPf1m8KUVo8
Pin earned-time-v0.22.0. The toast and the poke reply show only the
shutdown gain; gaming_budget_minutes leaves the reply and the phone
app's result line (an older PC's field is ignored).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWViGJJaqBKGr1Hbppr
wait_for_turn sleeps its 1.5 s startup grace for real, so every test
that builds a locker paid it. The suite took ~135 s under the CPU
cap and the ci-pytest gate step could not finish inside the 60 s
action cap. With the grace zeroed in the hermetic gatelock fixture
all 2142 tests run in 13 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWWfb63jncj9Lca2jeX
On 2026-11-16 a manual workout was credited at 07:59 by
_session_stream, but the open lock window never rechecked log.json
(TRY AGAIN only asked StrongLifts/adb), so kuhy had to mark a sick
day. The window now polls log.json mtime every 3 s via Tk after and
stands down (decision workout_credited_elsewhere, no second credit),
and TRY AGAIN stands down when today is already logged.
_verify_phone_workout is deliberately unchanged (shared with
early-bird/status).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWWfb63jncj9Lca2jeX
Revert 6777656; the app again writes zero distance across a gap
over 30 s. Also drop the importer-test skip for its fixture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYwyP67ppvkeie3X1F
Every locker screen, the status window and the credit toast now show
glyphs (screen_locker/_glyphs.py) and numbers, coloured by state.
Sentences that carried a reason (verifier message, sync diagnosis,
sick refusal, form rejection) go to the log at warning instead.
New pre-commit hook text-free runs scripts/verify_text_free.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
textgate scan 319 -> 0: docs/explanations (dropped explain-diff
output, not published, nothing links it), Tk window titles, the
MaterialApp title, '+kg' -> '+' plus the weight icon, and
spoken-only Semantics labels hoisted so the gate sees them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Painted chrome becomes icons or symbols; old words stay as
spoken labels or code comments. OS window titles kept. Tests
build today from the local day.
Todo: ed07cff3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The PC keeps a dropout moving at 1 m/s to 25 km/h; the app zeroed
every gap over 30 s. Bridge unpaused dropouts, pauses stay zero.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWXcjiPpgRfxzrRfoky
Silent-failure checker, mypy, pylint now clean. Hidden packages count
as installed (pm list -u), pull gets a long timeout, wifi entries are
matched by ro.serialno, and a missing log/drop dir is a warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZ9CKZsNxtD5Jr9bYD
Anchor = PC credit time of an app-authored run (joined on TCX end
time in log.json), due 7 days later, gated on a validated import
marker, then adb backup + uninstall. Typed results, --status/--dry-run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZ9CKZsNxtD5Jr9bYD
Pure-Dart TCX codec pinned to the PC's RunnerUp parser by a shared
golden fixture (Dart byte-compare + pytest through the real verifier),
GPS filters and moving-time maths mirroring the PC walk rule, runs /
run_points tables (schema v9), PositionSource seam over geolocator,
location permissions and foreground service type, map/cache deps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZ9CKZsNxtD5Jr9bYD
Poll morning_session every 15s (05:00-11:00) while the lock is
up; on a signed skip bank the early-bird marker, record
wake_alarm_skip_late and leave through the normal close().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZd3smuxDGmEgXkYP8
The Firebase stream only ingested StrongLifts sessions, so a manual
workout logged on the phone waited for the 15-min workout-sync tick.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWVTJPDdbeF71W9Wd3q
Real one-line docstrings stating what each test pins down. Files that
would pass 250 lines moved whole classes into _part2 siblings
(sick_panel, earned, poke_server, shutdown_reading,
manual_workout_dialog).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYdwRAtMg7ki6TKxuU
Real fixes: split over-long functions (lock-decision chain, manual
sync, validation, phone verification, status), hoist a dead lazy
import, context-manage Xvfb and temp dirs, add encodings, share the
silent-failure argv loop.
lock_grab_handoff read lock._recovery, which gatelock's LockWindow
does not have (its public property is recovery); a contract test now
checks every attribute the handoff reads against the real class.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYdwRAtMg7ki6TKxuU
Adds StatusSectionsMixin._section_streak, called from
StatusWindow.render: the stored consecutive 5+-workout-week streak and
the reward message the week transition produced, display only. A streak
of 0 is stated plainly, never padded; a "Streak reset" message is
warning-coloured, not green. get_status already returned the streak
(it is asdict(gather_status())); StatusSnapshot gains week_rewards.
The week-transition strings used to go to _logger.info only.
process_week_transition now also keeps them under a week_rewards key in
the existing extra_benefits_state.json (no new file), read back for the
current ISO week by week_rewards(). Their "early-bird extended to 09:00"
clause is dropped: early_bird_extended is read only by display code, no
lock or window decision uses it (early bird is wake-alarm's signed
exemption since 2026-09-20), so it is not shown in the window either.
Per kuhy: no daily-streak state, no shutdown time for streaks, no
freezes or grace days; no enforcement logic touched.
Red first: new section/state/snapshot tests failed, then passed. On a
scratch copy of the real state the window shows "7-week streak" and
"6 workouts in 2026-W43! 7-week streak", no early-bird line.
Removes prompts/TODO-dopamine-ux-04-screen-locker.md (done).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYdwRAtMg7ki6TKxuU
The by-minutes bonus path clamped at 24:00 (_MIDNIGHT) and relied on
adjust_shutdown_schedule.sh's RESTORE_CEILING (23:00). It now clamps at
earned_time.shutdown_ceiling_for(day) via the new _ceiling.ceiling, so a
moved WAKE_MINUTES cannot be passed by a bonus. The shell's 1380 stays
the hard upper bound; ceiling() is min()'d with it, and a test pins the
Python constant to the script's value. _preview_sim and the invariant
test reuse that constant instead of a second 23 * 60.
Failure mode: if the earned_time lookup raises (ArithmeticError,
LookupError, TypeError, ValueError), ceiling() falls back to 23:00
loudly (logger.warning), never silently and never above the helper's
bound. That is fail-open relative to a lowered ceiling, bounded by the
shell clamp; an earned_time without the API (0.3.0) uses its constant.
Red first: new tests (21:00 ceiling, failing lookup, caps-at-ceiling)
failed on c3a5d14, pass now. 14-day replay of the real ledgers
(2026-10-18..31) through old and new code, plus an all-done-at-22:30
counterfactual: identical, every day 23:00; live files unchanged.
TODO-cap-bonus-at-day-ceiling.md removed (done).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYdwRAtMg7ki6TKxuU
The original only bounded the elapsed time, so == 5.0 was stricter than the
requirement it replaced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- addopts: -n 4 --dist worksteal (fixed, not auto: 24 workers would break
capped.sh's 4 GiB). CI's own -n auto still wins.
- coverage core = sysmon (PEP 669): ~40% less tracing overhead, same data.
- shutdown ceiling invariant: one plain-function patch of earned_units per
day instead of a MagicMock per unit (~5000 per case); every day and every
case still checked.
- poke/web server tests: serve_forever(poll_interval=0.01), so shutdown()
no longer waits 0.5 s per test.
- autouse _no_real_ntp: check_clock_skew sent real UDP to pool.ntp.org from
every verification test, and a lost reply cost a random test 5 s.
- temperature hard-timeout test: pins the default to 5 s and times the
mechanism at 0.1 s instead of waiting 5 real seconds.
- _xvfb_reexec: Xvfb -displayfd instead of xvfb-run's fixed 3 s sleep.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lending the X grab to the workout app stops recovery and releases it with
the claim still live, so gatelock 0.11 held_grabs (leisure-watch C2) read
"held" for the whole workout. release() now reports held=False before
grab_release; reacquire()'s grab_input() sets it true once the grab lands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dsh4Znwh2KnC7q6vbGpX1N