agentscope-ai / agentscope-ai/agentscope-java

[Bug]:MySQL AgentStateStore rejects Harness sandbox session IDs containing

未關閉
#2,583 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area/core/memory area/core/tool area/extensions area/harness bug
主要語言
Java
星號
5.6k
分支
1.3k
平均合併
4 天 12 小時
30 天內合併 PR
77

描述

```markdown
### Environment

- AgentScope Java: `2.0.1-sn-v2-SNAPSHOT`
- Java: 17
- Store: `MysqlAgentStateStore`
- Harness sandbox enabled

### Problem

When Harness persists sandbox state with session isolation, `SessionSandboxStateStore` generates a session ID like:

```text
sandbox/session/conv-a12d03e7-e213-4905-ad82-ad199ae1ea70
```

`MysqlAgentStateStore` then rejects it in `validateSessionId(...)`:

```text
java.lang.IllegalArgumentException:
AgentStateStore ID cannot contain path separators
```

Relevant call chain:

```text
SandboxManager.persistState(...)
-> SessionSandboxStateStore.save(...)
-> slotSessionId(...)
-> MysqlAgentStateStore.save(...)
-> validateSessionId(...)
```

### Expected behavior

Harness sandbox state should be persistable through `MysqlAgentStateStore`, or the sandbox store should encode/sanitize its internal scoped session IDs before delegating to `AgentStateStore`.

### Question

Should `SessionSandboxStateStore` use a storage-safe encoding for IDs such as `sandbox/session/`, or should `MysqlAgentStateStore` allow `/` in session IDs?

The database itself can store `/`; the failure comes from the application-level validation.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。