vm: OURCLOUD_QEMU_SYSTEM / OURCLOUD_GUEST_IMAGE overrides ship in the production build #295

Closed
opened 2026-08-05 23:10:47 +00:00 by ben · 1 comment
Owner

internal/vm/resolve.go:66 — the env overrides for the QEMU binary and guest image compile into the production build. Env-gated so not a default fake, but a shipped bypass of the ADR 0110 payload pin: any process environment can swap the guest image the helper stands up.

Acceptance

  • The overrides move behind the existing dev build tag (the repo's two wiring_dev.go files are the pattern); production resolves only the pinned payload.
  • Test (untagged build): env set ⇒ ignored.

Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).

`internal/vm/resolve.go:66` — the env overrides for the QEMU binary and guest image compile into the production build. Env-gated so not a default fake, but a shipped bypass of the ADR 0110 payload pin: any process environment can swap the guest image the helper stands up. **Acceptance** - The overrides move behind the existing `dev` build tag (the repo's two `wiring_dev.go` files are the pattern); production resolves only the pinned payload. - Test (untagged build): env set ⇒ ignored. --- _Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code)._
Author
Owner

Fixed in 9106001 (on origin/main).

The three single-artifact env overrides (OURCLOUD_QEMU_SYSTEM, OURCLOUD_QEMU_IMG, OURCLOUD_GUEST_IMAGE) now live behind the existing dev build tag, mirroring the repo's two wiring_dev.go files. ResolveConfig delegates to applyDevArtifactOverrides: internal/vm/resolve_dev.go (//go:build dev) reads the env vars; internal/vm/resolve_prod.go (//go:build !dev) is a no-op. Production resolves only the pinned OURCLOUD_PAYLOAD_DIR carriage — no process environment can swap the ADR 0110 payload.

Tests split by tag: untagged resolve_prod_test.go (TestResolveConfigProdIgnoresDevOverrides + TestResolveConfigProdOverrideCannotStandInForCarriage) asserts a set override is ignored in the shipped build; -tags dev resolve_dev_test.go keeps the layering. go test/vet/build + golangci-lint green in both tag configs; the pre-push gate passed.

Fixed in 9106001 (on origin/main). The three single-artifact env overrides (`OURCLOUD_QEMU_SYSTEM`, `OURCLOUD_QEMU_IMG`, `OURCLOUD_GUEST_IMAGE`) now live behind the existing `dev` build tag, mirroring the repo's two `wiring_dev.go` files. `ResolveConfig` delegates to `applyDevArtifactOverrides`: `internal/vm/resolve_dev.go` (`//go:build dev`) reads the env vars; `internal/vm/resolve_prod.go` (`//go:build !dev`) is a no-op. Production resolves only the pinned `OURCLOUD_PAYLOAD_DIR` carriage — no process environment can swap the ADR 0110 payload. Tests split by tag: untagged `resolve_prod_test.go` (`TestResolveConfigProdIgnoresDevOverrides` + `TestResolveConfigProdOverrideCannotStandInForCarriage`) asserts a set override is ignored in the shipped build; `-tags dev` `resolve_dev_test.go` keeps the layering. `go test`/`vet`/`build` + `golangci-lint` green in both tag configs; the pre-push gate passed.
ben closed this issue 2026-08-06 01:11:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#295
No description provided.