Skip to main content

max / makenotwork

tagtree: exclude model_valid's semantic-depth guard, which is equivalent The confirming run put `oracle.rs:594:30 replace > with >= in model_valid` back in the missed list, and the previous commit's message had it as one of the two bounds the new tests kill. That was a misread of the line: 594 is `config.semantic_depth > 0`, and the max_depth bound the test actually kills is 591. Both bounds are dead; this is a third mutant that was never in that pair. It is equivalent, and it is the same mutant as `src/lib.rs:189:30` in `validate_with` sitting in the model that reimplements it. `>= 0` is always true for a usize, so the mutant evaluates `segs.len() < semantic_depth + 1` with `semantic_depth == 0`, which asks `segs.len() < 1`. `model_valid` returns false for the empty tag on its first line and `str::split` yields at least one segment for every non-empty string, so the extra check cannot fire. With `semantic_depth > 0` the guard is true either way. List-diff verified: 149 to 140, exactly the nine intended. The max_depth `>` at 591 stays in scope and stays caught, which is the check that the exclusion is aimed at the right line this time.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session
https://claude.ai/code/session_01MptwXZ8k65v19rFmdGAyki
Author: Max Johnson <me@maxj.phd> · 2026-08-31 16:08 UTC
Signed with PGP, not checked
Commit: 701d957cb847ec77454618379fdbef27835cd72f
Parent: b744286
1 file changed, +11 insertions, -0 deletions
@@ -115,4 +115,15 @@
115 115 # way. `model_valid_rejects_leading_and_trailing_separators` pins the
116 116 # behaviour; it cannot pin the operator, and says so.
117 117 "src/oracle.rs:578:35: replace \\|\\| with && in model_valid",
118 +
119 + # `config.semantic_depth > 0` guarding model_valid's minimum-depth check.
120 + # The same mutant as `src/lib.rs:189:30` in `validate_with`, in the model
121 + # that reimplements it, and equivalent for the same reason: `>= 0` is always
122 + # true for a usize, so the mutant evaluates `segs.len() < semantic_depth + 1`
123 + # with `semantic_depth == 0`, which asks `segs.len() < 1`. `model_valid`
124 + # returns false for the empty tag on its first line, and `str::split` yields
125 + # at least one segment for every non-empty string, so `segs.len() >= 1` always
126 + # holds by the time this line runs and the extra check cannot fire. When
127 + # `semantic_depth > 0` the guard is true either way.
128 + "src/oracle.rs:594:30: replace > with >= in model_valid",
118 129 ]