fix(dstorage): Keep cancelled requests out of queue errors #33

Manually merged
github merged 1 commit from gh-pr/33/head into gh-pr/33/base 2026-11-26 19:56:32 +00:00
Owner

@⁠mrb-eel on GitHub · 2026-11-21 14:26 UTC · original
mrb-eel:codex/directstorage-cancellation-status → main · +38 −17 · 2 files · 1 commits · merged 2026-11-22 09:58 UTC

ScarlettX currently reports E_ABORT for requests cancelled by DStorageCancelRequestsWithTag. That result becomes the batch status and increments the queue's failure count. Games can then handle an intentional cancellation as an asset read failure.

Retire cancelled requests in queue order without executing the read or recording an error. Match the Xbox Series X|S DirectStorage cancellation contract for status arrays and queue error records.

Verification

  • Updated test_dstorage_xvd. The new expectation failed against upstream with E_ABORT and passed with the fix.
  • The test checks that the cancelled destination stays untouched, a later read with the same tag still completes, and a genuine read failure in the same batch keeps its original status and error record.
  • Ran eight relevant CTest targets on macOS arm64 and verified the same regression test linked directly against dstorage_xs. The full Windows build and game testing remain pending.

Developed with assistance from OpenAI Codex.

**@⁠mrb-eel** on GitHub · 2026-11-21 14:26 UTC · [original](https://github.com/Freminet/ScarlettX/pull/33) `mrb-eel:codex/directstorage-cancellation-status` → `main` · +38 −17 · 2 files · 1 commits · merged 2026-11-22 09:58 UTC ScarlettX currently reports `E_ABORT` for requests cancelled by `DStorageCancelRequestsWithTag`. That result becomes the batch status and increments the queue's failure count. Games can then handle an intentional cancellation as an asset read failure. Retire cancelled requests in queue order without executing the read or recording an error. Match the [Xbox Series X|S DirectStorage cancellation contract](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/dstorage/interfaces/idstoragequeuex/methods/idstoragequeuex_cancelrequestswithtag) for status arrays and queue error records. ### Verification - Updated `test_dstorage_xvd`. The new expectation failed against upstream with `E_ABORT` and passed with the fix. - The test checks that the cancelled destination stays untouched, a later read with the same tag still completes, and a genuine read failure in the same batch keeps its original status and error record. - Ran eight relevant CTest targets on macOS arm64 and verified the same regression test linked directly against `dstorage_xs`. The full Windows build and game testing remain pending. Developed with assistance from OpenAI Codex.
Retire requests cancelled by tag in queue order without recording
E_ABORT in the status array or error record. Keep the first real
failure record and the batch result intact across cancellations.

Verify that a cancelled request leaves its destination untouched,
a later read using the same tag completes, and a genuine file read
failure still reaches the title.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:56:29 +00:00
github manually merged commit eed458839c into gh-pr/33/base 2026-11-26 19:56:32 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.