standing: S4a rent dies at the DigitalOcean droplet-create — the just-registered SSH key is not yet visible to the create validator, and the create is the one DO hop with no read-after-write tolerance #1178
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#1178
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?
The failure
Drive
drive-device/20260903T042240Z(commit8237a0db, targetdevice) reds at legstandingafter 9.5s, and again at the nestedwizard-rent. Both carry one fault:artifacts/legs.json,artifacts/verdict.json(firstRedLeg: standing, 0 green / 2 red) andartifacts/journey.device-*/error-context.mdall agree. The page snapshot shows the wizard correctly parked atCreate · 3 of 5with a retriablerent-errorand a Retry button — the app-side surface behaved exactly as DDR 0190 decision 3 asks; the fault is upstream in the broker.The rent was raised against the LIVE broker (
IDSS_BROKER_URL=https://broker.idss.nz), so the DO calls happen on the broker droplet, not on the executor.Evidence — all three links checked against the live account
test-results/standing-rented/state/rent-operator/id_ed25519.pub:ssh-keygen -l -E md5→MD5:f3:5d:78:b6:37:3b:1f:a7:f5:f3:27:b4:af:65:a8:46— byte-for-byte the fingerprint DO refused.sshKeyFingerprint(broker/internal/broker/provider_do.go:616) is computing the right value; this is NOT a fingerprint-format bug.GET /v2/account/keysreturnsid 59072583,name idss-gateway-rehearsal-e-dac8,fingerprint f3:5d:78:…— the broker's own naming convention fromrentals.go:284. SoensureSSHKey's POST (provider_do.go:344-377) genuinely succeeded; it did not fall through its 422-duplicate branch on a phantom.GET /v2/account/keys/f3:5d:78:…resolves 200 today. And the 2026-08-31 gateway-image build (/home/swarm/swarm/gateway-image-build.log, rc 0) created its build droplet with--ssh-keys <MD5 fingerprint>fromscripts/gateway-image/preflight-ssh-key.sh. DO has not deprecated the identifier form.Suspected layer — the broker's DO provider, at the one un-retried hop
Key registered, identifier valid, create refused. The remaining explanation is read-after-write: at the instant of
POST /v2/dropletsthe droplet-create validator had not yet observed the keyensureSSHKeyregistered milliseconds earlier.provider_do.go:145—CreatecallsensureSSHKey, gets the locally-computed fingerprint back.provider_do.go:154— that fingerprint goes straight into"ssh_keys": []string{fp}.provider_do.go:164— the create POST calls the un-retriedd.do, neverd.doRetry. That bypass is correct and deliberate (ADR 0047 / #682: a 5xx replay could leak a second box) — but it also means a 422 here is terminal in milliseconds, with no settle window.This is the same DO read-after-write class the repo has already fixed twice — #677 (
isTransientOrUnsettledDO, the key POST's 404 tolerance) and #672 (pollActive's post-create droplet-GET 404). The create's dependency on a just-written account key is the one hop in that family that never got a settle gate;ensureSSHKeyreturns a fingerprint it has never confirmed DO can resolve.Fix shape (for the ruling). Gate the create on the write actually being visible: after the key POST, poll
GET /v2/account/keys/{fp}(idempotent — rides the existingdoRetry/isTransientDOpolicy, no new retry machinery) until it resolves, then create. Optionally also carry DO's ownssh_key.idout of the POST response body instead of the locally-computed fingerprint —ensureSSHKeycurrently discards that body entirely — but the numeric id does not by itself dodge the propagation lag, so the confirm-gate is the load-bearing half. Critically, this adds NO retry to the droplet-create POST, so ADR 0047 / #682's fence stays intact.Side effect to sweep. No droplet leaked (0 droplets tagged
idss-gateway; ADR 0047 holds). But account key59072583is orphaned:Destroyreaps a key by resolving it from its droplet (provider_do.go:192), and here no droplet ever existed. Same #708 leak family — one stale key per red rent of this shape.Why the healer refused rather than fixed
Refusal rule 3 (product-behaviour surface). The defect and its fix live in
broker/internal/broker/provider_do.go's droplet-create path — literally what a deploy does when it provisions a community's gateway. That is a design decision, not harness plumbing, and it sits directly against the ADR 0047 / #682 fence that deliberately forbids retrying the create POST; anything moving near that boundary deserves a ruling rather than an in-lane heal.Two independent bars also block a self-fix: the broker is a deployed service at
broker.idss.nz, so a commit in this checkout changes nothing until thebroker-deployrail runs (infra state outside this checkout), and there is no targeted check on this machine that can exercise the fix against live DO —go test ./broker/internal/brokerruns against anhttpteststub, which would pass either way. Healing here would have re-fired the drive straight back into the same red at the cost of another paid stand-up.Not a flake to paper over. The red is honest and the app-side surface is right; the rent must not proceed on a key the provider cannot resolve. Do not widen the fixture wait or soften the
s4aRentfault check inapp/tests/e2e/fixtures/wizard.ts:225-233— the 8-minute race there already did its job, failing fast on the broker's own stage instead of sitting out the address wait (#897).drive
20260903T042240Zred atstanding:S4a rent was declined in place by the broker (rent-error), never reaching S5 — provision — broker: DigitalOcean refused: Unprocessable Entity: {"id":"unprocessable_entity","message":"f3:5d:78:b6:3evidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260903T042240Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled by session under ADR 0174 — veto anytime. The fix shape this ticket proposed is adopted verbatim and LANDED:
0fc29770.The ruling:
ensureSSHKeyconfirm-gates BOTH its return paths (fresh registration and the 422-duplicate branch) onGET /v2/account/keys/{fp}resolving, riding the existingdoRetry/isTransientOrUnsettledDOpolicy. The droplet-create POST gains NO retry — the ADR 0047/#682 fence is untouched, andTestDO_CreatePostIsNeverRetriedstill proves it. Two-way: revertible, same family as the #677/#672 precedents. The duplicate branch is gated too because a released rental's owed reap (#756) can delete the very key the duplicate 422 vouched for — this drive's own probable variant.New pins: create waits out the lag and still POSTs exactly once; a never-resolvable key fails LOUD naming it with ZERO droplet POSTs (the can-fire half); the duplicate path confirm-gates. Broker suite green; gofmt + go vet clean.
Deploy: the fix is not live until the
deploy-brokerrail installs it on the mail droplet (GOTCHAS: a broker change is not live until broker-deploy ran). This session is watching the installed binary's mtime and will close this ticket only once the live broker carries0fc29770— the drive re-fires on that close.Orphan key 59072583 (
idss-gateway-rehearsal-e-dac8): deliberately NOT deleted yet — the survivingstanding-rented/state/rent-operatorkey means the re-drive's rent may 422-dup against it and now resolve through the gate. Sweep it once the phase-7 drive is past the rent (the #708 leak family, one stale key per red rent of this shape).session-runner: two unattended attempts did not advance this ticket — labelled
agent-blockedfor a human look (ADR 0174 escalation). Latest session log:/home/swarm/.local/state/matou-session-runner-Matou-idss/logs/run-1178-20260903T064511Z.logon the workstation. Removeagent-blocked(and the stale fail counter if re-arming by hand) to let the runner retry.session-runner: two unattended attempts did not advance this ticket — labelled
agent-blockedfor a human look (ADR 0174 escalation). Latest session log:/home/dev/.local/state/matou-session-runner-Matou-idss/logs/run-1178-20260903T070012Z.logon the workstation. Removeagent-blocked(and the stale fail counter if re-arming by hand) to let the runner retry.DEPLOY VERIFIED — closing; the drive re-fires on this close.
Live check on the mail droplet 2026-09-03:
/usr/local/bin/ourcloud-brokermtime 07:31:23Z,ourcloud-broker.sha=eb3f630c— andgit merge-base --is-ancestor 0fc29770 eb3f630cholds, so the running binary CARRIES the confirm gate (served-bits-vs-main discipline, never trusting the mtime alone).ourcloud-broker.serviceactive; /v1/gateways/offer answering.Credit where due: this deploy was stranded twice by the CI seam and was walked home by the swarm — #1180/#1182 greened the seam, two re-triggers (
3daafbdc,eb488739), and #1183 raised the auto-deploy walk horizon so a far-back orphaned broker fix self-heals in future.Remaining sweep (not blocking): orphan account key 59072583 (
idss-gateway-rehearsal-e-dac8) — delete once the phase-7 drive is past the rent.