Skip to content

Fix worktree cleanliness and no-checkout handling - #173

Merged
mizchi merged 1 commit into
mainfrom
agent/fix-worktree-cleanliness
Aug 11, 2026
Merged

Fix worktree cleanliness and no-checkout handling#173
mizchi merged 1 commit into
mainfrom
agent/fix-worktree-cleanliness

Conversation

@mizchi

@mizchi mizchi commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve executable modes when adding linked worktrees
  • make status and non-force removal consistently detect mode-only changes
  • compare symbolic links by link target and avoid following them during cleanup
  • implement worktree add --no-checkout without materializing files or an index
  • ensure whitebox tests use the build variant matching the test runner

Root cause

Worktree checkout initially materialized blobs as regular files, while status and removal used different comparison paths. Status followed symbolic links, removal compared only file bytes, and the parsed --no-checkout flag was not forwarded to the worktree creation layer.

Validation

  • pkf run build
  • worktree whitebox tests: 7/7 passed
  • mizchi/bit_runtime: 14/14 passed
  • mizchi/bit_lib: 302/302 passed
  • Git worktree-only suites: t2401t2407 passed; the targeted t2400 --no-checkout case now passes
  • moon check --target native modules/bit modules/bit_lib modules/bit_runtime
  • package layering check and git diff --check
  • manual release-binary checks for executable mode, symlinks, dirty removal, and no-checkout/reset behavior

Closes #172

@mizchi
mizchi merged commit 9d24eff into main Aug 11, 2026
3 of 22 checks passed
@mizchi
mizchi deleted the agent/fix-worktree-cleanliness branch August 11, 2026 15:31
@mizchi mizchi mentioned this pull request Aug 11, 2026
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.

worktree add drops executable bits and cleanliness checks disagree

1 participant