Prune feedback bundles an agent read over 14 days ago #5
Summary#
- Automatically prune complete feedback bundles after their read age exceeds 14 days, with CLI and environment options to change or disable cleanup.
- Add
prune-feedbackfor manual cleanup or dry runs, and document the behavior and options.
Testing#
node --checkpassed for the changed JavaScript files.- Scratch-project checks covered old, recent, unread, incomplete, and malformed bundles, dry runs, disabled cleanup, and bare
.rivtargets. - Started the server against a fixture with an old bundle; confirmed the cleanup log and
/api/feedbackresponse.
Review follow-up (df66001)#
- Prune now refuses to run when
.rive-previewor thefeedbackdir is reached through a symlink, so a linked folder can never send deletes outside the project. Tested: symlinked.rive-preview/feedbackdirs remove nothing; a project reached through/tmp→/private/tmpand a bare.rivstill prune. - Two Codex review rounds: the first found the symlink case (fixed above), the second found nothing.
Rebased onto main (after #7 wait-feedback) + review rounds#
- Rebased onto
origin/main; the README section and theprune-feedbacksubcommand sit next towait-feedback(additive conflicts only). Prune is compatible with #7 claims: consumers only claim/mark unread bundles, prune only deletes old read ones. - A bundle is now
rename()d out offeedback/to.pruning-<stamp>-<hex>before it is deleted, so a folder swapped for a symlink mid-prune can only lose the link (stress-tested with ~13k swaps). Leftovers from an interrupted prune are cleared only when they match that exact name and are real folders. - If a parent folder is swapped mid-prune, the move is verified and undone instead of deleted. A fully race-free version against a hostile local process would need dirfd-relative fs calls Node lacks; that is out of scope.
- Re-verified after the rebase: scratch suite, live server on a
test-fixture-audiocopy (startup prune, prune after share,/api/feedback), andwait-feedbackdelivering a new bundle while the player runs. - Codex (gpt-6.1-sol, medium) review rounds until clean: final round NO FINDINGS.
🤖 Generated with Claude Code
- 1
fuko merged this3317c94
fuko closed this
Sign in to join this conversation.