@@ -162,9 +162,23 @@ jobs:
162162 # (a) PRs exercise the official runtime Dockerfile itself, and
163163 # (b) the e2e stays hermetic — no dependency on a prior release
164164 # having published the tag (chicken-and-egg on the very first one).
165+ #
166+ # Pin the runtime's CLI to the SAME version the generated project
167+ # actually resolved to — NOT a hardcoded `latest`. The scaffolded
168+ # artifact is built by that project's `@objectstack/cli` and carries
169+ # its `engines.protocol` major; `os start` in the runtime image rejects
170+ # any artifact from a different protocol major. During an RC window the
171+ # project pins `^<repo rc>` (e.g. 16.0.0-rc.1, protocol 16) while the
172+ # `latest` dist-tag still points at the last STABLE cli (protocol 15),
173+ # so a hardcoded `latest` skews the two and boot fails. Reading the
174+ # resolved version keeps the image in lockstep whether the project got
175+ # the repo RC, the `latest` fallback (see the install step), or a
176+ # published stable.
165177 run : |
178+ CLI_VERSION=$(node -p "require('$RUNNER_TEMP/e2e-app/node_modules/@objectstack/cli/package.json').version")
179+ echo "Runtime image will bundle @objectstack/cli@$CLI_VERSION (matches the scaffolded artifact's protocol)"
166180 docker build -t ghcr.io/objectstack-ai/objectstack:latest \
167- --build-arg OS_CLI_VERSION=latest \
181+ --build-arg OS_CLI_VERSION="$CLI_VERSION" \
168182 "$GITHUB_WORKSPACE/docker"
169183
170184 - name : Docker build and run (scaffolded Dockerfile)
0 commit comments