Skip to content

test: cover mz leaked mutation survivors#75

Merged
qartik merged 1 commit intomainfrom
ks-resolve-mz-leaked-mutants
Apr 27, 2026
Merged

test: cover mz leaked mutation survivors#75
qartik merged 1 commit intomainfrom
ks-resolve-mz-leaked-mutants

Conversation

@qartik
Copy link
Copy Markdown
Member

@qartik qartik commented Apr 27, 2026

Summary

  • add exact malformed-signature coverage for __quantum__qis__mz_leaked__body return width and parameter type checks
  • extract and test the defensive mz_leaked operand-shape guard
  • remove a redundant function-body filter from result-slot validation that produced an equivalent mutation survivor

Original failures

The failing mutants job in https://github.com/Quantinuum/qir-qis/actions/runs/24985659961 reported two missed mutations:

  • src/lib.rs:788:48: replace && with || in aux::handle_mz_leaked_call
  • src/lib.rs:798:13: delete match arm [_, _] in aux::handle_mz_leaked_call

Validation

  • make lint
  • make test
  • make mutants

Copilot AI review requested due to automatic review settings April 27, 2026 15:57
Copy link
Copy Markdown
Contributor

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

This PR strengthens mutation-test coverage and hardens malformed-call handling around __quantum__qis__mz_leaked__body, while simplifying result-slot validation by removing a redundant filter.

Changes:

  • Add precise malformed-signature tests for mz_leaked (wrong return width, non-pointer parameter).
  • Extract mz_leaked’s operand-shape validation into a dedicated helper and add a focused unit test for it.
  • Simplify validate_result_slot_usage by iterating all module functions (dropping a redundant “has basic blocks” filter).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@qartik qartik merged commit b8f63ef into main Apr 27, 2026
28 checks passed
@qartik qartik deleted the ks-resolve-mz-leaked-mutants branch April 27, 2026 19:50
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.

2 participants