Include PowerShell changes in red-green mutations #3227

Manually merged
github merged 1 commit from github-bot/gh-3227 into gh-pr/3227/base 2026-12-03 16:20:41 +00:00 AGit
Owner

@⁠merzleckeier on GitHub · 2026-12-02 21:13 UTC · original
merzleckeier:fix/red-green-powershell-mutations → main · +30 −11 · 3 files · 1 commits · merged 2026-12-03 16:10 UTC

Claimed in the coordination issue as TEST-RED-GREEN-POWERSHELL-MUTATIONS.

What and why

red_green.py --mutate already runs Python regression tests for launcher changes. It used to leave changed PowerShell scripts out of the hunks it reverses. Include .ps1 files outside the tests in the existing mutation workflow and document the added coverage.

Tested

  • A synthetic repository with *.ps1 text eol=crlf reports red then green on both checker versions. The old checker reports no mutation. With this change, it reverses the status-line change and the fixture reports the mutation as caught.
  • On Linux, 40 checker tests passed (one platform-specific skip), and all 59 documentation checks passed. The new fixture also passed on Windows CPython 3.12.10 under Wine 11.22 with MinGit.
  • A clean local combination with #3224 at 22e03b5e checked the real #3220 head 0beb7d26 on main 8877be37 with PowerShell 7.7.0. It reports red then green and catches all four PowerShell hunks independently.
  • The clean-room and whitespace checks passed.

GPUs tested: n/a (synthetic Git fixtures and PowerShell runs).

AI-assisted: OpenAI GPT-6.2 through Codex. GPT-6.2 Sol independently reviewed the exact head read-only and verified that the reverse patch preserves CRLF.

Checklist

  • Based on upstream main at 8877be37.
  • One topic.
  • Synthetic fixtures only.
  • Translator rule: n/a.
**@⁠merzleckeier** on GitHub · 2026-12-02 21:13 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3227) `merzleckeier:fix/red-green-powershell-mutations` → `main` · +30 −11 · 3 files · 1 commits · merged 2026-12-03 16:10 UTC Claimed in the coordination issue as [TEST-RED-GREEN-POWERSHELL-MUTATIONS](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570). ### What and why `red_green.py --mutate` already runs Python regression tests for launcher changes. It used to leave changed PowerShell scripts out of the hunks it reverses. Include `.ps1` files outside the tests in the existing mutation workflow and document the added coverage. ### Tested - A synthetic repository with `*.ps1 text eol=crlf` reports `red then green` on both checker versions. The old checker reports no mutation. With this change, it reverses the status-line change and the fixture reports the mutation as `caught`. - On Linux, 40 checker tests passed (one platform-specific skip), and all 59 documentation checks passed. The new fixture also passed on Windows CPython 3.12.10 under Wine 11.22 with MinGit. - A clean local combination with #3224 at `22e03b5e` checked the real #3220 head `0beb7d26` on `main` `8877be37` with PowerShell 7.7.0. It reports `red then green` and catches all four PowerShell hunks independently. - The clean-room and whitespace checks passed. GPUs tested: n/a (synthetic Git fixtures and PowerShell runs). AI-assisted: OpenAI GPT-6.2 through Codex. GPT-6.2 Sol independently reviewed the exact head read-only and verified that the reverse patch preserves CRLF. ### Checklist - [x] Based on upstream `main` at `8877be37`. - [x] One topic. - [x] Synthetic fixtures only. - Translator rule: n/a.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 21:16:43 +00:00
Author
Owner

@⁠fiestorra on GitHub · 2026-12-02 21:32 UTC · original

VERIFY-3227 — Windows nativo: red then green, y la rama trae #3204 dentro

Head acfda765c
Merge base b41763227 = current main
Estado the branch contains #3204's frame.rs change (3 occurrences of CAP_UNREAD; main has none)

Ran

python -I tests/test_red_green.py      Ran 41 tests in 93.6s — OK

Negative control: reverting acfda765c's own hunks with git apply -R does not apply (the file also carries #3224's change on the same lines), so I took the file as it was at the parent commit instead (git show acfda765c^:scripts/red_green.py):

FAIL: test_a_powershell_fix_undone_with_crlf_checkout_is_caught
FAIL: test_a_test_only_pull_request_has_nothing_to_undo
Ran 41 tests — FAILED (failures=2)

That is the right red, and the first of the two is the case this repository needs: a PowerShell fix undone with a CRLF checkout is caught. The tool mutates the changed lines and checks that the tests catch it; on a Windows checkout the line endings are CRLF, and a mutation tool that cannot rewrite a CRLF file would silently report "no red" — the same class of false verdict as #3188's two.

Two things for whoever merges:

  1. The branch carries #3204's frame.rs change, which is still open. Merging this lands both; the same happens with #3200 and #3132. It is a pattern tonight, not a one-off — the stacked PRs need merge-order discipline.
  2. #3224 and #3227 both edit scripts/red_green.py (different regions; git merge-tree between the two branches is clean), but whichever lands second will need a rebase to see the other's tests. I would land #3224 first, then this.

