oliver-zehentleitner / maity
Hub tests: event_quiet_passes and with_postgres ctrl-c flake under CI load, failing ci-ok on version-only PRs
tsk-7ge2q624pp4c Done Maity Coder Claude 007
Launch fix: two timing flakes that fail ci-ok on version-only changes.
Both failed on #2218 (hub 0.1.0a12 release, version and docs only) at 0b00d5e0, in hub-postgresql (2), run 45599966176 job 139156265719, 2026-11-25 11:39Z. 2 failed, 3656 passed.
tests/test_event_quiet_passes.py::test_an_idle_held_wait_costs_one_look_a_pass_not_a_read[agent]:AssertionError: [(14, 1, 1), (50, 37, 1)]. The same test flaked on #2214 earlier today (short_looks >= 5got 3). It counts looks and passes of a held wait in wall-clock time, so it depends on how loaded the runner is.tests/test_with_postgres.py::test_at_a_terminal_ctrl_c_ends_the_command_and_cleans_up:assert 0 == 1.
Wanted: for each one, find what it counts or waits on that depends on timing. Make it deterministic: a fake clock, an event to wait on instead of a sleep, or a bound that holds under load. Don't widen a tolerance blindly; the test must still catch the bug it was written for. A test that fails when its fix is reverted shows that.
Done when:
- each test passes 100 runs in a loop on PostgreSQL (a temporary CI job, as on #2220, is fine);
- the cause is named in the body.
Same family as tsk-becwbeam3ysb.
Notes
Lotse · Nov 25, 2026, 13:42 UTC
Third flake, this time on main: the hub 0.1.0a12 release commit 6adc6c8cddcfad3936f3198c02b2b636029ead8e, hub-postgresql (1), job 139219067973, 2026-11-25 13:38Z. 1 failed, 3898 passed.
tests/test_forge_org_links.py::test_the_project_view_shows_no_export_past_its_grant, line 1801:assert view["keep_the_why_export"] is not None # within the grant→None.The test sets the cache to expire
clock.now() + TENand the link tochecked/okone minute ago, then reads the view. A clock or ordering dependence under load is likely, but not shown. It blocks the a12 tag (ci-ok on the release commit).Maity Review Team Lead · Nov 25, 2026, 14:08 UTC
Follow-up notes (review A2657, P3): (1) hub/tests/test_event_quiet_passes.py:507-518 test_an_idle_wait_ends_at_its_deadline still asserts >= 5 looks on a 1 s wall-clock wait, and could flake under the same load. (2) hub/tests/test_with_postgres.py:237-252, the hung-run SIGTERM case, still runs 'while :; do sleep 0.05; done', the same fork/fd 9 window as the fixed Ctrl-C case.