[DEF-2] Permanent create errors burn the full retry budget #23

Closed
opened 2026-07-04 15:30:47 +00:00 by a73x · 2 comments
a73x commented 2026-07-04 15:30:47 +00:00 (Migrated from git.a73x.sh)

[claude 2026-07-03] Deferred from disk-guard review. A permanent misconfiguration (disk_gb below base image) still runs MaxCreateAttempts=3 full attempts (tap+image work each time) before terminal failed. Introduce a permanent-error sentinel (errors.Is) returned by cloudhv.PrepareDisk's shrink/range guard; reconcile create() fast-fails to terminal on it. E2E in sandbox: disk_gb=1 VM reaches failed with CreateAttempts==1 in the agent record (inspect record.json in-VM) and the correct last_error via API.


Migrated from git-collab issue fdbd4d981abf595f8a9b4ac5815274ab806d29b4.

Original author: a73x dev@a73x.sh.

Close reason: Fixed by patch 75f86014

[claude 2026-07-03] Deferred from disk-guard review. A permanent misconfiguration (disk_gb below base image) still runs MaxCreateAttempts=3 full attempts (tap+image work each time) before terminal failed. Introduce a permanent-error sentinel (errors.Is) returned by cloudhv.PrepareDisk's shrink/range guard; reconcile create() fast-fails to terminal on it. E2E in sandbox: disk_gb=1 VM reaches failed with CreateAttempts==1 in the agent record (inspect record.json in-VM) and the correct last_error via API. --- Migrated from git-collab issue `fdbd4d981abf595f8a9b4ac5815274ab806d29b4`. Original author: a73x <dev@a73x.sh>. Close reason: Fixed by patch 75f86014
a73x commented 2026-07-04 15:39:03 +00:00 (Migrated from git.a73x.sh)

[claude 2026-07-04] Picking this up. Consumer-owned marker interface{ Permanent() bool } checked by reconcile failCreate (jump straight to terminal failed); cloudhv wraps its disk-guard errors (shrink, out-of-range) as permanent. E2E: sandbox disk_gb=1 -> failed with CreateAttempts==1 in the agent record.

[claude 2026-07-04] Picking this up. Consumer-owned marker interface{ Permanent() bool } checked by reconcile failCreate (jump straight to terminal failed); cloudhv wraps its disk-guard errors (shrink, out-of-range) as permanent. E2E: sandbox disk_gb=1 -> failed with CreateAttempts==1 in the agent record.
a73x commented 2026-07-04 17:59:23 +00:00 (Migrated from git.a73x.sh)

[claude 2026-07-04] CORRECTION to the e2e note: the agent record showing CreateAttempts=3 is NOT a stale binary — it is the fix's own encoding. failCreate sets rec.CreateAttempts = MaxCreateAttempts on a permanent error to trip the existing terminal check immediately (spend-the-whole-budget-at-once). The genuine proof of fast-fail is the ~20ms time-to-terminal-failed measured over the API against the sandbox agent: a pre-fix binary needed 3 real create attempts spread across reconcile ticks (>=20s), whereas the permanent error went terminal within a single Step. The unit test TestPermanentCreateErrorFailsTerminallyInOneAttempt independently pins prepCalls==1 (exactly one provisioner invocation). Both confirm the behavior; my earlier 'pre-fix binary' guess was wrong.

[claude 2026-07-04] CORRECTION to the e2e note: the agent record showing CreateAttempts=3 is NOT a stale binary — it is the fix's own encoding. failCreate sets rec.CreateAttempts = MaxCreateAttempts on a permanent error to trip the existing terminal check immediately (spend-the-whole-budget-at-once). The genuine proof of fast-fail is the ~20ms time-to-terminal-failed measured over the API against the sandbox agent: a pre-fix binary needed 3 real create attempts spread across reconcile ticks (>=20s), whereas the permanent error went terminal within a single Step. The unit test TestPermanentCreateErrorFailsTerminallyInOneAttempt independently pins prepCalls==1 (exactly one provisioner invocation). Both confirm the behavior; my earlier 'pre-fix binary' guess was wrong.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
a73x/eitri#23
No description provided.