anthropics / anthropics/claude-agent-sdk-typescript
Redis SessionStore can silently lose or duplicate appends
- 主要語言
- Shell
- 星號
- 1.8k
- 分支
- 226
- PR 合併指標
- 30 天內沒有已合併 PR
描述
The Redis `SessionStore` reference adapter ignores per-command errors returned
by `MULTI/EXEC`.
Two failure modes follow:
1. If the transcript key has the wrong type, `append()` resolves even though
`RPUSH` failed.
2. If the index key has the wrong type, `RPUSH` succeeds before the index
command fails. Retrying the same append duplicates transcript entries.
Reproduced on
https://github.com/anthropics/claude-agent-sdk-typescript/commit/e3d162bdf035169d0ea44bb6314d6e8fc5c730fe
against Redis 7:
```text
append rejects Redis transaction command errors:
Expected promise that rejects
Received promise that resolved
three SDK retries of an index failure:
Expected []
Received three duplicate transcript entries
```
Checking the `EXEC` result surfaces errors but does not make the write safe,
because Redis does not roll back commands that succeeded earlier in the
transaction. A failure-atomic fix needs to validate both key types before
writing them in one server-side operation.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Start at the Redis SessionStore append implementation and inspect how MULTI/EXEC handles per-command results from RPUSH and the index update. Reproduce the wrong-key-type cases on Redis 7, then verify that an append rejects failures without leaving partial writes or duplicate transcript entries during retries.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- redis, typescript
- 領域
- backend, databases
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100