fix(version-bump): temp-file + mv in sed fallback (B-001, Windows hang) - #193
Merged
Conversation
The jq-less fallback used `sed -i`, which hung on Windows/WSL editing the repo over a 9p mount during the 5.1.3 release. Switch all three JSON updates to `sed > tmp && mv` (matching the jq branch), so there is no in-place edit on a mounted filesystem. Adds a "sed fallback (no jq)" test suite that runs the script with a PATH that excludes jq: asserts all four version points update, no .tmp files are left behind, and the JSON stays valid. The existing tests only exercised the jq branch, so the fallback (the path that actually broke) was uncovered.
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.
Closes BACKLOG B-001.
Problem
version-bump.sh's jq-less fallback usedsed -i(in-place edit). During the 5.1.3 release on Windows, thebashthat Node/PowerShell spawns is WSL, andsed -iagainst the repo on the 9p-mounted Windows filesystem stalled (exit 255 after kill). The four version files had to be edited by hand instead.Fix
All three JSON updates in the fallback now use
sed > tmp && mv— the same temp-file +mvpattern the jq branch already uses — so there's no in-place edit on a mounted filesystem. The plain-textaiagentminder-versionwrite was already a simple truncate (echo >), unaffected.Tests
Added a "sed fallback (no jq)" suite that runs the script with a PATH symlinked to only the tools it needs (excluding
jq), so the fallback branch is actually exercised — the existing tests only ever hit the jq branch. It asserts:.tmpfiles are left behind (temp+mv completed), andFull suite green.
Part of
"Release & Tooling Hardening" — the small post-v5.3 batch (see
docs/strategy-roadmap.md→ Planned). The release-automation CI item is a separate PR.https://claude.ai/code/session_01XJW9vNpaZKKY8Vg97hzyuc
Generated by Claude Code