feat(xgameruntime): implement XAsync #10

Manually merged
github merged 2 commits from gh-pr/10/head into gh-pr/10/base 2026-11-26 19:13:46 +00:00
Owner

@⁠CaseReed on GitHub · 2026-11-21 06:41 UTC · original
CaseReed:feat/xasync → main · +1172 −25 · 13 files · 2 commits · merged 2026-11-21 08:37 UTC

What

Implements XAsync (#1): XAsyncBegin, XAsyncRun, XAsyncSchedule, XAsyncComplete, XAsyncCancel, XAsyncGetStatus, XAsyncGetResult and XAsyncGetResultSize, in a new Async.cpp built on the existing XTaskQueue exports. TaskQueue.cpp is unchanged.

Rebased onto main now that #8 and #9 are merged: two commits, the implementation and the review fix below.

Provenance. The code is written for AnyBox, not adapted, so the file carries no upstream notice. Signatures, the XAsyncBlock layout, return codes and the order of provider ops follow the public MIT sources in microsoft/libHttpClient: Include/XAsync.h, Include/XAsyncProvider.h, Source/Task/AsyncLib.cpp, Tests/UnitTests/Tests/AsyncBlockTests.cpp and Include/httpClient/pal.h (for E_NO_TASK_QUEUE). The headers are not copied; types are redeclared in Types.hpp. No GDK binary was opened.

Design.

  • Each call is a heap Call object. The 32 internal bytes of the title's block hold 24 bytes: a signature, the final status, a pointer to the Call and a serial number. A block is trusted only if its pointer is in a registry, its serial matches and the Call points back at it, so arbitrary bytes are never taken for a live call. static_asserts pin the size and offsets of XAsyncBlock and XAsyncProviderData.
  • One mutex guards the registry, reference counts and states. No title or provider code and no task queue call runs under it, which also covers the re-entrant Immediate dispatch mode.
  • The provider gets a copy of the block held in the Call, as in the reference, so it can still schedule or complete after the title has released its own block.
  • The title's block is not written once the title can observe completion (final status, or a wait returning); with a completion callback the block is released before the callback runs, so the callback may reuse or free it.
  • Cleanup runs once, when the last reference to the call is dropped, never during another op.

Where it stops, and where it differs from the reference (all in the debt fragment, each with a Closes when: where one is measurable):

  • A completion callback that cannot be queued because the call's task queue was terminated stops with AbxUnsupported. The reference holds termination until outstanding calls finish; XTaskQueue cannot do that today.
  • XAsyncBegin on an already terminated queue does not return E_ABORT up front, because XTaskQueue exposes no termination state. Fixing either of these two needs a change in TaskQueue.cpp, which I left alone; tell me if you want it.
  • XAsyncCancel follows XAsync.h ("does nothing if the call has already completed"), where AsyncLib.cpp still invokes Cancel on a call completed with a payload not yet retrieved.
  • Cleanup can run later than in the reference.
  • A null block, provider, work callback or size pointer stops. A zeroed block behaves as in the reference. Any other block no call owns is a no-op for XAsyncCancel and XAsyncComplete, and stops for the four functions where the reference would return whatever its status field holds.

Supporting changes: the eight stubs leave Inventory.cpp; FakeXGameRuntime.cpp gets eight deliberately wrong exports so a misrouted call fails; e2e.py gets a per-scenario table for the expected stop function; README.md, ARCHITECTURE.md and the pending gdk-inventory.md fragment are updated where this change made a sentence untrue.

Review fix (second commit). When XTaskQueueSubmitDelayedCallback failed, XAsyncSchedule left workScheduled set, so the next call returned E_UNEXPECTED instead of the queue's error. The flag is now cleared under the registry mutex before the reference is released. e2e_async schedules twice on a terminated queue and expects E_ABORT both times; with the fix removed that case fails. The reference keeps its flag set after a failed submit, so the divergence is recorded in debt.

Tested

Windows 11, MSVC 19.38 (VS 2022), CMake 4.4.4, Ninja 1.13.2, clean build directory, on main at 60b902f.

  • Full build: ok, no warning. ctest: 34/34 (30 existing, 4 new: e2e_async, e2e_async_null, e2e_async_terminated, e2e_async_begin_terminated), each under 0.4 s.
  • e2e_async covers: XAsyncRun with a completion callback; XAsyncGetStatus with and without wait, including from the call's own callback; a full provider (Begin, Schedule, DoWork, Complete with payload, GetResultSize, GetResult, Cleanup), also with GetResult called inside the callback; delayed work; DoWork returning E_PENDING and rescheduling; cancellation in both dispatch orders; wrong identity; zeroed blocks; no process task queue; a completion still queued when the queue is terminated; 1000 concurrent calls.
  • Stress: e2e_async 200/200 sequential and 200/200 with four processes in parallel; the two stop scenarios 50/50 each.
  • Mutation check: 13 deliberate faults in Async.cpp, each caught by a test, the file restored and rebuilt after each.
  • python tools/check_conventions.py: ok. python tools/debt_fold.py --check: 3 fragments apply cleanly. python tools/progress.py --module xgameruntime: 15 → 23 implemented, 376 → 368 stubs.
  • MinGW: Async.cpp (with the project headers inlined), FakeTitle.cpp and FakeXGameRuntime.cpp compile without error or warning under -std=c++20 -Wall -Wextra with MinGW GCC 13.1, 15.2 and 16.2 on Compiler Explorer (after the review fix: 15.2 only).

Not tested: the full MinGW build and its test run (no GCC on this machine; relies on CI), the E_OUTOFMEMORY paths (no way to inject an allocation failure), a non-zero block that no call owns passed to the four functions that stop, and anything on a console. Two checks in e2e_async (a waiting status must not return before the completion callback; the block must not be written after a wait returns) are timing-dependent: they catch their mutant in practice but cannot fail deterministically without a sleep. A blocked scenario fails after 20 s through a watchdog, under the 30 s limit.

Self-review. Before opening this, an independent read of the first version found one real defect (scheduled work could still run DoWork on a call canceled while it had a completion callback, hidden by the dispatch order of the test), a stop where the result is defined (E_NO_TASK_QUEUE), a stop on a zeroed block that the reference ignores, and missing test cases. All are fixed in this commit and each fix has a mutation that fails a test.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • python tools/check_conventions.py passes (no comments in code, one declaration per export, Conventional Commit subjects)
  • Unimplemented paths stop (AbxNotImplemented / AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragment (no silent stub added)
  • Known gaps added, changed or removed through docs/dev/debt/changes/<branch>.md (feat-xasync.md; debt_fold.py reads changes/*.md only)
  • Generic behaviour, not specific to one title
  • No game files, keys, notes or logs added to the repository
  • Depends on: none (#8 and #9 are merged)
  • Fixes: Fixes #1
  • Unblocks: none
  • Source of behaviour: public MIT sources in microsoft/libHttpClient (Include/XAsync.h, Include/XAsyncProvider.h, Source/Task/AsyncLib.cpp, Tests/UnitTests/Tests/AsyncBlockTests.cpp, Include/httpClient/pal.h)
  • AI-assisted: yes

🤖 Generated with Claude Code

**@⁠CaseReed** on GitHub · 2026-11-21 06:41 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10) `CaseReed:feat/xasync` → `main` · +1172 −25 · 13 files · 2 commits · merged 2026-11-21 08:37 UTC ### What Implements XAsync (#1): `XAsyncBegin`, `XAsyncRun`, `XAsyncSchedule`, `XAsyncComplete`, `XAsyncCancel`, `XAsyncGetStatus`, `XAsyncGetResult` and `XAsyncGetResultSize`, in a new `Async.cpp` built on the existing XTaskQueue exports. `TaskQueue.cpp` is unchanged. Rebased onto `main` now that #8 and #9 are merged: two commits, the implementation and the review fix below. **Provenance.** The code is written for AnyBox, not adapted, so the file carries no upstream notice. Signatures, the `XAsyncBlock` layout, return codes and the order of provider ops follow the public MIT sources in `microsoft/libHttpClient`: `Include/XAsync.h`, `Include/XAsyncProvider.h`, `Source/Task/AsyncLib.cpp`, `Tests/UnitTests/Tests/AsyncBlockTests.cpp` and `Include/httpClient/pal.h` (for `E_NO_TASK_QUEUE`). The headers are not copied; types are redeclared in `Types.hpp`. No GDK binary was opened. **Design.** - Each call is a heap `Call` object. The 32 `internal` bytes of the title's block hold 24 bytes: a signature, the final status, a pointer to the `Call` and a serial number. A block is trusted only if its pointer is in a registry, its serial matches and the `Call` points back at it, so arbitrary bytes are never taken for a live call. `static_assert`s pin the size and offsets of `XAsyncBlock` and `XAsyncProviderData`. - One mutex guards the registry, reference counts and states. No title or provider code and no task queue call runs under it, which also covers the re-entrant `Immediate` dispatch mode. - The provider gets a copy of the block held in the `Call`, as in the reference, so it can still schedule or complete after the title has released its own block. - The title's block is not written once the title can observe completion (final status, or a wait returning); with a completion callback the block is released before the callback runs, so the callback may reuse or free it. - `Cleanup` runs once, when the last reference to the call is dropped, never during another op. **Where it stops, and where it differs from the reference** (all in the debt fragment, each with a `Closes when:` where one is measurable): - A completion callback that cannot be queued because the call's task queue was terminated stops with `AbxUnsupported`. The reference holds termination until outstanding calls finish; XTaskQueue cannot do that today. - `XAsyncBegin` on an already terminated queue does not return `E_ABORT` up front, because XTaskQueue exposes no termination state. Fixing either of these two needs a change in `TaskQueue.cpp`, which I left alone; tell me if you want it. - `XAsyncCancel` follows `XAsync.h` ("does nothing if the call has already completed"), where `AsyncLib.cpp` still invokes `Cancel` on a call completed with a payload not yet retrieved. - `Cleanup` can run later than in the reference. - A null block, provider, work callback or size pointer stops. A zeroed block behaves as in the reference. Any other block no call owns is a no-op for `XAsyncCancel` and `XAsyncComplete`, and stops for the four functions where the reference would return whatever its status field holds. Supporting changes: the eight stubs leave `Inventory.cpp`; `FakeXGameRuntime.cpp` gets eight deliberately wrong exports so a misrouted call fails; `e2e.py` gets a per-scenario table for the expected stop function; `README.md`, `ARCHITECTURE.md` and the pending `gdk-inventory.md` fragment are updated where this change made a sentence untrue. **Review fix (second commit).** When `XTaskQueueSubmitDelayedCallback` failed, `XAsyncSchedule` left `workScheduled` set, so the next call returned `E_UNEXPECTED` instead of the queue's error. The flag is now cleared under the registry mutex before the reference is released. `e2e_async` schedules twice on a terminated queue and expects `E_ABORT` both times; with the fix removed that case fails. The reference keeps its flag set after a failed submit, so the divergence is recorded in debt. ### Tested Windows 11, MSVC 19.38 (VS 2022), CMake 4.4.4, Ninja 1.13.2, clean build directory, on `main` at `60b902f`. - Full build: ok, no warning. `ctest`: 34/34 (30 existing, 4 new: `e2e_async`, `e2e_async_null`, `e2e_async_terminated`, `e2e_async_begin_terminated`), each under 0.4 s. - `e2e_async` covers: `XAsyncRun` with a completion callback; `XAsyncGetStatus` with and without wait, including from the call's own callback; a full provider (`Begin`, `Schedule`, `DoWork`, `Complete` with payload, `GetResultSize`, `GetResult`, `Cleanup`), also with `GetResult` called inside the callback; delayed work; `DoWork` returning `E_PENDING` and rescheduling; cancellation in both dispatch orders; wrong identity; zeroed blocks; no process task queue; a completion still queued when the queue is terminated; 1000 concurrent calls. - Stress: `e2e_async` 200/200 sequential and 200/200 with four processes in parallel; the two stop scenarios 50/50 each. - Mutation check: 13 deliberate faults in `Async.cpp`, each caught by a test, the file restored and rebuilt after each. - `python tools/check_conventions.py`: ok. `python tools/debt_fold.py --check`: 3 fragments apply cleanly. `python tools/progress.py --module xgameruntime`: 15 → 23 implemented, 376 → 368 stubs. - MinGW: `Async.cpp` (with the project headers inlined), `FakeTitle.cpp` and `FakeXGameRuntime.cpp` compile without error or warning under `-std=c++20 -Wall -Wextra` with MinGW GCC 13.1, 15.2 and 16.2 on Compiler Explorer (after the review fix: 15.2 only). Not tested: the full MinGW build and its test run (no GCC on this machine; relies on CI), the `E_OUTOFMEMORY` paths (no way to inject an allocation failure), a non-zero block that no call owns passed to the four functions that stop, and anything on a console. Two checks in `e2e_async` (a waiting status must not return before the completion callback; the block must not be written after a wait returns) are timing-dependent: they catch their mutant in practice but cannot fail deterministically without a sleep. A blocked scenario fails after 20 s through a watchdog, under the 30 s limit. **Self-review.** Before opening this, an independent read of the first version found one real defect (scheduled work could still run `DoWork` on a call canceled while it had a completion callback, hidden by the dispatch order of the test), a stop where the result is defined (`E_NO_TASK_QUEUE`), a stop on a zeroed block that the reference ignores, and missing test cases. All are fixed in this commit and each fix has a mutation that fails a test. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] `python tools/check_conventions.py` passes (no comments in code, one declaration per export, Conventional Commit subjects) - [x] Unimplemented paths stop (`AbxNotImplemented` / `AbxUnsupported`); silent stubs are listed under Silent stubs through a debt fragment (no silent stub added) - [x] Known gaps added, changed or removed through `docs/dev/debt/changes/<branch>.md` (`feat-xasync.md`; `debt_fold.py` reads `changes/*.md` only) - [x] Generic behaviour, not specific to one title - [x] No game files, keys, notes or logs added to the repository - [x] Depends on: none (#8 and #9 are merged) - [x] Fixes: Fixes #1 - [x] Unblocks: none - [x] Source of behaviour: public MIT sources in [microsoft/libHttpClient](https://github.com/microsoft/libHttpClient) (`Include/XAsync.h`, `Include/XAsyncProvider.h`, `Source/Task/AsyncLib.cpp`, `Tests/UnitTests/Tests/AsyncBlockTests.cpp`, `Include/httpClient/pal.h`) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Implement XAsyncBegin, XAsyncRun, XAsyncSchedule, XAsyncComplete,
XAsyncCancel, XAsyncGetStatus, XAsyncGetResult and
XAsyncGetResultSize in a new Async.cpp, on top of the existing
XTaskQueue exports. TaskQueue.cpp is unchanged.

The code is written for AnyBox. Signatures, the XAsyncBlock layout,
return codes and the order of provider ops follow the public MIT
sources in microsoft/libHttpClient (XAsync.h, XAsyncProvider.h,
AsyncLib.cpp, AsyncBlockTests.cpp, pal.h).

Each call is a heap object referenced from the 32 internal bytes of
the title's block and tracked in a registry under one mutex. No title
or provider code and no task queue call runs under that mutex. The
title's block is not written after the title can observe completion.

Four end-to-end scenarios cover run, wait, provider ops, results,
cancellation, delayed and repeated work, zeroed and null blocks, a
missing process task queue and a terminated queue. Divergences from
the reference and behaviour not measured on a console are recorded
in the debt fragment.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
When XTaskQueueSubmitDelayedCallback failed, workScheduled stayed
set and no work callback would ever clear it, so the next
XAsyncSchedule on that call returned E_UNEXPECTED instead of the
queue's error. Clear the flag under the registry mutex before
releasing the reference.

e2e_async schedules twice on a terminated queue and expects E_ABORT
both times. The reference keeps its flag set after a failed submit;
the divergence is recorded in debt.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:13:44 +00:00
github manually merged commit f79f11d9e1 into gh-pr/10/base 2026-11-26 19:13:46 +00:00
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 07:00 UTC · original · requested changes

Changes requested

One small defect in XAsyncSchedule blocks this. The rest is careful work and passes everything I ran, including repeated stress runs.

What I ran

Reviewed head 1080b4a. Built it with MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10 from a clean build directory. #8 and #9 are now squash-merged on main.

Results

Check Result Note
MinGW full build passed no warnings, so the GCC side of your Compiler Explorer check holds for the full build
CTest passed 33/33
e2e_async and e2e_taskqueue, repeated passed 50 runs each, 4 in parallel, no failure
tools/check_conventions.py passed
tools/debt_fold.py --check passed 3 fragments apply cleanly
tools/progress.py --module xgameruntime passed 15 → 23 implemented
CI passed

Findings

Blocking

  • core/libs/xdll/xgameruntime/Async.cpp:389: when XTaskQueueSubmitDelayedCallback fails, XAsyncSchedule drops its reference but leaves call->workScheduled set to true (set at line 384). No WorkCallback will ever run to clear it (line 258), so every later XAsyncSchedule on that call returns E_UNEXPECTED at line 380 instead of the queue's own error. Concretely: a provider whose queue was terminated calls XAsyncSchedule and gets E_ABORT. If it calls XAsyncSchedule again, it gets E_UNEXPECTED, which reads as "work is already scheduled" when nothing is.
    Fix: on failure, clear workScheduled under the registry mutex before releasing, for example
    if (FAILED(queued)) {
        {
            std::lock_guard lock(registry.mutex);
            call->workScheduled = false;
        }
        Release(call);
    }
    
    and add a case to e2e_async: schedule twice on a terminated queue and expect E_ABORT both times.

Non-blocking

None.

Not verified

The E_OUTOFMEMORY paths and anything on a console, as you noted. I did not repeat your mutation check.

To get this to a good state

Fix the flag reset with its test, and rebase onto main so the PR shows only the XAsync commit. Happy to merge right after.

**@⁠Dark3581** on GitHub · 2026-11-21 07:00 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10#pullrequestreview-6003679041) · **requested changes** # Changes requested One small defect in `XAsyncSchedule` blocks this. The rest is careful work and passes everything I ran, including repeated stress runs. ## What I ran Reviewed head `1080b4a`. Built it with MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10 from a clean build directory. #8 and #9 are now squash-merged on `main`. ## Results | Check | Result | Note | |---|---|---| | MinGW full build | passed | no warnings, so the GCC side of your Compiler Explorer check holds for the full build | | CTest | passed | 33/33 | | `e2e_async` and `e2e_taskqueue`, repeated | passed | 50 runs each, 4 in parallel, no failure | | `tools/check_conventions.py` | passed | | | `tools/debt_fold.py --check` | passed | 3 fragments apply cleanly | | `tools/progress.py --module xgameruntime` | passed | 15 → 23 implemented | | CI | passed | | ## Findings ### Blocking - `core/libs/xdll/xgameruntime/Async.cpp:389`: when `XTaskQueueSubmitDelayedCallback` fails, `XAsyncSchedule` drops its reference but leaves `call->workScheduled` set to `true` (set at line 384). No `WorkCallback` will ever run to clear it (line 258), so every later `XAsyncSchedule` on that call returns `E_UNEXPECTED` at line 380 instead of the queue's own error. Concretely: a provider whose queue was terminated calls `XAsyncSchedule` and gets `E_ABORT`. If it calls `XAsyncSchedule` again, it gets `E_UNEXPECTED`, which reads as "work is already scheduled" when nothing is. Fix: on failure, clear `workScheduled` under the registry mutex before releasing, for example ```cpp if (FAILED(queued)) { { std::lock_guard lock(registry.mutex); call->workScheduled = false; } Release(call); } ``` and add a case to `e2e_async`: schedule twice on a terminated queue and expect `E_ABORT` both times. ### Non-blocking None. ## Not verified The `E_OUTOFMEMORY` paths and anything on a console, as you noted. I did not repeat your mutation check. ## To get this to a good state Fix the flag reset with its test, and rebase onto `main` so the PR shows only the XAsync commit. Happy to merge right after.
@ -0,0 +390,4 @@
std::lock_guard lock(registry.mutex);
call->workScheduled = false;
}
Release(call);
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 07:00 UTC · original

workScheduled stays true here when the submit fails, so the next XAsyncSchedule on this call returns E_UNEXPECTED instead of the queue's error. Clear it under the registry mutex before Release(call). Details in the review.

**@⁠Dark3581** on GitHub · 2026-11-21 07:00 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10#discussion_r4651237443) `workScheduled` stays `true` here when the submit fails, so the next `XAsyncSchedule` on this call returns `E_UNEXPECTED` instead of the queue's error. Clear it under the registry mutex before `Release(call)`. Details in the review.
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-21 07:14 UTC · original

This pull request conflicts with main. Rebase it on current main and force-push the branch; the label is removed automatically once it merges cleanly.

**@⁠github-actions[bot]** on GitHub · 2026-11-21 07:14 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10#issuecomment-7059125761) This pull request conflicts with `main`. Rebase it on current `main` and force-push the branch; the label is removed automatically once it merges cleanly.
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-21 08:32 UTC · original

Progress report (60b902f → f79f11d)

📈 Libraries: 15.54% (+1.8018%, +8 implemented functions)

✅ 8 implemented
Library Name
xgameruntime XAsyncBegin
xgameruntime XAsyncCancel
xgameruntime XAsyncComplete
xgameruntime XAsyncGetResult
xgameruntime XAsyncGetResultSize
xgameruntime XAsyncGetStatus
xgameruntime XAsyncRun
xgameruntime XAsyncSchedule

Changed libraries

Library Before After Change
xgameruntime 15/391 (3.84%) 23/391 (5.88%) +2.05%
**@⁠github-actions[bot]** on GitHub · 2026-11-21 08:32 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10#issuecomment-7059980365) <!-- progress-report --> ### Progress report (60b902f → f79f11d) 📈 **Libraries**: 15.54% (+1.8018%, +8 implemented functions) <details> <summary>✅ 8 implemented</summary> | Library | Name | | - | - | | xgameruntime | `XAsyncBegin` | | xgameruntime | `XAsyncCancel` | | xgameruntime | `XAsyncComplete` | | xgameruntime | `XAsyncGetResult` | | xgameruntime | `XAsyncGetResultSize` | | xgameruntime | `XAsyncGetStatus` | | xgameruntime | `XAsyncRun` | | xgameruntime | `XAsyncSchedule` | </details> #### Changed libraries | Library | Before | After | Change | | - | - | - | - | | xgameruntime | 15/391 (3.84%) | 23/391 (5.88%) | +2.05% |
Author
Owner

@⁠CaseReed on GitHub · 2026-11-21 08:35 UTC · original

Thanks for the review and for running the MinGW build. Fixed in f79f11d: XAsyncSchedule now clears workScheduled under the registry mutex when the submit fails, and e2e_async schedules twice on a terminated queue and expects E_ABORT both times (the case fails with the fix removed). The reference keeps its flag set there, so I recorded the divergence in the debt fragment. Rebased onto main: the PR now shows the XAsync commit and this fix. Rebuilt with MSVC 19.38, 34/34, and CI is green on the new head.

**@⁠CaseReed** on GitHub · 2026-11-21 08:35 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10#issuecomment-7060015030) Thanks for the review and for running the MinGW build. Fixed in `f79f11d`: `XAsyncSchedule` now clears `workScheduled` under the registry mutex when the submit fails, and `e2e_async` schedules twice on a terminated queue and expects `E_ABORT` both times (the case fails with the fix removed). The reference keeps its flag set there, so I recorded the divergence in the debt fragment. Rebased onto `main`: the PR now shows the XAsync commit and this fix. Rebuilt with MSVC 19.38, 34/34, and CI is green on the new head.
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 08:37 UTC · original · approved these changes

Reviewed — looks good

Merging as it is. The one open point, XAsyncSchedule after a failed submit, is mine to settle: I'll restore the reference behaviour (E_UNEXPECTED on the second call) in a follow-up commit on main, with your scenario adjusted and the debt entry removed, so you don't need another round.

What I ran

Head f79f11d, rebased on main (60b902f). MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10, clean build directory.

Results

Check Result Note
MinGW full build passed no warnings
CTest passed 34/34
e2e_async, repeated passed 30/30, 4 in parallel
tools/check_conventions.py, tools/debt_fold.py --check passed 3 fragments apply cleanly
CI (Windows, relinker on Linux and macOS, conventions, progress) passed

Findings

Blocking

None.

Non-blocking

  • XAsyncSchedule clears its scheduled flag after a failed submit, where AsyncLib.cpp keeps it set. Follow-up on main, as above.

Not verified

The E_OUTOFMEMORY paths and console behaviour, as recorded in debt.

Thanks for a careful and very well tested implementation.

**@⁠Dark3581** on GitHub · 2026-11-21 08:37 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10#pullrequestreview-6004186666) · **approved these changes** # Reviewed — looks good Merging as it is. The one open point, `XAsyncSchedule` after a failed submit, is mine to settle: I'll restore the reference behaviour (`E_UNEXPECTED` on the second call) in a follow-up commit on `main`, with your scenario adjusted and the debt entry removed, so you don't need another round. ## What I ran Head `f79f11d`, rebased on `main` (`60b902f`). MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10, clean build directory. ## Results | Check | Result | Note | | - | - | - | | MinGW full build | passed | no warnings | | CTest | passed | 34/34 | | `e2e_async`, repeated | passed | 30/30, 4 in parallel | | `tools/check_conventions.py`, `tools/debt_fold.py --check` | passed | 3 fragments apply cleanly | | CI (Windows, relinker on Linux and macOS, conventions, progress) | passed | | ## Findings ### Blocking None. ### Non-blocking - `XAsyncSchedule` clears its scheduled flag after a failed submit, where `AsyncLib.cpp` keeps it set. Follow-up on `main`, as above. ## Not verified The `E_OUTOFMEMORY` paths and console behaviour, as recorded in debt. Thanks for a careful and very well tested implementation.
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 08:39 UTC · original

Follow-up landed in 81a02cc: XAsyncSchedule keeps its flag set after a refused submit, as AsyncLib.cpp does. Your scenario now expects E_ABORT and then E_UNEXPECTED (it fails if the flag is cleared again), and the debt entry is gone. Thanks again.

**@⁠Dark3581** on GitHub · 2026-11-21 08:39 UTC · [original](https://github.com/Dark3581/AnyBox/pull/10#issuecomment-7060065004) Follow-up landed in 81a02cc: `XAsyncSchedule` keeps its flag set after a refused submit, as `AsyncLib.cpp` does. Your scenario now expects `E_ABORT` and then `E_UNEXPECTED` (it fails if the flag is cleared again), and the debt entry is gone. Thanks again.
This discussion has been locked. Commenting is limited to contributors.
No description provided.