test(mutation): Introduce mutation-based test coverage#22
test(mutation): Introduce mutation-based test coverage#22talagrand wants to merge 1 commit intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds mutation-testing-driven test coverage improvements (via cargo-mutants) and wires up CI support to report mutation outcomes on PRs.
Changes:
- Expand interpreter/parser/unit tests to cover additional error paths and equality/roundtrip behaviors (Scheme, JSONLogic, evaluator, builtins, AST).
- Add
mutants.out/to.gitignoreand introduce a GitHub Actions workflow to runcargo mutantson PR diffs and comment results. - Tighten a few existing tests to assert more specific error messages.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/scheme.rs |
Adds parser tests for nested arity errors and longhand (quote ...) depth-limit coverage. |
src/jsonlogic.rs |
Adds tests for invalid var names and more AST→JSONLogic roundtrip cases. |
src/evaluator.rs |
Makes several error-case assertions more specific (lambda/define validation). |
src/builtinops.rs |
Extends equality coverage for distinct builtins. |
src/ast.rs |
Adds additional PartialEq coverage for function/env differences and PrecompiledOp args differences. |
.gitignore |
Ignores mutation testing output directory mutants.out/. |
.github/workflows/mutants.yml |
New workflow to run cargo-mutants on PR diffs and post a summary comment/artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write |
There was a problem hiding this comment.
The workflow uses the Issues API (listComments/createComment/updateComment), but the job-level permissions only grants contents: read and pull-requests: write. With these permissions, GITHUB_TOKEN won’t have issues: write, so the PR comment step is likely to fail with a permissions error. Add issues: write (and optionally drop pull-requests: write if it’s not needed).
| pull-requests: write | |
| pull-requests: write | |
| issues: write |
Test coverage improvements via cargo mutants