Skip to content

fix(version-bump): temp-file + mv in sed fallback (B-001, Windows hang) - #193

Merged
lwalden merged 1 commit into
mainfrom
claude/version-bump-windows-resilient
Jun 4, 2026
Merged

fix(version-bump): temp-file + mv in sed fallback (B-001, Windows hang)#193
lwalden merged 1 commit into
mainfrom
claude/version-bump-windows-resilient

Conversation

@lwalden

@lwalden lwalden commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Closes BACKLOG B-001.

Problem

version-bump.sh's jq-less fallback used sed -i (in-place edit). During the 5.1.3 release on Windows, the bash that Node/PowerShell spawns is WSL, and sed -i against 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 + mv pattern the jq branch already uses — so there's no in-place edit on a mounted filesystem. The plain-text aiagentminder-version write 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:

  • all four version points update to the new version,
  • no .tmp files are left behind (temp+mv completed), and
  • the JSON stays valid with sibling fields preserved.

Full 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

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.
@lwalden
lwalden merged commit 8f1c1d7 into main Jun 4, 2026
1 check passed
@lwalden
lwalden deleted the claude/version-bump-windows-resilient branch June 4, 2026 02:49
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.

2 participants