Summary
Fix priority:develop:sync so it works from linked worktrees and remains safe for unattended runs.
Problem
tools/priority/Sync-OriginUpstreamDevelop.ps1 currently builds its lock path under repoRoot/.git, which is a file in linked worktrees. That causes lock acquisition to self-time out and forces manual sync fallbacks after PR merges.
Acceptance Criteria
priority:develop:sync -- --fork-remote origin succeeds from both the root checkout and a linked worktree.
- Sync locks use the common git dir so serialization remains repo-wide across worktrees.
- The default writer-lease root uses the common git dir.
- Develop sync diagnostics/reporting include resolved git admin paths (
gitDir, gitCommonDir, lockPath).
- Regression coverage reproduces the linked-worktree failure mode and verifies the fixed behavior.
Notes
- Scope is limited to the unattended hot path, not a repo-wide
.git cleanup.
- This issue exists to make post-merge fork sync deterministic for unattended delivery.
Summary
Fix
priority:develop:syncso it works from linked worktrees and remains safe for unattended runs.Problem
tools/priority/Sync-OriginUpstreamDevelop.ps1currently builds its lock path underrepoRoot/.git, which is a file in linked worktrees. That causes lock acquisition to self-time out and forces manual sync fallbacks after PR merges.Acceptance Criteria
priority:develop:sync -- --fork-remote originsucceeds from both the root checkout and a linked worktree.gitDir,gitCommonDir,lockPath).Notes
.gitcleanup.