startup: keep shadow-only descriptor table entries in the capture summary #1483

Merged
tedin7 merged 1 commit from upstream-pr/1490 into main 2026-11-24 13:21:44 +00:00
tedin7 commented 2026-11-24 12:50:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:50:41Z.


What

describe() in tools/startup/capture.py now pairs the shadow and token id lists with itertools.zip_longest(..., fillvalue=0) instead of zip. Two regression checks are added to tests/startup_capture_check.py: check_describe_shadow_only and check_describe_one_sided_ids.

Why

on_TABL stores shadow=ids[:entries] and tokens=ids[entries:]. When a table carries only the shadow half, tokens is empty and zip yields nothing, so the summary printed "0 of N entries known" and dropped every entry. The line that prints (shadow N token M) already treats an empty tokens as a valid case, so the two lines disagreed. The current writer (src/startup_stubs/d3d12_capture.inl) always emits 2 * entries ids, or no ids when entries is 0, so this hardens the reader against shorter files. on_TABL is unchanged because it matches the writer layout. The used[:64] limit is unchanged. Output for full-length tables is unchanged.

Tested

Linux, pure Python:

  • python3 -B tests/startup_capture_check.py: all 7 checks ok
  • python3 -B tests/docs_links_check.py: ok
  • python3 -B tests/bidi_controls_check.py: ok
  • git diff --check: clean

Negative control: the new test file was run against git show origin/main:tools/startup/capture.py (copied outside the repo). check_describe_shadow_only failed there because the output lacked "2 of 2 entries known" (it printed "0 of 2"). It passes with the fix.

Not run: nothing Windows-specific is involved (no MSVC, no CMake build, no D3D12). The test is already registered in CMakeLists.txt, which is untouched.

Left out

Docs are unchanged: docs/startup-runtime.md does not describe the table summary format.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6582178122 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1490). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T12:50:41Z. --- ## What `describe()` in `tools/startup/capture.py` now pairs the shadow and token id lists with `itertools.zip_longest(..., fillvalue=0)` instead of `zip`. Two regression checks are added to `tests/startup_capture_check.py`: `check_describe_shadow_only` and `check_describe_one_sided_ids`. ## Why `on_TABL` stores `shadow=ids[:entries]` and `tokens=ids[entries:]`. When a table carries only the shadow half, `tokens` is empty and `zip` yields nothing, so the summary printed "0 of N entries known" and dropped every entry. The line that prints `(shadow N token M)` already treats an empty `tokens` as a valid case, so the two lines disagreed. The current writer (`src/startup_stubs/d3d12_capture.inl`) always emits `2 * entries` ids, or no ids when `entries` is 0, so this hardens the reader against shorter files. `on_TABL` is unchanged because it matches the writer layout. The `used[:64]` limit is unchanged. Output for full-length tables is unchanged. ## Tested Linux, pure Python: - `python3 -B tests/startup_capture_check.py`: all 7 checks ok - `python3 -B tests/docs_links_check.py`: ok - `python3 -B tests/bidi_controls_check.py`: ok - `git diff --check`: clean Negative control: the new test file was run against `git show origin/main:tools/startup/capture.py` (copied outside the repo). `check_describe_shadow_only` failed there because the output lacked "2 of 2 entries known" (it printed "0 of 2"). It passes with the fix. Not run: nothing Windows-specific is involved (no MSVC, no CMake build, no D3D12). The test is already registered in CMakeLists.txt, which is untouched. ## Left out Docs are unchanged: `docs/startup-runtime.md` does not describe the table summary format. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-24 13:00:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:58:40Z.


Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit b9b60f6bb0b6af0173faa014333486732ec7a937:

  • Debug (--preset dev): ctest --preset dev -R '^startup_capture$' --parallel 4 --no-tests=error --output-on-failure: 1/1 passed
  • Release /O2 (--preset release): ctest --preset release -R '^startup_capture$' --parallel 4 --no-tests=error --output-on-failure: 1/1 passed

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132176081 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1490#issuecomment-7132176081). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T12:58:40Z. --- Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `b9b60f6bb0b6af0173faa014333486732ec7a937`: - **Debug (`--preset dev`)**: `ctest --preset dev -R '^startup_capture$' --parallel 4 --no-tests=error --output-on-failure`: **1/1 passed** - **Release `/O2` (`--preset release`)**: `ctest --preset release -R '^startup_capture$' --parallel 4 --no-tests=error --output-on-failure`: **1/1 passed** AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-24 13:00:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T12:58:50Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T13:01:35.433190Z b9b60f6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132180106 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1490#issuecomment-7132180106). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T12:58:50Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"b9b60f6bb0b6af0173faa014333486732ec7a937","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T13:01:35.433190Z">2026-11-24T13:01:35.433190Z</relative-time> | `b9b60f6` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
upstream-sync closed this pull request 2026-11-24 14:02:54 +00:00
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
R0Y00/Xbox2Windows!1483
No description provided.