agentop tui: TestSearchDoc_RenderIsLinearInALongLine is flaky on shared CI runners

Đang mở Phù hợp với người mới
#2,165 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
78/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ệ
go
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu với cmd/agentop/tui/searchdoc_test.go và TestSearchDoc_RenderIsLinearInALongLine, thời gian đo render ở 3.000 và 12.000 lần lặp. Chọn một trong các phương án được đề xuất để giảm độ nhạy cảm với runner dùng chung mà vẫn duy trì khả năng phát hiện tăng trưởng bậc hai, sau đó chạy test Go tập trung và job Go CI (authbridge agentop). Hoàn thành khi test không còn bị flaky dưới tải runner thay đổi, nhưng vẫn thất bại với mức tăng trưởng khoảng 16 lần do quá trình render bậc hai gây ra.

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

Mô tả

TestSearchDoc_RenderIsLinearInALongLine (cmd/agentop/tui/searchdoc_test.go) times render on a line of 3,000 and of 12,000 repetitions, takes the best of 3 runs of each, and fails when 4x the line takes more than 8x the time.

On a busy runner, that ratio can pass 8 when nothing is wrong. On #2164, which doesn't touch the search doc code, "Go CI (authbridge agentop)" failed with:

searchdoc_test.go:129: 4x the line took 8.5x the time (132ms → 1.12s): render is not linear

The same job's earlier red on another PR (#2157) is very likely the same test.

Why it flakes: the two sizes are timed at different moments, so a noisy neighbour that slows only the second measurement inflates the ratio. Three runs of each aren't enough to filter that out.

Possible fixes, any one of which keeps catching the regression the test exists for (a quadratic render shows about 16x for 4x the line):

  • loosen the bound to about 12x, which is still well below a quadratic's 16x;
  • interleave the measurements (small, large, small, large…) and take the best of more runs, say 7, so both sizes see the same load;
  • check how the work grows instead of the time: count the operations or allocations of render, which don't depend on the runner;
  • move the timing to a benchmark, and keep only a correctness test in CI.

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.