ui.matches/string waitFor hangs the run when screen() hits OpenTUI OutputBusy
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 69/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- testing
調査の方向性
packages/simulation/src/frontend/actions.tsから始めます。issueでは、失敗する経路としてscreen()とmatches()が挙げられています。ui.captureが使うレンダリングのアイドル待機経路と比較してください。issueに記載された、連続する2回のui.waitFor()呼び出しで問題を再現し、バッファ読み取りの失敗時にシミュレーションエンドポイントが応答することを確認してください。完了条件は、matchesがレンダリングのアイドル状態を待ち、失敗時にもRPCが未応答のままにならず、応答が返ることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
ui.matches (and therefore ui.waitFor("some text"), which polls it) can fail permanently on a current V2 checkout:
opencode drive ui websocket: request failed cause="NativeError: ot_session_acquire_buffer_lease failed: OutputBusy"
at withResolvedChars (@opentui/core buffer.ts)
at screen (packages/simulation/src/frontend/actions.ts:94)
at matches (packages/simulation/src/frontend/actions.ts:150)
The simulation endpoint logs the failure and never answers the RPC, so Drive waits until UiTimeoutError (30s) and aborts the run. matches calls screen() (a direct currentRenderBuffer.getRealCharBytes() read) without waiting for the renderer to go idle, so it races a render that holds the buffer lease. ui.capture re-renders and waits for idle() first, and did not fail in 6+ consecutive calls in the same run.
The first matches usually succeeds and a later one fails, so a waitFor that has already matched once can still die mid-poll.
Reproduction
yield* ui.submit("Run something")
yield* ui.waitFor("step 3", { timeout: 30_000 }) // may succeed
yield* ui.waitFor("step 4", { timeout: 30_000 }) // UiTimeoutError: ui.matches timed out after 30000ms
100% reproducible across 3 runs on this checkout, with recording: false.
Expected
- The simulation endpoint answers the RPC with an error (or retries internally) instead of leaving it unanswered; a failed read should surface as a catchable
UiWaitTimeoutError/operation error, not hang the whole run. matches/screenshould use the same render-idle path ascapture.
Environment
- opencode-drive 2.4.0
- OpenCode
b032f90634(PR #62977 worktree), @opentui/core 0.8.1 - TUI stderr/log:
/tmp/opencode-drive/run-af7b2256-d917-4337-b2cd-c92c25a62afb/logs/opencode/log/opencode-local.log(searchOutputBusy)
Workaround
Poll ui.capture() and search the joined span text yourself (what I did for the recording), instead of ui.matches/string waitFor.
- 主要言語
- TypeScript
- スター
- 41
- フォーク
- 9
- 平均マージ
- 39分
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode-drive のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode-drive#141 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode-drive#107 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode-drive#102 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
llm settlement waits on a reply whose request an interrupt already aborted対応中かも @mikemikimike が 4 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
anomalyco/opencode-drive#135 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
anomalyco/opencode-drive#132 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode-drive の issue をすべて見る
似ている issue
-
area:tooling good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
interledger/publisher-tools#1007 ·
メンテナーはふだん 1 日以内に返信
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
databrickslabs/ontos#1420 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vercel-labs/just-bash#756 ·
メンテナーはふだん 1 日以内に返信
-
area: ci good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
interledger/web-monetization-extension#1555 ·
メンテナーはふだん 1 日以内に返信
-
🐞 bug 🧐 unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Tencent/tdesign-vue-next#7056 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信