fix(buzz-acp): ground the agent workspace on Windows - #3730
Open
sumit-m wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.