HLE: pin a call's task queue at XAsyncBegin #503

Open
github-bot wants to merge 1 commit from github-bot/gh-503 into main AGit
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 04:16 UTC · original
Quat3rnion:victory-xasync-queue → main · +96 −12 · 1 files · 1 commits · open

What

An XAsync call resolved its queue again at schedule and completion time. If
the title changed the process default between Begin and completion, work
submitted to the old queue could deliver its completion to the new one,
where the title may never dispatch it. This resolves the queue once at Begin,
retains it in the call, and uses it for work and completion. Starting a
provider with no available queue now returns E_NO_TASK_QUEUE as GDK
requires, instead of completing inline and reporting success.

An AI tool wrote part of this change.

Tested

  • Linux: cargo test --workspace: 166 passed, 0 failed, 3 ignored. Two new hermetic tests: one starts a call with no queue through a test seam and checks the refusal; the other changes the block's queue mid-call and asserts both work and completion stay on the original manual queue.
  • Windows cross-build: cargo check --target x86_64-pc-windows-gnu --workspace --tests passes. No Windows host here.
  • cargo xtask policy passes (150 files ok). No game files or data from them were added.

Checklist

  • Workspace tests and Windows cross-check pass.
  • cargo xtask policy passes. No game files or data from them were added.
  • AI authorship is disclosed above.
**@⁠Quat3rnion** on GitHub · 2026-11-24 04:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/503) `Quat3rnion:victory-xasync-queue` → `main` · +96 −12 · 1 files · 1 commits · open ## What An XAsync call resolved its queue again at schedule and completion time. If the title changed the process default between Begin and completion, work submitted to the old queue could deliver its completion to the new one, where the title may never dispatch it. This resolves the queue once at Begin, retains it in the call, and uses it for work and completion. Starting a provider with no available queue now returns `E_NO_TASK_QUEUE` as GDK requires, instead of completing inline and reporting success. An AI tool wrote part of this change. ## Tested - Linux: `cargo test --workspace`: 166 passed, 0 failed, 3 ignored. Two new hermetic tests: one starts a call with no queue through a test seam and checks the refusal; the other changes the block's queue mid-call and asserts both work and completion stay on the original manual queue. - Windows cross-build: `cargo check --target x86_64-pc-windows-gnu --workspace --tests` passes. No Windows host here. - `cargo xtask policy` passes (150 files ok). No game files or data from them were added. ## Checklist - [x] Workspace tests and Windows cross-check pass. - [x] `cargo xtask policy` passes. No game files or data from them were added. - [x] AI authorship is disclosed above.
A call must keep the queue it began on: otherwise work submitted before the title changes the process default can deliver its completion to the new queue, where the title may never dispatch it. Resolve and retain the queue in Call, use it for Schedule and Complete, and return E_NO_TASK_QUEUE when no queue is available. Two hermetic tests cover the refusal and the mid-call queue change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:06:22 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 17:31 UTC · original

Verification ran against PR head 43710396895e6bce2ea3de27b96380f05ef4af51; the PR was open at refresh.

  • cargo test -p victory-hle xasync: 8 passed; modules::xasync::tests::begin_without_a_task_queue_is_refused failed because PINNED_COMPLETED changed from 0 to 1 between the snapshots.
  • cargo test -p victory-hle xasync -- --test-threads=1: all 9 xasync tests passed, including begin_without_a_task_queue_is_refused and a_call_keeps_the_queue_it_began_on.

The first failure is a test-isolation race: both new tests share PINNED_COMPLETED, so the queue-pinning test can increment it while the no-queue test asserts it is unchanged. Serial execution passes the queue-resolution and pinned work/completion checks.

This verification was AI-assisted.

**@⁠jeremygold02** on GitHub · 2026-11-24 17:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/503#issuecomment-7139313059) Verification ran against PR head `43710396895e6bce2ea3de27b96380f05ef4af51`; the PR was open at refresh. - `cargo test -p victory-hle xasync`: 8 passed; `modules::xasync::tests::begin_without_a_task_queue_is_refused` failed because `PINNED_COMPLETED` changed from 0 to 1 between the snapshots. - `cargo test -p victory-hle xasync -- --test-threads=1`: all 9 xasync tests passed, including `begin_without_a_task_queue_is_refused` and `a_call_keeps_the_queue_it_began_on`. The first failure is a test-isolation race: both new tests share `PINNED_COMPLETED`, so the queue-pinning test can increment it while the no-queue test asserts it is unchanged. Serial execution passes the queue-resolution and pinned work/completion checks. This verification was AI-assisted.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:22 UTC · original

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-hle/src/modules/xasync.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/503#issuecomment-7148437696) <!-- victory-triage v1 head=43710396895e6bce2ea3de27b96380f05ef4af51 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-hle/src/modules/xasync.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-hle/src/modules/xasync.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/503/head:github-bot/gh-503'
git switch 'github-bot/gh-503'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-503'
git switch 'github-bot/gh-503'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-503'
git switch 'github-bot/gh-503'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-503'
git switch 'main'
git merge --squash 'github-bot/gh-503'
git switch 'main'
git merge --ff-only 'github-bot/gh-503'
git switch 'main'
git merge 'github-bot/gh-503'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!503
No description provided.