mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #660] [MERGED] semantic_mutants: leave docstrings alone, so their op names are not reported as surviving mutants (OLD-9432) #701
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#701
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/660
Author: @qhukz13
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:cont/semantic-mutants-docstrings📝 Commits (3)
a8a0990semantic_mutants: leave docstrings alone, so their op names are not reported as surviving mutantsdc29310semantic_mutants: a --lines range that starts inside a docstring is widened to the whole stringea10ffdsemantic_mutants: a """ in a comment and adjacent string literals no longer hide or split a docstring📊 Changes
2 files changed (+138 additions, -0 deletions)
View changed files
📝
tests/test_semantic_mutants.py(+58 -0)📝
tools/semantic_mutants.py(+80 -0)📄 Description
Claimed in the coordination issue as: OLD-9432 (restoration of ItsNotRexed/Leonida#9432, closed unmerged when that repository went private)
mutants_fortreated any line starting with a quote as code (meant forf"... OpIAdd ..."emit lines), so a docstring naming an opcode produced mutants that can never fail a test and were always reported SURVIVED:--function nminmax_f32listed 5 mutants, 4 of them in its docstring, and 47 acrossrdna2spirv.py.--linesrange that starts inside a docstring is widened to the whole string (from review on the original PR:--lines 595-595insideu16_half's docstring was mutated as code). Every one of the translator's 1,049 docstring lines now gives 0 mutants as a one-line range.Tested:
python -I tests/test_semantic_mutants.py(13 tests OK) onmain21625bca8, Linux, CPU only; no GPU needed. No game files.AI-assisted (Claude Code).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.