fix(backend): give each report file a name of its own (closes #61) #66

Merged
clawbot merged 1 commits from fix/report-file-names into next 2026-09-29 08:05:27 +02:00
1 Commits
Author SHA1 Message Date
clawbot 93d4062794 fix(backend): give each report file a name of its own (closes #61)
check / check (push) Successful in 48s
Report files were named by a millisecond timestamp and created with
O_EXCL, so two flushes in the same millisecond, such as a flush for
size and the final flush at shutdown, got the same name and the second
failed, losing its reports. Each name now carries a number after the
timestamp that goes up by one for each file the server starts to
write, so names still sort by time and never repeat within a run. A
failed write uses up its number, leaving a gap if the file could not
be created and otherwise a file under that number that may be
incomplete. The buffer reads the time through a clock the new test
stops, so its two flushes share one timestamp on every run; the 1 ms
pauses earlier tests used to dodge the collision are gone.

Model: opus-5-5
2026-09-29 05:41:09 +00:00