๐Ÿงช test(kavach): cosmic-ray over slice #508's whole range (proof, never merges)

Draft
AT
2d ago
+567-52

Proof only, never merges. As #333 was for #351, this draft runs kavach's Python mutation gate over one slice's whole line range, on that slice's branch: slice #508 of the mutation sweep (#466), bash_guard.py lines 458โ€“666 as they now read. Auto-merge stays off on purpose; it is closed once its result is on the slice's pull request.

  • .github/workflows/kavach-sweep-proof.yml runs scripts/kavach_mutation/sweep.py: the gate's own run (scripts/kavach_mutation/gate.py), with every line of the range taken as changed, on Linux with its memory and file caps.
  • sweep-proof.json names the slice, the module, the range and the equivalents the slice's pull request lists (none here). The job fails on a fault, a line no test runs, a mutant that is not killed and not listed, or a listed one that is killed.

niyam-guard / judge is red here, as expected: a new workflow is a guard file, and no slice names it. niyam / Work rules may be red too: this body names no slice, since the work rules allow one pull request per slice, and the slice's own is that one.

๐Ÿค– Generated with Claude Code


Summary by cubic

Proof-only branch (never merges) that runs kavach's cosmic-ray mutation gate over slice #508's whole line range in bash_guard.py (lines 458โ€“666) as if every line changed, and rewrites the shell walker's helpers so they survive mutation testing.

Proof workflow

  • scripts/kavach_mutation/sweep.py drives the gate via a new kavach-sweep-proof.yml workflow; sweep-proof.json names the slice, module, range, and expected survivors (none).
  • The job fails on a fault, an uncovered line, a mutant not killed and not in expect, or an expected one that is killed.
  • niyam-guard / judge is red by design: the workflow is a guard file no slice names, and this branch never merges.

Behavior-preserving rewrites

  • Set unions become {*...} unpacking, WORD_STARTS derives from COMMAND_LEADERS, and while loops that walk indexes become for loops so mutants can't stall or offset the walker.
  • New tests exercise the helpers and the Branches class directly on literal token lists.