Skip to content

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

Open
Eugene (talagrand) wants to merge 1 commit into
microsoft:mainfrom
talagrand:mutants
Open

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

Conversation

@talagrand

Copy link
Copy Markdown
Collaborator

Test coverage improvements via cargo mutants

CopilotAI left a comment

Copy link
Copy Markdown

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
FileDescription
src/scheme.rsAdds parser tests for nested arity errors and longhand (quote ...) depth-limit coverage.
src/jsonlogic.rsAdds tests for invalid var names and more AST→JSONLogic roundtrip cases.
src/evaluator.rsMakes several error-case assertions more specific (lambda/define validation).
src/builtinops.rsExtends equality coverage for distinct builtins.
src/ast.rsAdds additional PartialEq coverage for function/env differences and PrecompiledOp args differences.
.gitignoreIgnores mutation testing output directory mutants.out/.
.github/workflows/mutants.ymlNew 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

CopilotAIMar 20, 2026

Copy link

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 freeto 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

@talagrand@muthuArivoli@Ant4g0n1st