Repository navigation
Description
Describe the bug
#4453 removed the agentscope-core failure from the Windows job of a 2.0.x PR. With #4454 applied, that job gets further and then fails in agentscope-harness: 1619 run, 5 failures, 13 errors. Every module that depends on the harness is skipped, and the Ubuntu job is cancelled.
The same tests fail on a Windows machine on unmodified 2.0.x (5 failures, 12 errors; the 13th error is a case that also fails sometimes without any change). On Linux the module passes: the Ubuntu job of the same run, before it was cancelled, had run it with 1619 tests and 0 failures.
So a 2.0.x PR still cannot get a green or complete CI run, and changes to the harness module are never tested by CI on this branch.
Error messages
Three separate causes, all about paths on Windows.
-
12 errors in
HarnessAgentTest(7) andSandboxFilesystemIsolationScopeExampleTest(5):SandboxException$SandboxConfigurationException: Sandbox workspace root must be an absolute path but was: C:\Users\...\agentscope-inmemory-sandbox-...\...SandboxWorkspaceRoot.normalizeonly accepts a root that starts with/. The in-memory sandbox used by these tests reports a host directory as its workspace root (InMemorySandboxClient,Files.createTempDirectory("agentscope-inmemory-sandbox-")), which is a Windows path on Windows.The version of this class that fix(harness): honor active sandbox workspace roots #3646 brought to
main(6ff7590a) returns the root without that check. The2.0.xbackport of the same change (30d13bd2) added it. -
1 error in
MemoryFlushSandboxIndependenceTest:MemoryFlushSandboxIndependenceTest.hostMemoryAllowsSafeUnicodeNestedNamespacesAndLegacyRoot:462 » IllegalArgument 'other' has different rootLine 462 is
Path.of("").toAbsolutePath().relativize(workspace): the same cross-driverelativizeas [CI] 2.0.x: every PR fails the Windows job in SkillBoxTest$UploadContainment, so no 2.0.x PR gets a complete CI run #4453. -
5 failures in
MemoryConsolidatorCommitGateTest:checkedUploadCannotBypassRejectingProjectWriterOnCompositeExactRoute:763 expected: <false> but was: <true> projectConfirmationUsesActualWriterNotIdenticalUpperOrLower:931 reject ==> expected: <false> but was: <true> (4 cases)An upload that these tests expect to be rejected succeeds. I have not diagnosed this one yet.
To Reproduce
On Windows, on 2.0.x with #4454 applied:
mvn -pl agentscope-harness test
Expected behavior
The harness module passes on the Windows job for 2.0.x.
Suggested fix
- For 1, accept a host-absolute root in
SandboxWorkspaceRoot.normalize(the in-memory sandbox is the one sandbox that works on a host directory), or return the root asmaindoes. - For 2, the same change as test(core): run the legacy skill-name test on Windows on 2.0.x (#4453) #4454: keep the directory that the test relativizes on the drive of the working directory.
- For 3, diagnose first; a rejecting project writer being bypassed on Windows may be more than a test problem.
I can take this and open a PR against 2.0.x, unless someone else wants to.
Environment
- AgentScope-Java Version:
2.0.xat50886798with test(core): run the legacy skill-name test on Windows on 2.0.x (#4453) #4454 (f8040af3) - Java Version: 17
- OS: Windows (GitHub
windows-latest; reproduced locally on Windows 10)
Activity
aiyili commentedon Nov 27, 2026
Taking this one. I'll open a PR against
2.0.x, stacked on #4454 so that its CI gets pastagentscope-coreand shows the harness result. Order: the two known causes first (the workspace-root check, then therelativizein the test), then theMemoryConsolidatorCommitGateTestfailures, which I'll diagnose before changing anything.aiyili commentedon Nov 27, 2026
Opened #4456 against
2.0.x, stacked on #4454 so that its CI shows the harness result.The three causes are fixed, and one of them was more than a Windows problem of the tests.
ProjectAwareOverlay.isWorkspacePathrelied onPath.isAbsolute(); on a Windows host a path with a leading separator does not count as absolute, so/MEMORY.md, the spelling theCompositeFilesystemhands its backends, was classified as a workspace file and written to the workspace layer. The project writer was bypassed. A leading separator now counts as absolute wherever the code runs, as it already did on Linux.mainhas the same code but not the tests that catch it, so the bypass exists there on Windows as well.The other two:
SandboxWorkspaceRootnow accepts a drive root on every host, while still rejecting relative, drive-relative and UNC roots; andMemoryFlushSandboxIndependenceTestno longer relativizes the temp directory.The full
agentscope-harnesssuite on Windows goes from 5 failures and 12 errors on unmodified2.0.xto none. In a Linux container the result is unchanged apart from the 2 added tests.One more thing, found while verifying: a full run on Windows failed once in
LocalFilesystemPersonalAssistantExampleTest.localFilesystem_filesPersistAcrossCalls, which asserts thatMEMORY.mdis unchanged after a call while the memory flush runs in the background. Repeating the scenario 50 times on unmodified2.0.xchanged the file once. That test now disables memory hooks; it is the last commit of the PR.fix(harness): make path handling host-independent on Windows on 2.0.x (…