Purging a tenant left its Prüfwerk database and files behind (found in the entry-offer fulfilment research: needed before the first 90-day deletion).
What changes
DELETE /v1/admin/tenants/{id} first calls Prüfwerk DELETE /api/v1/platform/tenants/{id}/data with the registry's service token and {"confirm": "<tenant id>"}.
Any failure → 502 pruefwerk_error, nothing removed; staff retry (the Prüfwerk call is idempotent).
No Prüfwerk in the environment's catalog (on-prem without it) → step skipped, audit says not_configured.
tenant.purged audit metadata: pruefwerk_data and pruefwerk_files_not_removed (only when > 0).
Checked with the Prüfwerk session (code v0.4.19)
A tenant Prüfwerk never provisioned answers 200 {"status":"deleted",…} (DB created then dropped, no files).
tenant-registry-svc-stage / -prod are in PLATFORM_ALLOWED_CLIENTS for stage and prod; it is the same client the registry already uses for /targets.
Tests: TestPurgeErasesPruefwerkData (failure keeps everything, request shape, audit, no-catalog skip); full suite green locally. Nothing was purged on stage to try it.
Purging a tenant left its Prüfwerk database and files behind (found in the entry-offer fulfilment research: needed before the first 90-day deletion).
**What changes**
- `DELETE /v1/admin/tenants/{id}` first calls Prüfwerk `DELETE /api/v1/platform/tenants/{id}/data` with the registry's service token and `{"confirm": "<tenant id>"}`.
- Any failure → 502 `pruefwerk_error`, nothing removed; staff retry (the Prüfwerk call is idempotent).
- No Prüfwerk in the environment's catalog (on-prem without it) → step skipped, audit says `not_configured`.
- `tenant.purged` audit metadata: `pruefwerk_data` and `pruefwerk_files_not_removed` (only when > 0).
**Checked with the Prüfwerk session (code v0.4.19)**
- A tenant Prüfwerk never provisioned answers 200 `{"status":"deleted",…}` (DB created then dropped, no files).
- `tenant-registry-svc-stage` / `-prod` are in `PLATFORM_ALLOWED_CLIENTS` for stage and prod; it is the same client the registry already uses for `/targets`.
**Tests**: `TestPurgeErasesPruefwerkData` (failure keeps everything, request shape, audit, no-catalog skip); full suite green locally. Nothing was purged on stage to try it.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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>
sharang
merged commit cc12c6c810 into main2026-11-30 20:23:47 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Purging a tenant left its Prüfwerk database and files behind (found in the entry-offer fulfilment research: needed before the first 90-day deletion).
What changes
DELETE /v1/admin/tenants/{id}first calls PrüfwerkDELETE /api/v1/platform/tenants/{id}/datawith the registry's service token and{"confirm": "<tenant id>"}.pruefwerk_error, nothing removed; staff retry (the Prüfwerk call is idempotent).not_configured.tenant.purgedaudit metadata:pruefwerk_dataandpruefwerk_files_not_removed(only when > 0).Checked with the Prüfwerk session (code v0.4.19)
{"status":"deleted",…}(DB created then dropped, no files).tenant-registry-svc-stage/-prodare inPLATFORM_ALLOWED_CLIENTSfor stage and prod; it is the same client the registry already uses for/targets.Tests:
TestPurgeErasesPruefwerkData(failure keeps everything, request shape, audit, no-catalog skip); full suite green locally. Nothing was purged on stage to try it.🤖 Generated with Claude Code
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>