Skip to content

[ci]: make priority:develop:sync worktree-safe for unattended runs #11

@svelderrainruiz

Description

@svelderrainruiz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciCI/CD, workflows, and pipeline changesenhancementNew feature or requestfork-standing-priorityFork-only standing priority for automation routing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions