Skip to content

Add targeted mutation gate for scientific invariants - #175

Merged
dnncha merged 1 commit into
mainfrom
mutation-scientific
Oct 28, 2026
Merged

dnncha merged 1 commit into
mainfrom
mutation-scientific

Conversation

@dnncha

@dnncha dnncha commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Adds a targeted mutation gate to prove the scientific tests detect known-wrong semantics.

  • scripts/check_mutation_sensitivity.py copies the package into a throwaway tree, applies one source mutation, runs the scientific tests, and requires failure.
  • Mutants: radius→unique, FASTQ validation disabled, counts parsed through float, and ambiguous feature counts.
  • make mutation-scientific runs the gate; make quality includes it.
  • Hardens the FASTQ corruption fuzz so the mutated validation path is actually exercised.
  • Adds an explicit ambiguous-feature matrix test so the ambiguous-count mutant is killed.

Local gates: make quality (43 typed files, lint, 2133 pytest passed / 11 skipped, 4/4 mutants killed, compat39 14 passed).

@dnncha
dnncha merged commit 7210aaa into main Oct 28, 2026
10 of 28 checks passed
@dnncha
dnncha deleted the mutation-scientific branch October 28, 2026 11:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T11:32:24.474025Z 5403c50 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5403c50dec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +108 to +113
if completed.returncode == 0:
print(f"survived: {mutant.name}", file=sys.stderr)
print(completed.stdout[-4000:], file=sys.stderr)
return False
print(f"killed: {mutant.name}")
return True

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject pytest infrastructure errors as invalid mutant runs

When pytest fails during collection, is interrupted, encounters an internal/usage error, or collects no tests, this condition treats the mutant as killed. For example, running make mutation-scientific without Hypothesis installed makes every subprocess fail while importing the copied tests, yet the script prints that all four mutants were killed and exits successfully. Accept only the pytest test-failure exit status as a killed mutant, and fail the gate for infrastructure or collection errors; a clean unmutated baseline run would also prevent false positives from pre-existing failures.

Useful? React with 👍 / 👎.

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.

1 participant