Files
pruefwerk/docs
Sharang ParnerkarandClaude Opus 5.5 7c447f0447
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 8m24s
feat(retention): deleting a target or erasing a tenant removes its files (#289)
Customer code stayed on disk forever: deleting a target removed its
records, and tenant erasure dropped its database, but clones, uploads,
unpacked trees and blobs remained. On a small node that is disk; for
customer code it is an incomplete GDPR erasure.

- retention: every path of a target (uploads, work trees, the scan and
  ingest clones, its blobs) and of a tenant (its clone and runner-artifact
  directories). Removal refuses anything outside the two configured base
  directories and treats an already-missing path as done.
- DELETE /api/v1/targets/{id} reads the target first and removes its
  files after its records.
- DELETE /api/v1/platform/tenants/{id}/data collects every target's paths
  before dropping the database, then removes them; the response counts
  removed and unremovable paths.
- Guide: docs/guide/data-retention.md, the retention table.

Not yet: a time-based sweep for files left by an interrupted deletion, and
the slug check on tenant erasure (#265).

Tests: a target's files go and another target's stay; nothing outside the
data directories is touched; tenant paths; and an integration test
(MongoDB) that uploads a file, deletes the target and finds it gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-23 18:03:26 +02:00
..
2026-03-08 13:59:50 +00:00