Skip to content

fix(docker): stop pinning a stale release version in source builds - #343

Open
HearthCore wants to merge 1 commit into
Maneek21:masterfrom
HearthCore:fix/source-build-release-version
Open

HearthCore wants to merge 1 commit into
Maneek21:masterfrom
HearthCore:fix/source-build-release-version

Conversation

@HearthCore

Copy link
Copy Markdown

Summary

The Dockerfile defaults ARG DEFT_RELEASE_VERSION=0.3.0-preview.14 in both stages. docker compose build from a source checkout never passes that arg, so a preview.15 checkout reports release: 0.3.0-preview.14 on /health, in the Agent Channel handshake (server_release), and in the Hermes integration bundle URL built in agent-employees.ts. That env default beats the in-code fallback in apps/api/src/lib/agent-channel.ts, which release prep (#319) already bumped to preview.15.

The fix leaves the arg empty so the in-code fallback applies. The release workflow still passes the exact version (release.yml, DEFT_RELEASE_VERSION=${{ steps.release.outputs.version }}), so published images are unaffected.

Observed on a source build of 1427f66: /health → {"release":"0.3.0-preview.14","commit":"unknown","schema_head":"0.3.0-preview.29",…}.

Type

  • Bug fix

Test plan

  • New case in scripts/release-workflow.test.mjs: the Dockerfile must not pin a DEFT_RELEASE_VERSION default, and the release workflow must keep passing it. node --test scripts/release-workflow.test.mjs: 16/16 on the branch, 15/16 on master (the new case fails).
  • Not run: a full image build of this branch.

Residual note

commit stays unknown for source builds because nothing passes VCS_REF. Wiring git rev-parse into compose is a separate decision, so it is left out here.

Related issues

None found (searched open and closed issues and PRs).

The Dockerfile defaulted DEFT_RELEASE_VERSION to 0.3.0-preview.14. Docker
source builds (docker compose build) never pass the arg, so /health, the
Agent Channel handshake and the Hermes integration bundle URL reported
preview.14 on a preview.15 checkout. The env default beat the in-code
fallback in agent-channel.ts, which release prep already keeps current.

Leave the arg empty so the in-code fallback applies; the release workflow
still passes the exact version. A release-workflow test guards against the
default coming back.
@HearthCore

Copy link
Copy Markdown
Author

Built this branch as an image (docker build ., no build args, i.e. the source-build path) and checked what the API resolves:

  • no DEFT_RELEASE_VERSION passed: release=0.3.0-preview.15 (on master the same build reports 0.3.0-preview.14)
  • DEFT_RELEASE_VERSION=9.9.9-release-arg set, as the release workflow does: release=9.9.9-release-arg

Release images are unaffected, and source builds report the checked-out version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant