Auto Worktree Misreads Stale .gsd, Falsely Marking

by Jule 51 views
Auto Worktree Misreads Stale .gsd, Falsely Marking

When an auto worktree’s .gsd symlink points to a stale external state, GSD can quietly misread project progress - declaring all milestones complete even when the main repo still has active work. This hidden bug exploits a mismatch between main repo and worktree state symlinks, creating false closure signals that disrupt development flow.

Here’s how it works: In one recent case, the main repo’s .gsd symlink pointed to a live state store (/Users/dpearson/.gsd/projects/ae2a7af867b0), but the auto worktree’s .gsd symlink pointed to a stale store (/Users/dpearson/.gsd/projects/c109be07bb89) - a valid but outdated project snapshot.

Key facts:

  • The main repo showed milestone M001-3erpof as active and phase executing
  • The worktree’s .gsd pointed to a stock, unupdated store with no milestones
  • GSD’s /gsd auto concluded All milestones complete despite active work

Behind the scene, GSD’s current logic only flags broken symlinks - not wrong targets - so stale but functional symlinks go unrepaired. This creates a blind spot where worktrees misinterpret project status, risking premature milestone closure and lost effort.

The controversy: this isn’t just a bug - it’s a design gap. Auto worktrees are meant to mirror main repo state, but inconsistent symlink handling undermines trust. Without repair, teams unknowingly close work prematurely.

Safety and clarity matter: always verify .gsd targets in worktrees, especially after migration, and demand auto tools correct misaligned symlinks. When /gsd auto runs, does it reflect true progress - or hide a system error?

The bottom line: never assume All milestones complete means closure - check the state source. Fixing symlink alignment and extending detection to wrong-target symlinks isn’t just better UX; it’s essential for reliable CI/CD culture.