Skip to content

ci(mutants): exclude the hand-reproduced cursor hangs - #416

Merged
plusky merged 2 commits into
mainfrom
test/mutants-2026-11
Nov 2, 2026
Merged

plusky merged 2 commits into
mainfrom
test/mutants-2026-11

Conversation

@plusky

@plusky plusky commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Fixes the red weekly mutants run 41192647029. A unit test now kills the one survivor (the latency_ms scale), and line-anchored exclude_re entries drop the 21 TIMEOUTs. Each excluded mutant was hand-reproduced as a hang, so its test binary never exits. The stdio delimiter advance moves out of scope too, which reverses 0dc4ac2's choice to keep it in. Verified with the workspace gates, a cargo mutants --list diff (exactly those 21 removed, killed siblings kept), an OCR pass, and an adversarial review that hand-applied all 21 plus both scale mutants.

The weekly mutants run (41192647029) left `latency_us / 1_000` with `%`
as its one survivor: the wiremock delay tests bound a 200 ms wait to
[200, 5200] ms, and 200_xxx us modulo 1000 lands inside that window
often enough to pass. A unit test on the private `record` pins the
scale deterministically: two sub-millisecond waits sum to one whole
millisecond, where `%` reports 300 and `*` 1_300_000, and the last
status wins with a response-less request reading `None`. Hand-applied,
both scale mutants fail the test and the unmutated code passes it.
Run 41192647029 reported 21 TIMEOUTs, every one a loop cursor whose
mutated advance can never pass the current byte: `*= 1` leaves the
index in place so the body re-runs in the same state forever, and `-=`
steps back onto a byte the preceding branch advances over again so the
pair cycles (on other inputs it underflows, which those tests already
catch). Each was reproduced on its own under a 10 s per-test timeout,
against groups that finish unmutated in under 5 s: qs_mask (2044 -=;
2052, 2078, 2082 both; 2063 *=), qs_split_ranges 2099 *=,
qs_find_operator 2116 and 2132 both, qs_has_question 2144 *=,
glob_match 164/172/180 *=, embedded_local_ids 942 both, and the stdio
delimiter advance 196 both, which DESIGN.md already records as a
hand-verified hang. Each mutant hangs at least one test; some `-=`
ones also fail others through an underflow, but cargo-mutants runs
plain `cargo test`, so the binary holding the hang never exits and the
verdict is TIMEOUT either way. No timeout masks a survivor and no
added test could turn one into a kill; they are excluded line-anchored
like the otel hangs, so the Saturday run stops paying the floor for
verdicts already in hand. Verified by --list diff: exactly these 21
disappear and every killed sibling (the -= twins at 2063, 2099, 2144
and the glob lines, the *= at 2044) stays. The mutants.yml note that
kept the stdio hangs in scope is updated to match.
@plusky
plusky merged commit 4a1189f into main Nov 2, 2026
19 checks passed
@plusky
plusky deleted the test/mutants-2026-11 branch November 2, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant