Data UI Backlog

Usage retention

Keep the usage table from growing without bound

Give the :usage log a retention policy. A retention value alone shrinks nothing: nothing deletes usage rows today (be-update / be-delete reject the append-only type, and no host-side timer touches the table), so the item is two parts — where the value lives, and a sweeper that applies it. Sweeper points from the discussion that filed this item: opt-in (an absent value keeps rows forever, today's behavior); trigger is open — a sweep from the write path, throttled and batched, or a timer thread (the image has none today); filter on created_at (:when is text); and take the swept rows' resources rows in the same sweep, or it manufactures orphans.

The first spelling discussed was a top-level model key, :usage (:retention-days 90) beside the existing :state. Changing a model key is a redeploy, which is what raised the settings question — see the journal note "Dependencies" for what this item depends on.

Slot
30000
Status
10 Open
Tags
backend, model
Contributors
Donnie, Sofia