fix(docker)(agentic_hosting#26): normalise sphere-sdk version before file: install - #24
Merged
Merged
Conversation
…file: install Stage-1 of the trader image build uses `npm ci` (lenient — installs from lockfile, doesn't strict-validate the file: dep's own package.json). Stage-2 uses `npm install` (strict — re-resolves the file: dep when the path changes via sed), which validates every encountered version against semver and refuses anything malformed. Upstream sphere-sdk main currently carries `"version": "0.0.a1"` (commit b8b526d, "chore(release): 0.0.a1") — `a1` is not a valid semver prerelease tag (must be `[0-9A-Za-z-]+` and the form here `0.0.a1` parses as `MAJOR.MINOR.PATCH` where `a1` isn't a number). The release-driven build of `trader:v0.2` failed at this exact line with `Invalid Version: 0.0.a1` (run 27281190676). Fix: insert `npm pkg set version=0.0.0-dev --prefix sphere-sdk` between the file: path rewrite and `npm install`. The version field on a file: dep is informational only — npm resolves by path, not by version constraint — so this rewrite has zero functional effect beyond letting the install proceed. Robust against any future invalid-semver drift upstream. A separate upstream PR to sphere-sdk main is appropriate to actually fix the version field there. That's not in this PR's critical path; this Dockerfile patch is enough to unblock the v0.2 image build. Related: vrogojin/agentic_hosting#26 (the rebuild this unblocks), unicity-sphere/sphere-sdk#475 (the soak that consumes v0.2 once it's on ghcr.io)
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
Invalid Version: 0.0.a1failure that blocked the v0.2docker-publish.ymlbuild (run 27281190676).Root cause
Stage-1 of the trader image build uses
npm ci(lenient — installs from lockfile, doesn't strict-validate the file: dep's own package.json). Stage-2 usesnpm install(strict — re-resolves the file: dep when the path changes via sed), which validates every encountered version against semver and refuses anything malformed.Upstream sphere-sdk main currently carries
"version": "0.0.a1"(commit b8b526d, "chore(release): 0.0.a1") —a1is not a valid semver prerelease tag (must be[0-9A-Za-z-]+; the form0.0.a1parses asMAJOR.MINOR.PATCHwherea1isn't a number). All four rotations this PR is meant to pick up (#456/#457/#464/#447) landed after that bad version commit, so we can't sidestep by pinning earlier.Fix
Insert
npm pkg set version=0.0.0-dev --prefix sphere-sdkbetween the file: path rewrite andnpm install:The version field on a
file:dep is informational only — npm resolves by path, not by version constraint — so this rewrite has zero functional effect beyond letting the install proceed. Robust against any future invalid-semver drift upstream.Follow-up
A separate upstream PR to sphere-sdk normalising the version field is appropriate (so other downstreams that depend on
file:../sphere-sdkaren't broken). Tracked as task #37 in this session; will land asynchronously and not in this PR's critical path.Test plan
ci.yml) passes on this branchdocker-publish.ymlbuilds + pushesghcr.io/vrogojin/agentic-hosting/trader:v0.2Related