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

Closed
alexandersato0830 wants to merge 0 commits from upstream-pr/1962 into main
alexandersato0830 commented 2026-11-25 16:49:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by alexandersato0830 on 2026-11-25T16:49:49Z.


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5495445292 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1962). Originally posted by [alexandersato0830](https://github.com/alexandersato0830) on 2026-11-25T16:49:49Z. --- 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 commented 2026-11-25 17:11:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-25T17:11:54Z.

Review: APPROVED


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6061832983 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1962#pullrequestreview-6061832983). Originally posted by [MSedgeMC](https://github.com/MSedgeMC) on 2026-11-25T17:11:54Z. **Review:** APPROVED --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T12:21:45Z.


#1962 | head 28c4f41838 (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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7239174291 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1962#issuecomment-7239174291). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T12:21:45Z. --- #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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:56:56Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246388205 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1962#issuecomment-7246388205). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:56:56Z. --- **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 commented 2026-12-01 11:55:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:55:38Z.

Review: CHANGES_REQUESTED


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

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130759442 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1962#pullrequestreview-6130759442). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:55:38Z. **Review:** CHANGES_REQUESTED --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T10:32:20Z.


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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7342616689 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1962#issuecomment-7342616689). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T10:32:20Z. --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T11:49:24Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7344455260 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1962#issuecomment-7344455260). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T11:49:24Z. --- 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).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1962
No description provided.