device-add: the printed install one-liner needs root but carries no sudo — as an ordinary user it dies with a bare curl: (23) #2002
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#2002
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
The control panel's device-add code screen prints
curl -sSf https://<apex>/get | sh -s -- <CODE>(dashboard/src/lib/deviceAdd.ts:321). Run as it is printed, by the machine's ordinary user, it dies:Seen 2026-09-30 00:3xZ on
bens-mac-04(Ubuntu 24.04) joining Whakatōhea Demo by hand.Cause
The served script (
internal/controlapi/installscript.go:46) writes the agent to/usr/local/bin/.idss-agent.tmp, which is root-owned. Nothing in the script checksid -u, and nothing in the printed command or the code screen's copy says the command needs root. The only signal is curl's exit 23, which names neither the path nor the reason.Fix
sudo(… | sudo sh -s -- <CODE>). Exit non-zero before any fetch.installCommand, and the rented/own-VPS forms that build the same line ininternal/controlapi/enroll_rent.go:271) carries thesudo, or the code screen's copy says it plainly beside the command. The wireframe for P2-S2 is the contract — check it before changing the printed line.Related
Found in the same hand run as the cold-install VM-create defect and the silent guest download (filed alongside).
Siblings
Found in the one hand run (bens-mac-04 → Whakatōhea Demo, 2026-09-30): #2003 #2004 #2005 #2006 #2007
swarm-claim host=bens-mac-04 run=36153
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
Scope note on
enroll_rent.go(line ~271,deviceEnrolCloudInit). The Fix lists the rented/own-VPS form as a place to carrysudo, but that builder emits cloud-init user-data (#!/bin/shrun at the generic gateway image's first boot,CloudInit:at enroll_rent.go:213) — cloud-init runs it as root, so the served script's new non-root guard passes there without a change. Addingsudoto that path would be wrong: a minimal cloud image may not ship sudo and there is no controlling terminal at first boot, so it could break the auto-enrol the operator never sees. Left unchanged.Two-way door: revertible by a one-line edit; proven by
go test ./internal/controlapi/(the served-script root guard) and the dashboard unit test on the printed command.Shipped: the served script (
installscript.go) refuses before any fetch whenid -uis non-zero, naming/usr/local/binand the| sudo sh -s -- <CODE>form; the printed operator one-liner (dashboardinstallCommand) and the P2-S2 wireframe both carrysudo.close-report for #2002 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
/dev/ttyis sudo's inner pty fed by the dead curl pipe, the install is parked by SIGTTIN #2038