main is red: tui_review_test is flaky and order-dependent #82
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mainat15bc9a3failscargo test. Exit 101.I merged it on a green full-suite run in the agent's worktree, so the verification passed and was not reliable — that is the part worth fixing, not just the test.
Diagnosis so far:
--test-threads=1Failing names seen:
an_editor_killed_mid_write_records_nothing,a_comment_only_body_aborts_and_records_nothing. Which of the two fails varies; sometimes both.Passing alone but failing in-binary rules out the test's own logic. Serial failure rules out plain parallel interference. What is left is shared state between tests in the binary, or a timing assumption that holds when a test starts on an idle machine and not when it starts after eleven pty sessions. 74 seconds for 12 tests says the harness spends most of its time waiting on fixed delays, which is the usual source of exactly this.
Both failures are in the
$EDITORpath, which is the newest and most timing-dependent part ofrun_dashboard_driven— it spawns a pty, drives stdin, and waits for an external process to write a file and exit.Wanted: make the harness wait on observable conditions rather than elapsed time — the editor's output file existing, the process having exited, the expected text appearing on screen — with a generous timeout as a backstop rather than as the mechanism. A test that passes because a sleep was long enough is a test that fails on someone else's machine.
Also worth having: run the file repeatedly in CI, or at least once with
--test-threads=1, so an order dependency cannot hide again.Migrated from git-collab issue
79fd7273620072de46a8501915defb79edf09fc6.Original author: a73x dev@a73x.sh.
Close reason: merged in patch
4a2dba54