Serialize agent Land and Discard lifecycle operations

オープン
#130 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
git, rust
領域
backend, devtools

調査の方向性

crates/clowder-daemon/src/server.rs の finish_agent 周辺(816-887 行)から始め、Land と Discard のリクエストパスおよびその状態遷移を追跡します。両方の操作を競合させ、競合するリクエストが拒否されることを検証し、1 つの操作だけがエージェントを完了させることを、driver の失敗時の動作も含めて証明する回帰テストを追加します。

索引モデルが issue の本文から書いたものです。

説明

bug priority: critical rust

Problem

Land and Discard can run concurrently for the same agent. Both enter finish_agent without a per-agent lifecycle lock, so Discard may remove the worktree or branch while Land is staging or committing.

Evidence: https://github.com/richardcase/clowder/blob/b5492d5/crates/clowder-daemon/src/server.rs#L816-L887

Impact

Uncommitted agent work can be destroyed, and the registry/UI can be left inconsistent.

Acceptance criteria

  • Atomically claim an agent lifecycle operation and reject conflicting duplicate requests.
  • Keep state transitions consistent when the driver fails.
  • Add a regression test that races Land and Discard and proves only one operation can finalize the agent.
主要言語
Rust
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

richardcase/clowder のほかの issue

richardcase/clowder の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。