BOOT-RENDER-DIAG: summarize render evidence in boot traces #498

Merged
bobcatchris merged 4 commits from upstream-pr/498 into main 2026-11-29 01:36:30 +00:00
bobcatchris commented 2026-11-24 06:28:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-11-24T06:28:19Z.


Claimed in the coordination issue as: BOOT-RENDER-DIAG

What and why

boot_trace.py summarized D3D12 method calls but ignored the runtime's render diagnostics on the same stderr stream. A first-boot report therefore could not say whether captures were black, which shader classes were missing, or whether stub pipelines were being created without sharing the raw log.

This recognizes fixed categories of shader-lookup failures, the stub-pipeline milestone, and presenter capture measurements, then emits only aggregate counts in text and --counts-only. Raw log text, paths and game strings are not emitted.

Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches@33ab48d3ea/README.md (reading-black-frame-and-missing-shader-evidence-from-a-boot-log)

No game data, keys, or decryption are included.

Tested

  • python -I tests/test_boot_trace.py — 30 tests OK
  • baseline source + patched tests: 1 failure and 1 error in the two new cases; patched source passes
  • python -I tests/test_docs_links.py — 16 tests OK
  • python -I tests/test_docs_cli_flags.py — 4 tests OK
  • python -I tests/test_ci_registration.py — 15 tests OK
  • python -m compileall -q tools tests — OK
  • git diff --check clean
  • security sweep of the diff: 0 hits

The source report tested the parser on a saved synthetic presenter run. I reproduced the regression locally with the added synthetic log cases; no game files were used.

