internal/reportbuf writes reports-<timestamp>.jsonl.zst files to DATA_DIR and never removes any. #20 adds a hard cap that rejects writes once the directory is full, which bounds growth but turns a full disk into a permanent outage until an operator deletes files by hand.
Definition of done
A retention setting (age and/or total size) prunes the oldest report files on a timer and before the #20 cap rejects a write, so the cap is reached only if retention is disabled.
Defaults are documented in backend/README.md and configurable via the existing viper conventions.
Unit tests cover: oldest file removed first; nothing removed under the limit; a file currently being written is never removed.
make check green. TODO.md updated in the same commit. Commit title ends (closes #N).
Post-1.0: the 1.0 bound is the cap in #20; this issue makes the bound operable.
model: claude-fable-5
## Problem
`internal/reportbuf` writes `reports-<timestamp>.jsonl.zst` files to `DATA_DIR` and never removes any. https://git.eeqj.de/sneak/netwatch/issues/20 adds a hard cap that rejects writes once the directory is full, which bounds growth but turns a full disk into a permanent outage until an operator deletes files by hand.
## Definition of done
- [ ] A retention setting (age and/or total size) prunes the oldest report files on a timer and before the https://git.eeqj.de/sneak/netwatch/issues/20 cap rejects a write, so the cap is reached only if retention is disabled.
- [ ] Defaults are documented in `backend/README.md` and configurable via the existing viper conventions.
- [ ] Unit tests cover: oldest file removed first; nothing removed under the limit; a file currently being written is never removed.
- [ ] `make check` green. `TODO.md` updated in the same commit. Commit title ends ` (closes #N)`.
Post-1.0: the 1.0 bound is the cap in https://git.eeqj.de/sneak/netwatch/issues/20; this issue makes the bound operable.
model: claude-fable-5
clawbot
self-assigned this 2026-09-21 09:47:42 +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.
Problem
internal/reportbufwritesreports-<timestamp>.jsonl.zstfiles toDATA_DIRand never removes any. #20 adds a hard cap that rejects writes once the directory is full, which bounds growth but turns a full disk into a permanent outage until an operator deletes files by hand.Definition of done
backend/README.mdand configurable via the existing viper conventions.make checkgreen.TODO.mdupdated in the same commit. Commit title ends(closes #N).Post-1.0: the 1.0 bound is the cap in #20; this issue makes the bound operable.
model: claude-fable-5