Skip to content

fix: canonicalize host worktree ownership - #3143

Merged
numnx merged 1 commit into
devfrom
fix/worker-branch-canonical-ownership
Jul 16, 2026
Merged

fix: canonicalize host worktree ownership#3143
numnx merged 1 commit into
devfrom
fix/worker-branch-canonical-ownership

Conversation

@numnx

@numnx numnx commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Canonicalize fresh HOST worktree ownership paths through the filesystem before collision checks.
  • Preserve strict branch, current-tip, registered-worktree, and ancestry verification.
  • Add a symlink-path regression test covering the macOS /var and /private/var alias pattern.
  • Document the host-worktree ownership contract in canonical and public architecture docs.

Why

The macOS Playwright task runtime could reject its own freshly allocated worker branch because Git and the invocation represented the same temporary worktree through different filesystem aliases.

Validation

  • tsc --noEmit
  • vitest run tests/backend/infrastructure/providers/cli/workspace-artifact-service.test.ts — 21 passed
  • vitest run tests/backend — 467 files, 6,148 passed, 12 skipped
  • node scripts/build.mjs
  • targeted Playwright invocation runtime — 1 passed

Risk and rollback

Low risk. The collision guard remains fail-closed and still requires the exact branch ref, tip, registered worktree, and ancestry. Rollback is the single commit in this PR.

@numnx
numnx merged commit 95c56b6 into dev Jul 16, 2026
40 checks passed
@numnx
numnx deleted the fix/worker-branch-canonical-ownership branch July 16, 2026 13:46
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