You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Projects/organizations: permanent (hard) deletion after archive #841
Organizations and projects can only be archived (soft-deleted); there is no way to permanently delete them or their data from the product.
POST /meta/organizations/:orgId/archive and POST /meta/projects/:projectId/archive in apps/api/src/routes/project-dashboard.ts (~L544–600) only set deleted_at = now(), gated by canArchiveOrganization / canArchiveProject.
Every read path filters on deleted_at: null, so archived rows (and their events, errors, sessions, API keys, alert rules, etc.) stay in Postgres indefinitely.
No purge job for archived orgs/projects exists in apps/api/src.
Seen in practice during the Business Heartbeats prod test (2026-10-20): the test project could be archived but not removed.
Proposal (scope to be refined)
Owner-only "Delete permanently" for an already-archived project/org, with typed-name confirmation and an audit log entry.
Delete or cascade dependent data (check existing onDelete relations in apps/api/prisma/schema.prisma), revoke all API keys and MCP/agent tokens for the scope first.
Optionally: automatic purge of archived orgs/projects after a grace period (e.g. 30 days), restorable until then.
Billing: block or handle orgs with an active Stripe subscription.
Data retention / GDPR
Retained archived data may include end-user personal data (user IDs, IPs, emails in events/errors). GDPR Art. 17 (erasure) and storage limitation expect a real deletion path; the privacy policy and DPA should state the archive→deletion timeline. Backups retention should be documented separately.
Not a security bug; normal/low priority backlog item.
Activity