Sync host repo during rebuild to keep CLI in lockstep#313
Open
woltspace-jerpint[bot] wants to merge 4 commits into
Open
Sync host repo during rebuild to keep CLI in lockstep#313woltspace-jerpint[bot] wants to merge 4 commits into
woltspace-jerpint[bot] wants to merge 4 commits into
Conversation
woltspace rebuild now checks out the target version in the host repo before building the Docker image. Prevents drift where the container has new code (e.g. tunnel.json) but the host CLI still uses old paths. Falls back gracefully if checkout fails (warning, not error). Closes #312 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The previous version synced the host repo on every rebuild and silently warned-and-proceeded if the checkout failed — which reintroduces the exact drift bug we're trying to fix (image moves, host stays put). New contract: - Sync only when --version is explicitly passed. Plain 'rebuild' and branch builds leave the host repo alone; the host is the source of truth in those cases. - Skip when already at the target ref (noop, no fetch). - Abort with a clear message if the working tree is dirty. Silent drift is worse than a loud stop — user commits/stashes and retries. - Abort on checkout failure instead of warning. Same reasoning. This keeps the CLI ↔ container lockstep invariant without yanking devs or tagged users off their intended version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jerpint
approved these changes
Apr 14, 2026
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
The host
woltspaceCLI and the container image were carrying versions behind each other's backs — the rebuild moved the image to v0.4.23, but the CLI kept polling for a tunnel URL file that no longer existed. Users' lodges came up fine, but_show_url()gave up after 30 seconds with "tunnel still digging."This PR makes
woltspace rebuild --version <tag>atomic across both surfaces: the image and the host CLI move together, or neither moves.What changed
woltspace(host CLI) — new sync block inrebuild:--versionis explicitly passed (and not--local, and the host is a git repo), check out that tag on the host before rebuilding the imagerebuildandrebuild --branch Xleave the host repo alone — in those flows the host is the source of truth.claude/skills/woltspace-update/SKILL.md— updateWolt polish:.versionon older or local-build images (inline git fallback inside the container, graceful"unknown"handling)--local,--branch) report the nearest ancestor tag in.versionTest plan
woltspace rebuild --version v0.4.23on clean tree → host checks out v0.4.23, image rebuildswoltspace rebuild(no--version) → host repo unchangedwoltspace rebuild --branch some-branch→ host repo unchanged (sync is version-only)WOLTSPACE_LOCAL=true woltspace rebuild --version X→ sync skipped (local build)/woltspace-updateagainst a container missing.version→ preflight falls back cleanly, no user-visible errorCloses #312
The dam's watertight now — CLI and container move in lockstep, or not at all. 🦫