Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

🤖 bug: init replay lease hand-off windows and no init-end for a replaying backend

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

Start by tracing InitStateManager.replayInit, startInit, runBackgroundInit, withInitUseLease, and the WorkspaceService init logger, then check how AgentSession triggers replay. The fix is complete when lease hand-off windows cannot overwrite a successful final status and a connected replaying backend observes and displays the completed record without requiring reconnect or reload.

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

説明

backlog

Problem

Follow-up from the review of #4917 (#4801 item 3). #4917 makes InitStateManager.replayInit leave a "running" init record alone while any live init use lease exists, and read the record again after the lease probe. Two gaps remain, both older than #4917 (before it, the replaying backend always finalized the record):

  1. Lease hand-off windows. The owner persists "running" in startInit shortly before runBackgroundInit takes the init lease, and its final status write (WorkspaceService logger: void initStateManager.endInit(...)) is not ordered before withInitUseLease releases the lease. A replay by another backend that probes in either window sees no lease, reads "running" again, and writes status: "error". If that write lands after the owner's final write, a successful init is replayed as interrupted from then on.
  2. No completion for a connected replayer. While the owner holds the lease, the other backend replays the record as running. The owner's init-end event is process-local, and AgentSession calls replayInit() only on history replay or reconnect, so the other backend's creation card stays "running" until the client reconnects or reloads.

Possible fix

  1. Hold one record-owner lock (or the init lease) from before the "running" write until the final status is durable, for example by having the init logger's completion return the endInit promise and runBackgroundInit await it before the release.
  2. Have the replaying backend observe the lease's release (or the status file) and replay the final record once.

Refs #4801, #4917


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

主要言語
TypeScript
スター
2k
フォーク
136
平均マージ
7時間 27分
マージ済み PR(30日)
710

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

coder/xum のほかの issue

coder/xum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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