Skip to content

v2.12.2 β€” fix: WaxFlow could not be built from a fresh clone - #53

Merged
rancur merged 1 commit into
mainfrom
fix/fresh-clone-build
Aug 9, 2026
Merged

v2.12.2 β€” fix: WaxFlow could not be built from a fresh clone#53
rancur merged 1 commit into
mainfrom
fix/fresh-clone-build

Conversation

@rancur

@rancur rancur commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The bug

sync-web/public/ was never committed, but sync-web/Dockerfile copies it out of the builder stage:

COPY --from=builder /app/public ./public

A clean checkout therefore fails with:

failed to compute cache key: failed to calculate checksum of ref ... /app/public

Nobody could build WaxFlow from a fresh clone. Every new user following the README quick start (docker compose up -d --build) would have hit this.

It went unnoticed because it only affects clean checkouts β€” anyone whose working copy already had the directory built fine. CI built from a clean checkout for the first time in 2.12.0, and the web image failed while api and worker succeeded, which is what surfaced it.

Verified directly:

$ git clone --depth 1 https://github.com/rancur/waxflow.git /tmp/wf_fresh
$ ls /tmp/wf_fresh/sync-web/public
ls: no such file or directory

The fix

  • Track sync-web/public/.gitkeep so the directory always exists.
  • Add RUN mkdir -p /app/public in the builder stage, so the COPY cannot fail even if the directory is missing from the build context.

Also documented

NEXT_PUBLIC_API_URL is a build arg, which normally means a per-install image. It doesn't here: the frontend calls a relative /api, and next.config.js rewrites it server-side from INTERNAL_API_URL at runtime. Nothing user-specific is baked in β€” which is what lets one published image serve every install. Added as a comment so the next person doesn't assume otherwise.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01HmUiLHPmKoz215WAWV5eHe

sync-web/public/ was never committed, but sync-web/Dockerfile COPYs it out of the
builder stage, so a clean checkout failed with:

    failed to compute cache key: failed to calculate checksum of ref ... /app/public

Nobody could build WaxFlow from a fresh clone. It only worked for people whose
working copy already had the directory, which is why it went unnoticed β€” CI built
from a clean checkout for the first time in 2.12.0 and the web image failed while
api and worker succeeded. Verified by cloning the repo fresh: no sync-web/public.

Tracks public/.gitkeep and adds `RUN mkdir -p /app/public` so the COPY cannot
fail even when the directory is missing from the build context.

Also documents why the web image is portable despite taking NEXT_PUBLIC_API_URL
as a build arg: the frontend calls a relative /api and next.config.js rewrites it
server-side from INTERNAL_API_URL at RUNTIME, so nothing user-specific is baked
in. That is what lets one published image serve every install.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmUiLHPmKoz215WAWV5eHe
@rancur
rancur merged commit 9b3b5b1 into main Aug 9, 2026
2 checks passed
@rancur
rancur deleted the fix/fresh-clone-build branch August 9, 2026 21:22
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