šŸ‘· ci(veda): take stock of every surviving mutant (inventory, never merges)

Draft
AT
7d ago
+839-0

Slice #330 under #238: take stock of every surviving mutant in veda, TypeScript and Python, before the one-time sweep.

This pull request never merges. As #330 says, its only change is one workflow, .github/workflows/mutant-inventory.yml, which runs on its own path. Once the inventory is posted as a comment on #238, this pull request is closed unmerged. So auto-merge stays off, on purpose.

niyam-guard / judge fails here, and that is expected. A new workflow is a guard file, and slice #330 has no Guards: section naming it, so the shared Guard refuses it. Clearing that would take a slice edit and Alok's approving it again, only to allow a merge this pull request never asks for. The measurement's own jobs are what count. (Guard's other finding, job names that are expressions, is fixed.)

What the workflow does

  • TypeScript. Every source file of every lane in #287's agnipariksha.json (slice #272, not merged yet), whatever the cut-off.
    • Each job merges #287's pinned head (3fca3c1) into the checkout, so main's sources meet #287's lane configs.
    • Stryker runs on one file at a time, against the <stem>.test.ts that owns it, through stryker/lane.mjs, as agnipariksha would. That gives each file's mutants, survivors, uncovered mutants, timeouts and run time.
    • Files with no owning suite, and sources in no lane (needs-you's hooks, scripts/*.mjs), are listed as not measured.
  • Python, for each module of packages/kavach/python/kavach:
    • Reach. coverage.py runs each test file alone and records which modules' lines it executes. A test file that runs any line of a module is in that module's subset, since one that only imports it can still kill an import-time mutant. The files that run the most lines beyond the import go first. A .pth file starts coverage in every Python child, even one given a bare env or -I. A guard copied to a temp folder still counts as its module.
    • Cost. One run of that subset alone is timed.
    • Survivors. cosmic-ray 8.9.0 runs every mutant against the subset, the file that runs most of the module first, both failfast. The run is sharded across jobs, sized from the measured cost.
  • Faults, not findings, fail a job: an unmutated run that fails, a shard that loses a mutant, or a control that does not hold. Survivors never fail it.

Controls

  • Reach: the map must contain the test files #333's run saw killing tool_guard, command_guard, config and refusal_log.
  • Subset: those four modules, run on their subsets alone, must leave exactly #351's 12 equivalents.
  • TypeScript: cli-entry.ts (15 mutants, 1 blocking on #238), sarathi's cli.ts (385 and 78) and kavach's rule-checks (609 and 10) are checked against #238's numbers.

Runs

The workflow's SCOPE moves in three pushes, so the full run's cost is read before it starts:

  1. smoke: one TypeScript file, and tool_guard in two shards.
  2. plan: every Python module timed and counted, and only tool_guard's shards run.
  3. full: everything.

max-parallel keeps this run to 14 of the org's 20 concurrent jobs, so other pull requests still run. Actions are pinned by SHA. coverage.py, cosmic-ray and Stryker's install live in the jobs only. The JSON reports and the session databases upload as artifacts, kept 90 days.

Slice: #330

šŸ¤– Generated with Claude Code