Repository navigation
Conversation
…scope-ai#4453) `SkillBoxTest$UploadContainment.preservesLegacyNamesWithRelativeNonNormalizedWorkDirectory` started with `Path.of("").toAbsolutePath().relativize(tempDir)`. A relative path cannot cross drives, and on the Windows runner the checkout is on `D:` while `java.io.tmpdir` is on `C:`, so that line threw `'other' has different root` before `SkillBox` was called. Since the backport of agentscope-ai#3787 (`508d5e27`) it has failed the Windows job of every `2.0.x` PR and got the Ubuntu job cancelled. The directory the test relativizes is now created under the module's `target/`, which is on the drive a relative path is resolved against, and is removed afterwards. What the test asserts and the code it exercises are unchanged: with `SkillUtil.resolveContainedPath` no longer normalizing its base directory, this is the one test in the class that fails.
Contributor
Author
|
About the CI of this PR: on Windows, The job still shows red because it gets further and fails in |
This was referenced Nov 27, 2026
…agentscope-ai#4455) Three Windows path problems kept the harness module red on the Windows job of every `2.0.x` PR, 18 tests in all, so that module and everything after it was never tested by CI on this branch. `SandboxWorkspaceRoot.normalize` accepted only roots that start with `/`. The in-memory sandbox used by the tests reports a host directory as its root, which is a drive path on Windows. A drive path is accepted now, on every host; relative, drive-relative and UNC roots are still rejected. `ProjectAwareOverlay.isWorkspacePath` relied on `Path.isAbsolute()` to tell an absolute path from a relative one. On a Windows host a path with a leading separator is not absolute for it, so `/MEMORY.md`, the spelling the `CompositeFilesystem` hands its backends, was matched against the workspace prefixes as if it were relative. It was then written to the workspace layer, which bypasses the project writer and its rejection. A leading separator now counts as absolute wherever the code runs. `MemoryFlushSandboxIndependenceTest` relativized the temp directory from the working directory, which cannot cross drives, as in agentscope-ai#4453. Tests: `SandboxWorkspaceRootTest` and `ProjectAwareOverlayTest` each gain a case that holds on every host.
… test `LocalFilesystemPersonalAssistantExampleTest.localFilesystem_filesPersistAcrossCalls` asserts that MEMORY.md is unchanged after the second call. With memory hooks on, the flush that runs in the background after a call can consolidate into MEMORY.md, so that assertion depended on whether the flush had finished. Repeating the scenario 50 times on unmodified `2.0.x` changed MEMORY.md once, to the stub model's reply. The test is about files persisting across calls, not about memory, so it now disables memory hooks. With them disabled, 50 repetitions did not change MEMORY.md.
aiyili
force-pushed
the
fix/ci-windows-harness-paths-20x
branch
from
November 27, 2026 10:01
57cdbc0 to
43f29af
Compare
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.
Fixes #4455
Stacked on #4454: the first commit is that PR's, so that the CI of this one gets past
agentscope-coreand shows the harness result. The other two commits are this PR's.Problem
With #4454 applied, the Windows job of a
2.0.xPR fails inagentscope-harnesson 18 tests, and every module after the harness is skipped. The same tests fail on a Windows machine on unmodified2.0.x. On Linux the module passes. Three causes, all about paths on Windows.Fix
Sandbox workspace root
12 errors in
HarnessAgentTestandSandboxFilesystemIsolationScopeExampleTest:SandboxWorkspaceRoot.normalizeaccepted only roots that start with/. The in-memory sandbox used by these tests reports a host directory as its root, which is a drive path on Windows, so every call that builds the system prompt or a path normalizer failed.A drive path is accepted now, on every host. Relative, drive-relative (
C:ws) and UNC roots are still rejected, and roots are still normalized. #3646 brought the class tomainwithout that check (6ff7590a); the2.0.xbackport (30d13bd2) added it. This keeps the backport's behaviour and only corrects what it counts as absolute.Project-aware overlay
5 failures in
MemoryConsolidatorCommitGateTest:ProjectAwareOverlay.isWorkspacePathtold an absolute path from a relative one withPath.isAbsolute(). On a Windows host, a path with a leading separator is not absolute for that method./MEMORY.md, which is the spelling theCompositeFilesystemhands its backends, was therefore matched against the workspace prefixes as if it were relative, classified as a workspace file and written to the workspace layer. The project writer, which these tests make reject the write, was bypassed.A leading separator now counts as absolute wherever the code runs. That is what the class already did on Linux and what
isWorkspacePath_absoluteOutsideWorkspace_returnsFalsestates as the intent; that test only covers the spelling with a drive.Path.isAbsolute()is no longer consulted for this decision. On either host it could only be true here for a drive path outside the workspace root, and such a path matches no workspace prefix either way, so the result is the same without it. The check is now the same on every host, and both of its outcomes run on Linux, where coverage is collected.mainhas the same code and not these tests, so on Windows the bypass exists there too. I have not touchedmain.One test
1 error in
MemoryFlushSandboxIndependenceTest:Path.of("").toAbsolutePath().relativize(workspace)cannot cross drives, as in #4453. The relative workspace is now taken under the module'starget/, which is on the drive a relative path is resolved against.A race found while verifying
With the three fixes in place, a full run on Windows failed once in
LocalFilesystemPersonalAssistantExampleTest.localFilesystem_filesPersistAcrossCalls, which asserts thatMEMORY.mdis unchanged after the second call. With memory hooks on, the flush that runs in the background after a call can consolidate intoMEMORY.md. The test is about files persisting, so it now disables memory hooks. The numbers are in the last commit's message.Tests
Two cases were added, each of which holds on any host:
SandboxWorkspaceRootTest.driveRootsAreAcceptedOnEveryHostProjectAwareOverlayTest.isWorkspacePath_rootRelativeOutsideWorkspace_returnsFalseOnEveryHostOn Windows, the 18 tests pass with the change. Each piece of the fix was then broken on its own, also on Windows:
/roots are absolutedriveRootsAreAcceptedOnEveryHost, and the 5SandboxFilesystemIsolationScopeExampleTestcasesdriveRootsAreAcceptedOnEveryHost,activeRootIsNormalizedAndInvalidRootsFailFastisWorkspacePath_rootRelativeOutsideWorkspace_returnsFalseOnEveryHost, and the 5MemoryConsolidatorCommitGateTestcasesisWorkspacePath_classifiesCorrectlyand 3 write-routing casesThe first four are caught. The third is invisible on Linux, where the old and the new code agree.
The fifth is not caught, and cannot be:
matchesWorkspacePrefixdoes not strip a leading separator, so/MEMORY.mdmatches no prefix and the result is the same with or without the check. The bug was the old loop that stripped the separators before matching, which only ran on Windows. The check is kept because it states the rule and does not depend on how the prefix match is written.Verification
The full
agentscope-harnesssuite was run before and after the change on Windows and in a Linux container. "Before" is unmodified2.0.x.maven:3.9-eclipse-temurin-17)BaseSandboxFilesystemTest.edit_*(python3: not foundin the image),MarketplaceStagerOrphanGcTest.unreadableEntryDoesNotFailStageThe only difference on Linux is the 2 added tests. The first full run on Windows, without the last commit, had the one failure described under "A race found while verifying"; the second, with it, has none.
Effect on CI
The CI run of this PR shows the change: on Windows,
agentscope-coreandagentscope-harnessboth pass now. For the harness that is 1621 tests with 0 failures, the first time the module passes on the Windows runner since the two backports of 2026-11-13. The job then goes on through the next modules and fails inagentscope-extensions-sandbox-e2b, on two tests that pass a host directory as an in-sandbox workspace root, which the production code rightly rejects on Windows. That is a separate problem and not part of this PR; the harness module is what this PR is about. It is fixed in #4461, which is stacked on this PR, and whose CI is green on both systems with this PR's commits on the branch.