ui.matches/string waitFor hangs the run when screen() hits OpenTUI OutputBusy
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 69/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- testing
调研方向
从 packages/simulation/src/frontend/actions.ts 开始,issue 指出 screen() 和 matches() 是出错路径;将其与 ui.capture 使用的渲染空闲等待路径进行比较。使用 issue 中描述的连续两次 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 分钟
- 30 天内合并 PR
- 9
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 天内回复