Skip to content

test(mutation): Introduce mutation-based test coverage#22

Open
talagrand wants to merge 1 commit intomicrosoft:mainfrom
talagrand:mutants
Open

test(mutation): Introduce mutation-based test coverage#22
talagrand wants to merge 1 commit intomicrosoft:mainfrom
talagrand:mutants

Conversation

@talagrand
Copy link
Collaborator

Test coverage improvements via cargo mutants

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .gitignore and introduce a GitHub Actions workflow to run cargo mutants on 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
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
pull-requests: write
pull-requests: write
issues: write

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants