🤖 bug: a resume refused by the mutation gate can still accept a pending compaction replacement (#5400 follow-up)

クローズ
#5,434 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

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

調査の方向性

Start at AgentSession.streamWithHistory and trace acceptCompactionReplacement, the turn use lease confirmation, and the current refusal point. Check the formal/compaction model plus the retirement and witness handling that follows acceptance; done means a refused lease causes no replacement acceptance while preserving retry correlation and valid history.

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

説明

backlog

Problem

Follow-up from #5400 / #5419. In AgentSession.streamWithHistory, a resume that carries a pending compaction replacement (preparation.resumeReplacement) accepts that replacement (acceptCompactionReplacement, a history rewrite) before the turn use lease is confirmed. If another backend's structural mutation gate refuses the lease, the resume fails afterwards, but the compaction replacement has already been committed to history.

The impact is history-only: no checkout work runs and no turn starts. The accepted replacement is the compaction protocol's own outcome, so the history stays valid. It is still a history write made by a resume that was then refused, which is the class #5400 closed for the [CONTINUE] sentinel.

Possible fix

Confirm the turn lease before the replacement acceptance, and keep the refusal at its current failure point so retry correlation does not change. Check this against the compaction model (formal/compaction) and the retirement/witness handling that follows acceptance.

Refs #5400, #5381


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

主要言語
TypeScript
スター
2.1k
フォーク
139
平均マージ
3時間 35分
マージ済み PR(30日)
950

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

coder/xum のほかの issue

coder/xum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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