From 044f159b7922125d57082607ffe0199e4edfcdac Mon Sep 17 00:00:00 2001 From: Quick <31828688+Quick104@users.noreply.github.com> Date: Sun, 26 Jul 2026 15:33:04 +0000 Subject: [PATCH] fix(build): copy the settings contract into the container build context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both Dockerfiles copy cmd/, internal/, migrations/ and web/embed.go, but the manifest lives in contracts/settings/v1 — an embedded Go package that sits outside internal/ because clients vendor those files. The image build therefore fails with "no required module provides package .../contracts/settings/v1". Caught deploying to the dev box. Nothing had built an image since the manifest landed: the Docker workflow only runs on pushes to main and workflow_dispatch, and CI's go build runs against a full checkout, so neither gate covers the container context. This would have broken the published image on merge. Co-Authored-By: Claude Opus 5 (1M context) --- Dockerfile | 4 ++++ Dockerfile.dev | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 95314135..f9c7dce7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,10 @@ COPY --from=frontend_dist / web/dist COPY cmd/ cmd/ COPY internal/ internal/ COPY migrations/ migrations/ +# The settings contract is a Go package (contracts/settings/v1) that embeds the +# manifest, so the binary carries the exact bytes it was built from. It lives +# outside internal/ because clients vendor these files. +COPY contracts/ contracts/ ARG BUILD_REVISION ARG BUILD_DIRTY=false RUN --mount=type=cache,target=/root/.cache/go-build \ diff --git a/Dockerfile.dev b/Dockerfile.dev index d6b69341..263f824e 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -29,6 +29,9 @@ COPY --from=frontend /app/web/dist web/dist COPY cmd/ cmd/ COPY internal/ internal/ COPY migrations/ migrations/ +# See Dockerfile: the settings contract is an embedded Go package outside +# internal/, so the build fails without it. +COPY contracts/ contracts/ # Stage 3: Build Go binary for dev using a local plugin SDK checkout passed via # BuildKit named context `silo_plugin_sdk`.