fix(image): copy tooling/sql into the build stage - #5
Merged
Conversation
The Dockerfile enumerates the source directories the build stage needs, one COPY per library, and that list is the check that the two shipped binaries are a small closed set. `writ_cli` gained a dependency on `writ_sql` and the list did not gain `tooling/sql`, so the image build stopped at "Library "writ_sql" not found" while every other build — which sees the whole tree — kept passing. Nothing builds the image on push (image.yml fires on a v* tag or by hand), so the drift was invisible until publish. The comment above the list now says so, because the list is load-bearing and reads like documentation. Verified by a local `docker build`: both executables compile, the in-Dockerfile smoke checks pass, and `writ sql` — the verb the missing library backs — runs in the finished image. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The failure
The publish run stopped in stage 1:
Why
The Dockerfile enumerates the source directories the build stage needs, one
COPYper library — deliberately, since that list is the check thatwritandwrit-mcpare a small closed set.writ_cligained a dependency onwrit_sql; the list did not gaintooling/sql.It builds everywhere else because everywhere else has the whole tree. Only the image sees the subset, and nothing builds the image on push —
image.ymlfires on av*tag or by hand — so the drift stayed invisible until publish.The change
One
COPY, plus a note in the comment block above the list recording this failure mode, since the list reads like documentation and is load-bearing.Verification
Local
docker build, changed layer uncached:writ.exeandwrit_mcp.exewrit check→states: 2,writ derive→(3 rows),writ-mcpinitialize →protocolVersiondocker run --rm <image> --version→writ 0.1.0writ sql— the verb the missing library backs — runs in the finished imageChecked the rest of the closure against the dune files:
writ.exeneedswrit_data,writ_syntax,writ_runtime,writ_loadpath,writ_sql;writ_mcp.exeaddswrit_jsonandwrit_mcp.tooling/sqlwas the only gap.🤖 Generated with Claude Code