rehearsal-3: get.idss.nz bootstrap service — install script + pinned agent, the gateway /get contract mirrored #515
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.
Blocks
Reference
Matou/idss#515
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?
Part of rehearsal phase 3 — gateway from home (spec
docs/superpowers/specs/2026-08-14-183-phase-3-home-gateway-rehearsal-design.md, plandocs/superpowers/plans/2026-08-14-183-phase-3-home-gateway-rehearsal.md).The plan section below is the work, verbatim; its Interfaces block names what neighbouring tasks consume — keep those names exact.
Global constraints (apply to every step)
CONTEXT.md) in ALL copy, comments,commit messages: founding, gateway, agent, install command,
enrollment code — never installer/daemon/token/join-key.
error with the real reason, never a silent skip or a made-up value.
install command is a doorway, not a kept tool (ADR 0028).
closes #NNN(or any close keyword) in commits or issue bodiesfor the standing drive issue family — say "advances #NNN". Even DESCRIBING a
close can auto-close (2026-08-10 lesson, twice).
STATUS.mdin the same commit(CLAUDE.md rule); the drive-issue minting commit (Task 9) carries the
STATUS + runbook update for the whole arc.
.sandcastle/.env(it forwards into worker containers);host-only secrets live in the executor's
rehearsal-env.sh(2026-07-11lesson).
Task 1: The
get.idss.nzbootstrap service (serving half)Files:
bootstrap/cmd/bootstrap/main.gobootstrap/cmd/bootstrap/main_test.gobootstrap/cmd/bootstrap/installscript.go(the servedshscript asa Go string + its template test)
internal/controlapi/install_doorway.go— no behavior change; onlyif the handler needs exporting for reuse (see below), keep the gateway
doorway's semantics byte-identical.
Interfaces:
Consumes:
internal/controlapi.WithInstallDoorway(src AgentSource)andAgentSource(Agent(ctx, arch) (release string, binary []byte, err error))— the EXISTING gateway
/getcontract this service mirrors(
internal/controlapi/install_doorway.go).Consumes:
internal/joindevice-end expectations — the install script mustleave exactly what
internal/install'sServiceadapter leaves (binary laiddown, persistent systemd service started now AND at boot) and then run the
agent's terminal join with the code (
agent/cmd/agentsubcommands; readinternal/join/cli.go's package comment for the P2 doorway contract beforewriting the script).
Produces: an HTTP service,
bootstrap serve --dir <artifacts> --addr :8091:GET /→text/x-shellscript, the install script.GET /get?arch=x86_64→ the agent binary from<artifacts>/agent-x86_64with
X-OurCloud-Releasefrom<artifacts>/RELEASE— 400 on missingarch param, 503 when nothing honest is seeded (ADR 0100), matching the
gateway doorway's behavior.
depend on it): POSIX sh; takes the enrollment code as
$1; refuses(exit non-zero, plain message) when
uname -m≠x86_64or$1isempty; fetches
https://get.idss.nz/get?arch=x86_64to/usr/local/bin/ourcloud-agent; writes + enables + starts theourcloud-agent.servicesystemd unit; then execs the agent's terminaljoin with the code in the foreground so consent (S8) happens in the
operator's terminal (ADR 0024).
Step 1: Write the failing contract tests —
main_test.gooverhttptestagainst the composed mux:go test ./bootstrap/...— expect FAIL(
newHandlerundefined).newHandler(dir string) http.Handler: adir-backed
AgentSource(Agentreadsagent-<arch>+RELEASE, errorwhen either is missing) composed with
controlapi's doorway registration for/get(reuseWithInstallDoorway/registerInstallDoorway; export the minimal hook ifneeded — the gateway's own behavior must not change), plus the
/scripthandler from
installscript.go.main= flag parsing +http.ListenAndServe(follow
broker/cmd/broker/main.go's shape for logging/flags).go test ./bootstrap/... ./internal/controlapi/....a temp file and runs
sh -non it (syntax gate; skip with the real reasonif
shis absent in the sandbox).bootstrap: get.idss.nz serves the install script and the pinned agent (spec 2026-08-14, mirrors the gateway /get doorway).swarm-claim host=matou-dev-server-01 run=5898
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #515 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope