rehearsal-4: executor rebuilds the gateway snapshot itself when #656 says stale — the ADR 0185 reseed loop for images, no hands #661
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#661
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?
Seen 2026-08-22 12:1xZ on elitebook-03, tick 3 of the armed #652:
PREFLIGHT: gateway image stale: built at 8585a9546dd3, agent changed in 91685055dd5b (4 agent-commit(s) since) — rebuild with scripts/gateway-image/build.sh (#656). The gate is RIGHT — the registry published 4 newidss-agentartifacts since the snapshot (the publish guard diffs bytes;internal/is statically linked into the agent). But the remedy is a human runningbuild.sh(~10 min, full DO token) after nearly every landed commit — the same hands-in-the-loop stall ADR 0185 retired forget.idss.nz(#601).Ask: when the staleness gate parks a rented drive, the executor rebuilds the snapshot itself and then drives, on the same tick or the next:
scripts/rehearsal-cycle.sh(rented target only): ongateway-image-stale, runscripts/gateway-image/build.sh(it already resolves the newest PUBLISHED ancestor, #654) under a host-wide build lock (/tmp/idss-gateway-image-build.lock, flock) so two executors never build the same snapshot; log the new snapshot id into the drive dir; re-run the staleness check; proceed.DIGITALOCEAN_ACCESS_TOKEN(full account —rehearsal-env.sh) and nix;build.shneeds nothing else. Budget: the build's ~10 min counts toward the drive's wall clock but NOT toward any leg ceiling (it runs pre-legs.json).idss-gateway-*;doctl compute snapshot deletethe rest after a successful build (DO bills snapshots per GB).doctl+ fakebuild.sh): stale → build invoked once → fresh → drive proceeds; build failure → drive parks by name (never a stale-image drive); lock held → waits, does not double-build.8585a95→ by elitebook-03") — the reseed-pin comment precedent.Non-goal: CI-built images (ADR 0185's revisit stands; this keeps the build on the executor host that already has the credential).
swarm-claim host=matou-dev-server-01 run=8796
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
Decision: implement the auto-rebuild + old-snapshot reaping exactly as this ticket specifies, without asking a human first.
Why it is a two-way door:
build.shrents one throwaway droplet for ~10 min on the SAMEDIGITALOCEAN_ACCESS_TOKENthe executor host already carries (rehearsal-env.sh), and tears it down on any exit (trap, ADR 0047). It is the identical spend a human already runs today when the #656 gate parks — this only moves the hand off the button.idss-gateway-*snapshots is not data destruction. These are GENERIC, regenerable golden build artifacts (no secret/slug/brand — ADR 0048);build.shrecreates any of them from git. Keeping the newest 3 preserves rollback headroom; the rest are pure DO GB-billing. No member data, no community state.What proves it:
scripts/gateway-image/tests/gateway-image-rebuild-test.sh(offline, fake doctl + fake build.sh) proves stale→build-once→proceed, build-failure→park-by-name (never a stale-image drive), peer-holds-lock→no-double-build, and reap-keeps-newest-3-sparing-non-idss-gateway. Non-one-way-door: no personal credential, no security-posture widening, no member-facing trust accept, no member data destruction, no non-routine spend.close-report for #661 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope