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

Merged
tedin7 merged 3 commits from upstream-pr/2083 into main 2026-11-25 01:57:59 +00:00
tedin7 commented 2026-11-25 00:04:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:04:13Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6593994386 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2083). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T00:04:13Z. --- 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.
upstream-sync closed this pull request 2026-11-25 02:01:41 +00:00
chatgpt-codex-connector[bot commented 2026-11-25 02:02:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T01:34:00Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149694546 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2083#issuecomment-7149694546). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T01:34:00Z. --- <!-- 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>
R0Y00 commented 2026-11-25 02:02:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:48:34Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149981381 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2083#issuecomment-7149981381). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T01:48:34Z. --- 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.
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!2076
No description provided.