atxtechbro / atxtechbro/dotfiles

Fix symlink handling for git worktrees in setup scripts

Open
#305 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
27
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

We've encountered an issue with symlinks when working with git worktrees. When developing in a worktree (e.g., `pr-300`), the setup scripts create symlinks that point to the main repository path rather than the worktree path, causing the symlinks to point to non-existent files.

### Current Behavior

1. Setup script in worktree creates symlinks like:
```
~/ppv/pipelines/bin/mcp-server -> ~/ppv/pillars/dotfiles/mcp/scripts/mcp-server
```

2. But the actual script is located at:
```
~/ppv/pillars/dotfiles/pr-300/mcp/scripts/mcp-server
```

3. Result: Commands like `mcp-server` fail with "command not found" when testing in a worktree.

### Impact

This breaks the "spilled coffee principle" as developers can't properly test new features in worktrees without manual intervention.

### Reproduction Steps

1. Create a git worktree for a feature branch
2. Add a new script and update setup script to create a symlink to it
3. Run the setup script from the worktree
4. Try to use the new command

## Possible Solutions

We need a solution that maintains the benefits of worktrees while ensuring scripts can be properly tested during development.

**Labels:** bug, worktrees, symlinks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the setup scripts that create the symlinks and the mcp/scripts/mcp-server entry point, then reproduce the setup from a git worktree such as pr-300. Done means symlinks created from a worktree resolve to files in that worktree and the mcp-server command works without manual intervention.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, git, shell
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.