Stamp every record with a clock that counts through sleep, and write the naps down #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/tick"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The second of the review's two remaining foundations:
Instantstops in sleep on a Mac, so an hour asleep read as no time, and the indicator's last report looked a second old after a nap, which let content capture continue behind a pill that had not spoken since before it.What changes.
here_os::tick_msreads the boot clock, which counts through sleep:/proc/uptimeon Linux,mach_continuous_timeon macOS,GetTickCount64on Windows, a stated fallback elsewhere. Every collector stamps it besideat, the gate stores it beside the two wall stamps, and the envelope carries it astick_ms, so records from one machine can be ordered and spaced when the wall clock stepped or was never set. The gate compares the boot clock with the process clock on every job and writes aclock.sleepdecision with the length when they drift, so a nap is a record and not a hole. Indicator freshness uses the boot clock, so the first content record after a nap is held until the pill speaks again.Proof. The tick never goes backwards, advances at the rate of time and counts from boot; an hour on the boot clock against a second awake is an hour asleep reported once; a second nap is its own report; jitter is not a nap; a record carries the tick and the envelope ships it. The nap test fails against a watch that never reports, checked by making it one. Linux verifier green on the pinned toolchain;
here-osandhere-wincross-check clean for Windows. Not run here: the Windows verifier and the end-to-end suite; the macOS branch of the clock is compiled only on a Mac.