Skip to content

Patch vendored mutator to survive test output that is not UTF-8 - #19

Merged
0xjgv merged 1 commit into
mainfrom
vendor-mutator-utf8
Nov 23, 2026
Merged

0xjgv merged 1 commit into
mainfrom
vendor-mutator-utf8

Conversation

@0xjgv

@0xjgv 0xjgv commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Problem

The vendored mutator runner reads test output with text=True. A test command that prints invalid UTF-8 raises UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff ... and aborts the whole mutation run.

Change

  • scripts/vendor-patches/mutator-runner-undecodable-output.patch: add errors="replace" to the runner's Popen.
  • scripts/vendor.py applies scripts/vendor-patches/NAME-*.patch with git apply after vendoring. A patch that stops applying after a repin fails the script.
  • README documents the patch directory; delete a patch once the pin includes the fix.
  • tests/test_vendor.py: regression test. It fails without the patch.

Verification

  • make test: 162 tests OK.
  • python scripts/vendor.py reproduces the committed vendored tree.

The mutator runner decoded test output strictly, so a test printing invalid
UTF-8 raised UnicodeDecodeError and killed the whole run. Decode with
errors="replace". The fix lives in scripts/vendor-patches, which
scripts/vendor.py now applies after vendoring, so the vendored-tree check
still reproduces the tree from the pins.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-23T08:26:43.434516Z
We couldn’t complete this review. Comment @codex review to try again.
d997b3b 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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@0xjgv
0xjgv merged commit eeb512a into main Nov 23, 2026
2 checks passed
@0xjgv
0xjgv deleted the vendor-mutator-utf8 branch November 23, 2026 08:33
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