agentop tui: TestSearchDoc_RenderIsLinearInALongLine is flaky on shared CI runners

Abierto Apto para principiantes
#2,165 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go
Área
testing-qa

Línea de trabajo

Comienza con cmd/agentop/tui/searchdoc_test.go y TestSearchDoc_RenderIsLinearInALongLine, que mide el tiempo de render con 3.000 y 12.000 repeticiones. Elige uno de los enfoques propuestos para reducir la sensibilidad a los runners compartidos y, al mismo tiempo, conservar la detección del crecimiento cuadrático; después, ejecuta la prueba de Go enfocada y el job Go CI (authbridge agentop). La tarea está terminada cuando la prueba ya no sea flaky con una carga variable del runner, pero siga fallando ante el crecimiento aproximado de 16x causado por el renderizado cuadrático.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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]

Lenguaje dominante
Go
Estrellas
31
Forks
49
Merge medio
9 h 43 min
PR fusionados (30 d)
367

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rossoctl/cortex

Todos los issues de rossoctl/cortex

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.