Commit Graph

1 Commits

Author SHA1 Message Date
david 17f75d49b6 feat: run snippet retention from the opencode plugin (#37)
build / test (push) Has been cancelled
build / image (push) Has been cancelled
expire existed but nothing called it, so the queue refilled until someone
ran it by hand.

expire --every N now runs only when the last sweep is at least that old
and records the run in settings['snippets_expire_last_run'] — including
runs that found nothing, since the window was still checked. The clock
lives in the index, not the caller, so an agent hook, a cron job and a
human share one schedule and a reloaded plugin cannot cause a burst.

plugins/maintenance runs it from the prompt hook (fire-and-forget) with
an in-process guard that only avoids spawning a CLI that would decide it
is not due.
2026-11-04 21:27:47 -08:00