What I could not test: an end-to-end red_green.py <pr> run whose PowerShell fix is reverted on a real pull request; the tests build the repository synthetically.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-12-02 21:32 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3227#issuecomment-7359420080) ## VERIFY-3227 — Windows nativo: `red then green`, y **la rama trae #3204 dentro** | | | |---|---| | Head | `acfda765c` | | Merge base | `b41763227` = current `main` | | Estado | the branch **contains #3204's `frame.rs` change** (3 occurrences of `CAP_UNREAD`; `main` has none) | **Ran** ``` python -I tests/test_red_green.py Ran 41 tests in 93.6s — OK ``` **Negative control**: reverting `acfda765c`'s own hunks with `git apply -R` **does not apply** (the file also carries #3224's change on the same lines), so I took the file as it was **at the parent commit** instead (`git show acfda765c^:scripts/red_green.py`): ``` FAIL: test_a_powershell_fix_undone_with_crlf_checkout_is_caught FAIL: test_a_test_only_pull_request_has_nothing_to_undo Ran 41 tests — FAILED (failures=2) ``` **That is the right red**, and the first of the two is the case this repository needs: **a PowerShell fix undone with a CRLF checkout is caught**. The tool mutates the changed lines and checks that the tests catch it; on a Windows checkout the line endings are CRLF, and a mutation tool that cannot rewrite a CRLF file would silently report "no red" — the same class of false verdict as #3188's two. **Two things for whoever merges**: 1. **The branch carries #3204's `frame.rs` change**, which is still open. Merging this lands both; the same happens with #3200 and #3132. It is a pattern tonight, not a one-off — the stacked PRs need merge-order discipline. 2. **#3224 and #3227 both edit `scripts/red_green.py`** (different regions; `git merge-tree` between the two branches is clean), but whichever lands second will need a rebase to see the other's tests. I would land #3224 first, then this. **What I could not test**: an end-to-end `red_green.py <pr>` run whose PowerShell fix is reverted on a real pull request; the tests build the repository synthetically. Written with an AI assistant.
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-02 21:53 UTC · original

Thanks for the native Windows run. I checked the base on current upstream f3865cae. #3204 already landed in main as 8d82a34a, an ancestor of both main and this branch. Their merge base is 8877be37; the three-dot diff for acfda765c contains only scripts/red_green.py, tests/test_red_green.py and docs/testing.md. #3224 also merges cleanly with this head. Together they ran on the real #3220 head: red then green, with all four PowerShell hunks independently caught by the launcher regression. Run details. AI-assisted.

**@⁠merzleckeier** on GitHub · 2026-12-02 21:53 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3227#issuecomment-7359932257) Thanks for the native Windows run. I checked the base on current upstream `f3865cae`. #3204 already landed in `main` as `8d82a34a`, an ancestor of both `main` and this branch. Their merge base is `8877be37`; the three-dot diff for `acfda765c` contains only `scripts/red_green.py`, `tests/test_red_green.py` and `docs/testing.md`. #3224 also merges cleanly with this head. Together they ran on the real #3220 head: `red then green`, with all four PowerShell hunks independently `caught` by the launcher regression. [Run details](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/3220). AI-assisted.
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-03 00:29 UTC · original

Integration check on main at d5b30be1: I combined the five open Red/Green changes #3203 (d7deb51a), #3224 (22e03b5e), #3227 (acfda765), #3245 (b5520eb8) and #3251 (3da59c5e). They apply cleanly. The combined checker suite passed 44 tests under Linux and skipped the Windows job-object test.

I then ran the combined checker on the actual launcher preflight patch #3220 (0beb7d26), with Linux PowerShell 7.7.0. It reports red then green, with no new failures. All four PowerShell mutations at lines 106, 146, 151 and 161 were caught by the preflight regression. The checker ran offline in a disposable clone using synthetic launcher fixtures. AI-assisted.

**@⁠merzleckeier** on GitHub · 2026-12-03 00:29 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3227#issuecomment-7363242102) Integration check on `main` at `d5b30be1`: I combined the five open Red/Green changes #3203 (`d7deb51a`), #3224 (`22e03b5e`), #3227 (`acfda765`), #3245 (`b5520eb8`) and #3251 (`3da59c5e`). They apply cleanly. The combined checker suite passed 44 tests under Linux and skipped the Windows job-object test. I then ran the combined checker on the actual launcher preflight patch #3220 (`0beb7d26`), with Linux PowerShell 7.7.0. It reports `red then green`, with no new failures. All four PowerShell mutations at lines 106, 146, 151 and 161 were caught by the preflight regression. The checker ran offline in a disposable clone using synthetic launcher fixtures. AI-assisted.
github-bot changed target branch from main to gh-pr/3227/base 2026-12-03 16:19:34 +00:00
github manually merged commit acfda765c3 into gh-pr/3227/base 2026-12-03 16:19:52 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3227
No description provided.