mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #975] boot_trace: preserve events after JSON decoder limit errors (BOOT-TRACE-CORRUPT-JSONL) #1012
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1012
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/975
Author: @TheGeogeo
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/boot-trace-corrupt-jsonl📝 Commits (2)
b7ba45dKeep parsing startup traces after JSON decoder limit errorsca56e38test: make boot trace decoder recursion case portable📊 Changes
2 files changed (+34 additions, -5 deletions)
View changed files
📝
tests/test_boot_trace.py(+32 -0)📝
tools/boot_trace.py(+2 -5)📄 Description
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.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.