Host windowing-environment facts, gathered from process env vars.
Only meaningful on Linux (X11 vs Wayland, compositor); on macOS /
Windows the windowing system is implied by the OS. Split from the
gathering so the markdown rendering is unit-testable.
Volatile readings gathered by the command from the OS / plugins:
the idle probe, DND state, screen-lock, notification permission, and
OS-level autostart. Bundled and passed into runtime_snapshot_section
so that function touches only in-memory scheduler state — these probes
go through X11 / dbus / plugin FFI that segfaults on the headless CI
runner, so they must stay out of the testable path.
Everything the report needs to answer “why isn’t a break happening
right now”. Gathered live from the scheduler + windowing system, then
rendered by format_runtime_snapshot (kept pure for testing).
Render the whole environment block from already-gathered facts.
Pure: the caller does the env / windowing-system queries and passes
the results in, so this formatting is fully unit-testable.
Seconds until the next break of a kind: positive = still counting
down, zero or negative = overdue (the scheduler will fire as soon as
no guard is suppressing it). i64 so overdue is representable.
Build the Runtime section from in-memory scheduler state plus the
already-gathered LiveReadings. No OS / plugin / AppHandle access,
so it’s testable with a bare scheduler.
Compact one-line environment summary logged once at startup, so the
log file (and therefore every diagnostics report’s log tail) always
opens with the context a bug report needs — even if the user never
generates a report. Pure so the formatting is unit-testable.