[Bug] The mutation sweep has a survivor: the checklist-scope predicate is untested or dead #660
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck#660
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while dating the mutation-testing claim for #616 — the sweep was run rather than assumed, and it does not come back clean.
Reproduce:
make mutate-parsersResult (2026-07-22): 26 mutants, one survivor, and the sweep halts there so the remaining five of the seven target files never run.
What a survivor means here.
tool/mutation_check.dartnegates eachString.startsWith/endsWithpredicate and reruns the tests. A mutant that survives is a predicate whose two branches no test distinguishes: either it is dead code, or the behaviour behind it has no test. For a Markdown parser predicate that is the second one often enough to be worth checking —ocideck_checklist_scope:is how a checklist slide's scope object round-trips, so a silent break there loses a field on save/load.Two things to settle:
Why this is a good first issue: it is one predicate, one test file, and the tool tells you exactly when you have fixed it. No knowledge of the rest of the codebase required.
Context: #616 now records the real scope and this real result in
CONTRIBUTING.mdandassurance/CRA-2024-2847-positie.md— the numbers there are not rounded to green, so this issue is what makes them green.Opgepakt. Tak:
fix/checklist-scope-mutant-660. Reikwijdte: hetmutate-parsers-doel in de Makefile, plus de twee plekken die het oude getal noemen (CONTRIBUTING.md,assurance/CRA-2024-2847-positie.md).Opgelost in
75c4d404(PR #678), op main.Punt 1 — het predicaat is niet dood. Het is gedekt, door
test/checklist_spec_test.dart: dat haalt een checklistdia mét scope-object doorgenerateDeckenparseDecken toetst datout.checklistScopeer weer uitkomt. Dat bestand stond alleen niet in de lijst tests die de sweep voor dít doel opnieuw draait. De ronde-trip-test die je vroeg bestond dus al; wat ontbrak was dat de sweep ernaar keek. Dat bestand staat nu in de regel voormarkdown_service_finding.dart.Punt 2 was het grotere, en je had gelijk dat het de moeite waard was. Eén
make-regel per bestand betekent stoppen bij de eerste fout, dus vijf van de zeven doelen draaiden nooit — en "26 mutanten" was daarmee niet het aantal mutanten maar het aantal dat het tot de eerste stop haalde. Het doel telt nu de mislukkingen op en faalt aan het eind.Uitkomst: 51 mutanten over zeven doelen, nul overlevers. Dat getal staat in CONTRIBUTING.md en in de CRA-positiebepaling, mét de vermelding dat het vorige getal een artefact was — een sweep die zijn eigen uitkomst afkapt is een sweep waarvan je de uitslag niet kunt geloven, en dat hoort er niet stilzwijgend uit te verdwijnen zodra hij groen staat.
Daarmee zijn de twee cijfers uit #616 groen zonder dat ze zijn afgerond.