agentop tui: TestRunOptionsWiringEndpointBypass hangs intermittently on Windows

Offen Anfängerfreundlich
#2,158 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
68/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
go
Bereich
cli, testing

Rechercherichtung

Beginne mit cmd/agentop/tui/picker_test.go und verfolge, wie TestRunOptionsWiringEndpointBypass tui.Run aufruft und die Bubble-Tea-Eingabe konfiguriert. Reproduziere das Problem unter Windows mit dem Befehl aus dem Issue und prüfe anschließend, ob die gewählte Eingabekonfiguration den blockierten stdin-Lesevorgang verhindert. Das Ziel ist erreicht, wenn wiederholte Ausführungen unter Windows ohne Zeitüberschreitung abgeschlossen werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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]

Vorherrschende Sprache
Go
Sterne
31
Forks
49
Ø Merge
9 Std. 43 Min.
Gemergte PRs (30 T.)
367

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus rossoctl/cortex

Alle Issues in rossoctl/cortex

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.