Skip to content

Add expiration, deletion, and storage reclamation for provisioned sites #2081

Description

@chubes4

Parent: #1970

Goal

Give the elastic preview fleet a safe, observable lifecycle so site identities and storage can be expired, deleted, retained, or reclaimed without cross-generation data exposure.

Scope

  • site TTL and retention policy at allocation time
  • explicit owner-authorized deletion and optional renewal
  • two-phase active -> deleting -> tombstoned lifecycle
  • mutation fence and operation cancellation before teardown
  • generation-bound identities preventing stale host, credential, queue, or cache reuse
  • bounded reclamation of canonical MDI objects, publications, uploads, mutable wp-content, staged artifacts, operation records, and claims
  • immutable deletion receipts and retryable garbage-collection checkpoints
  • quota release only after the lifecycle reaches its declared safe state

Acceptance criteria

  • Expiration blocks new mutations and claims while preserving the configured read/grace policy.
  • Deletion cannot race an import, canonical commit, publication promotion, or administrator claim.
  • Retried cleanup converges after Worker eviction or partial R2 deletion.
  • Reusing a human slug or hostname creates a new generation that cannot read old cookies, credentials, caches, operations, or objects.
  • Cross-site and cross-generation deletion attempts fail without mutation.
  • Receipts report retained and removed object counts/bytes plus unresolved work.
  • Local gates cover active operations, stale queue delivery, publication reads during grace, final tombstone, and allocation quota recovery.
  • No production deletion or deployment is performed by this issue.

AI assistance

OpenAI GPT-5.6 Sol via OpenCode identified the missing fleet lifecycle boundary and drafted this reclamation contract with Chris Huber.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions