agentop tui: TestRunOptionsWiringEndpointBypass hangs intermittently on Windows

Đang mở Phù hợp với người mới
#2,158 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli, testing

Hướng nghiên cứu

Bắt đầu với cmd/agentop/tui/picker_test.go và theo dõi cách TestRunOptionsWiringEndpointBypass gọi tui.Run và cấu hình đầu vào Bubble Tea. Tái hiện trên Windows bằng lệnh trong issue, sau đó kiểm tra xem thiết lập đầu vào đã chọn có ngăn việc đọc stdin bị chặn hay không. Được xem là hoàn tất khi các lần chạy lặp lại kết thúc trên Windows mà không bị hết thời gian chờ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

TestRunOptionsWiringEndpointBypass (cmd/agentop/tui/picker_test.go) sometimes hangs on Windows until go test times out. Seen on main at 9c6a8d76.

Reproduce (Windows 11, Go, no console attached to stdin):

cd cmd/agentop
go test -count=5 -timeout 60s -run TestRunOptionsWiringEndpointBypass ./tui/

Some runs pass in about 5 s. One of the five hangs and hits the 60 s timeout. A full go test ./tui/ then stops at Go's 10-minute default.

Where it hangs (goroutine dump at the timeout):

  • The test calls tui.Run with a context that's already cancelled.
  • bubbletea.(*Program).Run waits in semacquire for its read loop to finish.
  • The read loop (readLoop → readInputs → readAnsiInputs) is stuck in a blocking stdin read (syscall), which bubbletea's cancel reader can't interrupt on Windows when stdin isn't a console.

Possible fixes:

  • pass tea.WithInput(nil) (or an empty reader) when the test drives Run;
  • or give RunOptions an input override for tests;
  • or skip the test on Windows.

Assisted-By: Claude (Anthropic AI) [email protected]

Ngôn ngữ chính
Go
Star
31
Fork
49
Merge trung bình
9 giờ 43 phút
Pull request đã merge (30 ngày)
367

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rossoctl/cortex

Tất cả issue của rossoctl/cortex

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.