bootstrap reseed pipeline: CI publishes the agent artifact, the mail droplet pulls — plus the get.idss.nz pin-policy ADR #601
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#601
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?
Problem
get.idss.nz's served agent is reseeded by hand, and only Ben's laptop can do it (the artifacts dir is root-owned on the mail droplet; the workstation provably cannot SSH there — #597 and #598 both dead-ended
ready-for-humanon exactly this wall). Result on 2026-08-19: the pin sat 4 days stale, drives went red on an already-fixed bug, and two writers (a deliberate ADR 0181 re-stage to75dfba9, then the95c428f-era reseed) had no shared rule for what the pin should be.Ruling needed first (the ADR)
Pin policy for get.idss.nz. ADR 0051/0100 posture is a pinned release, fail-loud when unseeded. Auto-tracking
mainquietly turns the pin into a mirror — and whatever this endpoint serves is installed as root-level code on real machines, so "swarm commit → live install endpoint, ungated" is a supply-chain decision, not a workflow tweak. Options to rule between:mainthat passed CI; automation moves it; the pin remains explicit (aRELEASEfile naming one sha) and every move is logged + announced. Revisit before real-customer installs.main-tracking staging pin for drives + human-advanced production pin. Most future-proof, most machinery.Mint the ADR from the then-current sequence when this lands; record the choice and its revisit trigger (first non-rehearsal install).
What to build (shape: CI publishes, droplet pulls — no new inbound doors)
mainwhere tests are green and the change touches the agent-affecting set (agent/,go.mod,go.sum, agent-importedinternal/), buildCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./agent/cmd/agentand publishagent-x86_64+ its sha256 + the git sha as a Forgejo release/package asset (Forgejo generic package registry is the natural home; token = the swarm machine PAT, write scope on packages only).RELEASE; when policy says advance: download, verify sha256,installbinary (0755) +RELEASE(0644) into/opt/ourcloud-bootstrap/artifacts/, then self-probex-ourcloud-releaseand log the move. Runs as root or a dedicated user with write on the artifacts dir — rule which during implementation.PINoverride file (orpin <sha>subcommand) so work like ADR 0181's script-staging pins intentionally through the mechanism, visibly, instead of around it — and the alarm still fires if an override goes stale.Why human
Companion:
#600(drive-preflight staleness gate) is the cheap guard that protects drives under ANY pin policy and needs no infra — it should land regardless.Evidence trail: #597, #598 (closed 2026-08-19, reseed proof on #598's close comment), rehearsal-183 red chain #581→#595→#597→#598.
Ben ruled (2026-08-19, live session): option A — tracking pin, for the rehearsal era.
mainthat passed CI where the change touches the agent-affecting set; automation moves it. The pin stays explicit (RELEASE names one sha), every move is logged and announced (Mattermost), never a silent mirror.PINoverride that still alarms when stale) land regardless, per the ticket.origin/main'sdocs/adr/first (tonight alone consumed 0180–0182).!. Until the pipeline is live, stale-stage reds keep routing through #600's preflight gate + manual re-stage.Armed ready-for-agent.
Agent code landed —
9b56af3onorigin/mainBoth halves built against your ruling (option A, tracking pin). ADR minted as 0185 (next-free on
origin/main; 0184 was the last taken).Landed:
docs/adr/0185-get-idss-nz-serves-a-tracking-pin-for-the-rehearsal-era.md— the policy + the revisit trigger (first non-rehearsal install → expected option C).scripts/lib/bootstrap-reseed-lib.sh— pure decision core (target w/ PIN override, should-advance, git-free behind-count over the published version list, staleness alarm). Offline suitescripts/tests/bootstrap-reseed-test.sh— 20 checks green.scripts/bootstrap-reseed/publish.sh— CI half: buildagent-x86_64+ sha256 + RELEASE → Forgejo generic package registry, one immutable version per sha, self-guarded on the agent-affecting set (docs-only pushes never move the pin).scripts/bootstrap-reseed/reseed.sh— droplet half: poll → verify sha256 → install → self-probex-ourcloud-release→ announce → staleness alarm. Subcommandsrun|status|pin <sha>|unpin.ourcloud-reseed.service/.timer(5-min poll), README with the ritual, runbook updated.Two residuals — both out of an agent's reach
.forgejo/workflows/— protected path, #445): filed #606ready-for-session. Until it lands nothing is published, so the pull half has nothing to advance to.!, below. This issue is routedready-for-humanfor it.Droplet install ritual (your hands, once)
On the mail droplet (
ssh dev@100.98.48.68), ourcloud checkout at/opt/ourcloud(adjustExecStartin the unit if elsewhere):Note the ordering: #606 (publish wiring) should land first so there is a published version for the first
reseed.sh runto advance to; if you install the timer before #606,statuswill shownewest: <none published>and it will simply hold (no harm). A deliberate re-stage after this is live:sudo reseed.sh pin <sha>/unpin.Once installed, no reseed needs a human again in the rehearsal era, and the staleness alarm makes any stuck advance loud within
RESEED_MAX_DAYS. Veto the policy anytime via the ADR.Why human
Agent code is landed and pushed (
9b56af3). The remaining step is a one-way-door, hands-on install on a host only Ben can reach: theourcloud-reseed.timerunit + its credentials/permissions on the mail droplet (root-owned artifacts dir — the exact wall #597/#598 dead-ended on). Ritual is in the comment above. The publish-side wiring is separately filed as #606ready-for-session(protected.forgejo/path). Routing toready-for-humanfor the droplet install; Ben closes this once the timer is armed.Pull half LIVE on the droplet (2026-08-20 20:58Z). Ritual done by Ben via
!:/opt/idss-bootstrap+idss-bootstrap.service(retiredourcloud-bootstrap), reseed scripts at/opt/idss/scripts/…,/etc/idss-reseed.env(Mattermost lines commented — add to get announcements),idss-reseed.timerarmed (5 min). First liverunsurfaced two wrapper bugs the lib-only suite could not:b4fef9d(pin_override/served_shatrippedset -ewith no PIN file — the unit exited 1 before logging; plus short-vs-full sha compare) and8ca4a74(RETURN trap leaked intocmd_run,tmp: unbound). The advance itself worked: downloaded, sha256 verified, installed, self-probed — publicx-idss-release: 7a35076d55d7…. Suite now runs the wrapper offline (26 checks). Publish side: see #606 (token) and #621 (seam red).Ben's ruling, 2026-08-25 (interactive session): closed as proven.
Live probe today:
HEAD https://get.idss.nz/get?arch=x86_64→x-idss-release: 129efa325a3756c6307a82a99133fd2b1648a72f— that is 2026-08-25's phase-5 spec commit onmain, served with no hands involved: CI published the artifact (#606, unblocked by #621), the droplet'sidss-reseed.timerpulled and advanced the pin. The full chain this ticket asked for is standing: ADR 0185 rules the tracking-pin policy, publish is wired in.forgejo, the pull half has been live on the droplet since 2026-08-20, and the pin provably tracks CI-passedmain.Known residue, deliberately not blocking:
/etc/idss-reseed.env's Mattermost lines are still commented, so pin advances are logged but not announced. ADR 0185's revisit-before-real-customer-installs clause stands.