ui.matches/string waitFor hangs the run when screen() hits OpenTUI OutputBusy
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 69/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- testing
Hướng nghiên cứu
Bắt đầu với packages/simulation/src/frontend/actions.ts, nơi issue xác định screen() và matches() là đường dẫn bị lỗi; so sánh nó với đường dẫn chờ render ở trạng thái nhàn rỗi mà ui.capture sử dụng. Tái hiện bằng hai lần gọi ui.waitFor() liên tiếp được mô tả trong issue và kiểm tra xem endpoint mô phỏng có trả lời khi đọc buffer thất bại hay không. Công việc hoàn tất khi matches chờ render ở trạng thái nhàn rỗi và lỗi trả về một phản hồi thay vì để RPC không được trả lời.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 41
- Fork
- 9
- Merge trung bình
- 39 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode-drive
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode-drive#141 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode-drive#107 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode-drive#102 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
llm settlement waits on a reply whose request an interrupt already abortedCó thể đã có người làm @mikemikimike đã nhận 4 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
anomalyco/opencode-drive#135 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
anomalyco/opencode-drive#132 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode-drive
Issue tương tự
-
area:tooling good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
interledger/publisher-tools#1007 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
databrickslabs/ontos#1420 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
vercel-labs/just-bash#756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ci good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
interledger/web-monetization-extension#1555 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[t-dialog] 弹窗组件和抽屉组件的文档说明不够详细清楚Đang mở🐞 bug 🧐 unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Tencent/tdesign-vue-next#7056 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày