Skip to content

[comp] Production Deploy#2636

Merged
Marfuen merged 11 commits intoreleasefrom
main
Apr 22, 2026
Merged

[comp] Production Deploy#2636
Marfuen merged 11 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 22, 2026

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-enabled flag using useFeatureFlag from @trycompai/analytics.

Written for commit b08f78e. Summary will update on new commits.

carhartlewis and others added 9 commits April 20, 2026 18:35
…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
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Apr 22, 2026 4:45pm
comp-framework-editor Ready Ready Preview, Comment Apr 22, 2026 4:45pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Apr 22, 2026 4:45pm

Request Review

@vercel vercel Bot temporarily deployed to staging – portal April 22, 2026 15:01 Inactive
cubic-dev-ai[bot]
cubic-dev-ai Bot previously approved these changes Apr 22, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Auto-approved: Low-risk UI change gating a component behind a feature flag. Isolated logic with no impact on core business or infrastructure.

[dev] [carhartlewis] lewis/comp-delete-org-trace
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.28.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants