Harden detached-first Codex worktree creation - #1499
Conversation
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
|
Self-review on exact head HIGH
MEDIUM
Verification
The new hosted Windows job is intentionally the first complete 13-case run. |
|
@codex review Please review exact head |
Chris0Jeky
left a comment
There was a problem hiding this comment.
Independent adversarial review A — exact head 4360576b4d720b5eb4d60428b0505ce5d01683a9
Verdict
No findings.
- CRITICAL: none
- HIGH: none
- MEDIUM: none
- LOW: none
I reviewed the complete exact-head diff with the requested PowerShell 5.1 lens: the ProcessStartInfo argv boundary and fallback quoting, native-Git selection, exit/stdout/stderr propagation, single-commit base resolution, detached/state-preserving behavior, guard-before-branch handoff, negative-test fidelity/cleanup, mirrored worker guidance, and the reusable Windows gate.
I also re-read every existing PR conversation surface immediately before submitting this review: two top-level comments, no submitted reviews, and no review threads. The earlier self-review findings are represented by fixes in this head and have focused regression coverage; I found no unaddressed comment or bot finding.
Evidence
- Exact-head local Windows PowerShell 5.1 full harness: 13/13 passed
- PowerShell parser: 0 errors across helper and harness
git diff --check 6fd3936...4360576: passed- Hosted exact-head
Docs Governance / Worktree Helper (Windows PowerShell): success
Residual risks / test gaps
- The harness exercises paths containing spaces and metacharacter containment, but does not fuzz every legal Git-ref/Windows command-line edge (for example embedded quotes or trailing backslashes).
- Abrupt process termination during worktree creation/cleanup is not fault-injected.
- Overall merge readiness is not established by this review: at the last exact-head check,
E2E Smoke / E2E Smokewas still in progress, and the PR body retains the explicit #1496-first merge-order gate.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4360576b4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Independent adversarial review B — exact head MEDIUM
Residual risk / gate state
|
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
|
Fix evidence for the MEDIUM containment finding in comment
Exact-head local evidence on
All review and CI evidence from |
|
@codex review Please re-review exact head |
|
Independent adversarial re-review B — exact head VerdictThis head is not clean yet. The prior lexical HIGH
MEDIUM
LOW
Prior finding disposition and evidence
Residual gate stateNo broad local suite was run for this timeboxed review. Several required jobs were still in progress at the last exact-head snapshot. The PR remains draft, and its explicit |
Chris0Jeky
left a comment
There was a problem hiding this comment.
Independent adversarial re-review A — exact head ff8c54c96fb70077d9117f371ab0d873f207a30d
The new traversal/rooted/unapproved-input checks are correctly placed before filesystem or worktree mutation, and the exact-head hosted 16-case Windows helper job is green. The head is not clean for review, however: all six existing Codex threads remain applicable, and the containment fix leaves one additional physical-path escape.
HIGH
-
The printed PowerShell handoff is not fail-fast —
scripts/git/New-CodexIssueWorktree.ps1:229-231.A nonzero native exit does not terminate Windows PowerShell 5.1. If the guard fails because the worker is in the coordinator checkout, a pasted/runs-as-a-block handoff still reaches
switch -cand can create the issue branch in the wrong checkout. If branch creation fails, later worker steps can continue on detached HEAD.Expected fix/test: emit explicit
$LASTEXITCODEchecks after both commands, or replace the pair with one fail-fast handoff script. Exercise guard failure from the coordinator and branch-collision failure, proving no wrong-checkout branch and no subsequent work.
MEDIUM
-
Containment is lexical and can still escape through a reparse point —
scripts/git/New-CodexIssueWorktree.ps1:163-170.Path.GetFullPathnormalizes syntax but does not resolve a directory junction/symlink. If the approved.worktreespath is a reparse point to a directory outside the repository, the requested and expected strings compare equal while Git/files are created outside the containment boundary.Expected fix/test: reject an existing
.worktreesreparse point (or resolve and verify its final physical target) before mutation; add a disposable junction/symlink regression proving no target and no registration are created. -
The mandatory guard still re-enters the PATH-first Git shim —
scripts/worktree_guard.ps1:8, printed fromNew-CodexIssueWorktree.ps1:230.The helper selects an argv-safe native Git executable, but its first printed command invokes a guard that runs
& git. Under the very batch-shim condition this PR contains, the guard can fail or execute shim behavior before the pinned executable is used. The current shim case stops at helper execution and does not exercise the handoff.Expected fix/test: pass the selected executable into the guard (or otherwise pin it there) and run the complete guard-then-branch sequence with the failing/sentinel batch shim first on PATH.
-
The replacement flow no longer guarantees a branch from latest
main—.claude/skills/issue-to-pr/SKILL.md:35-47.The old path pulled
origin/main; the new helper only resolves the locally cached remote-tracking ref. This conflicts with the execution guide's “Branch from latestmain” rule and can start work from a stale commit while appearing to use the remote base.Expected fix/test: refresh the explicit remote ref with the selected native Git executable without touching coordinator files/branch, or add an equally fail-closed freshness contract before resolving the commit.
-
The canonical worker prompt omits the required branch command —
docs/WORKTREE_AGENT_PROTOCOL.md:104-116.Copying the template tells the worker only to run the guard, so it can implement and commit on detached HEAD. The autonomy-runbook template already includes the missing second command.
Expected fix: add the helper's printed native-Git
switch -ccommand as the second, post-guard prompt command. -
The documented Bash path cannot execute the printed branch handoff —
docs/WORKTREE_AGENT_PROTOCOL.md:87-95.Bash is explicitly supported for the guard, but the helper emits only PowerShell syntax with a Windows path. A Bash worker cannot complete the newly mandatory second step.
Expected fix/test: either require the entire helper handoff to run under PowerShell, or print/document and exercise a safely quoted Bash-compatible native-Git command.
LOW
-
Annotated-tag bases regress from the previous Git behavior —
scripts/git/New-CodexIssueWorktree.ps1:199-206.rev-parse --verifyreturns the annotated tag object's SHA andcat-file -tthen rejects it astag, although the previousgit worktree addaccepted and peeled a tag that points to a commit.Expected fix/test: resolve one commit via a single protected
<base>^{commit}argument, or explicitly narrow and document the parameter contract; cover annotated and non-commit tags while retaining revision-range rejection.
Discussion and gate state
I re-read all five top-level comments, both submitted reviews, and all six unresolved review threads immediately before submitting this review. The six prior Codex findings above remain unresolved and non-outdated on this head. Exact-head Docs Governance / Worktree Helper (Windows PowerShell) is green; several broader exact-head jobs were still running, so merge readiness is not claimed. No broad local suite was run for this timeboxed re-review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff8c54c96f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Review-fix evidence — exact head
|
|
@codex review exact head |
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
|
Exact-head CI recovery for superseded head
The failed run is understood and superseded. Fresh exact-head CI and review are required. |
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82627c8ed3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Chris0Jeky
left a comment
There was a problem hiding this comment.
Independent adversarial security/docs review — exact head 82627c8ed3813aa201ac44a7124022a050b382f9
Verdict
This head is not clean: four MEDIUM findings and two LOW findings remain.
MEDIUM
-
A refreshed remote base can be shadowed by a local ref —
scripts/git/New-CodexIssueWorktree.ps1:224-258, especially line 249.For
origin/main, the helper fetches intorefs/remotes/origin/mainbut then resolves the ambiguous shorthandorigin/main^{commit}. Git resolves tags, then local heads, before remote-tracking refs, so a local tag or branch namedorigin/maincan win and detach the worktree at the wrong commit while the helper reports that it refreshedorigin/main. See Git's documented refname precedence.Required fix/test: for a recognized remote, resolve the fully qualified
refs/remotes/<remote>/<branch>^{commit}; add conflicting local tag and/or branch fixtures and prove HEAD equals the freshly fetched remote OID. -
Option-looking remote names are not terminated before
git fetch—scripts/git/New-CodexIssueWorktree.ps1:242-243.remote get-url -- <name>intentionally treats an option-looking name as data, but the later fetch passes$candidateRemotewithout--. A configured remote such as-uis consumed as a fetch option and the generated refspec becomes the repository argument; an option such as--upload-pack=...can select a program. This breaks the argv boundary the PR is intended to harden.Required fix/test: insert
--before the remote argument and add a safe leading-dash remote regression proving the intended remote/ref is fetched with no option interpretation or canary execution. -
The guard can accept a coordinator/standalone checkout under a
.worktreesancestor —scripts/worktree_guard.ps1:44-53and the resulting branch command atscripts/git/New-CodexIssueWorktree.ps1:285.The current guard uses substring markers only. A primary checkout such as
C:/dev/.worktrees/Taskdecktherefore passes, and the printedswitch -cmoves that coordinator checkout instead of failing closed. This is also the current exact-head Codex thread: #1499 (comment).Required fix/test: verify the actual linked-worktree relationship (for example, canonical Git dir differs from the common dir) in addition to the approved path marker; add a standalone/coordinator repo nested under
.worktreesand prove the handoff stops before branch creation. -
The headless Claude authorization contract still does not cover the printed handoff —
docs/WORKTREE_AGENT_PROTOCOL.md:69-86,.claude/settings.json:10-15,51, and unresolved thread #1499 (comment).The committed rules allow relative
powershell -File ...andgit switchshapes, while the helper prints dynamically absolute& '<PowerShell>' ...and& '<Git>' switch -c ...commands. The documented--allowedToolsexample covers only the generic relative guard, andacceptEditsauto-approves edits/common filesystem operations—not arbitrary Git commands (permission modes). A noninteractive worker can therefore remain blocked on detached HEAD. The trust explanation also conflicts with the current statement that trust verification is disabled for ordinary-pruns (security docs).Required fix/test: prefer one stable reviewed relative wrapper that performs the pinned guard-plus-switch sequence and can be narrowly allowlisted; otherwise define an explicit launch authorization covering the exact whole dynamic block. Add a headless permission-contract regression and remove
acceptEditsas a sufficient standalone remedy.
LOW
-
Post-run verification contradicts preserved coordinator state —
docs/WORKTREE_AGENT_PROTOCOL.md:166-170.The expected state says unrelated changes are absent, but this PR intentionally permits and preserves pre-existing tracked/untracked changes. That wording can pressure a coordinator to clean user-owned state.
Required fix: require branch/status to match the pre-creation baseline, including unchanged pre-existing user changes, with no newly introduced coordinator changes.
-
The PR body/review ledger is stale against live exact-head state.
It still names
ed238b9efor fresh review, reports DCO5/5, and says all six inline threads are resolved. Live state is head82627c8e, six signed commits, and two unresolved threads (the two MEDIUM threads linked above). The two other lateff8c54c9threads—reparse-root containment and the worker-prompt branch command—now have correct fix replies and are resolved.Required fix: update the body to exact-head counts/evidence, address/reply to both applicable threads, resolve only after fixes, and re-check linked-issue metadata after the body edit.
Evidence
- Read all 10 top-level comments, 13 submitted reviews, and all 10 review threads immediately before posting; 8 threads are resolved and 2 remain applicable/unresolved.
- Local Windows PowerShell harness: 21/21 passed.
- Four changed Taskdeck skill validators: 4/4 passed.
- PowerShell parser checks and
git diff --check 6fd39367...82627c8e: passed. - Exact-head hosted state: all 37 check runs completed with no failing conclusion; Windows helper, CodeQL, workflow lint, required CI, and CI Extended are green/skipped as designed.
- DCO trailers are present on 6/6 commits.
- No files or refs were changed by this review.
Residual risks / test gaps
- The harness does not execute a post-helper branch-collision case where
switch -citself returns a native nonzero; the current gate appears correct, but that regression remains worth adding. - Native Git/PowerShell paths are pinned, not identity/hash/publisher pinned; same-path replacement remains outside this slice.
- A same-user TOCTOU race can replace
.worktreesafter its last reparse check and beforegit worktree add. - Abrupt termination during worktree creation/cleanup is not fault-injected.
- The draft and its explicit #1496-first merge-order hold remain binding; this review does not authorize merge.
|
Independent adversarial correctness review — exact head VerdictThis head is not clean. I found one HIGH, one additional MEDIUM, and two LOW correctness findings. I also independently confirm the three correctness-impacting MEDIUM findings already recorded in the exact-head security/docs review. HIGH
MEDIUM
LOW
Conversation and evidence
Residual gate stateThe tests do not exercise wrong-valid-worktree handoff, local-ref shadowing, uppercase/final-LF slugs, or a native This review does not authorize merge. The #1496-first merge-order hold remains binding. At posting time the PR was open and unmerged; GitHub reported it as ready-for-review rather than draft, so the coordinator should restore draft state if that transition was unintended. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82627c8ed3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Review-fix evidence — exact head
|
|
@codex review Please review exact head |
|
Independent adversarial security/docs review — exact head VerdictThis head is not clean: one MEDIUM headless-permission/trust-boundary finding remains. MEDIUM
Review evidence
Residual risks
|
There was a problem hiding this comment.
💡 Codex Review
Taskdeck/scripts/worktree_guard.ps1
Lines 100 to 103 in 43407cb
On Windows, the helper accepts -WorktreeRoot .WORKTREES because its root comparisons use OrdinalIgnoreCase, but this marker check uses case-sensitive String.Contains. If Git preserves the supplied casing in rev-parse --show-toplevel, the helper successfully creates the detached worktree and then its printed initializer rejects that same worktree as unrecognized; use the existing OS-specific path comparison here or require canonical casing in the helper.
AGENTS.md reference: AGENTS.md:L89-L91
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Independent adversarial Git/PowerShell correctness review — exact head VerdictThis exact head is not clean: one MEDIUM and two LOW correctness findings remain. The separately posted exact-head headless-permission finding is also still merge-blocking; the findings below are from this independent correctness pass. MEDIUM
LOW
Evidence
Residual risk / gate stateExecutable paths remain identity/hash-unpinned after resolving them; same-user replacement and the documented reparse check-to-use race remain. Abrupt termination during creation/cleanup is not fault-injected. The PR remains draft and its explicit |
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43407cbcb4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…elper Signed-off-by: Chris0Jeky <jeky.tck@gmail.com> # Conflicts: # docs/TESTING_GUIDE.md
Parked gate checkpoint — 2026-07-27PR #1499 remains at remote head The bounded full harness reached 23 passing cases, then hit a distinct functional red in This PR is parked under #1498. Do not merge it until the target-smudge contract is repaired, the complete harness and governance matrix pass, the local work is signed/pushed, every existing finding is mapped/replied/resolved, and fresh exact-head independent/Codex reviews plus CI/CI Extended/CodeQL are green. |
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
…elper Signed-off-by: Chris0Jeky <jeky.tck@gmail.com> # Conflicts: # .claude/skills/taskdeck-issue-batch-orchestrator/SKILL.md # .codex/skills/taskdeck-issue-batch-orchestrator/SKILL.md
Exact-head review-fix evidence —
|
…elper Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Exact-head base-refresh evidence —
|
|
@codex review Please perform a fresh review of PR #1499 at exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccc6ddc8b5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| $initializerAllowRule = "PowerShell($initializerInvocation)" | ||
| Write-Host "Claude Code task-scoped initializer allow rule (additive PowerShell transport):" | ||
| Write-Host "`$initializerAllowRule = @'" | ||
| Write-Host $initializerAllowRule | ||
| Write-Host "'@" | ||
| Write-Host '# Pass as one argv value: claude ... --allowedTools $initializerAllowRule' |
There was a problem hiding this comment.
Authorize the required guard command for headless workers
In the documented unattended claude -p --permission-mode dontAsk flow, this is the only emitted PowerShell allow rule, but the required handoff starts with the separate guard invocation at lines 781-783. The protocol states that unmatched commands are denied under dontAsk, and .claude/settings.json no longer grants this PowerShell guard, so a headless worker cannot execute the mandated first command and never reaches the authorized initializer. Emit an exact guard rule as well, or authorize the complete six-line handoff as one bounded command.
AGENTS.md reference: AGENTS.md:L89-L92
Useful? React with 👍 / 👎.
| $removeResult = Invoke-GitCommand -Arguments @("worktree", "remove", $Worktree) | ||
| if ($removeResult.ExitCode -ne 0) { | ||
| throw "Could not remove helper-created worktree '$Worktree' after handoff verification failed (exit code $($removeResult.ExitCode)).$(Format-GitContext $removeResult.Output)" |
There was a problem hiding this comment.
Clean up dirty artifact-verification failures
When a checkout/smudge filter changes a target handoff artifact and its clean filter does not canonicalize those bytes back to the index blob, artifact verification fails with a Git-dirty worktree and this unforced removal refuses to delete it; git worktree -h documents -f as forcing removal of dirty or locked worktrees. The helper consequently leaves both the registered worktree and target path behind, blocking retries precisely when byte protection fires. The harness misses this because its target-smudge clean filter always reproduces the reviewed blob, making Git regard the altered checkout as clean; cleanup should safely handle a verified helper-created dirty target and the regression case should exercise that state.
Useful? React with 👍 / 👎.
| - Windows `Worktree Helper (Windows PowerShell)` runs | ||
| `powershell -NoLogo -NoProfile -NonInteractive -File scripts/git/Test-New-CodexIssueWorktree.ps1` | ||
| as a 26-case harness enforcing detached-first creation, clean source helper/guard/initializer | ||
| artifacts (including local clean-filter canaries and index-hidden byte changes), independent |
There was a problem hiding this comment.
Report the actual 28-case harness count
The test script's default case list contains 28 cases and the workflow invokes that full default, but this canonical testing documentation still calls it a 26-case harness; docs/STATUS.md repeats the same stale count. This misstates the required gate being reviewed, so update both canonical descriptions to 28 (or derive the count rather than duplicating it).
AGENTS.md reference: AGENTS.md:L113-L118
Useful? React with 👍 / 👎.
| if ($PSCmdlet.ShouldProcess($worktreeDir, "Refresh the base when remote and create a detached worktree from $BaseBranch")) { | ||
| if ($null -ne $candidateRemote) { | ||
| $remoteRefspec = "+refs/heads/$candidateBranch`:refs/remotes/$candidateRemote/$candidateBranch" | ||
| $fetchResult = Invoke-GitCommand -Arguments @("fetch", "--no-tags", "--no-recurse-submodules", "--", $candidateRemote, $remoteRefspec) |
There was a problem hiding this comment.
Preflight target collisions before refreshing remote refs
When the derived .worktrees/codex-… target already exists, the helper performs this force-fetch before Reserve-WorktreeTarget detects the collision, so an invocation that is guaranteed to fail still updates the caller's remote-tracking ref. The same ordering lets -WhatIf report success for an occupied target because the reservation is inside the skipped ShouldProcess block. Restore a non-mutating target-existence preflight before remote operations and ShouldProcess, while retaining the later atomic reservation to close races.
Useful? React with 👍 / 👎.
| [string]::IsNullOrWhiteSpace($commonGitDirectory.Output)) { | ||
| Exit-WithInitializerError "git switch -c failed and the unused helper-created worktree could not be scheduled for removal because Git could not resolve the common directory." 2 | ||
| } | ||
| $repoRoot = Split-Path -Parent $commonGitDirectory.Output.Trim() |
There was a problem hiding this comment.
Bind late-collision cleanup to the actual Git directory
For a checkout initialized with --separate-git-dir, or for a submodule repository, the parent of --git-common-dir is not the repository's worktree root. This assignment therefore makes the scheduled child run git -C in an unrelated directory; it exits 128 after the initializer has already returned, silently leaving the unused worktree path and registration behind after a late branch collision. Invoke cleanup through the verified common Git directory itself or otherwise resolve an actual registered worktree instead of assuming a conventional <root>/.git layout.
AGENTS.md reference: AGENTS.md:L89-L92
Useful? React with 👍 / 👎.
| if (-not $BaseBranch.StartsWith($remotePrefix, [System.StringComparison]::Ordinal) -or | ||
| $BaseBranch.Length -le $remotePrefix.Length) { |
There was a problem hiding this comment.
Reject case-variant remote shorthand before local resolution
On Windows, if the configured remote is origin but the caller supplies Origin/main, this ordinal prefix check does not recognize it as a remote base. The fallback rev-parse can nevertheless resolve a loose refs/remotes/origin/main through the case-insensitive filesystem, so the helper silently uses the stale tracking ref without performing the promised remote refresh. Canonicalize against configured remote names or reject case variants instead of allowing them to fall through as local revisions, and cover this Windows-specific resolution path in the harness.
Useful? React with 👍 / 👎.
Summary
origin/HEADCloses #1498
Verification
dotnet test backend/Taskdeck.sln -c Release(not applicable locally: no backend product behavior changed; fresh hosted required lanes pending)powershell.exe -NoLogo -NoProfile -NonInteractive -File scripts/git/Test-New-CodexIssueWorktree.ps1— 28/28.claude/settings.jsonand.mcp.jsonparsegit diff --check origin/main...HEADThe 28 cases cover dirty-source preservation, detached HEAD, complete remote-name matching, remote freshness and symbolic default resolution, fully-qualified refs, guard/switch order, exact-worktree/base binding, source and target artifact bytes, PATH shim bypass, headless permission posture, missing executables, linked-worktree identity, reparse containment, tags, revision ranges, metacharacters, invalid Windows refs, dry-run missing bases, collisions, cleanup, and native Git failure diagnostics.
Documentation
docs/STATUS.md— required docs governance names the hosted Windows worktree-helper gatedocs/TESTING_GUIDE.md— canonical local invocation recordeddocs/IMPLEMENTATION_MASTERPLAN.md(not updated by this PR: roadmap and priorities did not change)docs/WORKTREE_AGENT_PROTOCOL.mddocs/tooling/CODEX_AUTONOMY_RUNBOOK.mdReview
ccc6ddc8b5331c0fe44bfb5bba367a6622b917d1CI workflow validation
Tracking
Closes #1498Risk notes
git worktree remove; no force cleanup is introduced.88eb6776is merged in signed commitccc6ddc8; fresh review and hosted gates are required before merge.