Broker: a DEVICE-rent fault hook (the rehearsal-rentfail twin) so #1451 leg 14 device-fails-gateway-stands is deterministically drivable #1473
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.
Dependencies
No dependencies set.
Reference
Matou/idss#1473
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 broker needs a DEVICE-rent fault hook — the twin of the gateway
rehearsal-rentfailslugSplit out of #1451 (the two-machine build drive). Its leg 14 —
device-fails-gateway-stands— wants a deterministic added-device failure so the drive can prove the build stands the gateway up and hands over past a failed machine (DDR 0241 dec 4, #1461), showing the failedfleet-devicecard with its fault and no RUNNING pill, the community still usable.Why the ticket's mechanism doesn't work. #1451 leg 14 specifies "rent the added device into a region the snapshot does not span (GOTCHAS #220 makes this deterministic)". But GOTCHAS #220's own rule makes an out-of-span region a claim-stage refusal the offer never lists —
offer.regions= DO available ∩ the gateway snapshot's ownregions[](one region,syd1, today), and a pick is re-validated against that same intersection at rent time. So the founding rent picker cannot offer an out-of-span region for the drive to select through the UI; there is no deterministic device-reach failure to drive.The fix (mirrors the gateway path). The gateway
rent-fails-cleanhonesty leg is deterministic because the broker recognises a host whose slug starts withrehearsal-rentfailand, after a real Create, Destroys the box and returns a 502 stageprovision(ADR 0047,broker/internal/broker/rentals.go;app/tests/e2e/fixtures/rented.tsRENTFAIL_PREFIX). Add the device twin: the broker's device-rent (#1460,POST /v1/devices/rent) recognises a rehearsal-fault device name/slug and refuses at reach with a namedprovision/reach-stage error, no half-rented box (ADR 0047). Then #1451's leg 14 asserts:device:<id>:reachred with the broker's refusal (a remedy, not a hang);finishruns;fleet-devicecard with its fault and no RUNNING pill;sign-inleg).Scope: broker Go change + a broker deploy (matou-ops), plus un-
fixmeing leg 14 injourney.v2-fleet.spec.ts. Out of #1451's drive-authoring scope; #1451's leg 14 is carried as an honesttest.fixmepointing here.Ruled/filed by agent under ADR 0174 (a follow-up split per session rule 1 — file follow-ups rather than scope-creep the drive ticket).
Triage:
enhancement+ready-for-sessionRuled by agent under ADR 0174 — veto anytime.
The ruling:
enhancement,ready-for-session. Notneeds-design, not redundant, not a one-way door.Claim verified against the tree (HEAD):
rehearsal-rentfailhonesty hook exists —broker/internal/broker/rentals.gorecognises the prefix (strings.HasPrefix(slug, "rehearsal-rentfail"), ~L387/L418) and returns aprovision-stage 502 after a real create+destroy; the Go model to mirror isTestGateway_RentFailHostIs502WithStageinhttp_rent_test.go.Rentals.RentDevice(rentals.go:492) has no rehearsal-fault recognition — only the ordinary destroy-on-error path. So this is not already-implemented.POST /v1/devices/rent(#1460, now closed) is live inhttp.go— no open blocker, nodepends_onadded.test.fixme(journey.v2-fleet.spec.ts:630) whose own message names exactly this missing broker hook..out-of-scope/entry resembles this; nothing prior-rejected.Why a two-way door. Revertible by a later commit/label change; the broker Go hook is provable by a Go unit test mirroring the gateway rentfail test, and the leg by the live v2-fleet drive. It touches none of the one-way-door list: the fault prefix is a test-only branch on an already-authorised device-rent path (widens no surface, loosens no auth), no personal credentials, no member-facing trust accept, no data destruction; the drive rents-then-destroys lab droplets (routine lab spend). The broker deploy to matou-ops is a live-infra op with an established rollback pattern (ADR 0174 rule 1).
Why
ready-for-session, notready-for-agent. The work terminates in a broker deploy to matou-ops and its proof is leg 14 of the live v2-fleet drive (real helper + live broker + two real droplets). Both need an interactive session's standing — matou-ops deploy access and the live drive rail — which the swarm queue (ready-for-agent-only) deliberately excludes. This matches its parent #1451 and sibling #1450, bothready-for-session. Once the broker Go change lands on main, thedeploy-pendingrail carries the install/close per its normal broker-tree flow.Actionable, and well-specified. Add the device-rent fault twin to
RentDevicemirroring the gateway hook (a real create, then destroy, then a namedprovision/reach-stage*ProvisionError— no half-rented box, ADR 0047), with a Go unit test on theTestGateway_RentFailHostIs502WithStagemodel; add the device rentfail fixture helper alongsideRENTFAIL_PREFIX/rentfailSlug; un-fixmeleg 14 and assertdevice:<id>:reachred, gateway rows green +finish, the failedfleet-devicecard with its fault and no RUNNING pill, and a usable community (sign-in).Ruled by agent under ADR 0174 — veto anytime. The two-way, provable half of this ticket is landed on
main(7df3d0e0); the one-way residue is routed to a human.What landed (two-way, proven)
broker/internal/broker/rentals.go):RentDevicenow recognises a community whose slug starts withdeviceRehearsalFaultPrefix(rehearsal-devfail) and, after a REAL Create, Destroys the box and returns aprovision-stage*ProvisionError(errRehearsalDeviceFault) — the honest no-half-rented-device path (ADR 0047), the exact twin of the gatewayrehearsal-rentfailslug. The transient image-lookup fault is decoupled as the gateway's is (#752,errRehearsalDeviceFaultNoLiveCreate).rehearsal-devfail-<token>slug stands its GATEWAY up for real (Rentdoes not matchrehearsal-rentfail) while only the ADDED device faults — DDR 0241 dec 4's build-stands-past-a-fault. This is what makes leg 14 (device-fails-gateway-stands) deterministically drivable, resolving the GOTCHAS #220 dead-end (an out-of-span region is a claim-stage refusal the picker never offers).DEVFAIL_PREFIX/devfailSluginapp/tests/e2e/fixtures/rented.ts— theRENTFAIL_PREFIX/rentfailSlugtwin, a per-driverehearsal-devfail-<token>slug the picker never blocks.test.fixmenote injourney.v2-fleet.spec.tsrewritten to record the landed hook and name the gated remainder.Proof
TestDevice_RehearsalFaultSlugFailsCleanAtProvision(broker/internal/broker/http_device_test.go) — red→green (confirmed red with the hook reverted): 502 stageprovision, a real create-then-destroy, no ledger lease, and the gateway rented under the SAME host still standing.go vet+gofmt -lclean.rented.test.ts24/24 (incl. a devfail slug does NOT trip the gateway hook);vue-tsc+ eslint clean;playwright --liststill collects the spec (1 drive + 2 fixmes).Commit:
7df3d0e0.Why human
The ticket's own scope names two steps this one-shot session on matou-workstation cannot take — both one-way / gated doors:
broker.idss.nz). A production infra deploy to shared Matou infrastructure is outside a two-way door and outside this host's standing. Until it lands, a live drive finds no hook.devfailSlugthat stands the gateway and faults the added device, assertingdevice:<id>:reachred with the broker's refusal, the gateway rows green,finishruns, the hand-off shows the failedfleet-devicecard with its fault and NO running pill, and the community is usable (asign-inleg). The two-box live green (KVM + live broker + DO) is the rehearsal-executor frontier, not a one-shot session's to run.Step 2 is gated behind step 1 (un-fixme-ing before the deploy would red the next live v2-fleet run). Relabelled
ready-for-human.Closed 2026-10-21 (Ben's ruling): folded into the drive checklist #2055 — the live proof this ticket still owed is now a checklist item there, to be carried by the next drives on the latest versions. A proof that fails on the drive becomes a NEW ticket; this one is not reopened.