Deleted files 3/3: purge log — record of finally-deleted files (#278) #281

Closed
opened 2026-08-19 18:44:18 +00:00 by Cordy · 1 comment
Owner

Part of epic #278.

Backend

  • Every final deletion (automatic retention purge, manual purge #280, and — once #268 lands — space purge) appends a purge-log record: original path, owner, size, deleted-into-trash at, purged at, purge cause (auto-retention | admin-manual | space-delete), acting admin where applicable.
  • Storage: append-only JSON in the state-backend (statestore pattern, same family as holds/settings), separate from the trash entries themselves so the log survives the purge it documents. Bounded growth: cap by count with oldest-first rollover (the audit log keeps the long tail; this is the trash-scoped view).
  • Records are also mirrored as audit events (trash-purge), so instances with audit disabled still get the purge log, and instances with audit enabled get both views consistently.

UI (mockup-first)

Deleted files → Purge log tab:

  • Read-only, newest-first list in the established row style: path, owner, size, purged-at, cause, actor.
  • Filter by user / path substring / cause; empty state explains when entries appear.
  • No delete/clear action on the log itself from this surface (it is the record); rollover is the only trimming.

Acceptance

  1. Auto-purged and manually purged items both appear with correct cause and actor.
  2. The log survives redeploys (state-backend) and outlives the purged data.
  3. Bounded: rollover works and is documented in the tab's hint text.
  4. Mockup proposed and signed off before implementation ships.
Part of epic #278. ## Backend - Every **final** deletion (automatic retention purge, manual purge #280, and — once #268 lands — space purge) appends a purge-log record: original path, owner, size, deleted-into-trash at, purged at, purge cause (`auto-retention` | `admin-manual` | `space-delete`), acting admin where applicable. - Storage: append-only JSON in the state-backend (statestore pattern, same family as holds/settings), separate from the trash entries themselves so the log survives the purge it documents. Bounded growth: cap by count with oldest-first rollover (the audit log keeps the long tail; this is the trash-scoped view). - Records are also mirrored as audit events (`trash-purge`), so instances with audit disabled still get the purge log, and instances with audit enabled get both views consistently. ## UI (mockup-first) **Deleted files → Purge log** tab: - Read-only, newest-first list in the established row style: path, owner, size, purged-at, cause, actor. - Filter by user / path substring / cause; empty state explains when entries appear. - No delete/clear action on the log itself from this surface (it is the record); rollover is the only trimming. ## Acceptance 1. Auto-purged and manually purged items both appear with correct cause and actor. 2. The log survives redeploys (state-backend) and outlives the purged data. 3. Bounded: rollover works and is documented in the tab's hint text. 4. Mockup proposed and signed off before implementation ships.
Cordy referenced this issue from a commit 2026-08-19 20:35:31 +00:00
Author
Owner

Shipped as v0.6.51 (PR #285), live on both dogfoods. Pure frontend — the audit log already recorded both purge kinds, and the admin audit query already filters by action; the tab merges manual-purge + auto-purge queries, newest first, capped at 200.

As built (per the signed-off mockup, fidelity-diffed before shipping): flat hairline rows with mono timestamp and mono original path; red manual pill with "purged by " vs teal automatic pill with "retention sweep · owner " (the audit user field means different things for the two actions, so the label disambiguates); path-prefix filter (button + Enter); audit-source footer.

Dogfood checklist (fresh login after the roll):

  • #admin/trash/log shows your #280 test purges as manual rows attributed to the purging admin
  • path-prefix filter narrows (e.g. /spaces/Fall)
  • empty-filter miss shows the empty-state line, not an error

With this, the epic #278 surface is complete: Retention (v0.6.48), Manual purge (v0.6.49 + v0.6.50 polish), Purge log (v0.6.51). Automatic-sweep rows will appear once an instance runs with auto-purge enabled.

Shipped as **v0.6.51** (PR #285), live on both dogfoods. Pure frontend — the audit log already recorded both purge kinds, and the admin audit query already filters by action; the tab merges `manual-purge` + `auto-purge` queries, newest first, capped at 200. As built (per the signed-off mockup, fidelity-diffed before shipping): flat hairline rows with mono timestamp and mono original path; red **manual** pill with "purged by <admin>" vs teal **automatic** pill with "retention sweep · owner <user>" (the audit user field means different things for the two actions, so the label disambiguates); path-prefix filter (button + Enter); audit-source footer. Dogfood checklist (fresh login after the roll): - `#admin/trash/log` shows your #280 test purges as **manual** rows attributed to the purging admin - path-prefix filter narrows (e.g. `/spaces/Fall`) - empty-filter miss shows the empty-state line, not an error With this, the epic #278 surface is complete: Retention (v0.6.48), Manual purge (v0.6.49 + v0.6.50 polish), Purge log (v0.6.51). Automatic-sweep rows will appear once an instance runs with auto-purge enabled.
Cordy closed this issue 2026-08-20 05:12:28 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#281
No description provided.