Keep boot trace text readable when map records lack names (carry of #1962) #3089

Merged
leonida/mandy
MoonEyes merged 3 commits from carry/1962 into main 2026-12-02 12:58:44 +00:00

Pull request successfully merged and closed

MoonEyes commented 2026-12-02 10:30:15 +00:00

Claimed in the coordination issue as: BOOT-TRACE-MAP-NAME (the original author's item ID, claimed at https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7168564771)

What and why

Carry of #1962 (alexandersato0830), unchanged since 2026-11-25. Branch = main + the author's head (commit kept) + conflict resolution + no further commits of mine.

A startup trace can contain a parseable map record whose module name is missing, empty or not a string. format_text in tools/boot_trace.py concatenated that value with the (relocated) suffix and raised TypeError, so the whole text summary was lost. The change prints <unknown module> for such records and keeps the relocation marker.

Conflict: tests/test_boot_trace.py had two tests added at the same insertion point (the author's map-record test and main's file-open histogram test). I kept both. tools/boot_trace.py merged without conflict.

Review: the only change request (aslan2142, 2026-12-01) asked for a rebase onto current main, which this branch does. No other defect was raised, so I made no fix commit.

Tested

Windows 11, no GPU, no game files, on main a917c54d6 plus this branch.

  • python -I tests/test_boot_trace.py: Ran 42 tests, OK.
  • python -I tests/test_dev_boot_trace.py: Ran 5 tests, OK.
  • Red: with tools/boot_trace.py restored to main's version, python -I tests/test_boot_trace.py gives Ran 42 tests, FAILED (errors=1); the failing test is test_text_summary_survives_map_records_without_a_module_name. File restored afterwards.
  • python -I scripts/check_no_game_data.py tools/boot_trace.py tests/test_boot_trace.py: clean (exit 0).

Not run: the full suite, CI.

GPUs tested: n/a (unit tests only)

AI-assisted: yes. Models: Claude Opus 5.5 in Claude Code (carry, conflict resolution, fixes, tests); separate read-only reviewer agent: Claude Opus 5.5.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: no translator rule.)

Supersedes #1962 once merged; the original stays open until a maintainer decides.

🤖 Generated with Claude Code

Claimed in the coordination issue as: BOOT-TRACE-MAP-NAME (the original author's item ID, claimed at https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7168564771) ### What and why Carry of #1962 (alexandersato0830), unchanged since 2026-11-25. Branch = main + the author's head (commit kept) + conflict resolution + no further commits of mine. A startup trace can contain a parseable `map` record whose module name is missing, empty or not a string. `format_text` in `tools/boot_trace.py` concatenated that value with the ` (relocated)` suffix and raised `TypeError`, so the whole text summary was lost. The change prints `<unknown module>` for such records and keeps the relocation marker. Conflict: `tests/test_boot_trace.py` had two tests added at the same insertion point (the author's map-record test and main's file-open histogram test). I kept both. `tools/boot_trace.py` merged without conflict. Review: the only change request (aslan2142, 2026-12-01) asked for a rebase onto current main, which this branch does. No other defect was raised, so I made no fix commit. ### Tested Windows 11, no GPU, no game files, on main a917c54d6 plus this branch. - `python -I tests/test_boot_trace.py`: Ran 42 tests, OK. - `python -I tests/test_dev_boot_trace.py`: Ran 5 tests, OK. - Red: with `tools/boot_trace.py` restored to main's version, `python -I tests/test_boot_trace.py` gives Ran 42 tests, FAILED (errors=1); the failing test is `test_text_summary_survives_map_records_without_a_module_name`. File restored afterwards. - `python -I scripts/check_no_game_data.py tools/boot_trace.py tests/test_boot_trace.py`: clean (exit 0). Not run: the full suite, CI. GPUs tested: n/a (unit tests only) AI-assisted: yes. Models: Claude Opus 5.5 in Claude Code (carry, conflict resolution, fixes, tests); separate read-only reviewer agent: Claude Opus 5.5. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: no translator rule.) Supersedes #1962 once merged; the original stays open until a maintainer decides. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
enlight3d commented 2026-12-02 12:44:03 +00:00

RUN (independent run on Windows, #3089 head 4079705d6, merged locally into main 9b4d71899 with git merge --no-ff, no conflicts. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.)

  • History: #1962's head 28c4f4183 (alexandersato0830) is an ancestor of the head through the merge fc56da44f, under its author's name.
  • python -I tests/test_boot_trace.py -v: main 41 tests OK; merge 42 tests OK.
  • python -m pytest on the 8 test files that name boot_trace: main 71 passed; merge 72 passed.
  • Red: main's tools/boot_trace.py with this pull request's test file gives 42 tests and 1 error, test_text_summary_survives_map_records_without_a_module_name (TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'), as the body says.
  • Probe with the test's records (map records with no module, 42, "", and one relocated module), through main() in each output mode:
    • Text: main raises TypeError; the merge exits 0.
    • --json and --counts-only: exit 0 on both sides with the same output size. Only the text summary had this bug.
  • Mutations of the merge's tools/boot_trace.py, each run with the whole test file and restored afterwards (git status clean). All 4 are killed:
    • Only the empty check kept (the isinstance(name, str) check dropped): killed. The integer name then breaks the summary.
    • Only the type check kept (not name dropped): killed. The empty name prints as nothing.
    • (relocated) marker dropped: killed (the new test and test_text_report_has_the_triage_units).
    • Placeholder text changed: killed.

Not covered here: Linux and macOS, and a real gta6rt --trace file (synthetic records only).

Verdict: PASS. The text summary now survives map records without a usable module name and keeps the relocation marker, red on main and green on the merge match the body, every mutation tried is killed, and the author's commit is kept.

Machine: Windows 11 Pro 26300 (NTFS), i9-13900K, 64 GB, CPython 3.13.12 (CI uses 3.12); unit tests only, no GPU or game files used.

RUN (independent run on Windows, #3089 head 4079705d6, merged locally into `main` 9b4d71899 with `git merge --no-ff`, no conflicts. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.) - History: #1962's head 28c4f4183 (alexandersato0830) is an ancestor of the head through the merge fc56da44f, under its author's name. - `python -I tests/test_boot_trace.py -v`: main 41 tests OK; merge 42 tests OK. - `python -m pytest` on the 8 test files that name `boot_trace`: main 71 passed; merge 72 passed. - Red: `main`'s `tools/boot_trace.py` with this pull request's test file gives 42 tests and 1 error, `test_text_summary_survives_map_records_without_a_module_name` (`TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'`), as the body says. - Probe with the test's records (map records with no module, `42`, `""`, and one relocated module), through `main()` in each output mode: - Text: `main` raises `TypeError`; the merge exits 0. - `--json` and `--counts-only`: exit 0 on both sides with the same output size. Only the text summary had this bug. - Mutations of the merge's `tools/boot_trace.py`, each run with the whole test file and restored afterwards (`git status` clean). All 4 are killed: - Only the empty check kept (the `isinstance(name, str)` check dropped): killed. The integer name then breaks the summary. - Only the type check kept (`not name` dropped): killed. The empty name prints as nothing. - ` (relocated)` marker dropped: killed (the new test and `test_text_report_has_the_triage_units`). - Placeholder text changed: killed. Not covered here: Linux and macOS, and a real `gta6rt --trace` file (synthetic records only). Verdict: PASS. The text summary now survives map records without a usable module name and keeps the relocation marker, red on `main` and green on the merge match the body, every mutation tried is killed, and the author's commit is kept. Machine: Windows 11 Pro 26300 (NTFS), i9-13900K, 64 GB, CPython 3.13.12 (CI uses 3.12); unit tests only, no GPU or game files used.
MoonEyes commented 2026-12-02 12:47:36 +00:00

Merging. Head 4079705d6 merges cleanly with main 23a51c494 and does not force a rebase of #2566. Moon's own pull request, merged on green CI at his instruction. An independent read-only check by a separate agent on head 4079705d6 found every CI check green including no-game-data, no conflict with current main, no open review or unanswered question, and for a carry the original author's commits kept as ancestors. Merged by MoonEyes.

AI-assisted (Claude Code).

Merging. Head `4079705d6` merges cleanly with `main` `23a51c494` and does not force a rebase of #2566. Moon's own pull request, merged on green CI at his instruction. An independent read-only check by a separate agent on head 4079705d6 found every CI check green including no-game-data, no conflict with current main, no open review or unanswered question, and for a carry the original author's commits kept as ancestors. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.