Repository navigation
fix: pin @osaas/cli version in container entrypoint - #5
eyevinn-developer[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Research Review
Verified
- Pin value:
npm view @osaas/cli versionandnpm view @osaas/cli@4.35.0 versionboth return 4.35.0, so the pin exists and matches the ticket decision (issue #4 comment by birme). - Occurrence sweep: on main,
grep -rn "osaas/cli\|@latest"finds exactly one hit,scripts/docker-entrypoint.sh:90. The PR replaces it, so AC1 and AC2 hold. The version appears once, inENV OSAAS_CLI_VERSION=4.35.0in the Dockerfile. - The Dockerfile is single-stage (
FROM ${PYTHON_IMAGE},ENTRYPOINTat the end). TheENVtherefore reaches the entrypoint at runtime. ${VAR:?msg}inside the$(...)substitution underset -eaborts as the Lessons section says. I rantests/test-entrypoint-cli-pin.shon the PR head: 5/5 PASS, including the passing path (pinned spec reaches npx) and the failing path (unset version never runs npx).- Overlap with PR #3: it touches the Dockerfile, the entrypoint, and
tests/entrypoint_test.sh. The PR body discloses this, and the rebase need is the second merger's job.
Failing CI
- Failing check: build (workflow "Build and push Docker image"), run 41813030879. Log:
failed to read dockerfile: open Dockerfile.osc: no such file or directory. - It is pre-existing and unrelated to this diff.
.github/workflows/docker.ymlbuildsfile: Dockerfile.osc, but main commit 47cb5af ("remove Dockerfile.osc from upstream") deleted it. The same check has failed on both main commits since 2026-07-06 (runs 28795814893, 28795780614). - As a result, AC3 ("image build passes") cannot be shown by CI for this PR or any other. The Dockerfile change is a one-line
ENVplus a comment, and I found no problem with it by reading.
Adjacent Stubs Detected
- None found in
scripts/orDockerfile(no TODO/FIXME orundefined : undefined).
Orphaned Files Detected
tests/test-entrypoint-cli-pin.shis a standalone script with no CI hook. Main has no test workflow (PR #3 addstest.yml). Worth verifying, not blocking: wire it in when #3 lands.
Escape Hatch Coverage
docker-entrypoint.sh:90has a new fail-fast:?branch. It is reachable only if the image is built without the DockerfileENV, or the env is overridden to empty, which is a misconfiguration. A legitimate user is not blocked. The passing-path test exists in the test file (npx uses pinned spec).
Object Shape Verification
- No fetched or queried object is spread in this diff.
Contract diff
- No request handler or timeout changed. Files checked:
Dockerfile,scripts/docker-entrypoint.sh,tests/test-entrypoint-cli-pin.sh. Runtime behaviour ofconfig-to-envis unchanged other than the pinned version.
Impact Analysis
- Blast radius: only the config-service loading step in the container entrypoint.
- Downstream consumers: none in other repos.
- Coordinated changes needed: none. The sibling python-runner PR #34 uses the same pattern.
- Breaking change risk: low. Behaviour changes from "whatever is latest" to 4.35.0, which is the intent.
Risks Not Tested
- A real image build and container start could not be exercised because the Dockerfile.osc CI break is pre-existing. The test script simulates the extracted entrypoint line with a fake
npx, not the real CLI at 4.35.0. - That
config-to-envbehaves identically at 4.35.0 is assumed from it being the current latest.
Research Suggestions
- Separately fix
docker.yml(Dockerfile.oscvsDockerfile) so CI is meaningful. Not part of this PR.
Verdict
No blocking issues found.
Reviewed by PR Research Validator. This review checks whether code is based on verified sources rather than assumptions.
| CI-fix agent started for the failing checks (one cycle per PR). _daily-review Step 4.6_ |
CI failure needs a humanThe Please apply that line change to Co-Authored-By: Claude Sonnet 5.5 noreply@anthropic.com |
|
The one CI-fix cycle ran. The failing Needed now: push the one-line docker.yml change to this branch with workflow scope. |
Summary
npx -y @osaas/cli@latest, a floating tag. It now runs a pinned version.ENV OSAAS_CLI_VERSION=4.35.0is set in the Dockerfile, the only place the version appears.scripts/docker-entrypoint.shreads it as"@osaas/cli@${OSAAS_CLI_VERSION:?...}"and fails fast if it is unset.config-to-envbehaviour is otherwise unchanged.npm view @osaas/cli versionalso reports 4.35.0.tests/test-entrypoint-cli-pin.sh: passing path (npx called with the pinned spec when set), failing path (unset version aborts and npx is never called), and checks that no@osaas/cli@latestremains and the version is pinned once.Open PR #3 also changes
scripts/docker-entrypoint.shand the Dockerfile, including its own@osaas/cli@latestcall, so whichever merges second will need a rebase on the config-to-env line.Closes #4
Lessons
The single
@latestcall sits insideset -ecommand substitution, so the:?guard aborts the entrypoint only because ofset -e; the test sources the line underset -eto reflect that.What a human does next: Nothing.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com