Skip to content
9. Lifecycle enforcement outside the step chain

9. Lifecycle enforcement outside the step chain

  • Status: Accepted
  • Date: 2026-10

Context

Workspaces are deleted after a TTL or a period of inactivity, which needs a time-based wake-up. The lifecycle step used to schedule it by always asking to be re-run later. That step therefore never reported success, the chain was never fully True, and the operator never drift-checked workspaces: deleted pods were not recreated and configuration changes were not detected. A workspace stuck on an earlier step also never expired.

Decision

The lifecycle step only keeps status.expiresAt up to date and always succeeds. Enforcement moves to the controller’s Reconcile, around the chain: an expired workspace is deleted before the chain runs, and every other reconcile is requeued no later than the next deadline. The deadline is computed by one function, helpers.LifecycleDeadline.

Consequences

  • Self-healing and drift detection work, because every step can succeed.
  • Expiry is enforced even for a workspace whose chain is failing.
  • The rule generalizes: timers belong outside the step chain.