Skip to content

runtime: require DSH_VERSION as an explicit build-arg - #3491

Merged
Birfy merged 1 commit into
mainfrom
dev/3489-image-recipe-dsh-version-default
Dec 2, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3489-image-recipe-dsh-version-default

Conversation

@Birfy

@Birfy Birfy commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

What changed

runtime/flybot-image/Dockerfile declared ARG DSH_VERSION=0.2.2-rc.1 in both stages, so docker build -f runtime/flybot-image/Dockerfile runtime without --build-arg installed rc.1 while runtime/ds-bot-upstream.pin.json names 0.2.2-rc.5. Nothing caught it: the version check at the old :94 sits in the final stage and never sees the build stage's install.

  • Both stages now declare ARG DSH_VERSION with no default, and each fails fast on an empty value before its first npm install -g "@deepseek-ai/dsh@${DSH_VERSION}". Removing the default alone would have been worse: an empty "@deepseek-ai/dsh@" resolves to * (npm-package-arg: fetchSpec="*"), which drifts further from the pin than rc.1 did.
  • test/recipe.test.js gains a case that rejects any ARG DSH_VERSION= default, requires the guard to precede first use in every stage that installs DSH packages (two stages), and requires the workflow, docs/GETTING_STARTED.md and runtime/flybot-image/README.md to read the version from the pin rather than pass a literal.
  • docs/COMPOSE_MANAGER.md now tells operators to pass --build-arg DSH_VERSION=<dsh in runtime/ds-bot-upstream.pin.json>, so the documented bare-build path no longer walks into the new guard silently.

3 files, +47/−4, tree ccd25ec43fa95a0e71a4b60df24c4164cfb0f3c0, single parent 4b8d4216.

Local evidence (local, not CI; this host has no Docker daemon, so no image build was executed)

Bound to head c01eb3b99f598c5b8ec004407550258ce639a17b / tree ccd25ec4:

  • runtime/flybot-image: node --test test/recipe.test.js → 12/12 pass, rc 0.
  • runtime/flybot-image: npm test → 29 tests, 28 pass, 1 fail. The failure is test/model-api.test.js:80, which reads this host's real /run/secrets/flybot-workspace-model-api.json (272 B, 0600) and asserts undefined; it fails identically on parent 4b8d4216 without this slice, and is filed separately as runtime/flybot-image: recipe tests read the host's real /run/secrets model-api file and fail on a provisioned host #3490.
  • top level: node --test --test-concurrency=2 tests/*.test.mjs → 974/974 pass, 0 fail, rc 0 (8.4 s).
  • python3 -m unittest test_docs_pages test_shipped_licenses → 8 tests OK.
  • Guard semantics run directly: empty DSH_VERSION → rc 1 with the message on stderr; DSH_VERSION=0.2.2-rc.5 → rc 0.

CI has not been read for this head yet; the check runs will decide.

Boundary

Does not touch the shipped license records that still name rc.1 (NOTICE:22/:66, docs/reuse-audit/shipped-pins.json); that is a separate slice.

Related #3489

Both stages of runtime/flybot-image/Dockerfile carried
ARG DSH_VERSION=0.2.2-rc.1, so a bare docker build without --build-arg
installed a release that contradicts runtime/ds-bot-upstream.pin.json
(0.2.2-rc.5) and said nothing about it. Dropping the default alone would
have been worse: npm resolves an empty "@deepseek-ai/dsh@" to "*".

Each stage now declares the arg without a default and fails fast on an
empty value before the first install, a recipe test guards the default,
the guard order and the documented build paths, and COMPOSE_MANAGER.md
points operators at the pin.

Related #3489
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Dec 2, 2026
@Birfy
Birfy added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit a062ba2 Dec 2, 2026
18 checks passed
@Birfy
Birfy deleted the dev/3489-image-recipe-dsh-version-default branch December 2, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant