Skip to content

Add copy-on-write syncDirs bootstrap#71

Open
sjquant wants to merge 19 commits into
mainfrom
hopper-dropped-the-spoon-q9i
Open

Add copy-on-write syncDirs bootstrap#71
sjquant wants to merge 19 commits into
mainfrom
hopper-dropped-the-spoon-q9i

Conversation

@sjquant

@sjquant sjquant commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Why

New worktrees should become usable quickly while keeping dependency and build state correct for the new checkout. A CoW seed is only an optimization; the detected tool still performs authoritative repair after synced local files are available.

Changes

  • Keep syncDirs as an advanced, generic relative-directory CoW feature with APFS clonefile or mandatory Linux reflinks, never ordinary-copy fallback or package-manager behavior.
  • Resolve dependencyBootstrap across global, per-repo global, and local config with explicit values taking precedence over prompting.
  • Add an interactive tool-aware policy prompt for gji new and gji pr: reuse and repair, install fresh, or skip. Persist the choice through the existing local/global installSaveTarget behavior; JSON, headless, and dry-run modes never prompt and retain off when unset.
  • Detect PR bootstrap adapters from the actual PR worktree while selecting only safe project-local seed sources.
  • Support pnpm, Yarn, npm, uv, Cargo, and project-local Ruby/Bundler bootstrap targets with deterministic repair commands. npm remains install-only; Bundler is restricted to vendor/bundle and receives an explicit local bundle path.
  • Preserve the lifecycle CoW seed → syncFiles → dependency/build repair or install → after-create, and stop setup before repair, prompts, or hooks when syncFiles fails.
  • Preserve pnpm metadata regeneration, runtime compatibility checks, symlink and destination safety, clone reservations and locks, cached unsupported-CoW failures, partial-clone cleanup, no-overwrite publication, and protection of pre-existing targets.
  • Keep after-create as the project-specific escape hatch for generation, local services, and environment commands.
  • Keep human and JSON output paths separate, and report sync-file failures independently from dependency bootstrap failures.
  • Update README, website docs, and black-box coverage for policy persistence, explicit precedence, non-interactive behavior, Bundler, lifecycle ordering, fallback, cleanup, output states, and failure paths.

Validation: pnpm test (39 files, 692 tests), pnpm typecheck, pnpm build, pnpm docs:build, pnpm generate-man, and Biome checks all pass.

@sjquant sjquant self-assigned this Jul 21, 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.

1 participant