Include PowerShell changes in red-green mutations #3227
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3227"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T21:13:38Z.
Claimed in the coordination issue as TEST-RED-GREEN-POWERSHELL-MUTATIONS.
What and why
red_green.py --mutatealready runs Python regression tests for launcher changes. It used to leave changed PowerShell scripts out of the hunks it reverses. Include.ps1files outside the tests in the existing mutation workflow and document the added coverage.Tested
*.ps1 text eol=crlfreportsred then greenon both checker versions. The old checker reports no mutation. With this change, it reverses the status-line change and the fixture reports the mutation ascaught.22e03b5echecked the real #3220 head0beb7d26onmain8877be37with PowerShell 7.7.0. It reportsred then greenand catches all four PowerShell hunks independently.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
mainat8877be37.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T21:32:16Z.
VERIFY-3227 — Windows nativo:
red then green, y la rama trae #3204 dentroacfda765cb41763227= currentmainframe.rschange (3 occurrences ofCAP_UNREAD;mainhas none)Ran
Negative control: reverting
acfda765c's own hunks withgit apply -Rdoes 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):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:
frame.rschange, 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.scripts/red_green.py(different regions;git merge-treebetween 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.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T21:53:37Z.
Thanks for the native Windows run. I checked the base on current upstream
f3865cae. #3204 already landed inmainas8d82a34a, an ancestor of bothmainand this branch. Their merge base is8877be37; the three-dot diff foracfda765ccontains onlyscripts/red_green.py,tests/test_red_green.pyanddocs/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 independentlycaughtby the launcher regression. Run details. AI-assisted.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T00:29:01Z.
Integration check on
mainatd5b30be1: 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 reportsred 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.