enroll+broker: the LIVE rent-a-device half — broker device-rent endpoint (user_data) + control-plane broker composition (WithEnrollDeviceRent, has_broker) so the panel rent actually provisions a droplet #1460
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.
Reference
Matou/idss#1460
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?
Why this exists
Blocks the standing drive #1400 (RENT A DEVICE FROM THE PANEL). The drive's
rentleg doesPOST /api/v1/enroll/renton the standing gateway and expects a REAL droplet to be provisioned that then enrols itself. That end-to-end path does not exist — neither in the served control plane nor in the broker — so the drive cannot fire past the rent leg. #1397/#1398 landed the seam and the contract; the live wiring #1398's close report explicitly deferred to #1400 ("Next (#1400): compose the real broker + wireWithEnrollDeviceRent, flippinghas_brokertrue") was never built, and the broker has no device-rent HTTP route.Evidence (on current
mainf2f71a52, and live)control-plane/cmd/control-plane/compose.go:914hardcodesHasBroker: false;controlapi.WithEnrollDeviceRenthas no call site anywhere (only a comment at compose.go:910). NoEnrollDeviceBrokeris ever constructed.internal/brokerclienthas no device-rent method (noRentDevice, noServerOffermapping tocontrolapitypes).broker/internal/broker/http.goregisters/v1/gateways/{offer,rent,renew,release}only — no device-rent route.Rentals.Rent(rentals.go:322) does not threaduser_data. The provider layer already supports it (provider_do.go:215,provider.go:38 UserData) — it is just unreachable over HTTP.rehearsal-e.idss.nz:x-idss-composition: resting;GET /api/v1/enroll/configreturns{community_domain, release_channel}with nohas_broker;GET /api/v1/enroll/places→ 404;GET /api/v1/enroll/server-offer→ 404.Scope (the live rent half)
broker/internal/broker): a device-rent HTTP endpoint that provisions a droplet from the current gateway image with caller-supplied cloud-inituser_data, threading itRentals→Provider.Provision(UserDataalready wired). The rented device is recorded in the same rentals ledger so it is TTL-reaped and explicitly releasable (drive AC2: "the broker's rentals ledger records the reap"). Proposed default (adoptable under ADR 0174, else raise as a DDR): a device rent is authorised by the community gateway's own claim secret (the gateway rents under its own host), and the device rental is keyed by the device name under that host soreleasereaps exactly it. Red-before-green broker http tests.brokerclient: aRentDevice(ctx, spec)+ServerOffer(ctx)implementingcontrolapi.EnrollDeviceBroker, mapping the broker's offer/rent wire to the controlapi types.controlapi.WithEnrollDeviceRent(broker, enrollLedger, cfg), and setEnrollConfig.HasBroker = true. Resting/broker-less stayshas_broker:false(ADR 0100). Red-before-green composition + live-server seam tests.broker.idss.nz); the standing gateway serves the new control-plane bits (re-warm / reseed-publish) sox-idss-releasecarries the rent op and/api/v1/enroll/{places,server-offer}answer 200.Acceptance
GET /api/v1/enroll/server-offerreturns the broker's real offer andGET /api/v1/enroll/configcarrieshas_broker:true.POST /api/v1/enroll/rent {name,region,preset}provisions a real droplet, mints one auto-approve server code for it, returns{ip,specs,region}, and revokes the code + leaves no half-rented box on a broker fault (ADR 0047).Not in scope
The drive itself (#1400) and the standing-gateway
restingobservation (see #1400 comment).journey.rented-device.spec.tson the standing rented community: Overview → Add a device → place → rent → the box calls in → the device card → remove → reap; GREEN is the only closejourney.rented-device.spec.tson the standing rented community: Overview → Add a device → place → rent → the box calls in → the device card → remove → reap; GREEN is the only close #1400swarm-claim host=matou-dev-server-01 run=22605
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1460 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
journey.rented-device.spec.tson the standing rented community: Overview → Add a device → place → rent → the box calls in → the device card → remove → reap; GREEN is the only close #1400