[PR #975] boot_trace: preserve events after JSON decoder limit errors (BOOT-TRACE-CORRUPT-JSONL) #1012

Open
opened 2026-11-26 20:19:47 +01:00 by 4ld0 · 0 comments
Owner

📋 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)

  • b7ba45d Keep parsing startup traces after JSON decoder limit errors
  • ca56e38 test: 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 RecursionError for 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 main 6293c1c4 (ca56e38c, same patch as 33982844), on Windows 11, Python 3.12.4: tests/test_boot_trace.py 34 OK, tests/test_dev_boot_trace.py 5 OK; test_tool_stdout_encoding.py, test_docs_cli_flags.py and test_text_write_line_endings.py OK; git diff --check and the no-game-data check clean.

  • On main at 1504c1af, the updated regression still reports uncaught ValueError and RecursionError on the two cases.
  • python -I -B tests/test_boot_trace.py and python -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).
  • Isolated merge with #498 (42041b6b) and #962 (45883852): no conflicts; 36 boot-trace tests and 5 CLI tests passed together on Windows.
  • git diff --check and python -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

  • Based on current main.
  • One topic.
  • No game data, keys, or decryption.
  • Translator contract entry: not applicable.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/975 **Author:** [@TheGeogeo](https://github.com/TheGeogeo) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/boot-trace-corrupt-jsonl` --- ### 📝 Commits (2) - [`b7ba45d`](https://github.com/ubiquitarianism/leonida/commit/b7ba45dca9f0f0cc5b3325d636cd84098312a0e0) Keep parsing startup traces after JSON decoder limit errors - [`ca56e38`](https://github.com/ubiquitarianism/leonida/commit/ca56e38c3111516b3ba1579334dfda08490c9249) test: make boot trace decoder recursion case portable ### 📊 Changes **2 files changed** (+34 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_boot_trace.py` (+32 -0) 📝 `tools/boot_trace.py` (+2 -5) </details> ### 📄 Description Claimed in the coordination issue as: [BOOT-TRACE-CORRUPT-JSONL](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7137106338) ### 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 `RecursionError` for 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 `main` `6293c1c4` (`ca56e38c`, same patch as `33982844`), on Windows 11, Python 3.12.4: `tests/test_boot_trace.py` 34 OK, `tests/test_dev_boot_trace.py` 5 OK; `test_tool_stdout_encoding.py`, `test_docs_cli_flags.py` and `test_text_write_line_endings.py` OK; `git diff --check` and the no-game-data check clean. - On `main` at `1504c1af`, the updated regression still reports uncaught `ValueError` and `RecursionError` on the two cases. - `python -I -B tests/test_boot_trace.py` and `python -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). - Isolated merge with #498 (`42041b6b`) and #962 (`45883852`): no conflicts; 36 boot-trace tests and 5 CLI tests passed together on Windows. - `git diff --check` and `python -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 - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys, or decryption. - Translator contract entry: not applicable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1012
No description provided.