fix(buzz-acp): ground the agent workspace on Windows - #3730
Conversation
|
Flagging an overlap I should have caught before opening this: #3130 (opened 3 days earlier) changes the same predicate in Both PRs replace #3130 is the better version of that half. It also rejects filesystem roots generally via What is unique to this PR is the let repos = std::path::Path::new(cwd).join("REPOS");Interpolating Happy to go whichever way suits: rebase this onto #3130 so it becomes separator-only, or fold the root check from #3130 into this one and close that. No preference beyond not leaving two PRs racing on one function. |
2bbb583 to
3988531
Compare
workspace_section gated on cwd.starts_with('/'), which no Windows path
satisfies, so agents there got no [Workspace] section and were never told
where PLANS/ and REPOS/ live. Use Path::is_absolute and join REPOS natively.
Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
3988531 to
616720e
Compare
Problem
workspace_sectiondecides whether to emit the[Workspace]grounding block by testingcwd.starts_with('/'). No Windows path satisfies that, so on Windows the section is alwaysNone: agents are never told their working directory, nor thatAGENTS.md,PLANS/,RESEARCH/,WORK_LOGS/,OUTBOX/andREPOS/live there.The cwd itself is set correctly, so files still land in the right place by default — but the prompt loses the grounding that exists precisely to stop the agent hunting around
$HOMEfor those directories.Change
Path::is_absolutefor the absoluteness test. It is target-aware, soC:\Users\me\.buzzqualifies. The explicitcwd != "/"check stays, becauseis_absolute("/")is true on Unix and that value is thecurrent_dir()failure sentinel.REPOSwithPath::joinrather than interpolating a literal/, so a Windows nest reads…\.buzz\REPOSinstead of a mixed-separator path.Tests
The existing tests hardcoded
/Users/me/.buzzwith nocfggate, which is why this went unnoticed — on Windows they asserted nothing meaningful. They now go through acfg'dSAMPLE_ABS_CWDso the suite exercises the platform it runs on, plus a cross-platform regression guard and one rejection case per platform (C:foodrive-relative on Windows, a Windows path on Unix).cargo clippy -p buzz-acp --all-targetsclean;pool::tests98/98 on Windows.