tools/game_run_summary: guard stdout encoding, BOM ints, OSError and RecursionError (reprend #1837) #2746
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2746"
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 OreoFR on 2026-11-30T14:38:32Z.
Takes over #1837 (kirigayakazima), whose author has not answered since the request on 2026-11-29 to merge the current
main. The original commite76cabc17is kept as is, with its author.What
tools/game_run_summary.py: guard the stdout encoding, ints with a BOM,OSErrorandRecursionError(unchanged).mainmerged in. After #2028, a run that reached its time limit says so with the seconds at the limit, so the test that expected 45 seconds now writes and expects 60 (tests/test_game_run_summary.py). That is the only new change.Tests
mainb17b22d33merged:tests/test_game_run_summary.py12 passed, 15 subtests passed.python -I scripts/check_no_game_data.pyon both changed files: clean.mainbefore the fix).Co-authored with kirigayakazima (original commit kept).
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T14:48:29Z.
Independent Linux red/green and CLI timing-boundary check
CachyOS x86-64, Python 3.14.10. I merged
a70a976cdontomainb17b22d33(treeee6a7553d) and ran the carry'stests/test_game_run_summary.pyagainst both versions of the tool.main, there were three assertion failures (BOM metadata and two invalid-limit subtests) and two errors (the mocked failed reopen and nested JSON cases).python -ICLI. I exercised exit codes 124 and 137 at elapsed times 59, 60 and 61 seconds with a 60-second limit. Each metadata file independently used plain UTF-8 or UTF-8 with BOM.mainpassed 6/24 cases, all with plain UTF-8. The PR passed 24/24. With a BOM insecondsalone and an exit at 59 s,mainreported a timeout for both codes. The PR retained the recorded guest exit at 59 s and reported a timeout at and above 60 s.main.A second agent recomputed the CLI results from independent synthetic inputs. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T15:03:26Z.
Independent check on Windows (not the author), at
a70a976cd.python -I tests/test_game_run_summary.py: 12 tests passed in 0.08 s.The change is tool-only; the new guard cases (stdout encoding, BOM integers, OSError, RecursionError) run under the standard library on Python 3.12.10. No game files needed.
Environment: Windows 11 Pro 10.0.26200.9711, Python 3.12.10.
AI-assisted: yes (opencode).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T15:43:54Z.
Verified by MoonEyes (another owner than OreoFR) on head
a70a976cdmerged withmainb17b22d33: Windows 11, Python 3.14.tests/test_game_run_summary.py12 OK;test_tool_stdout_encoding,test_text_write_line_endingsandtest_ci_registrationOK.tools/game_run_summary.pyofmainwith this test file: 3 failures and 2 errors. The non-ASCII stdout test passes onmainalready.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:02:56Z.
Merging. Head
a70a976cdmerges cleanly withmaine324ad55eand does not force a rebase of #2566. Red/green on Windows 11 and Linux by two other people. Merged by MoonEyes.AI-assisted (Claude Code).