Skip to content

fix(harness): delegate Windows session batch reads - #3861

Merged
Buktal merged 2 commits into
agentscope-ai:mainfrom
Buktal:codex/delegate-windows-session-batch-reads
Oct 30, 2026
Merged

Buktal merged 2 commits into
agentscope-ai:mainfrom
Buktal:codex/delegate-windows-session-batch-reads

Conversation

@Buktal

@Buktal Buktal commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

AgentScope-Java Version

2.1.0-SNAPSHOT

Summary

Windows session replay through LocalSessionStorage.readAll currently opens one SQLite connection per object. Delegate the batch to the existing SQLite implementation after validating every path, so five objects use one connection. POSIX keeps the interface's default per-object reads.

LocalSessionStorage.readAll(keys)
  Windows: validate paths -> SqliteSessionStorage.readAll(keys) -> one connection
  POSIX:   default readAll(keys) -> read(key), including its existing path checks

Refs #3834 (slice 09). This shared tracking issue remains open for the other slices.

Evidence

  • Before: The recorded regression failed with expected: <1> but was: <5> connections for five existing objects.
    After: The same outer storage batch uses one real SQLite connection, with matching bytes and versions. Missing objects are omitted, an empty batch opens no connection, and traversal outside the root is rejected.
  • mvn -B -T1C -pl agentscope-harness -am test -Dtest=LocalSessionStorageTest,SqliteSessionStorageTest -Dsurefire.failIfNoSpecifiedTests=false: 9 passed, 2 POSIX-only tests skipped on Windows.
  • mvn -B -T1C -pl agentscope-harness -am spotless:check and git diff --check: passed.
  • The earlier module-wide clean verify run had one failure in MemorySearchToolTest.errorLookingMemoryIsData, also reproduced without this change. The full suite was not rerun after the review simplifications. POSIX execution remains for CI.

Merge Danger

Door: Two-way

Blast Radius: Local

Only local session batch reads change. The existing SQLite batch implementation, journal format, and path guards are reused; no migration or additional dependency is needed.

@Buktal
Buktal merged commit e4bca9a into agentscope-ai:main Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants