You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Residuals from the PR #1851 review (worktree_guard substance validation, #1833):
Substance check 1 (linked-worktree gitdir containment) has no failing test. Deleting the whole case "$_wt_gitdir" in "$_wt_worktrees_dir"/* block leaves the suite green (35/35) — every rejected fixture is caught by check 2 alone. The isolating case exists: a git submodule work tree has a .git pointer file resolving exactly to its own git dir, so only check 1 rejects it. Add a submodule fixture so the check has a test that can fail.
WT_GIT_DIR is exported in MSYS flavour (/c/...) while WT_REPO_ROOT is Windows flavour (C:/...) in the sh guard under Git for Windows (also visible in the FATAL diagnostic). Nothing consumes WT_GIT_DIR today; it is a trap for the first consumer that hands it to a native Windows tool. Normalize or document.
Contradictory HEAD expectations resolve silently.WT_EXPECT_HEAD=detached + WT_EXPECT_BRANCH=foo (and the ps1 equivalents) ignores the branch instead of erroring. A setup-error exit (2) would be more fail-closed.
expect_sh_output asserts only the NOTE substring, never the exit code — a guard that printed the NOTE then failed would still pass that case. Cheap to tighten.
Test-harness robustness: if both mktemp -d forms fail, FIXTURE_ROOT is empty and fixtures land at /primary, /bare.git, ... Guard the mktemp result.
docs/WORKTREE_AGENT_PROTOCOL.md:14 is stale — "Other roots are allowed only when the coordinator explicitly names them and updates guard configuration" no longer matches the substance-validated guard. (Coordinator docs sweep may fix this line first; keep the box here until it lands.)
Consider a short ADR recording the boundary change (path-shape markers demoted to advisory; substance validation now the gate). Repo CLAUDE.md names automation safety boundaries as ADR triggers; the net effect is strictly stronger, which is why PR fix(worktree): validate worktree guards by substance, not path shape #1851 shipped without one.
Residuals from the PR #1851 review (worktree_guard substance validation, #1833):
case "$_wt_gitdir" in "$_wt_worktrees_dir"/*block leaves the suite green (35/35) — every rejected fixture is caught by check 2 alone. The isolating case exists: a git submodule work tree has a.gitpointer file resolving exactly to its own git dir, so only check 1 rejects it. Add a submodule fixture so the check has a test that can fail.WT_GIT_DIRis exported in MSYS flavour (/c/...) whileWT_REPO_ROOTis Windows flavour (C:/...) in the sh guard under Git for Windows (also visible in the FATAL diagnostic). Nothing consumesWT_GIT_DIRtoday; it is a trap for the first consumer that hands it to a native Windows tool. Normalize or document.WT_EXPECT_HEAD=detached+WT_EXPECT_BRANCH=foo(and the ps1 equivalents) ignores the branch instead of erroring. A setup-error exit (2) would be more fail-closed.expect_sh_outputasserts only the NOTE substring, never the exit code — a guard that printed the NOTE then failed would still pass that case. Cheap to tighten.mktemp -dforms fail,FIXTURE_ROOTis empty and fixtures land at/primary,/bare.git, ... Guard the mktemp result.docs/WORKTREE_AGENT_PROTOCOL.md:14is stale — "Other roots are allowed only when the coordinator explicitly names them and updates guard configuration" no longer matches the substance-validated guard. (Coordinator docs sweep may fix this line first; keep the box here until it lands.)Source: PR #1851 fresh-context review (non-blocking items 1–7). None merge-relevant.