Narrow the infra-artifact version hash to what the VM actually runs #396

Open
opened 2026-07-17 00:10:10 -04:00 by didericis-claude · 0 comments
Collaborator

Context

Follow-up from PR #395 (PRD 0069 Stage 2). The prebuilt infra rootfs is pulled by a version tag that is a content hash of everything baked into the image. Per review (#395), that hash covers the entire bot_bottle/ package, because Dockerfile.orchestrator does COPY bot_bottle /app/bot_bottle wholesale.

Problem

Because the whole package is copied in (and therefore hashed), any commit under bot_bottle/ bumps the artifact version — including changes to modules the infra VM never runs at runtime (e.g. publish_infra.py, infra_artifact.py, the docker/macos backends, CLI files). So an unrelated change invalidates the published artifact, and a default-path (pull) firecracker launch then 404s until someone republishes the ~195 MB rootfs.

This is correct (it never boots stale code), but it makes the pull model impractical on a rolling dev branch — during this PR's work alone it forced three republishes for changes that didn't affect the VM's behavior.

Options

  • Do nothing / document. Keep dev on BOT_BOTTLE_INFRA_BUILD=local and only publish at release points. The model already assumes this; cheapest.
  • Narrow the image + hash to what the VM actually runs. Have Dockerfile.orchestrator/Dockerfile.infra COPY only the modules the control plane + gateway import (or add the host-only tooling to .dockerignore), and hash exactly those build inputs. Unrelated changes then stop churning the tag. More work; needs care to not miss a transitively-imported module (a missed file = the staleness bug the strict hash was protecting against).

Priority

Low — the local escape hatch fully covers dev today; this is an ergonomics/rollout improvement, not a correctness gap.

## Context Follow-up from PR #395 (PRD 0069 Stage 2). The prebuilt infra rootfs is pulled by a **version tag** that is a content hash of everything baked into the image. Per review (#395), that hash covers the *entire* `bot_bottle/` package, because `Dockerfile.orchestrator` does `COPY bot_bottle /app/bot_bottle` wholesale. ## Problem Because the whole package is copied in (and therefore hashed), **any** commit under `bot_bottle/` bumps the artifact version — including changes to modules the infra VM never runs at runtime (e.g. `publish_infra.py`, `infra_artifact.py`, the docker/macos backends, CLI files). So an unrelated change invalidates the published artifact, and a default-path (`pull`) firecracker launch then 404s until someone republishes the ~195 MB rootfs. This is *correct* (it never boots stale code), but it makes the pull model impractical on a rolling dev branch — during this PR's work alone it forced three republishes for changes that didn't affect the VM's behavior. ## Options - **Do nothing / document.** Keep dev on `BOT_BOTTLE_INFRA_BUILD=local` and only publish at release points. The model already assumes this; cheapest. - **Narrow the image + hash to what the VM actually runs.** Have `Dockerfile.orchestrator`/`Dockerfile.infra` `COPY` only the modules the control plane + gateway import (or add the host-only tooling to `.dockerignore`), and hash exactly those build inputs. Unrelated changes then stop churning the tag. More work; needs care to not miss a transitively-imported module (a missed file = the staleness bug the strict hash was protecting against). ## Priority Low — the `local` escape hatch fully covers dev today; this is an ergonomics/rollout improvement, not a correctness gap.
didericis-claude added the
Priority
Low
4
label 2026-07-17 00:10:24 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#396