Repository navigation
feat(filesystem): add conditional UTF-8 workspace writes - #4156
Closed
ningmao-hlyz wants to merge 3 commits into
Closed
ningmao-hlyz wants to merge 3 commits into
ningmao-hlyz wants to merge 3 commits into
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
3 of 5 tasks
ningmao-hlyz
force-pushed
the
feat/conditional-workspace-files
branch
from
November 13, 2026 18:25
794c270 to
ae985e8
Compare
ningmao-hlyz
marked this pull request as ready for review
November 13, 2026 18:25
This was referenced Nov 13, 2026
Reject an explicitly selected internal file before choosing the search backend. The Java fallback can otherwise return neighboring files when rg is absent. Verified the existing artifact regression with and without rg on PATH.
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.
AgentScope-Java Version
2.1.0-SNAPSHOT, based on main at
a4306d63(#4154).Description
Fixes #4165.
Two
WorkspaceManagerinstances can read the same memory file and overwrite one another's appends. Add optional conditional UTF-8 reads/updates to filesystem routes, and retry memory appends when their expected content is stale. Missing and empty files remain distinct.Local files coordinate cooperating writers across JVMs with an OS lock and atomic replacement. Windows sharing conflicts use bounded retries. Remote files require atomic versioned storage;
RemoteFilesystemcurrently usessupportsAtomicJournalStorage()to identify it. Overlay reads inherit raw lower-layer bytes, and internal lock/temp files are hidden from listings, search and the workspace index.Backends without the optional capability retain legacy append behavior. External edits, whole-file replacement and archive moves are outside this protocol. This does not add conditional deletion.
Three commits, directly based on main and independent of #4155:
rgis absent.Validation on Windows with Java 17:
mvn -B -o -T1C -pl agentscope-harness -am -Dtest=LocalAtomicTextFileTest,RemoteFilesystemCASTest,OverlayAtomicTextFileTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Djacoco.skip=true spotless:check test29 tests pass with
rgremoved from PATH. The existing artifact regression was also run directly in child JVMs: it reproduced the CI assertion before the fix withoutrg, and passes with and withoutrgafter the fix. Full Harness/dependency tests on the same filesystem implementation pass withoutrg: 5,909 tests, no failures or errors, 48 skipped.Checklist
mvn spotless:apply; Spotless checks pass.