Repository navigation
2.0.0-rc.16: the worktree audit reads paths with spaces, and --bootstrap never writes through a symlinked directory - #36
Open
J0UH wants to merge 3 commits into
Conversation
The audit took each worktree path from `git worktree list --porcelain` with awk's $2, which stops at the first space. With the checkout and its worktrees under one parent such as "/work/My Project/", the main worktree and every other one all read as "/work/My", so the loop skipped each of them as the main worktree and printed an empty table. The audit now prints everything after "worktree " and reads it with IFS= read -r. The new test puts the fixture under a temp directory whose name has a space: before the fix it found no worktrees, now it finds both. The forks.json entry for the audit names the change.
bootstrapComponent checked only the final path component with lstat. With plugins/pstack/skills/arena a symlink to a directory outside the checkout, arena/SKILL.md looked like a regular file and --bootstrap overwrote the file the link points at. The normal sync already reports a local link at a directory above an upstream path and writes nothing under it. Bootstrap now does the same: before any write it reports the first symlinked ancestor of each carried path under symlinks, which fails the run and blocks every write. dirsAbove moves to module scope so both paths share it.
VERSION, the manifests, and package.json move to 2.0.0-rc.16. CHANGES.md gets the entry with its behavior-delta table, and the README's pinned installer command names the new tag. The pins stay at 88d4751, so NOTICE.md, NOTICE-skills.md, and poteto-mode's copy of the notice do not change. The skill count stays 64.
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.
Two bugs in the port's own code, fixed with a failing test for each, then released as 2.0.0-rc.16. The pins stay at
88d4751.worktree-audit.sh drops every worktree under a path with a space
The audit read each worktree path from
git worktree list --porcelainwith awk's$2, which stops at the first space. When the checkout and its worktrees share a parent such as/work/My Project/, the main worktree and every other one all read as/work/My. Line 92 then skips each one as the main worktree, and the table comes out empty with exit 0.Reproduction on
main, with a repo and two worktrees under<tmp>/My Project/:After the fix:
Both awk calls now print everything after
worktree, and the loop reads withIFS= read -r. The audit is a declared fork, so itstools/forks.jsonentry now names this change. A path that contains a newline would still break the line-based table, so I left NUL-delimited parsing out.New test in
tests/worktree-audit.test.mjs: "lists every worktree when the checkout and its worktrees sit under a path with spaces". Onmainit fails withReceived: [].--bootstrapwrites through a symlinked local directorybootstrapComponentranlstatonly on the last part of each path. Withplugins/pstack/skills/arenalinked to a directory outside the checkout,arena/SKILL.mdlooked like a plain file, and bootstrap overwrote the file behind the link.Reproduction on
main:After the fix:
The normal sync already reports a local link at a directory above an upstream path and writes nothing under it. Bootstrap now does the same: it reports the first symlinked parent of each carried path under
symlinks, which the CLI prints asFAIL: symlink at plugins/pstack/skills/arenaand which blocks every write.dirsAbovemoves to module scope so both paths share it.New test in
tests/sync.test.mjs: "bootstrapComponent > a local symlink at a directory above upstream paths is reported at the link, and nothing is written through it". Onmainit fails withReceived: []forreport.symlinks.Release
VERSION, the manifests, and
package.jsonmove to 2.0.0-rc.16. CHANGES.md gets the entry and its table, and the README's pinned installer command names the new tag. Neither hooks file changes.Checks
GIT_CONFIG_GLOBAL=/dev/null bun test tests/ --timeout 30000: 552 pass, 46 skip, 0 failbun tools/generate.mjs --check: 17 generated files current, all checks passbun run typecheckclean,bun test orch watch-pr check-plan.test.ts119 pass, 0 failbun tools/sync.mjs {pstack,cursor-team-kit,thermos} 88d4751 --dry-run: exit 0 for all three. pstack listsworktree-audit.shas a declared policy fork (76 changed lines)shellcheck worktree-audit.sh: cleangit diff --check: clean