agentop tui: TestSearchDoc_RenderIsLinearInALongLine is flaky on shared CI runners

オープン 初心者向け
#2,165 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
testing-qa

調査の方向性

cmd/agentop/tui/searchdoc_test.go と TestSearchDoc_RenderIsLinearInALongLine から始めます。このテストは、render を3,000回と12,000回実行した時間を計測します。共有ランナーに対する感度を降低了まま、二次成長の検出を維持できる提案手法のいずれかを選び、対象のGoテストと Go CI (authbridge agentop) ジョブを実行してください。完了条件は、Runnerの負荷が変動してもテストが不安定にならない一方、二次的なレンダリングによる約16倍の成長に対して引き続き失敗することです。

索引モデルが issue の本文から書いたものです。

説明

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]

主要言語
Go
スター
31
フォーク
49
平均マージ
9時間 43分
マージ済み PR(30日)
367

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rossoctl/cortex のほかの issue

rossoctl/cortex の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。