mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
Rework the force-delete route guard to differentiate static blockers (`managed_local`, `instance_default`) from the runtime blocker (`active_runtime_use`). Static blockers always reject; the runtime blocker rejects unless `?force=true` is set. When `force=true`, attempt to cancel any active custom image setup session; if cancellation leaves the session in a non-terminal state (`starting`, `waiting_for_user`, `capturing`), return a 409 rather than deleting the row. Otherwise, release all active leases before proceeding to `removeIfDeletable`. Typed the active-status set as `const satisfies readonly EnvironmentCustomImageSetupSessionStatus[]` to ensure future status additions raise a compile error here. Co-Authored-By: Paperclip <noreply@paperclip.ing>