Skip to content

test(queen): kill the 39 surviving mutants of specs/queen/dispatch.t27 - #9961

Merged
gHashTag merged 1 commit into
masterfrom
fix/dispatch-mutants-9886
Oct 17, 2026
Merged

gHashTag merged 1 commit into
masterfrom
fix/dispatch-mutants-9886

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #9886

Result

tri mutate spec --file specs/queen/dispatch.t27 --jobs 8 --timeout 60 --zig-threads 6, Railway lab, fresh release build of t27c and tri at master cd8a65666:

mutants killed survived hung unviable
before (master, spec sha256 a894dc6f) 150 110 39 0 1
after (this PR, spec sha256 e71997bc) 150 149 0 0 1

The issue's line numbers were from 05e633d03; #6934 (end reasons) has since moved them by +27 and added 16 mutants. The 39 survivors are the same 39 the issue lists, at the new lines.

Classification: 39 test gaps, 0 dead lines, 0 equivalent mutants. No function body changed; 38 asserts are added to existing test blocks (36 for the mutants, 2 for the vacuous test below).

Each survivor was then planted by hand with tri mutate plant --file <spec> --line N --from ... --to ..., once on this PR's spec and once on the parent: all 39 are KILLED here (by the test named below) and SURVIVED on the parent.

Line Kind Function Class Killing assert (test)
208 drop-guard next_state test gap next_state(S_NONE, E_REFUSE) == S_REFUSED (the_table_moves_only_along_its_guards)
208 flip-cmp next_state test gap same
213 drop-guard next_state test gap next_state(S_RUNNING, E_REAP_STALL) == S_REAPED
214 drop-guard next_state test gap next_state(S_RUNNING, E_REAP_BOOT) == S_REAPED
217 swap-logic next_state test gap any ENDED/WAIT transition, e.g. next_state(S_ENDED, E_VERDICT_ACCEPT) == S_ACCEPT
218 drop-guard next_state test gap next_state(S_ENDED, E_VERDICT_ACCEPT) == S_ACCEPT
219 drop-guard next_state test gap next_state(S_ENDED, E_VERDICT_SENDBACK) == S_SENDBACK
220 drop-guard next_state test gap next_state(S_ENDED, E_VERDICT_ESCALATE) == S_ESCALATE
221 drop-guard next_state test gap next_state(S_ENDED, E_VERDICT_WAIT) == S_WAIT
222 drop-guard next_state test gap next_state(S_ENDED, E_VERDICT_EMPTY) == S_EMPTY
223 drop-guard next_state test gap next_state(S_ENDED, E_CRITERIA_CHANGED) == S_STALE
224 drop-guard next_state test gap next_state(S_ENDED, E_FLOOR_PASSED) == S_RELEASED
228 drop-guard next_state test gap next_state(S_ACCEPT, E_CI_RED_UNDER_CEILING) == S_SENDBACK
232 swap-logic next_state test gap next_state(S_SENDBACK, E_CRITERIA_CHANGED) == S_STALE
233 drop-guard next_state test gap next_state(S_SENDBACK, E_CRITERIA_CHANGED) == S_STALE
233 flip-cmp next_state test gap same
234 drop-guard next_state test gap next_state(S_SENDBACK, E_FLOOR_PASSED) == S_RELEASED
234 flip-cmp next_state test gap same
238 drop-guard next_state test gap next_state(S_ESCALATE, E_CRITERIA_CHANGED) == S_STALE
241 flip-cmp (!= S_REAPED) next_state test gap next_state(S_REAPED, E_REDISPATCH) == S_RUNNING
241 flip-cmp (!= S_REFUSED) next_state test gap next_state(S_REFUSED, E_REDISPATCH) == S_RUNNING
241 flip-cmp (!= S_RELEASED) next_state test gap next_state(S_RELEASED, E_REDISPATCH) == S_RUNNING
241 swap-logic (S_REAPED and) next_state test gap REAPED / REFUSED redispatch asserts
241 swap-logic (S_REFUSED and) next_state test gap REFUSED / RELEASED redispatch asserts
251 drop-guard claim_of test gap claim_of(true, V_FAILED, 0, 0, 0) == C_FAILED (a_claim_follows_the_verdict_and_three_clocks)
251 swap-logic claim_of test gap same, and V_CANCELLED
256 drop-guard claim_of test gap claim_of(true, V_STALE, 0, 0, 0) == C_FAILED
258 drop-guard claim_of test gap claim_of(true, V_SENDBACK, 3600000, 1, 1) == C_FAILED (SENDBACK_FLOOR_MS == CEILING_RELEASE_MS, so the guard only matters once a release is spent)
258 flip-cmp (>) claim_of test gap same assert, idle exactly at the floor
263 swap-logic claim_of test gap claim_of(true, V_NONE, 21600000, 0, 0) == C_FAILED (and V_BLANK)
264 swap-logic (or) claim_of test gap claim_of(true, V_WAIT, 21599999, 0, 0) == C_AWAITING_REVIEW
264 flip-cmp (<=) claim_of test gap claim_of(true, V_WAIT, 21600000, 2, 0) == C_AWAITING_REVIEW
277 drop-guard column_of test gap column_of(C_ACCEPTED, true, true) == COL_DONE (a_closed_issue_is_drawn_done_whatever_its_verdict)
283 drop-guard chosen_of test gap chosen_of(true, true, false, false, false) == 0 (the_first_eligible_wins_in_any_order)
286 drop-guard chosen_of test gap chosen_of(false, false, false, true, true) == 3
287 drop-guard chosen_of test gap chosen_of(false, false, false, false, true) == 4
310 ret-default counts_against_issue test gap counts_against_issue(false) == true (review_escalates_without_work_and_after_two_send_backs)
327 flip-cmp (>=) stall_reapable test gap stall_reapable(120) == false (one_lease_one_owner_and_age_alone_reaps); the comparison is strict -- f58 measured 119 and 121, not 120 itself, and the comment says so
331 flip-cmp (>=) followup_rounds test gap followup_rounds(0) == 0

