The message_features runner (tests/core_message_bdd.rs) has a flaky scenario:
the concurrent ask/tell property — "When concurrent tasks send a mix of asks and tells" →
"the final state equals the deterministic result of applying every command once" /
"no command is lost or applied twice".
Symptom: passes ~13/14, fails ~1/14 (panic in cucumber-0.23 cucumber.rs:1243, "1 step failed").
Where it bites:
Likely root cause: the test asserts final state before all spawned tasks have settled — a classic concurrency snapshot-timing bug (assert fires a hair early), not a bug in the SUT.
Fix (de-flake, don't loosen the assertion):
- Ensure real overlap with a
tokio::sync::Barrier, then await every spawned task/join handle before snapshotting state (per CLAUDE.md test-quality rule 8: "concurrent tests use real overlap … not sequential-then-check").
- Keep the assertion exact (deterministic fold of all commands), just move it after the join.
Sibling of the supervision de-flake #100. Surfaced during card #104 (repo hardening / clippy-gate parking).
The
message_featuresrunner (tests/core_message_bdd.rs) has a flaky scenario:the concurrent ask/tell property — "When concurrent tasks send a mix of asks and tells" →
"the final state equals the deterministic result of applying every command once" /
"no command is lost or applied twice".
Symptom: passes ~13/14, fails ~1/14 (panic in cucumber-0.23
cucumber.rs:1243, "1 step failed").Where it bites:
main(release build) — its last 2 runs failed on exactly this (test(console): cover tui::App render branches + poller loop orchestration (#82) #99, test(console): PTY-driven E2E smoke test for main.rs + input poll (#83) #101 merges).Nix Flake Checkstatus gate (ruleset #18433270): a flakynextestrun can block a legitimate merge. It happened to pass on chore(ci): repo hardening to cesr parity — spell-check + nix hygiene gates #105, but it's a coin-flip.Likely root cause: the test asserts final state before all spawned tasks have settled — a classic concurrency snapshot-timing bug (assert fires a hair early), not a bug in the SUT.
Fix (de-flake, don't loosen the assertion):
tokio::sync::Barrier, then await every spawned task/join handle before snapshotting state (per CLAUDE.md test-quality rule 8: "concurrent tests use real overlap … not sequential-then-check").Sibling of the supervision de-flake #100. Surfaced during card #104 (repo hardening / clippy-gate parking).