✨ feat(agnipariksha): a cut-off leaves large lanes to CI, 0.7.9
Merged
AT
11d ago+185+185+012345678901234567890123456789-11-11-01234567890123456789
Slice #268 under #238. Alok settled question 2 on 2026-11-19: small lanes are judged at pre-push and large ones in CI. agnipariksha had no cut-off, and #272 needs one released.
What changes
- A cut-off in
agnipariksha.json.maxLinescan be set at the top and per lane. A run that names no lane leaves out any lane whose targets hold more lines than its limit. It prints a line likescripts: 3 lines in 1 file(s), over its cut-off of 2 - not judged in this run, CI judges it (--lane "scripts" judges it here)and adds, 1 over the cut-off for CIto the total. A lane at the limit is judged. A lane left out doesn't fail the run. --lanealways judges. A run that names a lane judges it whatever its size, so CI's one job per lane never skips.--fileswithout--lanestill applies the cut-off.- Errors fall towards judging. The count is taken before Stryker starts, over the targets whole, since Stryker mutates them whole. A file that can't be read counts 0, so a failed read never leaves a lane out. 0, negatives, fractions, strings,
nulland anything past 2^53 are refused. - No change for existing configs. With
maxLinesabsent there is no cut-off. - Release. The README documents all of this, and agnipariksha is now 0.7.9. Once this merges I tag
v0.7.9, and then #272 can pin it.
Why lines
The six samples from #238's CI run 44507830088, each on a 4-CPU runner with the tap runner:
| Sample | Files | Lines | Mutants | Time | s/line | s/mutant |
|---|---|---|---|---|---|---|
| sarathi-248 | 1 | 312 | 385 | 1m47 | 0.34 | 0.28 |
| dvara-143 | 3 | 517 | 476 | 1m29 | 0.17 | 0.19 |
| kavach-141 | 2 | 695 | 609 | 1m37 | 0.14 | 0.16 |
| pair (pariksha) | 2 | 741 | 1,049 | 5m02 | 0.41 | 0.29 |
| agnipariksha-185 | 5 | 991 | 1,135 | 4m59 | 0.30 | 0.26 |
| pariksha-169 | 3 | 1,667 | 2,194 | 24m47 | 0.89 | 0.68 |
- Lines are known before Stryker starts. Mutants are only known after it instruments the code, and Stryker has no count-only mode.
- Lines sort these samples the same way mutants do. Any limit from 991 to 1,666 puts the five runs of 5 minutes or less under it and pariksha-169 over it.
- A file count would not work. Three files took 89 s in dvara and 1,487 s in pariksha.
- Lines are still a coarse measure. Time per line ranged 0.14–0.89 s. Even within pariksha, the two samples differ about 2.2× per line. So the per-lane
maxLinesis the main knob for a lane with slow tests. - The value isn't set here. veda's own limit is timed on Alok's Mac in #272.
Checks
The root pnpm check passes. So does pnpm --filter @veda-hq/agnipariksha check: 117 tests, with coverage at 99.4% of lines and 99.0% of branches. The new tests cover:
- a lane over the limit, a lane at the limit, and a lane with no limit;
- the
--laneexemption,--fileswithout--lane, and every lane left out; - an unreadable target;
- the line count's edge cases, and each refused
maxLinesvalue.
Slice: #268
🤖 Generated with Claude Code
Summary by cubic
Adds a configurable line-count cut-off to agnipariksha so pre-push runs judge small lanes and leave large ones for CI.
maxLinescan be set at the config root or per lane; a run naming no lane skips any lane whose targets exceed it, logs the count and limit, and adds the lane to a "over the cut-off for CI" total.--lanealways judges the named lane regardless of size, so each CI job runs its own lane.- Lines are counted before Stryker starts, over the targets whole; an unreadable file counts 0 so a failed read never causes a skip.
- Absent
maxLinesmeans no cut-off, so existing configs behave as before. - Invalid
maxLinesvalues (0, negatives, fractions, strings,null, unsafe integers) are refused at config load. - README documents the cut-off;
@veda-hq/agniparikshais bumped to 0.7.9.
Migration
- Tag
v0.7.9after merge;#272can then pin it and set veda's ownmaxLines.