Consolidate DigitalOcean transient-5xx retries into one provider-boundary policy #753
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#753
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom / context
Filed from #752. Over one evening, three DigitalOcean transient-5xx call-sites each cost a full drive + a ticket + a
#720red-streak reset: #749 (Destroy DELETE, 504), #751 (LatestImageID snapshot-list GET, 500), #752 (the same GET, a sustained 500).Ben's steer on #752 (ruled by agent under ADR 0174 — veto anytime):
Proposed fix
Consolidate the ad-hoc per-call retries (
doRetryTransient#749/#751,ensureSSHKey#677's POST retry,pollActive#672's read-after-write) into one shared bounded-retry policy at the DigitalOcean provider boundary (broker/internal/broker/provider_do.go):Then the next flaky endpoint (tag ops, actions log, …) is covered without a new per-call ticket.
Scope note
This is a forward-looking refactor, NOT the fix for #752's red. #752's image call was already wrapped by #751; it red anyway because the outage was sustained past the fixed budget. #752 closed that red by decoupling the
rehearsal-rentfailprovision fault from the image lookup (a fixed retry budget can't outlast an arbitrarily long outage). This ticket is the separate class-closing cleanup Ben asked to track.Found while working
#752 (rent-fails-clean: DO 500 on image lookup pre-empts the provision-fault assertion).
Verified against the current code:
doRetryTransientalready exists and wraps several DO call sites (snapshot list, droplet delete, droplet get), but the droplet-create POST correctly stays on the un-retriedd.dopath (per ADR 0047 — a lost response to a successful create must not be retried blind). The ticket's proposed boundary preserves that exclusion explicitly rather than accidentally. Two-way door — refactor consolidating existing retry call sites behind one policy, revertible by commit, provable by extending the existingprovider_do_test.gohttptest suite — moving toready-for-agent.Agent Brief
Category: enhancement
Summary: Consolidate the DigitalOcean provider's ad-hoc per-call transient-retry logic into one shared bounded-retry policy at the provider boundary, so the next flaky endpoint doesn't need its own ticket.
Current behavior:
Transient 5xx/429 handling against the DigitalOcean API is implemented per call site: an existing
doRetryTransienthelper covers some GETs and the delete call,ensureSSHKey's POST has its own retry, and other call sites have none. Each new flaky endpoint discovered in production has required its own patch and its own incident.Desired behavior:
One shared retry policy sits at the DigitalOcean provider boundary and is applied uniformly: transient class only (transport errors, 5xx, 429), short exponential backoff, ~3 attempts, one loud log line per retry. Non-transient errors (4xx, permanent failures) are excluded and fail fast. The droplet-create POST is explicitly and permanently excluded from this policy — a 5xx there may mask a droplet that was actually created, and retrying blind risks a double-create (ADR 0047's no-half-rented rule) — the exclusion must be visible in the code, not incidental.
Key interfaces:
doRetryTransientandensureSSHKey's own retry).Acceptance criteria:
provider_do_test.go(or equivalent) covers: a transient failure that recovers within budget, a transient failure that exhausts budget and fails loud, and a permanent 4xx that is never retried.Out of scope:
#752's actual fix (the provision-fault decoupling) — this ticket is the separate class-closing cleanup, not a re-fix.swarm-claim host=matou-dev-server-01 run=10600
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #753 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope