gateway-image staleness: the build recipe joins the rebuild key — a bake-changing commit must re-snapshot (the #1096 pin shortcut must not swallow it) #1196

Closed
opened 2026-09-03 17:24:53 +00:00 by ben · 5 comments
Owner

The gap (bit 2026-09-03, the #1191 bake arc)

The gateway-image rebuild/staleness key is OC_BOOTSTRAP_AGENT_PATHS = (agent/ go.mod go.sum internal/ …) — the IMAGE BUILD'S OWN inputs are not in it: scripts/gateway-image/**, scripts/lib/gateway-image-*-lib.sh, scripts/lib/installer-base-staleness-lib.sh, scripts/stage-vm-guest-slot.sh. A commit that changes what the snapshot BAKES (the #1048 installer-base closure, the #1191 vm-guest bundle, a build.sh phase) neither triggers the #661 auto-rebuild nor flips the #656 park — the fleet drives on a snapshot the build recipe has moved past.

Concrete: d9e35a2b (the vm-guest bake's quota fix) changes what the next snapshot carries, is invisible to the key, and only re-triggers because an UNRELATED internal/fleetwire commit happens to sit in the same behind-range. Had it landed alone, no rebuild would ever fire.

The ask

The gateway-image staleness axis grows a build-recipe input set (scripts/gateway-image/ + the gateway-image/installer-base/vm-guest libs + stage-vm-guest-slot.sh) — a behind-count over those paths marks the snapshot STALE exactly like the agent axis, WITHOUT riding the agent-pin suppression (#1096's pin shortcut must not swallow a recipe change: the pin tracks the agent binary, not the recipe). Offline tests in the rebuild/staleness suites: a recipe-path commit flips stale; a docs commit does not; the pin-axis shortcut does NOT suppress a recipe change (the cannot-fail check).

Origin: #1191's first bake failure ('install: Disk quota exceeded') — fixed in d9e35a2b, which this key would have ignored.

## The gap (bit 2026-09-03, the #1191 bake arc) The gateway-image rebuild/staleness key is `OC_BOOTSTRAP_AGENT_PATHS = (agent/ go.mod go.sum internal/ …)` — the IMAGE BUILD'S OWN inputs are not in it: `scripts/gateway-image/**`, `scripts/lib/gateway-image-*-lib.sh`, `scripts/lib/installer-base-staleness-lib.sh`, `scripts/stage-vm-guest-slot.sh`. A commit that changes what the snapshot BAKES (the #1048 installer-base closure, the #1191 vm-guest bundle, a build.sh phase) neither triggers the #661 auto-rebuild nor flips the #656 park — the fleet drives on a snapshot the build recipe has moved past. Concrete: `d9e35a2b` (the vm-guest bake's quota fix) changes what the next snapshot carries, is invisible to the key, and only re-triggers because an UNRELATED `internal/fleetwire` commit happens to sit in the same behind-range. Had it landed alone, no rebuild would ever fire. ## The ask The gateway-image staleness axis grows a build-recipe input set (`scripts/gateway-image/` + the gateway-image/installer-base/vm-guest libs + stage-vm-guest-slot.sh) — a behind-count over those paths marks the snapshot STALE exactly like the agent axis, WITHOUT riding the agent-pin suppression (#1096's pin shortcut must not swallow a recipe change: the pin tracks the agent binary, not the recipe). Offline tests in the rebuild/staleness suites: a recipe-path commit flips stale; a docs commit does not; the pin-axis shortcut does NOT suppress a recipe change (the cannot-fail check). Origin: #1191's first bake failure ('install: Disk quota exceeded') — fixed in d9e35a2b, which this key would have ignored.

swarm-claim host=matou-dev-server-01 run=17272
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=17272 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=17272
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=17272 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=17274
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=17274 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=17278
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=17278 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1196 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1196,
  "status": "success",
  "commits": [
    "d40edebc"
  ],
  "changed_files": [
    "STATUS.md",
    "scripts/gateway-image/tests/gateway-image-staleness-test.sh",
    "scripts/lib/gateway-image-staleness-lib.sh",
    "scripts/tests/gateway-image-rebuild-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/gateway-image/tests/gateway-image-staleness-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/gateway-image-rebuild-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The gateway-image staleness axis grows a build-recipe input set (scripts/gateway-image/ + gateway-image/installer-base/vm-guest libs + stage-vm-guest-slot.sh)": "OC_GWIMAGE_RECIPE_PATHS in scripts/lib/gateway-image-staleness-lib.sh: scripts/gateway-image, 'scripts/lib/gateway-image-*-lib.sh', scripts/lib/installer-base-staleness-lib.sh, scripts/stage-vm-guest-slot.sh",
    "A behind-count over those paths marks the snapshot STALE exactly like the agent axis": "recipe_behind = rev-list --count over OC_GWIMAGE_RECIPE_PATHS returns rc=1 stale when >0; staleness test D1 (recipe-only commit -> stale) and rebuild test 16 (agent-fresh but recipe-moved -> rebuild once -> proceed)",
    "WITHOUT riding the agent-pin suppression (#1096's pin shortcut must not swallow a recipe change)": "the recipe axis is checked BEFORE the agent behind-count and pin shortcut and returns early; staleness test D2 is the cannot-fail check — a recipe change atop a byte-identical pin move stays stale, with a control proving the swallow would happen without the axis",
    "Offline test: a recipe-path commit flips stale": "staleness test D1/D1b; rebuild test 16",
    "Offline test: a docs commit does not": "staleness test D3; rebuild test 16 docs sub-check (buildcount 0)",
    "Offline test: the pin-axis shortcut does NOT suppress a recipe change (the cannot-fail check)": "staleness test D2 (rc=1 with recipe verdict; control probe rc=0 proves the swallow without the axis)"
  },
  "summary": "Added an OC_GWIMAGE_RECIPE_PATHS build-recipe axis to the gateway-image staleness/rebuild key, checked before the #1096 agent-pin shortcut so a bake-changing commit re-snapshots on its own.",
  "reason": "",
  "blockers": []
}
**close-report** for #1196 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1196, "status": "success", "commits": [ "d40edebc" ], "changed_files": [ "STATUS.md", "scripts/gateway-image/tests/gateway-image-staleness-test.sh", "scripts/lib/gateway-image-staleness-lib.sh", "scripts/tests/gateway-image-rebuild-test.sh" ], "tests": [ { "command": "bash scripts/gateway-image/tests/gateway-image-staleness-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/gateway-image-rebuild-test.sh", "exit_code": 0 } ], "criteria": { "The gateway-image staleness axis grows a build-recipe input set (scripts/gateway-image/ + gateway-image/installer-base/vm-guest libs + stage-vm-guest-slot.sh)": "OC_GWIMAGE_RECIPE_PATHS in scripts/lib/gateway-image-staleness-lib.sh: scripts/gateway-image, 'scripts/lib/gateway-image-*-lib.sh', scripts/lib/installer-base-staleness-lib.sh, scripts/stage-vm-guest-slot.sh", "A behind-count over those paths marks the snapshot STALE exactly like the agent axis": "recipe_behind = rev-list --count over OC_GWIMAGE_RECIPE_PATHS returns rc=1 stale when >0; staleness test D1 (recipe-only commit -> stale) and rebuild test 16 (agent-fresh but recipe-moved -> rebuild once -> proceed)", "WITHOUT riding the agent-pin suppression (#1096's pin shortcut must not swallow a recipe change)": "the recipe axis is checked BEFORE the agent behind-count and pin shortcut and returns early; staleness test D2 is the cannot-fail check — a recipe change atop a byte-identical pin move stays stale, with a control proving the swallow would happen without the axis", "Offline test: a recipe-path commit flips stale": "staleness test D1/D1b; rebuild test 16", "Offline test: a docs commit does not": "staleness test D3; rebuild test 16 docs sub-check (buildcount 0)", "Offline test: the pin-axis shortcut does NOT suppress a recipe change (the cannot-fail check)": "staleness test D2 (rc=1 with recipe verdict; control probe rc=0 proves the swallow without the axis)" }, "summary": "Added an OC_GWIMAGE_RECIPE_PATHS build-recipe axis to the gateway-image staleness/rebuild key, checked before the #1096 agent-pin shortcut so a bake-changing commit re-snapshots on its own.", "reason": "", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1196
No description provided.