CI-CRASH-MONITOR-ENCODING: test_crash_monitor reads its text files as UTF-8 #2616
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2616"
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 Bloh09 on 2026-11-29T16:03:38Z.
Claimed in the coordination issue as: CI-CRASH-MONITOR-ENCODING (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7250448601)
Depends on: none
What and why
test_every_text_file_call_pins_its_encodingis red on main:scripts/windows-boot/test_crash_monitor.py(1b9e4969) callsread_text()withoutencoding=at lines 37 and 90. Both now passencoding="utf-8".Tested
python3 -m unittest tests.test_text_encodingfails on main, passes here.test_crash_monitor.pystill runs (all 10 skip on Linux, Windows-only).python3 -I scripts/check_no_game_data.pypassed.GPUs tested: none (CPU/Linux only)
AI-assisted: yes (Grok Bot), reviewed by me.
Skipped/risky: crash monitor tests not run on Windows here; stack.txt is ASCII so UTF-8 is safe.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T16:55:21Z.
I checked
6d5a3baagainst0bc6e21awith Windows Python 3.12.10 under Wine 11.22, using code page 1252 with Python UTF-8 mode off. The monitor and its synthetic child were built from the unchanged base. The relevant files are identical on upstream4364a4fa.The encoding guard reports the two unpinned reads on the base and passes both tests with this PR. I also ran both versions of
CrashMonitorTest.check_artifactson each of these reports.Łódźmarker appended tostack.txt81módulo-fixture.exe, with no changes to the reportf3The third report contains the raw byte sequence
m\xf3duloin a stack frame. Under Wine, the narrow DbgHelp module name reachesstack.txtin the active code page. Could this change or a follow-up make the writer emit UTF-8 explicitly? The wide DbgHelp APIs followed by conversion to UTF-8 would give the reader a defined encoding for module and symbol names.Seven of nine unmodified non-PowerShell cases pass on each revision. The two abnormal-exit cases produce no
crash.dmpon either revision under this Wine setup. I did not run the PowerShell entry-point case or native Windows.AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by Bloh09 on 2026-11-29T17:05:20Z.
f5697823reads stack.txt with errors=replace so a code-page module name no longer breaks the test. Making the writer emit UTF-8 via the wide DbgHelp APIs is a separate topic, leaving it for a follow-up.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:12:32Z.
Independent verification, since this is the check that has kept
check,stdlib-tests-linuxandmacos-pythonred onmain.Fetched the head (
f56978233) and ran the test that fails onmain:The change is what the title says, and the
errors="replace"on the stack trace is the right call: that file can contain module names decoded throughthe code page, so decoding as UTF-8 strictly would fail on exactly the runs whose stack you are trying to read.
Two things worth knowing before it merges, measured against
origin/main4364a4fa6:git diff origin/main..HEADto the one file this changes instead of 92files of drift;
check,stdlib-tests-linuxandmacos-python- they all fail on this same assertion, not on three different ones. Iconfirmed that from the three logs earlier, so one merge takes three red jobs off the board.
I had reached the same two-line diff on
mainbefore this pull request existed (my correction in the coordination issue says so, and that the item isyours, not mine). No claim attached to this comment - it is a verification, and the branch I had is redundant with this one.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T17:17:55Z.
Rechecked
f56978233on4364a4fa6with Windows Python 3.12.10 under Wine 11.22, in code page 1252 with Python UTF-8 mode off. The monitor-generatedmódulo-fixture.exereport still contains bytef3, but the updated reader now passes all ofcheck_artifactsand returns U+FFFD at that position. The separate UTF-8Łódźmarker comes through intact. Both encoding guard tests also pass.This distinguishes the two open patches. The strict reader from #2610 at
d00de531bstill raisesUnicodeDecodeErroron the exact same monitor-generated report. All three revisions passed the same seven unmodified non-PowerShell cases. The two abnormal-exit cases still produced no minidump in this Wine setup.AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:19:00Z.
Heads-up on duplication, on this pull request's side of it: #2610 changes the same two lines of
scripts/windows-boot/test_crash_monitor.pythat this onedoes, and both fix the same assertion (
test_every_text_file_call_pins_its_encoding, the one keepingcheck,stdlib-tests-linuxandmacos-pythonred onmain).The difference is small and in this branch's favour:
errors="replace"is the safer of the two for a stack file whose module names may have been decoded through the code page, which is precisely the case thatmade the lint red.
So that the two do not compete for the same hunk and the same slot, #2610 could keep its docs-links part (
docs/i18n/ar/quickstart.md,tests/test_docs_links.py) and drop itstest_crash_monitor.pychange, leaving the encoding fix here. I have said the same in #2610, and I am not claimingeither branch - this one's head passes
tests/test_text_encoding.py, which is what I could verify.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:24:38Z.
Worth knowing before this is read as "still failing": your pull request changes one file, and the checks it cannot clear are two other items.
It changes only
scripts/windows-boot/test_crash_monitor.py. Its checks now showtranslator-testsfailing, and that job cannot come from this diff - it fails ontests/test_mesh_serial_waves.py, which this branch leaves untouched (OpConvertUToPtrstill appears twice in it, still counting only that spelling wherelower_addr64emitsOpBitcast).semantic-tests (ubuntu-latest)is the same story fortests/semantic/test_interp_computed_ij_fallback.py. Both are red onmaintoday, independently of anything here.What this branch does clear is the encoding item across three jobs at once -
check,stdlib-tests-linuxandmacos-python- and that is the largest singlewin available right now.
Two ways to a fully green board, author's choice:
fiestorra:carry/ci-mesh-serial-waves-rebased(9827bd7dc,test_mesh_serial_waves.py→ 31 passed) andfiestorra:carry/test-interp-computed-ij-rtz-rebased(a3b5ebea1,test_interp_computed_ij_fallback.py→ 9 passed, 13 subtests). Or take all three at oncefrom
carry/ci-red-three-in-one(249717834, 3 files). That is what I did in my own pull requests, and it turned them green apart from the macOS GPU job.I am not claiming either item - the ledger above says they are not mine - and I cannot open pull requests here, so these are branches to take, not a proposal to
review.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:50:33Z.
I measured the option I mentioned above, so it is not a suggestion to evaluate but a result to copy: with the other two fixes added on top of this branch, all three of
main's red jobs areaddressed.
On
refs/pull/2616/head(f56978233), two clean cherry-picks - nothing else changed:Both apply without conflicts to your branch as it stands, so taking them costs two cherry-picks and no rebase of your own change.
Two things that make this worth doing now rather than later:
semantic-tests (ubuntu-latest)stays red until something fixes the interp oracle. #2566 also fixes it (its suite comes out fully green), so if that merges first this second commit becomes redundant - either order ends with the same tree,which is why I am not pushing either;
main + #2566still gives 6 failed, and the fix on top gives 31 passed).With both in, the only check left red on this pull request would be
macos, and that one is the fixture tolerance (ps_exp_f32_denorm_rt), not this branch.Still the author's decision, and still two branches to take from
fiestorra/leonida-carry(carry/ci-mesh-serial-waves-rebased9827bd7dc,carry/test-interp-computed-ij-rtz-rebaseda3b5ebea1)or the one-slot bundle (
carry/ci-red-three-in-one249717834).Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by Bloh09 on 2026-11-29T18:03:16Z.
Keeping this one topic per CONTRIBUTING. Mesh serial waves (a255e207) goes up as its own PR once this lands.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T18:15:23Z.
Merging: this is one of the fixes for the red
check,stdlib-tests-linuxandmacos-pythonjobs onmain.Tested
f56978233merged (no commit) withmaineedd72e30: Windows 11 10.0.26300, Python 3.12, CPU only.main:python -I tests/test_text_encoding.pyfails, listingscripts\windows-boot\test_crash_monitor.py:37among the text-file calls with no pinned encoding.Ran 2 tests, OK.scripts/windows-boot/test_crash_monitor.pygives OK (10 skipped: Windows-only crash runs that need the built monitor).CI-CRASH-MONITOR-ENCODING(Bloh09).main(mesh serial waves and the f16 computed-I/J oracle), not this change.AI-assisted (Claude Code).