Skip to content

Mutate f-strings and concatenated strings - #580

Draft
nabi-noor wants to merge 1 commit into
boxed:mainfrom
nabi-noor:fix-439-string-mutations
Draft

nabi-noor wants to merge 1 commit into
boxed:mainfrom
nabi-noor:fix-439-string-mutations

Conversation

@nabi-noor

Copy link
Copy Markdown

Summary

  • apply the existing string mutations to literal text in formatted strings
  • treat implicitly concatenated strings as one unit and mutate only the first non-empty text segment
  • avoid duplicate child-string mutants while preserving mutations inside f-string expressions
  • add focused regression cases and update the affected end-to-end snapshots

Closes #439

Testing

  • uv run pytest tests/mutation/test_mutation.py tests/e2e/test_e2e_coverage.py tests/e2e/test_e2e_my_lib.py -q (244 passed, 1 skipped)
  • uv run pytest --ignore=tests/utils/test_safe_setproctitle.py -q (402 passed, 2 skipped)
  • uv run pre-commit run --all-files --show-diff-on-failure --color=never

The complete macOS run has one unrelated failure in test_setproctitle_crashes_after_fork_with_corefoundation_loaded: the installed setproctitle no longer produces the deliberately expected SIGSEGV. That platform-specific sentinel is skipped by the project’s Linux CI.

AI assistance disclosure

This change was implemented with OpenAI Codex assistance. The implementation and test output were checked during the assisted session. The PR is intentionally left as a draft until the contribution author completes their personal review of the final diff, as requested in the issue discussion.

@nabi-noor

Copy link
Copy Markdown
Author

@boxed — GitHub does not allow an outside-fork contributor to add a formal review request here. Once this draft is marked ready after the contribution author’s final review, would you please review it?

@boxed

boxed commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Well.. truth be told I'm not really the main author of most of the code anymore heh. I'm more of the guy who got the ball rolling and am enjoying watching how great @Otto-AA and @nicklafleur are :P

@nicklafleur

Copy link
Copy Markdown
Collaborator

happy to review when you are ready

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.

Mutate f-strings and concatenated strings

4 participants