Conversation
…nization Customer-success-facing regulatory erasure. DELETE /v1/admin/organizations/:id cancels Stripe subscriptions, deletes the Stripe customer, sweeps S3 objects under the org prefix, triggers vector-store deletions, cascades the DB row, then verifies zero leftover rows. Guarded by PlatformAdminGuard, slug confirmation, 2/min throttle, and a durable audit log written to the acting admin's other membership org (fails closed when absent). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Stop swallowing vector-store trigger errors so purge aborts if cleanup cannot be scheduled - Require durable audit-log write to succeed; remove try/catch that let purge proceed without a trail - Skip AdminAuditLogInterceptor on DELETE :id so it does not try to write an audit log against the just-deleted org - Capture S3 keys per-bucket and purge across all configured buckets so org-chart/attachment objects in APP_AWS_BUCKET_NAME are removed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…on-prefix S3 keys
- The completion audit log write no longer fails the request: the org
is already deleted, so a failure there would falsely tell the caller
the purge failed. The initiated audit record is the durable trail.
- verifyS3Clean now HEADs any schema-referenced key that does not live
under the `${orgId}/` prefix, so legacy/non-prefixed objects cannot
survive a "clean" verification.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- DTO: require non-empty confirm string (defense in depth around slug match) - findAdminMembershipOrgId: require logging membership to be >=1h old, so an admin cannot self-invite into an arbitrary org immediately before a purge to satisfy the audit-trail requirement - Emit a "failed" audit record when external cleanup throws, pairing the "initiated" record so the audit trail is never left open-ended - Move S3-clean verification before the DB delete so the purge can fail safely while the org still exists - Post-delete DB verification no longer throws on leftover rows (the org is already gone); return a partial-success result instead and log loudly Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
[dev] [Marfuen] mariano/feature-flag-compliance-timeline
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
[dev] [carhartlewis] lewis/comp-delete-org-trace
Contributor
|
🎉 This PR is included in version 3.28.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.
Summary by cubic
Add a platform-admin purge endpoint to permanently delete an organization and all related data (Stripe, S3 across buckets, vector-store) with pre-delete S3 verification, a durable audit log, and an Admin UI “Delete Permanently” flow. Also gate the Framework Timeline behind the
is-timeline-enabledflag usinguseFeatureFlagfrom@trycompai/analytics.Written for commit b08f78e. Summary will update on new commits.