storage: implement next DirectStorage/BCPack slice (Part of #1198) #2083

Manually merged
github merged 3 commits from gh-pr/2083/head into gh-pr/2083/base 2026-11-26 23:55:05 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-25 00:04 UTC · original
tedin7:x2w-1198-next-slice → main · +399 −0 · 2 files · 3 commits · merged 2026-11-25 01:57 UTC

Part of #1198

What this unblocks: the "follow one failing request's generation through its status poll and a later write to the same destination" experiment the owner asked for in #1198, as a source-built fixture.

What it adds

startup_storage_refused_reuse reuses one mapped page (no release in between) with three page-destination zlib requests in one Submit, all ending at the first page's end (page_offset 0xF000, destination_size 0x1000):

  1. R1: inflates to 0x1800, refused for capacity. At its fence entry 0 is E_FAIL and every byte of the page is still the sentinel.
  2. V: inflates to exactly 0x1000. At its fence entry 1 is S_OK, entry 0 is still E_FAIL (a later success does not rewrite an earlier failure), and the destination holds exactly V's bytes.
  3. R2: a second oversized stream. Entry 2 is E_FAIL, entries 0 and 1 are unchanged, and the page is byte-identical to V's (no prefix written).

Also checked: fence order and positions, the stand-in log outcomes, and that sentinel, R1, R2 and V never share a byte at any destination offset.

Negative control startup_storage_refused_reuse_accept_refused_control: a consumer that takes R1's destination as data must fail ("matches the stream prefix in 0 of 4096").

Not covered: the console's own status-array layout (still the open semantics question).

Verification

Executed locally (Linux):

  • git diff --check: clean.
  • x86_64-w64-mingw32-g++ -std=c++17 -Wall -Wextra -fsyntax-only tests/startup_storage_refused_reuse.cpp: only the same function-cast warnings the sibling test has.

Win2025 commands not yet executed (no Windows build on this host):

  • cmake --build --preset release --target startup_storage_refused_reuse
  • ctest --preset release -R startup_storage_refused_reuse --output-on-failure

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 00:04 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2083) `tedin7:x2w-1198-next-slice` → `main` · +399 −0 · 2 files · 3 commits · merged 2026-11-25 01:57 UTC Part of #1198 What this unblocks: the "follow one failing request's generation through its status poll and a later write to the same destination" experiment the owner asked for in #1198, as a source-built fixture. ## What it adds `startup_storage_refused_reuse` reuses one mapped page (no release in between) with three page-destination zlib requests in one Submit, all ending at the first page's end (`page_offset 0xF000`, `destination_size 0x1000`): 1. R1: inflates to 0x1800, refused for capacity. At its fence entry 0 is E_FAIL and every byte of the page is still the sentinel. 2. V: inflates to exactly 0x1000. At its fence entry 1 is S_OK, entry 0 is still E_FAIL (a later success does not rewrite an earlier failure), and the destination holds exactly V's bytes. 3. R2: a second oversized stream. Entry 2 is E_FAIL, entries 0 and 1 are unchanged, and the page is byte-identical to V's (no prefix written). Also checked: fence order and positions, the stand-in log outcomes, and that sentinel, R1, R2 and V never share a byte at any destination offset. Negative control `startup_storage_refused_reuse_accept_refused_control`: a consumer that takes R1's destination as data must fail ("matches the stream prefix in 0 of 4096"). Not covered: the console's own status-array layout (still the open semantics question). ## Verification Executed locally (Linux): - `git diff --check`: clean. - `x86_64-w64-mingw32-g++ -std=c++17 -Wall -Wextra -fsyntax-only tests/startup_storage_refused_reuse.cpp`: only the same function-cast warnings the sibling test has. Win2025 commands not yet executed (no Windows build on this host): - `cmake --build --preset release --target startup_storage_refused_reuse` - `ctest --preset release -R startup_storage_refused_reuse --output-on-failure` AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:55:03 +00:00
github manually merged commit 8c0daa44da into gh-pr/2083/base 2026-11-26 23:55:05 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 01:34 UTC · original · edited 2026-11-25 01:36 UTC

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-25T01:36:19.160827Z efbc9b9 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.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 01:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2083#issuecomment-7149694546) · edited 2026-11-25 01:36 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"efbc9b9f910a0a1e92a66d919679477638d079b0","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-25T01:36:19.160827Z">2026-11-25T01:36:19.160827Z</relative-time> | `efbc9b9` | 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>
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-25 01:48 UTC · original

The Windows Release fixture passed both CTest cases. I updated the three generated requests after #2129 to use distinct 64-bit CancellationTag values independent of their decoded lengths. The failed/valid/failed sequence gives E_FAIL/S_OK/E_FAIL at the respective fences, and the invalid consumer matches 0 of 4096 bytes. This verifies the stand-in against a source-built sequence.

**@⁠R0Y00** on GitHub · 2026-11-25 01:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2083#issuecomment-7149981381) The Windows Release fixture passed both CTest cases. I updated the three generated requests after #2129 to use distinct 64-bit CancellationTag values independent of their decoded lengths. The failed/valid/failed sequence gives E_FAIL/S_OK/E_FAIL at the respective fences, and the invalid consumer matches 0 of 4096 bytes. This verifies the stand-in against a source-built sequence.
This discussion has been locked. Commenting is limited to contributors.
No description provided.