gateway-image: a snapshot rebuilt on another host bakes THAT host's vm-guest.tar — the driving host's supply seed then copies 2.6 GB (#1191 short-circuit misses) and reds at its budget #1858
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#1858
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 on WKT-DEMO Drive A fire 1 (drive
20260924T224155Z, #1855): bens-mac-04 (no DO ssh key registered, so it cannot runscripts/gateway-image/build.shitself) drove against snapshotidss-gateway-9fdb5a5f8813, rebuilt by hand on matou-workstation. The workstation's vm-guest slot rebuilt its tar fresh (de0c0165…, key8741152f94dc3a80) and baked it; bens-mac-04's payload carries the 2026-09-22 tar (6aaabd71…). Thesupplyseed's sha short-circuit (vm-guest.tar.sha256) missed, the seed spent its whole 300 s envelope on a copy the mac's uplink cannot finish, and the row redded at 420 s ("bar at 9%, no activity line"). The preflight's freshness gate (gateway-image-fresh: snapshot carries every agent-affecting commit) said FRESH — it compares the agent pin only, never the baked vm-guest sha, so a snapshot that is fresh for one executor is stale for another and nothing says so before the rent.Wanted (either, both is better):
$IDSS_PAYLOAD_DIR/vm-guest.tar's sha and parks by name —gateway image bakes vm-guest <sha> but this host's payload carries <sha>: sync the payload's tar to the bake (or rebuild the snapshot from this host)— instead of lettingsupplydiscover it 30 min later on a rented box.Workaround used 2026-09-24:
rsync --compressthe workstation's tar onto bens-mac-04's payload (~6:1, ~1 MB/s) before re-firing.Refs #1191, #1768, #1855, #1836.
Ruled by agent under ADR 0174 — veto anytime
Ruling.
ready-for-agent, categorybug, scoped to Wanted #1 (thepreflight freshness gate learns the snapshot's baked
vm-guest.tarsha andparks by name when this host's payload carries a different one). Wanted #2
(cross-host reproducible vm-guest build, or publishing the tar to the substituter
per #1768) stays out of this ticket — the implementing agent may split it into a
follow-up.
Why this is a two-way door. The fix is a comparison added to a preflight gate
plus a marker surfaced off-box — all under
scripts/(not a protected.sandcastle/path), revertible by a later commit, and provable offline bythe existing gate harness
scripts/gateway-image/tests/gateway-image-staleness-test.sh(fake
doctl+ fixtures, halves A/B/C — this adds a fourth). It touches nopersonal credentials, no security posture, no member-facing trust surface, no
data destruction, and no non-routine spend, so it is off the one-way-door list.
Ben's veto is async and non-blocking — reclassify anytime.
What proves it. A new half of
gateway-image-staleness-test.sh: with thesnapshot's recorded vm-guest sha
Xand a fixture$IDSS_PAYLOAD_DIR/vm-guest.tarwhose sha is
Y ≠ X, the preflight parks by name; withX = Yit proceeds. Thereal-host round-trip (build.sh recording the sha on an actual DO snapshot, read at
a real rent) is exercised by the next WKT-DEMO / rehearsal drive, not a landing
blocker — consistent with how this whole gate is already validated offline.
Agent brief
Context. Seen on WKT-DEMO Drive A fire 1 (drive
20260924T224155Z, #1855):bens-mac-04(no DO ssh key, so it cannot runscripts/gateway-image/build.sh)drove against snapshot
idss-gateway-9fdb5a5f8813, which had been rebuilt by handon
matou-workstation. The workstation's vm-guest slot rebuilt its tar fresh(
de0c0165…) and baked that;bens-mac-04's standing payload still carries the2026-09-22 tar (
6aaabd71…). Same vm-guest key (8741152f94dc3a80), differentbytes — the non-reproducibility that is Wanted #2. The founding
supplyseed'ssha short-circuit (
gateway-image-vm-guest-lib.sh:107, thetest "$(cat vm-guest.tar.sha256)" = "$sha"reuse branch) therefore missed on therented box, the seed spent its whole 300 s envelope copying a 2.6 GB tar the mac's
uplink cannot finish, and the row redded at 420 s. The preflight freshness gate
had said FRESH: it compares the agent pin and the recipe git commits only
(
OC_GWIMAGE_RECIPE_PATHS), never the baked vm-guest bytes, so a snapshot thatis fresh for the host that baked it is stale for a different executor and nothing
says so before the rent.
The gap, precisely.
oc_gateway_image_ensure_fresh()(
scripts/lib/gateway-image-rebuild-lib.sh:241) reads only the newestsnapshot's name —
idss-gateway-<git-sha>(25 chars) — and runsoc_gateway_image_staleness()(
scripts/lib/gateway-image-staleness-lib.sh:164). The recipe axis there(
OC_GWIMAGE_RECIPE_PATHS, verdict messages ~:190–:196) is a git-commitbehind-count over recipe source paths — it cannot see that two hosts at the
same git sha baked different tar bytes.
snapshot:
oc_gwvg_*writes it toOC_GWVG_MARKER(
$OC_GWVG_DIR/vm-guest.tar.sha256,gateway-image-vm-guest-lib.sh:33, writtenlast at
:131). Nothing surfaces it to the preflight host before the rent.Do.
without booting the snapshot. It must be the sha recorded at bake time by the
building host, not a local recompute — recompute would give this host's tar
bytes, which this bug proves can differ from the snapshot's. Choose the
mechanism (a DO snapshot tag alongside the
idss-gateway-<sha>name thatdoctl compute snapshot listalready returns is the least-new-infra home; apublished side-file keyed by the snapshot sha is an alternative). You may rule
the mechanism under ADR 0174 — it is revertible and offline-provable; record
the ruling on this ticket.
oc_gateway_image_ensure_fresh(or thestaleness lib) also compares that recorded vm-guest sha against
$IDSS_PAYLOAD_DIR/vm-guest.tar's sha and, on mismatch, parks by name witha message in the gate's existing voice, e.g.:
gateway image bakes vm-guest <sha> but this host's payload carries <sha>: sync the payload's tar to the bake (or rebuild the snapshot from this host)— instead of letting
supplydiscover it ~30 min later on a rented box. Keepthe I/O boundary (reading the recorded sha) overridable by a fixture, matching
how
oc_gwimage_published_agentsis overridden in the test.scripts/gateway-image/tests/gateway-image-staleness-test.sh: recorded shaXY ≠ X→ park by name;X = Y→ proceed; anunreadable recorded sha keeps the current (agent-pin/recipe) verdict rather
than parking (never park on a key you cannot read — same doctrine as the
agent-pin shortcut at
staleness-liband the installer-base axis).docs/GOTCHAS.mdentry (a snapshot freshfor its builder is stale for another executor when the vm-guest build is
non-reproducible), and update
STATUS.mdin the same commit if this changes agate's stated coverage. Refs #1191 (the vm-guest bundle short-circuit), #1768
(the cache-substitution move), #1855/#1836 (the drive that surfaced it).
Out of scope (split to a follow-up if pursued). Wanted #2 — making the
vm-guest slot build byte-reproducible across hosts for the same key, or publishing
the assembled tar to the substituter the gateway pulls from (#1768's move), taking
it off the operator's uplink for good. That is the durable fix; this ticket only
stops the late, budget-blowing discovery.
Acceptance.
vm-guest sha differs from this host's
$IDSS_PAYLOAD_DIR/vm-guest.tarsha.gateway-image-staleness-test.shcovers park-on-mismatch, proceed-on-match, andkeep-verdict-on-unreadable-marker, and passes offline.
swarm-claim host=matou-dev-server-01 run=32282
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1858 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope