You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've traced this and would like to take it. Verified on current main: CompositeFilesystem.sessionStorage() picks the backend via routeForPath("agents/"), but prefix matching requires the query path to start with the route prefix — and the registered session route is agents/{agentId}/sessions/ (deeper with IsolationScope.USER). "agents/" can never start with that, so the call always falls through to the default backend: Native Session Log silently lands in the local workspace while agentscope_store stays empty. Same "prefix-hierarchy mismatch" family as #2918/#2693, but a call site PR #3386 didn't touch.
Proposed fix, aligned with @iluv7's reproduced analysis: RemoteFilesystemSpec already builds the sessions backend when it registers the route — expose it (or the composed route entry) and have CompositeFilesystem carry an explicit sessionStorageBackend that sessionStorage(rc) delegates to, instead of inferring a backend from a synthetic single-segment path. File operations keep using the route table; user isolation stays with the existing namespace factory. Will include a regression that submits a session event through the spec-composed composite and asserts the store receives it (local journal absent).
@aiyili Thanks for looking into this! I've already submitted #4146 with this approach, including regression tests for remote persistence, recovery with a different local workspace, isolation, and history discovery. Would appreciate your review there so we can avoid duplicating the work.
Activity
iluv7 commentedon Nov 12, 2026
复现了。用
InMemoryStore配合RemoteFilesystemSpec(USER 隔离)提交一条会话事件,本地日志序号是 1,远程 sessions namespace 里还是 0,本地也确实生成了.agentscope-runtimejournal。绕过 Composite、直接用同一个 store 的RemoteFilesystem写入则正常,问题就在这里的后端选择。我想在装配
CompositeFilesystem时显式传入 sessions 后端,让sessionStorage(rc)直接委托给它,文件操作继续走原来的路由表。RemoteFilesystemSpec里已经创建了 sessions 路由,可以复用同一个后端,用户隔离也继续交给现有 namespace factory 处理。这样不用再从
RuntimeContext补传 agentId,也能兼顾没有具体 SessionKey 的list()。现有构造器保留兼容,再加一个参数版本给远程装配使用。aiyili commentedon Nov 15, 2026
I've traced this and would like to take it. Verified on current main:
CompositeFilesystem.sessionStorage()picks the backend viarouteForPath("agents/"), but prefix matching requires the query path to start with the route prefix — and the registered session route isagents/{agentId}/sessions/(deeper withIsolationScope.USER)."agents/"can never start with that, so the call always falls through to the default backend: Native Session Log silently lands in the local workspace whileagentscope_storestays empty. Same "prefix-hierarchy mismatch" family as #2918/#2693, but a call site PR #3386 didn't touch.Proposed fix, aligned with @iluv7's reproduced analysis:
RemoteFilesystemSpecalready builds the sessions backend when it registers the route — expose it (or the composed route entry) and haveCompositeFilesystemcarry an explicitsessionStorageBackendthatsessionStorage(rc)delegates to, instead of inferring a backend from a synthetic single-segment path. File operations keep using the route table; user isolation stays with the existing namespace factory. Will include a regression that submits a session event through the spec-composed composite and asserts the store receives it (local journal absent).iluv7 commentedon Nov 15, 2026
@aiyili Thanks for looking into this! I've already submitted #4146 with this approach, including regression tests for remote persistence, recovery with a different local workspace, isolation, and history discovery. Would appreciate your review there so we can avoid duplicating the work.
fix(harness): route native journals to remote sessions backend (agent…