Flaky: OwnerLadderLiveTest asserts the crew name before the realm crew fact is projected #17

Open
opened 2026-12-02 14:07:26 +00:00 by mars · 0 comments
Member

Purpose (fix): the owner-ladder LiveView test stops failing at random on main, so a red gates job means a real defect.

Instance: main 7687787b (kanban#14 landed), run 6943, job 28055 "gates (OTP 28.4.3 / Elixir 1.18.4)": 1 failure in mcl_kanban_web, MclKanbanWeb.OwnerLadderLiveTest "the appointment's reply names the crew, not the key it is acted on by (#40)" (apps/mcl_kanban_web/test/owner_ladder_live_test.exs:140, assert at :174): the rendered reply lacked runs the <b>RealmCrew…</b> crew. The same sha was green in PR run 6899 (job 27943); #14 does not touch mcl_kanban_web. The log also shows Exqlite ... database is locked at connect.

Likely cause (read, not proven): realm_crew_fact/2 hands the fact to the projector, but the final assert html =~ "runs the <b>#{name}</b> crew" is not wrapped in eventually/1, so a click that lands before the projection gives the key-less/unnamed reply.

Done when:

  • the test waits for the crew's name to be projected before it clicks (or asserts through eventually/1), and
  • the fix is shown to hold: the test run in a loop (e.g. 50x) with no failure, and
  • a mutant that drops the wait makes the loop fail.

Refs macula-services/mcl-kanban#14 (where it surfaced).

Purpose (fix): the owner-ladder LiveView test stops failing at random on main, so a red gates job means a real defect. Instance: main 7687787b (kanban#14 landed), run 6943, job 28055 "gates (OTP 28.4.3 / Elixir 1.18.4)": 1 failure in mcl_kanban_web, `MclKanbanWeb.OwnerLadderLiveTest` "the appointment's reply names the crew, not the key it is acted on by (#40)" (apps/mcl_kanban_web/test/owner_ladder_live_test.exs:140, assert at :174): the rendered reply lacked `runs the <b>RealmCrew…</b> crew`. The same sha was green in PR run 6899 (job 27943); #14 does not touch mcl_kanban_web. The log also shows `Exqlite ... database is locked` at connect. Likely cause (read, not proven): `realm_crew_fact/2` hands the fact to the projector, but the final `assert html =~ "runs the <b>#{name}</b> crew"` is not wrapped in `eventually/1`, so a click that lands before the projection gives the key-less/unnamed reply. Done when: - the test waits for the crew's name to be projected before it clicks (or asserts through `eventually/1`), and - the fix is shown to hold: the test run in a loop (e.g. 50x) with no failure, and - a mutant that drops the wait makes the loop fail. Refs macula-services/mcl-kanban#14 (where it surfaced).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-kanban#17
No description provided.