boot_trace: include XMem page observation totals in counts-only JSON (BOOT-TRACE-XMEM-COUNT) #962

Manually merged
github merged 1 commit from gh-pr/962/head into gh-pr/962/base 2026-11-26 09:30:42 +00:00
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 15:54 UTC · original
TheGeogeo:fix/boot-trace-xmem-count → main · +14 −0 · 2 files · 1 commits · merged 2026-11-24 20:04 UTC

Claimed in the coordination issue as: BOOT-TRACE-XMEM-COUNT

What and why

Include xmem_physical_pages_count in boot_trace.py --counts-only startup reports. This exposes the same total already used by the text summary, independently of --limit. The report contains the count with no XMem samples or trace fields. A synthetic trace with three observations and a one-sample limit verifies the behavior.

Tested

  • Windows, Python 3.12.4. The new test failed at 1504c1af with a missing xmem_physical_pages_count field.
  • python -I -B tests/test_boot_trace.py: 33 passed.
  • python -I -B tests/test_dev_boot_trace.py: 5 passed.
  • Merged #498 (42041b6b) in an isolated worktree without conflicts and reran python -I -B tests/test_boot_trace.py: 35 passed.
  • 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.
**@⁠TheGeogeo** on GitHub · 2026-11-24 15:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/962) `TheGeogeo:fix/boot-trace-xmem-count` → `main` · +14 −0 · 2 files · 1 commits · merged 2026-11-24 20:04 UTC Claimed in the coordination issue as: [BOOT-TRACE-XMEM-COUNT](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Include `xmem_physical_pages_count` in `boot_trace.py --counts-only` startup reports. This exposes the same total already used by the text summary, independently of `--limit`. The report contains the count with no XMem samples or trace fields. A synthetic trace with three observations and a one-sample limit verifies the behavior. ### Tested - Windows, Python 3.12.4. The new test failed at `1504c1af` with a missing `xmem_physical_pages_count` field. - `python -I -B tests/test_boot_trace.py`: 33 passed. - `python -I -B tests/test_dev_boot_trace.py`: 5 passed. - Merged #498 (`42041b6b`) in an isolated worktree without conflicts and reran `python -I -B tests/test_boot_trace.py`: 35 passed. - `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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:30:41 +00:00
github manually merged commit 45883852a3 into gh-pr/962/base 2026-11-26 09:30:42 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 16:08 UTC · original · approved these changes

Verified submitted head 45883852a311d1b5011c3917ed55310899b21264. test_boot_trace.py passed 33/33 and test_dev_boot_trace.py passed 5/5. The regression checks that counts-only reports all three synthetic XMem page observations despite --limit 1, omits raw observation fields, and does not echo private synthetic values. check_no_game_data.py and git diff --check passed. Synthetic CPU test only; no game data/GPU.

**@⁠KernelSmoker** on GitHub · 2026-11-24 16:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/962#pullrequestreview-6042932420) · **approved these changes** Verified submitted head `45883852a311d1b5011c3917ed55310899b21264`. `test_boot_trace.py` passed 33/33 and `test_dev_boot_trace.py` passed 5/5. The regression checks that counts-only reports all three synthetic XMem page observations despite `--limit 1`, omits raw observation fields, and does not echo private synthetic values. `check_no_game_data.py` and `git diff --check` passed. Synthetic CPU test only; no game data/GPU.
Author
Owner

@⁠kawaii-shakal on GitHub · 2026-11-24 16:14 UTC · original

Independent test of #962 (BOOT-TRACE-XMEM-COUNT)

Head tested: 45883852a3 (merge base 1504c1af). Environment: Windows 11, native Python 3.13.13, no GPU.

Commands and results:

  • python -I -B tests/test_boot_trace.py: Ran 33 tests, OK.
  • python -I -B tests/test_dev_boot_trace.py: OK.
  • Same test file with tools/boot_trace.py from the merge base: the new test ERRORS with KeyError: 'xmem_physical_pages_count'.
  • Mutation: replaced the new line (tools/boot_trace.py:273) with len(startup["xmem_physical_pages"]) (the sample list, which --limit caps). The new test FAILS with 1 != 3, so it pins the total rather than the number of samples shown. Restored afterwards.
  • git merge-tree --write-tree origin/main <head> (origin/main 0af7753c): clean.
  • python -I scripts/check_no_game_data.py on the changed files: exit 0. git diff --check: clean.

Findings:

  • tools/boot_trace.py:273 uses startup["kinds"], the same per-kind counter the text summary reads (line 362). The JSON and text outputs therefore agree, and the count does not depend on --limit.
  • The counts-only report still carries no samples or caller strings, and the test asserts this (assertNotIn("private-", ...)).
  • The name follows the existing *_count keys (file_open_failed_count, exception_count).

Verdict: looks good.

AI-assisted.

**@⁠kawaii-shakal** on GitHub · 2026-11-24 16:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/962#issuecomment-7137331784) Independent test of #962 (BOOT-TRACE-XMEM-COUNT) Head tested: 45883852a311d1b5011c3917ed55310899b21264 (merge base 1504c1af). Environment: Windows 11, native Python 3.13.13, no GPU. Commands and results: - `python -I -B tests/test_boot_trace.py`: Ran 33 tests, OK. - `python -I -B tests/test_dev_boot_trace.py`: OK. - Same test file with `tools/boot_trace.py` from the merge base: the new test ERRORS with `KeyError: 'xmem_physical_pages_count'`. - Mutation: replaced the new line (tools/boot_trace.py:273) with `len(startup["xmem_physical_pages"])` (the sample list, which `--limit` caps). The new test FAILS with `1 != 3`, so it pins the total rather than the number of samples shown. Restored afterwards. - `git merge-tree --write-tree origin/main <head>` (origin/main 0af7753c): clean. - `python -I scripts/check_no_game_data.py` on the changed files: exit 0. `git diff --check`: clean. Findings: - tools/boot_trace.py:273 uses `startup["kinds"]`, the same per-kind counter the text summary reads (line 362). The JSON and text outputs therefore agree, and the count does not depend on `--limit`. - The counts-only report still carries no samples or caller strings, and the test asserts this (`assertNotIn("private-", ...)`). - The name follows the existing `*_count` keys (`file_open_failed_count`, `exception_count`). Verdict: looks good. AI-assisted.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 20:04 UTC · original

Merging.

Why merged: BOOT-TRACE-XMEM-COUNT: boot_trace's --counts-only JSON now includes xmem_physical_pages_count, a one-line addition with a test. kawaii-shakal checked it on Windows (33 OK) and KernelSmoker approved it (33/33, 5/5).

Why it's good: test_boot_trace and test_dev_boot_trace: 39 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 6293c1c4f. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 571 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. Security read of the three-dot diff: no binaries, game data, downloads, network calls, new env vars or build/CI changes.

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

**@⁠QemmHD** on GitHub · 2026-11-24 20:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/962#issuecomment-7142994933) Merging. **Why merged:** BOOT-TRACE-XMEM-COUNT: boot_trace's --counts-only JSON now includes xmem_physical_pages_count, a one-line addition with a test. kawaii-shakal checked it on Windows (33 OK) and KernelSmoker approved it (33/33, 5/5). **Why it's good:** test_boot_trace and test_dev_boot_trace: 39 passed. Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 6293c1c4f. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 571 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. Security read of the three-dot diff: no binaries, game data, downloads, network calls, new env vars or build/CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.