Skip to content

Fix Git-spelling tests under legacy console encodings - #5460

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
mihir-s-05:fix/git-spelling-test-encoding
Oct 25, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
mihir-s-05:fix/git-spelling-test-encoding

Conversation

@mihir-s-05

Copy link
Copy Markdown
Contributor

On native Windows with redirected CP1252 output, the exact Git-spelling test fails even though the planner correctly rejects the Unicode alias: its child escapes the combining accent while the test expects a literal character. Match the fixture child's output encoding to its capture decoder, and add ASCII/CP1252/UTF-8 controls for inherited settings and explicit diagnostic output.

This integrates Arham Tahir's already published correction, credited in the test and evidence note. His original diagnosis, patch and receipts remained unapplied to current main; #5358 subsequently recorded the same limitation. Nick Petalas's #3007 supplies the original exact-path guard and tests.

Only the test module and its evidence note change. Rejections still require exit 1, the correctly rendered offending path, empty stdout and unchanged prior GitHub-output bytes. Correcting the declaration selects the expected consumer for the same Git change. Production validation, frozen packages, source pins and the selected frontier are unchanged. No new kappa or mathematical acceptance is claimed.

Validation at contribution head 771dae262537e01801af38b4170b8bcf3dfdea5a:

  • Focused module, normal and optimized test drivers: 9 passed / 1 existing filename skip on native Windows, 10 passed on Ubuntu/WSL. The inherited and explicit encoding cases run on both.
  • Existing research/replay-input-head-spelling registered replay passes on both platforms: historical three-omission/three-rejection/two-positive comparison, all ten spelling tests, and all five lexical-input tests.
  • Three disposable mutations fail as expected: remove the child encoding, decode CP1252 as UTF-8, or allow NFC-normalized input membership.
  • All 6,922 top-level source/replay manifests were inspected; only the existing spelling registration declares this test, and no source manifest pins it. Replay planning selects that one package. Committed bytes and git diff --check pass.

Reproduce with Python 3.12 and Git:

python -W error -B -m unittest discover -s tests -p test_research_git_spelling.py -v
python -O -W error -B -m unittest discover -s tests -p test_research_git_spelling.py -v
python -B scripts/research_package.py --package research/replay-input-head-spelling

The registered comparison requires historical source commit 836b19bfa309ceafbc8ee32a15e8c4b10dde7e11; it was explicitly fetched locally. The selected metadata baseline passes. Full selected cold replay, Windows descendant containment, other Python versions and independent human/formal acceptance were not checked. Hosted CI is separate from local evidence.

Started from and refreshed against canonical main 32890bc5de034ab8fc93ac88ead7279a6a416d04, priority 7. Canonical claim and handoff. Final overlap covered 330 open PRs, 4,725 Discussion records and all 7,402 tracked in-scope notes, with reported complete coverage; this is not a novelty guarantee.

Prepared for Mihir Srivastava with substantial OpenAI Codex assistance; Apache-2.0. Predecessor attribution is retained.

@Mister-Meeseeks
Mister-Meeseeks merged commit d99b379 into CrocSwap:main Oct 25, 2026
2 checks passed
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.

2 participants