|
On Windows, sdd-workspace printed the workspace in MSYS form
(/c/Users/... or /tmp/...). Every helper path derives from that line:
task-brief's "wrote", review-package's diff path, executing-plans'
task-start "brief:". PowerShell resolves /c/Users/x as C:\c\Users\x, so
Test-Path and Get-Content on any of them failed. That is the shell an
agent gets from Claude Code's PowerShell tool and from Copilot CLI on
Windows. Reproduced on Windows 11 from PowerShell and from Claude Code
2.1.308's PowerShell tool.
When cygpath is present (Git Bash, MSYS2, Cygwin), print the path
through `cygpath -m`, which gives C:/Users/.... PowerShell, cmd and
Claude Code's Read tool all accept that form, and so does bash, so the
sibling scripts that build file names on top of it keep working.
Elsewhere the output is unchanged.
Only the printed line changes. The plan-path markers keep pwd -P's
spelling, so workspaces created before this change, including absolute
markers for out-of-repo plans, still match their plans. PR #2369
converted root and the plan path too, which would rewrite those
absolute markers and orphan existing workspaces for out-of-repo plans.
Tests: physical_path in both suites now spells paths the way the
scripts print them, and test-sdd-workspace adds a check that PowerShell
can open the printed workspace and brief paths. That check runs on
Windows and is a no-op elsewhere. On Windows the suites failed 10 and 1
assertions before the fix, and both pass after.
Co-authored-by: hzxxxx <hhuihihiux@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
nothing (#2388)
Under `set -euo pipefail`, task-done extracted the ledger's test-result
field with:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1)
When the test command passes but the log is empty or blank-only, `grep -v`
matches no lines and exits 1; pipefail propagates that through the
pipeline, and set -e aborts the assignment before the ledger line is
written. A passing task is then silently not recorded: exit 1, no stderr,
no ledger entry — indistinguishable from the failure path the guard exists
to produce.
Make the no-match case non-fatal, falling back to a literal placeholder for
the ledger field:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1) || last="(no output)"
The failure guard above this line (recording nothing when the test command
itself exits non-zero) is untouched.
Fixes #2385.
|