agentop tui: TestSearchDoc_RenderIsLinearInALongLine is flaky on shared CI runners
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- go
- 领域
- testing-qa
调研方向
从 cmd/agentop/tui/searchdoc_test.go 和 TestSearchDoc_RenderIsLinearInALongLine 开始,它们分别在 3,000 次和 12,000 次重复中测量 render 的耗时。选择一种建议的方法,在降低对共享 runner 敏感性的同时保留检测二次增长的能力,然后运行聚焦的 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 分钟
- 30 天内合并 PR
- 367
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rossoctl/cortex 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug laptop
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behind可能已有人在做 @arshil42 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 80/100
ether/etherpad-go#571 ·
维护者通常 1 天内回复
-
labeler: read a limit above math.MaxInt as math.MaxInt in nonNegative (CodeQL alerts #20 and #21)未关闭cost:approved factory:queued factory:tracking priority:p2 rank:12 ready-for-doing task:approved tokens:50k
难度 2/5 1-3 小时 新手友好度 88/100
sisaku-security/sisakulint#860 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100