Keep boot trace text readable when map records lack names (BOOT-TRACE-MAP-NAME) #1962

Closed
leonida/mandy
alexandersato0830 wants to merge 0 commits from codex/boot-trace-map-name into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

alexandersato0830 commented 2026-11-25 16:49:49 +00:00

Claimed in the coordination issue as: BOOT-TRACE-MAP-NAME

What and why

A startup trace can contain a parseable map record whose module name is missing or malformed. The text formatter currently concatenates that value with the relocation suffix and throws TypeError, so the caller loses the entire summary.

Print <unknown module> when the name is absent, empty, or non-text. The text summary still shows the module count, valid names, relocation markers, and later events such as the exit code. The JSON report keeps its existing fields and values.

Tested

  • python -I tests/test_boot_trace.py passed all 35 tests. The new synthetic JSONL regression throws TypeError before the fix.
  • python -I tests/test_dev_boot_trace.py passed all 5 tests.
  • git diff --check and the source-only check passed. Tested on Windows 11 with Python 3.11.17.

GPUs tested: n/a (CPU-only synthetic fixtures)

AI-assisted: yes (Codex)

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.
Claimed in the coordination issue as: [BOOT-TRACE-MAP-NAME](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7168564771) ### What and why A startup trace can contain a parseable `map` record whose module name is missing or malformed. The text formatter currently concatenates that value with the relocation suffix and throws `TypeError`, so the caller loses the entire summary. Print `<unknown module>` when the name is absent, empty, or non-text. The text summary still shows the module count, valid names, relocation markers, and later events such as the exit code. The JSON report keeps its existing fields and values. ### Tested - `python -I tests/test_boot_trace.py` passed all 35 tests. The new synthetic JSONL regression throws `TypeError` before the fix. - `python -I tests/test_dev_boot_trace.py` passed all 5 tests. - `git diff --check` and the source-only check passed. Tested on Windows 11 with Python 3.11.17. GPUs tested: n/a (CPU-only synthetic fixtures) AI-assisted: yes (Codex) ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption.
MSedgeMC approved these changes 2026-11-25 17:11:54 +00:00
MSedgeMC left a comment

Verified on the PR branch: python3 -m unittest tests.test_boot_trace -v -> 35 tests OK, including the new test for map records with missing/non-string/empty module names. The fix guards module.get('module') before concatenation, which previously raised TypeError on malformed records, and preserves the relocated marker. Python-only, no game data.

Verified on the PR branch: python3 -m unittest tests.test_boot_trace -v -> 35 tests OK, including the new test for map records with missing/non-string/empty module names. The fix guards module.get('module') before concatenation, which previously raised TypeError on malformed records, and preserves the relocated marker. Python-only, no game data.
zmasi commented 2026-11-28 12:21:45 +00:00

#1962 | head 28c4f418381a2cb1dc39f71a04e9f266ba6161b1 (merged cleanly with main d48a957bb) | python -I tests/test_boot_trace.py | red on main: FAILED (errors=1) (TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' on nameless map record) | green on PR+main: 36 tests OK | Windows 11, Python 3.12.10 | AI-assisted: yes

Audited format_text in tools/boot_trace.py (falling back to <unknown module> when a startup map record omits "module", sets an empty string, or carries a non-string value while still preserving the (relocated) suffix). Also verified tests/test_ci_registration.py (18 OK), tests/test_text_write_line_endings.py (3 OK), and scripts/check_no_game_data.py.

#1962 | head 28c4f418381a2cb1dc39f71a04e9f266ba6161b1 (merged cleanly with main d48a957bb) | `python -I tests/test_boot_trace.py` | red on main: `FAILED (errors=1)` (`TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'` on nameless `map` record) | green on PR+main: `36 tests OK` | Windows 11, Python 3.12.10 | AI-assisted: yes Audited `format_text` in `tools/boot_trace.py` (falling back to `<unknown module>` when a startup `map` record omits `"module"`, sets an empty string, or carries a non-string value while still preserving the ` (relocated)` suffix). Also verified `tests/test_ci_registration.py` (`18 OK`), `tests/test_text_write_line_endings.py` (`3 OK`), and `scripts/check_no_game_data.py`.
OreoFR commented 2026-11-28 21:56:56 +00:00

Verified by OreoFR

  • Base: main 4a54aedcb + PR head 28c4f4183
  • Test: python -I tests/test_boot_trace.py
  • Red on main: 1 error (map without a module name)
  • Green with the PR: OK
  • Verdict: READY (conflicts with #2246: same insertion point in tests/test_boot_trace.py, whichever merges second needs a rebase)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

**Verified by OreoFR** - Base: main `4a54aedcb` + PR head `28c4f4183` - Test: `python -I tests/test_boot_trace.py` - Red on main: 1 error (map without a module name) - Green with the PR: OK - Verdict: READY (conflicts with #2246: same insertion point in tests/test_boot_trace.py, whichever merges second needs a rebase) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 reviewed 2026-12-01 11:55:38 +00:00
aslan2142 left a comment
No description provided.
Reviewed against current `main`: printing `<unknown module>` for malformed map records in `tools/boot_trace.py` looks good, but this branch currently conflicts with `main` and has no green CI run. Please rebase onto current `main` so CI runs cleanly. *(AI-assisted review.)*
MoonEyes commented 2026-12-02 10:32:20 +00:00

For information: this pull request is carried in #3089, which merges your head (your commits are kept) into current main, resolves the conflicts keeping both sides, and fixes the points raised in review here (details in its description). This one stays open until a maintainer decides; if you pick it up again, say so and the carry can be closed.

AI-assisted (Claude Code, Claude Opus 5.5)

For information: this pull request is carried in #3089, which merges your head (your commits are kept) into current `main`, resolves the conflicts keeping both sides, and fixes the points raised in review here (details in its description). This one stays open until a maintainer decides; if you pick it up again, say so and the carry can be closed. AI-assisted (Claude Code, Claude Opus 5.5)
MoonEyes commented 2026-12-02 11:49:24 +00:00

Closing: this pull request no longer applies to current main (merge conflict in tests/test_boot_trace.py), and open pull requests that have fallen out of step with main are being closed so the list stays workable. Your work is not lost: it is carried in #3089
, which keeps your commits and resolves the conflict on current main.

AI-assisted (Claude Code).

Closing: this pull request no longer applies to current `main` (merge conflict in `tests/test_boot_trace.py`), and open pull requests that have fallen out of step with `main` are being closed so the list stays workable. Your work is not lost: it is carried in #3089 , which keeps your commits and resolves the conflict on current `main`. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.