The one unviable mutant (not a survivor)

360 [ret-default] -- is_valid_end_reason emptied to return false;. Zig stops with encountered @panic at comptime: assertion failed: that is the comptime invariant all_end_reasons_valid firing, so the mutant is caught, but tri mutate files it as UNVIABLE rather than "killed by an invariant at compile time". It is the same before and after. How that error is classified is a cli/tri/src/mutate.rs question (foreign code, outside this boundary).

Vacuous test

end_reason_constants_are_correct ran 0 runtime asserts on master (all of them fold at comptime). Two asserts that call the functions reading those constants are added: end_reason_to_name(END_REASON_COUNT - 1) == "unknown" and is_valid_end_reason(END_REASON_COUNT) == false.

Acceptance (Railway lab)

  • t27c parse, typecheck (Typecheck OK (0 errors, 0 warnings)), gen-rust, gen-verilog, gen-c: all exit 0.
  • t27c test-report specs/queen/dispatch.t27: 13/13 pass, vacuous passes 0 of 13 (was 1 of 13).
  • Second tri mutate spec: 0 survivors, so there is no equivalent-mutant list.
  • .trinity/seals/queen_QueenDispatch.json regenerated with t27c seal --save on the fresh release build (t27c seal --verify: all hashes MATCH; tests vacuous 0). Only the zig and C gen hashes move (tests are lowered into those); rust and verilog are unchanged.

Boundary respected: only specs/queen/dispatch.t27 and its seal.

Refs #6971, #7077

🤖 Generated with Claude Code

tri mutate spec on master cd8a656 (Railway lab, --jobs 8 --timeout 60
--zig-threads 6): 110 of 150 killed, 39 survived, 1 unviable. All 39 were
test gaps; none is a dead line and none is equivalent. 36 asserts are added
to existing test blocks, no function body changes:

- next_state: every legal transition asserted once (24 survivors)
- claim_of: failed, cancelled and stale verdicts; the send-back floor at
  its edge with a release spent; none and blank verdicts; both edges of
  the wait floor (8)
- column_of: an accepted claim on an open issue is done (1)
- chosen_of: e0, e3 and e4 win (3)
- counts_against_issue(false) is true (1)
- stall_reapable(120) is false: the comparison is strict (1)
- followup_rounds(0) is 0 (1)

Each of the 39 was planted by hand with tri mutate plant: killed on this
spec, survived on the parent. Second pass: 149 of 150 killed, 0 survived.

end_reason_constants_are_correct ran 0 runtime asserts (all comptime);
two asserts that call the functions reading those constants make it
non-vacuous: test-report prints vacuous passes 0 of 13.

Seal regenerated with t27c seal --save on a fresh release build.

Closes #9886

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge October 17, 2026 14:28
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-17 14:28:44 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e769ef021713 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 57474a4 into master Oct 17, 2026
26 of 29 checks passed
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.

specs/queen/dispatch.t27: 39 of 134 mutants survive on master (land after #6934)

1 participant