feat(power): ride out sleep, lock and display changes

Docking, sleep and lock are where komorebi bugs show up, so the recording
carries on through them. On Windows a hidden window hears suspend, resume, the
lid, the displays and session lock as Windows delivers them; on a Mac a sleep is
found because the host clock pauses while the wall clock does not, and the lock
is polled on both hosts. A tracker turns these into reactions: a display that is
gone has its video finalized at once, one that returns starts a new segment, and
every stream is started afresh after a wake instead of trusting the old one.
This commit is contained in:
LGUG2Z committed 2026-10-27 22:22:56 -07:00
1 parent fb11cb2db9
commit 383cc3c3db
13 files changed
+1142

No files matched your search

+5
View File
@@ -83,6 +83,11 @@ one segment to a file: a display that is unplugged and returns starts a new segm
The recorder starts its sources in an order that makes the sources that are not video a superset of the video's span
(the clock anchor, the OS trace streams, the subscription to komorebi and its first `State`, komorebi's log offset, and
last the video), and stops them in the reverse order.
While it runs, the machine is docked, undocked, put to sleep, woken with the lid opened and locked, and none of that may
lose what was already captured. A tracker turns what the OS says (or, on a Mac, what the two clocks disagree about) into
reactions: a display that is gone has its video finalized at once, one that returns starts a new segment, and every
stream is started afresh after a wake. The capture backend is a trait, so that these policies are tested with a scripted
backend that docks and undocks without hardware.
## Rules and the layer that enforces them