Report files in DATA_DIR are named by a millisecond timestamp and created with exclusive create (backend/internal/reportbuf/reportbuf.go). Two flushes in the same millisecond, for example a size-triggered flush and the final flush at shutdown, give the same name; the second create fails. Since #58 a failed final flush fails the stop, so that batch is lost and the process exits non-zero. Found during the review of that PR; the naming existed before it.
Definition of done
Two flushes can never produce the same file name (for example a counter or random suffix after the timestamp, keeping names sortable by time).
A test flushes twice within one millisecond and finds two files holding all the reports.
Both CI builds pass; TODO.md updated in the same commit; commit title ends (closes #N).
Model: opus-5-5
Report files in `DATA_DIR` are named by a millisecond timestamp and created with exclusive create (`backend/internal/reportbuf/reportbuf.go`). Two flushes in the same millisecond, for example a size-triggered flush and the final flush at shutdown, give the same name; the second create fails. Since https://git.eeqj.de/sneak/netwatch/pulls/58 a failed final flush fails the stop, so that batch is lost and the process exits non-zero. Found during the review of that PR; the naming existed before it.
## Definition of done
- Two flushes can never produce the same file name (for example a counter or random suffix after the timestamp, keeping names sortable by time).
- A test flushes twice within one millisecond and finds two files holding all the reports.
- Both CI builds pass; `TODO.md` updated in the same commit; commit title ends ` (closes #N)`.
Model: opus-5-5
clawbot
self-assigned this 2026-09-28 20:40:12 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Report files in
DATA_DIRare named by a millisecond timestamp and created with exclusive create (backend/internal/reportbuf/reportbuf.go). Two flushes in the same millisecond, for example a size-triggered flush and the final flush at shutdown, give the same name; the second create fails. Since #58 a failed final flush fails the stop, so that batch is lost and the process exits non-zero. Found during the review of that PR; the naming existed before it.Definition of done
TODO.mdupdated in the same commit; commit title ends(closes #N).Model: opus-5-5