Verify cross-task dirty buffer safety after a refused rollback
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 43/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- desktop, testing-qa
調査の方向性
Start with src/core/Task.ts, src/core/tools/WriteToFileTool.ts, and src/integrations/editor/DiffViewProvider.ts, then trace task disposal and document opening. Add a two task test that records the dirty buffer and persisted contents before and after task B opens the shared path, and checks whether unapproved streamed content was saved. If the test confirms the risk, cover protection, recovery, and cleanup; otherwise document why the real document lifecycle prevents it.
索引モデルが issue の本文から書いたものです。
説明
Summary
Investigate whether a later task can save unapproved streamed content after a prior task's rollback fails and the prior task is disposed.
The earlier review found that a rollback failure could leave a dirty document open, and that a later DiffViewProvider.open() could save a dirty document. This cross-task risk predates PR #1930; it has not been verified with a two-task test. PR #1930 does not contain the disposal release discussed below.
The requester identifies the later stacked unit, PR #2435, as the relevant place to assess the disposal drop. At commit 4baf005673f482d9d911de87ff0890644765193a, src/core/task/Task.ts calls writeToFileTool.releaseTaskRollbackFailure(this) during disposal, and src/core/tools/WriteToFileTool.ts defines the release. src/integrations/editor/DiffViewProvider.ts manages the editor buffer and its opening and rollback behavior.
Required work
- Add a test with two distinct tasks that share a document. Make task A's rollback fail or be refused, keep the document dirty, and dispose task A. Then have task B open the same path.
- Check whether task B saves the unapproved streamed content before approval. Use a document double or extension-host coverage that preserves the dirty state across task disposal.
- If the test confirms the risk, add protection at the appropriate cross-task boundary and a regression test. Do not retain a disposed task solely to keep a per-task marker alive. Keep protection until safe recovery or an explicit user decision makes it unnecessary.
Acceptance criteria
- The test records the buffer and persisted contents before and after task B opens the path, and distinguishes unapproved streamed content from the original content.
- The test demonstrates that task B cannot silently persist unapproved content before approval, or documents why the scenario cannot occur with the real document lifecycle.
- If a fix is required, tests cover recovery and cleanup of its protection without retaining disposed task state.
Context
- Requester: @easonLiangWorldedtech
- Original PR: https://github.com/Zoo-Code-Org/Zoo-Code/pull/1930
- Review discussion: https://github.com/Zoo-Code-Org/Zoo-Code/pull/1930#discussion_r4507206649
- Later stacked unit identified by the requester: https://github.com/Zoo-Code-Org/Zoo-Code/pull/2435
- Referenced later-unit revision: https://github.com/Zoo-Code-Org/Zoo-Code/commit/4baf005673f482d9d911de87ff0890644765193a
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 301
- 平均マージ
- 3日 14時間
- マージ済み PR(30日)
- 103
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Zoo-Code-Org/Zoo-Code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Zoo-Code-Org/Zoo-Code#2773 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Zoo-Code-Org/Zoo-Code#2717 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
メンテナーはふだん 3 日以内に返信
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on Windows対応中かも @easonLiangWorldedtech が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
メンテナーはふだん 3 日以内に返信
-
[BUG] search_files hides matching text on long lines対応中かも @DananjayaNadun が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Zoo-Code-Org/Zoo-Code#2496 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
Zoo-Code-Org/Zoo-Code の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 modelオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
tashfeenahmed/freellmapi#2169 ·
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on recordオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vercel-labs/ui#1563 ·
メンテナーはふだん 1 日以内に返信