[Bug] Agent file_write and file_delete report success when storage requests fail
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start by reading executeFileTool and diskStorage.putTextFilesByJSON / deleteFilesByPaths, then trace how storage results become the Agent tool outcome. Add regression tests for HTTP 500 and rejected requests while preserving success behavior and best-effort behavior for other storage callers. Done means both file tools return an error for those failures, still return success for HTTP 200, and do not automatically retry.
索引モデルが issue の本文から書いたものです。
説明
Describe the Bug
At main commit 02468154c4d99f8925916425bf444d672454fb3d, executeFileTool('file_write', ...) and executeFileTool('file_delete', ...) return success when the corresponding /api/session-data request returns HTTP 500 or rejects with a network error.
diskStorage.putTextFilesByJSON and deleteFilesByPaths do not check response.ok and swallow fetch rejections. The file-tool handlers therefore continue to their success result. ChatPanel adds that result to the next model request as the tool's outcome.
Steps to Reproduce
I exercised the unchanged exported executeFileTool through the real diskStorage implementation, replacing only fetch with synthetic responses. This is a Node-based module reproduction, not a browser or live-provider test.
For each of file_write and file_delete, use a synthetic path such as apps/diary/data/entries/test.json (and valid JSON content for the write), then test:
- fetch resolves with HTTP 500: actual result is
success - fetch rejects with
Error('synthetic offline'): actual result issuccess - fetch resolves with HTTP 200: actual result is
success, as expected
That gives four failure cases incorrectly reported as success and two passing controls. No real files or provider requests were used.
Expected Behavior
The Agent should receive an error result when storage returns a non-success HTTP status or the request fails. A network error does not prove that the server made no change, so this should not automatically retry the mutation.
Screenshots
No browser screenshots were captured for this module-level reproduction.
Environment
- OS: Linux
- Browser: not used for this reproduction
- Node.js: v24.19.0
- pnpm: not used for the original module probe
Additional Context
Proposed scope
Keep existing best-effort behavior for other storage callers. Let these two Agent tools opt into failure propagation, using the current error: ... result format. Preserve tool schemas, successful output, read/list behavior, paths, and batch scheduling. Concurrent batches can still partially complete; this is not an atomicity or rollback change.
I can contribute a small fix with real file-tool/storage-path regression tests. AI assistance was used for diagnosis and testing.
- 主要言語
- TypeScript
- スター
- 1.3k
- フォーク
- 169
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/OpenRoom のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
MiniMax-AI/OpenRoom#44 ·
MiniMax-AI/OpenRoom の issue をすべて見る
似ている issue
-
area: cli bug flake ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
gazetta-studio/gazetta-studio#1772 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/playwright#43875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
calagopus/panel#285 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信