You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert rc != 0 or stdout == ""
AssertionError: assert (0 != 0 or 'commit 41bc6...' == '')
Why it's flaky
The test runs a real git command under a small timeout and asserts the timeout won: either a non-zero rc or empty stdout. On a fast/cold-cache CI runner the git command completes before the timeout fires, returning rc=0 with a full commit log — so the assertion fails without any code being wrong. It's a race between a wall-clock timeout and command latency.
Make the command deterministically outlast the timeout instead of racing a real git log, e.g. run git hash-object --stdin with stdin held open (blocks forever, timeout always triggers), or monkeypatch the subprocess to sleep. That converts the probabilistic assertion into a deterministic one.
What fails
tests/test_git_utilities.py::TestRunGit::test_run_git_timeoutWhy it's flaky
The test runs a real git command under a small timeout and asserts the timeout won: either a non-zero rc or empty stdout. On a fast/cold-cache CI runner the git command completes before the timeout fires, returning
rc=0with a full commit log — so the assertion fails without any code being wrong. It's a race between a wall-clock timeout and command latency.Evidence it's environmental, not code
fix/tui-agent-urls-clickable(PR fix(ui-tui): render agent URLs as visible, clickable text #694, run 29178945090) — a diff containing zero Python changes.dependabot/pip/rich-gte-13.9.4(run 28982750863, 2026-07-08), then passed on re-run of the same branch the next day.Suggested fix
Make the command deterministically outlast the timeout instead of racing a real
git log, e.g. rungit hash-object --stdinwith stdin held open (blocks forever, timeout always triggers), or monkeypatch the subprocess to sleep. That converts the probabilistic assertion into a deterministic one.Found by gstack /ship while landing PR #694.
🤖 Generated with Claude Code