GPUs tested: n/a (CPU-only log parser)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • Regression tests added for render logs without call tracing and mixed shader/call logs.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5467282746 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/498). Originally posted by [bobcatchris](https://github.com/bobcatchris) on 2026-11-24T06:28:19Z. --- Claimed in the coordination issue as: BOOT-RENDER-DIAG ### What and why `boot_trace.py` summarized D3D12 method calls but ignored the runtime's render diagnostics on the same stderr stream. A first-boot report therefore could not say whether captures were black, which shader classes were missing, or whether stub pipelines were being created without sharing the raw log. This recognizes fixed categories of shader-lookup failures, the stub-pipeline milestone, and presenter capture measurements, then emits only aggregate counts in text and `--counts-only`. Raw log text, paths and game strings are not emitted. Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection: https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/blob/33ab48d3ea90f9925351aeee8708181a71fb9634/README.md#reading-black-frame-and-missing-shader-evidence-from-a-boot-log No game data, keys, or decryption are included. ### Tested - `python -I tests/test_boot_trace.py` — 30 tests OK - baseline source + patched tests: 1 failure and 1 error in the two new cases; patched source passes - `python -I tests/test_docs_links.py` — 16 tests OK - `python -I tests/test_docs_cli_flags.py` — 4 tests OK - `python -I tests/test_ci_registration.py` — 15 tests OK - `python -m compileall -q tools tests` — OK - `git diff --check` clean - security sweep of the diff: 0 hits The source report tested the parser on a saved synthetic presenter run. I reproduced the regression locally with the added synthetic log cases; no game files were used. GPUs tested: n/a (CPU-only log parser) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [x] Regression tests added for render logs without call tracing and mixed shader/call logs.
PierreEbele commented 2026-11-24 21:55:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T21:55:07Z.


Reviewed 42041b6: ran tests/test_boot_trace.py and the dev-boot-trace/docs-cli-flags/dev-discovery tests on the PR and on main (sandbox); the two added tests fail on main as expected, all others pass. Verified the new regexes against the in-repo emitters (d3d12_vulkan_device.cpp:791/3540/4004, vulkan_present.h:1136) and probed prefixed, UTF-16, truncated and legacy lines on both trees — counts as designed, no digests or paths in --counts-only. Heads-up: git merge-tree flags conflicts in docs/boot.md and tools/boot_trace.py against main's newer XMem/frame-pacing changes, so it needs a rebase; and the stub-milestone / nonzero_rgb_pixels formats have no in-repo emitter yet, so those parsers stay inert until the runtime lands them. AI-assisted review.

Recommendation: Fix first

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7145560418 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/498#issuecomment-7145560418). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-24T21:55:07Z. --- Reviewed 42041b6: ran tests/test_boot_trace.py and the dev-boot-trace/docs-cli-flags/dev-discovery tests on the PR and on main (sandbox); the two added tests fail on main as expected, all others pass. Verified the new regexes against the in-repo emitters (d3d12_vulkan_device.cpp:791/3540/4004, vulkan_present.h:1136) and probed prefixed, UTF-16, truncated and legacy lines on both trees — counts as designed, no digests or paths in --counts-only. Heads-up: git merge-tree flags conflicts in docs/boot.md and tools/boot_trace.py against main's newer XMem/frame-pacing changes, so it needs a rebase; and the stub-milestone / nonzero_rgb_pixels formats have no in-repo emitter yet, so those parsers stay inert until the runtime lands them. AI-assisted review. **Recommendation:** Fix first
bobcatchris commented 2026-11-24 23:42:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-11-24T23:42:47Z.


Rebased on current main; preserved both newer frame-pacing summaries and this PR’s render diagnostics. Verified: 36 boot-trace tests, docs CLI-flag 4/4, docs links 16/16, no-game-data and security checks clean.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7147710671 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/498#issuecomment-7147710671). Originally posted by [bobcatchris](https://github.com/bobcatchris) on 2026-11-24T23:42:47Z. --- Rebased on current main; preserved both newer frame-pacing summaries and this PR’s render diagnostics. Verified: 36 boot-trace tests, docs CLI-flag 4/4, docs links 16/16, no-game-data and security checks clean.
PierreEbele commented 2026-11-25 00:08:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T00:08:40Z.


Follow-up on 681dae3a: the rebase is clean. The branch merges into current main without conflicts, and docs/boot.md now keeps both main's frame-pacing paragraph and this PR's render-diagnostics text. In a no-network sandbox on the PR merged with main, these pass: test_boot_trace 36/36 (main's pacing tests plus the two new ones), test_dev_boot_trace 5, test_docs_cli_flags 4, test_docs_links 16 (1 skipped, git not available in the sandbox) and test_dev_discovery 4. check_no_game_data is clean on the changed files. With the PR's tests/test_boot_trace.py dropped onto current main, the two new tests fail (1 failure, 1 error). Not blocking, still true: the STUB_MILESTONE and capture-line formats have no emitter under runtime/ on main yet, so those counters stay at zero until the runtime prints them. AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7148194351 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/498#issuecomment-7148194351). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T00:08:40Z. --- Follow-up on 681dae3a: the rebase is clean. The branch merges into current main without conflicts, and `docs/boot.md` now keeps both main's frame-pacing paragraph and this PR's render-diagnostics text. In a no-network sandbox on the PR merged with main, these pass: `test_boot_trace` 36/36 (main's pacing tests plus the two new ones), `test_dev_boot_trace` 5, `test_docs_cli_flags` 4, `test_docs_links` 16 (1 skipped, git not available in the sandbox) and `test_dev_discovery` 4. `check_no_game_data` is clean on the changed files. With the PR's `tests/test_boot_trace.py` dropped onto current main, the two new tests fail (1 failure, 1 error). Not blocking, still true: the `STUB_MILESTONE` and capture-line formats have no emitter under `runtime/` on main yet, so those counters stay at zero until the runtime prints them. AI-assisted review. **Recommendation:** Merge
MoonEyes commented 2026-11-28 17:59:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:59:10Z.


Hi @bobcatchris, thanks for this pull request. It currently conflicts with main (conflicting file(s): tools/boot_trace.py), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243439443 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/498#issuecomment-7243439443). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T17:59:10Z. --- Hi @bobcatchris, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `tools/boot_trace.py`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-28 23:06:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:06:17Z.


#498 | head 5865220a94 (merged cleanly with main adfb3821a2) | python -I tests/test_boot_trace.py -v + python -I tests/test_dev_boot_trace.py -v + python -I tests/test_docs_cli_flags.py | red on main: FAILED (failures=1, errors=1) (TraceError: ... has no [d3d12-trace] line in test_render_log_without_call_tracing and AssertionError: 8 != 1 in test_shader_diagnostics_and_calls_share_a_log) | green on PR+main: 41 ran, OK (test_boot_trace.py), 5 ran, OK (test_dev_boot_trace.py), 4 ran, OK (test_docs_cli_flags.py), 17 ran, OK (test_docs_links.py), 5 ran, OK (test_docs_repo_paths.py), and 1 ran, OK (test_docs_encoding.py) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Audited 5865220a94 (tools/boot_trace.py, tests/test_boot_trace.py, and docs/boot.md) merged cleanly onto main (adfb3821a2) on Windows 11. Confirmed _record_render strips Windows PowerShell : stderr prefixes, enforces nonzero <= width * height, accepts power-of-two LEONIDA_STUB_PIPELINES milestone counts while deducting recognized shader-miss and stub-pipeline lines from ignored_lines, allows render-only logs without --trace-d3d12 lines, and keeps frame_pacing and render summaries side by side in both text and --counts-only JSON output. Also verified scripts/check_no_game_data.py.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247202189 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/498#issuecomment-7247202189). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:06:17Z. --- #498 | head 5865220a94f15a9de553c2cb4d07d8bf312d2fcb (merged cleanly with main adfb3821a2) | `python -I tests/test_boot_trace.py -v` + `python -I tests/test_dev_boot_trace.py -v` + `python -I tests/test_docs_cli_flags.py` | red on main: `FAILED (failures=1, errors=1)` (`TraceError: ... has no [d3d12-trace] line` in `test_render_log_without_call_tracing` and `AssertionError: 8 != 1` in `test_shader_diagnostics_and_calls_share_a_log`) | green on PR+main: `41 ran, OK` (`test_boot_trace.py`), `5 ran, OK` (`test_dev_boot_trace.py`), `4 ran, OK` (`test_docs_cli_flags.py`), `17 ran, OK` (`test_docs_links.py`), `5 ran, OK` (`test_docs_repo_paths.py`), and `1 ran, OK` (`test_docs_encoding.py`) | Windows 11 (`10.0.26200.9974`), Python 3.12.10 | AI-assisted: yes Audited `5865220a94` (`tools/boot_trace.py`, `tests/test_boot_trace.py`, and `docs/boot.md`) merged cleanly onto `main` (`adfb3821a2`) on Windows 11. Confirmed `_record_render` strips Windows PowerShell ` : ` stderr prefixes, enforces `nonzero <= width * height`, accepts power-of-two `LEONIDA_STUB_PIPELINES` milestone counts while deducting recognized shader-miss and stub-pipeline lines from `ignored_lines`, allows render-only logs without `--trace-d3d12` lines, and keeps `frame_pacing` and `render` summaries side by side in both text and `--counts-only` JSON output. Also verified `scripts/check_no_game_data.py`.
OreoFR commented 2026-11-29 01:31:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T01:31:49Z.


Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 53b77df14 : red 1 failure + 1 error (test_render_log_without_call_tracing, test_shader_diagnostics_and_calls_share_a_log) / green 41 OK.

  • PR head 5865220a9, python -I tests/test_boot_trace.py from the repository root.
  • Red (main + only this PR's test files): 41 run, 1 failure, 1 error, 0 skips. test_render_log_without_call_tracing: boot_trace.TraceError: <tmp>/d3d12.log has no [d3d12-trace] line; test_shader_diagnostics_and_calls_share_a_log: AssertionError: 8 != 1.
  • Green (main + git merge --no-ff of this PR, no conflict): 41 run, OK, 0 skips.
  • Skips: none.
  • Verdict: READY.

Red = main + only the test files from this PR (git checkout pr-498 -- tests/test_boot_trace.py); green = main + the merged PR. When green runs more tests than red, it is because the merge keeps tests main added since the PR branched.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248842163 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/498#issuecomment-7248842163). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T01:31:49Z. --- Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 53b77df14 : red 1 failure + 1 error (`test_render_log_without_call_tracing`, `test_shader_diagnostics_and_calls_share_a_log`) / green 41 OK. - PR head 5865220a9, `python -I tests/test_boot_trace.py` from the repository root. - Red (main + only this PR's test files): 41 run, 1 failure, 1 error, 0 skips. `test_render_log_without_call_tracing`: `boot_trace.TraceError: <tmp>/d3d12.log has no [d3d12-trace] line`; `test_shader_diagnostics_and_calls_share_a_log`: `AssertionError: 8 != 1`. - Green (main + `git merge --no-ff` of this PR, no conflict): 41 run, OK, 0 skips. - Skips: none. - Verdict: READY. Red = main + only the test files from this PR (`git checkout pr-498 -- tests/test_boot_trace.py`); green = main + the merged PR. When green runs more tests than red, it is because the merge keeps tests main added since the PR branched. AI-assisted: Claude Code (Claude Opus 5.5).
MoonEyes commented 2026-11-29 01:36:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T01:36:33Z.


Merged after OreoFR's red/green check (check) (macOS 27.2.1, Apple M5, Python 3.12) and a local re-check here. Merged after local re-verification: this PR merged onto main 23c4ca006 without conflict, and its test file(s) (tests/test_bcpack_tool.py, tests/test_boot_trace.py) pass there. Earlier today the same tests failed on main without the PR (red/green) and a bundle with other open PRs showed no new failures. check_no_game_data.py is clean. Windows 11, Python 3.14; no GPU needed for these tests.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248895738 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/498#issuecomment-7248895738). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T01:36:33Z. --- Merged after **OreoFR**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/498#issuecomment-7248842163)) (macOS 27.2.1, Apple M5, Python 3.12) and a local re-check here. Merged after local re-verification: this PR merged onto `main` 23c4ca006 without conflict, and its test file(s) (`tests/test_bcpack_tool.py`, `tests/test_boot_trace.py`) pass there. Earlier today the same tests failed on `main` without the PR (red/green) and a bundle with other open PRs showed no new failures. `check_no_game_data.py` is clean. Windows 11, Python 3.14; no GPU needed for these tests. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
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!498
No description provided.