carry of #27870: fix cloud environment cleanup retries

Merged
TE
7d ago
+126-8

Carry of #27870: persist failed environment builder and warm-up VM cleanup and retry until guarded deletion or absence is confirmed.

Build completion now records both cleanup tasks durably. Each gets a distinct ordered-ledger position; sharing a position previously aborted the completion transaction and left the build marked building. The completion alarm attempts cleanup after success or terminal setup failure, and retries preserve backoff across owner restarts.

Validation: the prior backend run failed the cleanup and environment cases with duplicate ledger positions. Updated restart tests also assert the first durable cleanup attempt occurs in the completion alarm. Focused fleet run: https://github.com/manaflow-ai/cmux/actions/runs/41074216323 (result pending).

Original: https://github.com/manaflow-ai/cmux/pull/27870
Agent session: agent session