Make a timed batch write on every tick (closes #192) #193

Merged
clawbot merged 1 commits from issue-192-timed-write-every-tick into next 2026-10-27 15:23:53 +01:00
1 Commits
Author SHA1 Message Date
sneak 73210bfa1b Make a timed batch write on every tick (closes #192)
check / check (push) Waiting to run
The prefix, AS and peer handlers skipped a timed write unless one
interval had passed since the last write ended. The next tick came a
little less than one interval after that, so every other tick was
skipped. Each tick now writes. A full batch's write restarts the timer,
so the next timed write comes one interval after that write began.
Comparing clock readings would not do: two ticks one interval apart can
read a hair under it. flushBatch no longer reports whether it wrote a
batch, since nothing reads that. A new test runs the loop on a fake
clock and fails on the old code.

Model: opus-5-5
2026-10-27 14:06:22 +00:00