DO droplet-create POST needs a provably-safe retry guard once the next raw-404 pins it as the culprit (follow-up to #677) #678
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.
Depends on
Reference
Matou/idss#678
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?
Follow-up from #677. #677 fixed the half of the un-retried-POST gap that
was safe to fix blind:
ensureSSHKey'sPOST /v2/account/keysnow retries atransient refusal (its fingerprint is computed locally, so a real duplicate
always 422s — retry is idempotent by construction). It deliberately did NOT
touch the other call site,
DigitalOcean.Create'sPOST /v2/droplets(
broker/internal/broker/provider_do.go:126), because blindly retrying acreate is not provably safe: if the first POST actually succeeded but its
response was lost, a naive retry creates a second droplet — an ADR 0047
no-half-rented violation from the other direction.
What this needs. #677 also added structured logging:
DigitalOcean.donow logs
method/path/statusat Info on every non-2xx DO response(
provider_do.go). The next time a rehearsal drive reds with a raw,un-retried DO refusal on
wizard-rent(or any rent path), that log will namethe exact call site instead of requiring elimination-by-wrapper-text like
#677's own investigation had to do. This ticket is not actionable until
that evidence exists — hence
needs-info, notready-for-agent/ready-for-session.Once the evidence pins
/v2/dropletsas the culprit, the fix needs aguard that makes retry provably safe, e.g.:
idss-gateway/idss-rentaltags(
GET /v2/droplets?tag_name=...) and match on the request's own generatedName(idss-gateway-<slug>-<rand4>, unique per rent) — if found, thefirst POST DID land; use that droplet instead of retrying. If not found,
retry is safe.
idempotency-key header and use that instead of a lookup.
Note for whoever picks this up: the session-runner host env DOES carry
DIGITALOCEAN_ACCESS_TOKEN+doctl— a real (low-cost, reversible) dropletcreate/list/destroy cycle can verify the tag+name lookup shape against the
live API before trusting it in the retry guard, without needing to force a
live 404-on-create (which stays unreproducible on demand). Extend
provider_do_test.gowith the equivalent pair #677 added for the ssh-keypath (
TestDO_Create...RetriesTransient...NotFound/...FailsLoudWhenPostNeverRecovers) once the guard is designed.Proposed default ruling (ADR 0174 rule 4): once real evidence names
/v2/dropletsas the culprit and the tag+name lookup is verified live, thisis a two-way door (revertible by commit, provable by the httptest suite plus
one live verification of the lookup shape) — an agent session may rule and
implement it without Ben, same as #677.
Ruled: DEFERRED (agent triage, ADR 0174 — 2026-09-03)
The
needs-infoevidence gate on this ticket has been answered, and theanswer reroutes the work rather than actioning this ticket's original fix:
DO refusals now reach the run directory.
POST /v2/dropletsred and itwas ruled + fixed (commit
0fc29770): a read-after-write on the SSH key,fixed by confirm-gating the key write (
ensureSSHKeypollsGET /v2/account/keys/{fp}until it resolves). It added no retry to thecreate POST — the ADR 0047 / #682 fence stays intact, now guarded by
TestDO_CreatePostIsNeverRetried.not_found,#1178 = 422 invalid-key) is a deterministic read-after-write, addressed by
gating the dependency writes — never the transient / lost-response 5xx this
ticket's retry-guard is scoped to.
So this ticket's specific hazard — a blind retry of
POST /v2/dropletsdouble-creating a droplet after a lost success response — targets a failure mode
that has never occurred and that the codebase has deliberately fenced off
(ADR 0047 / #682: the create POST must stay un-retried). It is neither rejected
(a genuine transient create failure would revive it) nor actionable now.
Revisit criteria (remove
deferred, relabel for the pipeline when any fires)4xx read-after-write) on
POST /v2/droplets, captured in the now-harvestedbroker log — i.e. a create refusal a retry would actually recover.
POST /v2/droplets, making aprovably-safe create retry possible without the tag+name lookup.
Two-way door: revertible by relabel/reopen; provable by the closed #681, the
#1178 ruling +
0fc29770, andTestDO_CreatePostIsNeverRetried. Not on theone-way-door list. Veto anytime.
prioritydropped: the live rehearsal blockeris #1178 (owned/fixed); this parked defensive follow-up should not sit at the
swarm-queue head.
Recurrence corroboration (#680, drive
20260822T185236Z, same sig3b0b824f61b8as this ticket's original).wizard-rentreddened at the identical fault-line — S4a settled on a rawbroker: DigitalOcean refused: Not Found: {"id":"not_found",...}before[data-status="address"]ever appeared;rent-fails-clean(faultinjection) stayed green;
artifacts/journey.jsonagain shows{"rows": null, "fault": null}(create never got far enough to found a droplet).Still not actionable. This run's
logs/carries no broker-processoutput at all — every
logs/guest-*.logis empty or a local-connectionfailure, consistent with no droplet ever existing to harvest from, but
there's no
d.domethod/path/status line anywhere in the run directoryeither. So this recurrence still can't say whether it hit the un-retried
/v2/dropletsPOST orensureSSHKeyexhausting its new 3-retry budget(#677) on an unusually long blip — the evidence this ticket is gated on
does not exist for this occurrence, for the same reason it didn't exist
before #677 landed the logging: the broker's own log never reaches the
run directory (it's a remote systemd service, not something the drive
harness spawns/captures). Filed #681 to close that specific gap, with
the exact SSH/journalctl harvest pattern (
scripts/lib/rehearsal-droplet.sh :341-345) already used for the droplet's own caddy log — it's linked asblocking this ticket.
Closed #680 (this recurrence's own ticket) as a duplicate/reinforcement
per its own filer's recommendation — advances #678, no new ruling made on
the
/v2/dropletsretry guard itself, which stays gated on real evidenceper this ticket's
needs-info.Ruled by agent under ADR 0174 — veto anytime.
Re-evaluated on
needs-infore-triage after this ticket's only blocker (#681,broker-log capture) closed and its successor #1178 landed.
Ruling:
needs-info→deferred(defer-with-criteria; also droppedpriority).Why. The evidence this ticket was gated on now exists — and it reroutes the
work:
POST /v2/dropletsred and it was fixed(
0fc29770) as a read-after-write on the SSH key, resolved byconfirm-gating the key write, with no retry added to the create POST
(ADR 0047 / #682 fence intact;
TestDO_CreatePostIsNeverRetriedproves it).deterministic read-after-write, not the transient / lost-response 5xx
this ticket's retry-guard is scoped to. That scenario has never been observed,
and the create POST is deliberately fenced against retry.
So this is neither rejected nor actionable now. It's parked with concrete revisit
criteria (added to the issue body under Ruled: DEFERRED): a genuine transient
5xx on
POST /v2/droplets, or DO shipping an idempotency-key for droplet-create.Why a two-way door. Revertible by relabel/reopen; provable by the closed
#681, the #1178 ruling + commit
0fc29770, andTestDO_CreatePostIsNeverRetried.Not on the one-way-door list.