Commit Graph
7 Commits
Author SHA1 Message Date
Cursor AgentandRobert C. Martin 4fea247660 Do not count an unmutated worker build as a kill.
A worker that fails before any mutation was recording every mutant as
killed. Run the tests once on the unmutated overlay and stop the way a
failed baseline does. The tests also kill the mutants in the functions
this change touches.

Proved by a stand-in xcodebuild that fails only inside a worker, and by
mutator on engine.py and workers.py: 140 killed, 0 survived, 0
uncovered. pytest: 139 passed, 1 skipped.

Co-authored-by: Robert C. Martin <[email protected]>
2026-11-26 04:22:01 +00:00
Robert C. Martin 0136cf5557 Skip test directories only at the project root or under src/test.
Why: crapper.discover treats any test-named folder at any depth as a
test path. That silently skipped production fixtures such as
src/agnesse/slim/test/SymbolManagingTableTable.java, even when the file
was named directly, because "test" appeared in the path.

What: Mutator now walks the tree itself. A path relative to the project
root is a test path when its first component is a TEST_DIRS name (test,
tests, spec, specs, or __tests__), or when it sits under src/test or
src/tests, the Maven and Gradle layout. SKIP_DIRS are still skipped at
any depth. Filename-based test files are still detected by
crapper.discover.is_test_file, applied to the filename so the any-depth
directory check is not reused. crapper itself is unchanged. README and
--help describe the new rule.

Proof: 12 new tests in test_sources.py plus help assertions. 84 tests
were green before; 96 pass now. crapper on the changed files: every new
function is under 10 (iter_source_files 9.0, is_test_path 5.0,
is_mutable_source 5.0); parse_args remains 30.2, the existing
option-parser exception. dryer: no candidates. mutator on sources.py:
25 killed, 0 survived, 0 uncovered. Dry run against /tmp/agn at
58fd81c37: SymbolManagingTableTable.java is discovered along with 54
other files under src/agnesse/slim/test/; no files under test/ are.
2026-11-24 03:22:55 -06:00
Robert C. Martin a5a0cb803b Count multi-line statement sites as covered from their start line; skip TypeScript type positions 2026-10-21 14:33:45 -05:00
Robert C. Martin ba4065f3f1 Stop shelling generated test commands and fail closed on git and coverage.
A package path is one argument. Git status uses NUL records and returns git's status. A failed coverage command leaves reports unread, coverage keeps the longest path match, and site walks no longer recurse.
2026-10-03 17:48:32 -05:00
Robert C. Martin 1bad4b908a Mutate ?? and ?. in TypeScript and JavaScript, including Express handlers. 2026-10-03 08:49:10 -05:00
Robert C. Martin 21d6d6f50b Run a file's mutants at the same time in symlink overlays.
Each worker keeps a private copy of the file under test and links the rest of the project, so the original tree stays put. The default is one worker per core, and --max-workers can set a lower cap.
2026-09-30 15:23:42 -05:00
Robert C. Martin 63fe452adb Add tests that kill the mutation survivors the suite can reach.
A self-run left covered gaps and live mutants. These cases exercise the real boundaries and leave equivalent mutants and lines coverage cannot see.
2026-09-30 14:39:16 -05:00