boot_trace: preserve events after JSON decoder limit errors (BOOT-TRACE-CORRUPT-JSONL) #975
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!975
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/boot-trace-corrupt-jsonl"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as: BOOT-TRACE-CORRUPT-JSONL
What and why
A startup trace is a sequence of independent JSON records. A record that hits Python's integer or nesting limit used to abort the entire summary. Count these decoder errors through the existing bad-line path so later valid events remain available. The regression uses a real oversized integer and injects
RecursionErrorfor one synthetic row so the test works across different decoder nesting limits. The two surrounding rows use the real decoder.Tested
After a rebase on
main6293c1c4(ca56e38c, same patch as33982844), on Windows 11, Python 3.12.4:tests/test_boot_trace.py34 OK,tests/test_dev_boot_trace.py5 OK;test_tool_stdout_encoding.py,test_docs_cli_flags.pyandtest_text_write_line_endings.pyOK;git diff --checkand the no-game-data check clean.mainat1504c1af, the updated regression still reports uncaughtValueErrorandRecursionErroron the two cases.python -I -B tests/test_boot_trace.pyandpython -I -B tests/test_dev_boot_trace.py: 33 and 5 passed on Windows (Python 3.10.10 and 3.12.4) and Debian WSL (Python 3.11.2).42041b6b) and #962 (45883852): no conflicts; 36 boot-trace tests and 5 CLI tests passed together on Windows.git diff --checkandpython -I -B scripts/check_no_game_data.py tools/boot_trace.py tests/test_boot_trace.py: passed.GPUs tested: n/a. CPU-only synthetic traces.
AI-assisted: Yes, Codex.
Checklist
main.Addressed the Python 3.15 nesting-fixture feedback in
33982844. The regression now injectsRecursionErrorfor one synthetic record. The real decoder still handles the oversized integer and the valid surrounding records. ReviewThe boot-trace and CLI suites passed 33 and 5 tests, respectively, on Windows with Python 3.10.10 and 3.12.4 and on Debian WSL with Python 3.11.2. On the original base
1504c1af, the updated regression still fails on both uncaught exceptions.Rebased on
main6293c1c4:33982844->ca56e38c, same patch (git range-diff). The previous base failedtests/test_tool_stdout_encoding.py, which #948 fixed onmain, and the earlier CI run never started (action_required).tests/test_boot_trace.py34 OK,tests/test_dev_boot_trace.py5 OK;test_tool_stdout_encoding.py,test_docs_cli_flags.pyandtest_text_write_line_endings.pyOK;git diff --checkand the no-game-data check clean.33982844. The changes-requested review was on80ec580d; the correction it asked for is unchanged inca56e38c, and a new look is welcome. Python 3.15 was not run.No code change in this rebase. CI on the new head is still queued.
AI-assisted: yes (Claude Code).
Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main ec91d695c merged without conflict; the PR's test files run with the pins of
tests/requirements.txton Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5).ValueErrorkeeps the old behaviour for bad JSON and also newly catches the integer-digits limit error, which the title does not mention.Red/green: tests/test_boot_trace.py 2 failed on main, 35 passed with the PR.
Targeted batch of 30 PRs (their tests, the tests importing the changed modules, the docs tests, the translator suite) on main a997a3c: no new failure, Windows 11 / Python.
AI-assisted (Claude Code, Claude Opus 5.5)