feat(purge): erase the tenant's Prüfwerk data before deleting it #154

Merged
sharang merged 1 commits from feat/purge-pruefwerk-data into main 2026-11-30 20:23:47 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 933d9d950b feat(purge): erase the tenant's Prüfwerk data before deleting it
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 7m39s
ci / image (pull_request) Skipped
Purging a tenant left its Prüfwerk database and files behind. The purge
now first calls Prüfwerk's DELETE /api/v1/platform/tenants/{id}/data with
the registry's service token (the client is already allowed on the
platform routes in stage and prod). Any failure answers 502
pruefwerk_error and removes nothing, so staff can retry; the call is
idempotent. Without Prüfwerk in the environment's catalog (on-prem
without it) the step is skipped. The tenant.purged audit event records
pruefwerk_data (deleted / not_configured) and files Prüfwerk could not
remove.

Needed before the first 90-day deletion of an entry-offer workspace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:14:19 +01:00