registry: classify libHttpClient.GDK.dll HRESULT imports (RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY) #1465

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

@⁠piyonchu on GitHub · 2026-11-25 00:47 UTC · original
piyonchu:pr/unimpl-libhttpclient-classify → main · +23 −0 · 2 files · 1 commits · open

Claimed in the coordination issue as: RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY

Summary

  • Measures from game_scarlett_master.exe import and call-site analysis show 38 libHttpClient.GDK.dll imports (53 direct call/jump sites), with HCInitialize, HCCleanupAsync, and HCHttpCallCreate callers immediately testing test eax, eax; js ... (HRESULT < 0). When bundled libHttpClient.GDK.dll is absent (or gta6rt --dry-run is run on the executable alone), classify_import() previously returned ReturnClass::Other (0 / S_OK) for all 38 imports (unimplemented by return policy: hresult=0 other=72), leaving out-parameters untouched under LEONIDA_UNIMPLEMENTED=fail.
  • Classify the Microsoft GDK libHttpClient HRESULT-returning functions under libhttpclient.gdk.dll in runtime/shims/registry.cpp (HCInitialize, HCCleanupAsync, HCSettingsGetTraceLevel, HCHttpCallCreate, HCHttpCallCloseHandle, HCHttpCallPerformAsync, HCHttpCallGetRequestUrl, HCHttpCallSetTracing, HCHttpCallRequest*, and HCHttpCallResponse*), while keeping HCHttpCallDuplicateHandle (returns HCCallHandle), HCTraceImplMessage (void), and HCTraceSetEtwEnabled (void) as ReturnClass::Other.
  • Add unit tests for the new libhttpclient.gdk.dll ReturnClass::HResult / ReturnClass::Other rules in runtime/test/unimplemented_policy_test.cpp.

Verification

  • Built with MSVC (RelWithDebInfo, Windows 11, CPU-only build without Vulkan headers) and ran ctest -C RelWithDebInfo -R "^unimplemented_policy$" --output-on-failure: 1/1 passed (unimplemented_policy).
  • Verified gta6rt.exe --dry-run against a local game_scarlett_master.exe now reports unimplemented by return policy: hresult=35 other=37 (up from hresult=0 other=72).
  • python -I tests/test_build_runtime_fallback.py and python -I tests/test_text_write_line_endings.py (run below before commit).
  • git diff --check: clean.

AI-assisted; synthetic tests + --dry-run import check on Windows 11 (CPU-only build; no game files included).

**@⁠piyonchu** on GitHub · 2026-11-25 00:47 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1465) `piyonchu:pr/unimpl-libhttpclient-classify` → `main` · +23 −0 · 2 files · 1 commits · open Claimed in the coordination issue as: RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY ### Summary - Measures from `game_scarlett_master.exe` import and call-site analysis show 38 `libHttpClient.GDK.dll` imports (`53` direct call/jump sites), with `HCInitialize`, `HCCleanupAsync`, and `HCHttpCallCreate` callers immediately testing `test eax, eax; js ...` (`HRESULT < 0`). When bundled `libHttpClient.GDK.dll` is absent (or `gta6rt --dry-run` is run on the executable alone), `classify_import()` previously returned `ReturnClass::Other` (`0` / `S_OK`) for all 38 imports (`unimplemented by return policy: hresult=0 other=72`), leaving out-parameters untouched under `LEONIDA_UNIMPLEMENTED=fail`. - Classify the Microsoft GDK `libHttpClient` `HRESULT`-returning functions under `libhttpclient.gdk.dll` in `runtime/shims/registry.cpp` (`HCInitialize`, `HCCleanupAsync`, `HCSettingsGetTraceLevel`, `HCHttpCallCreate`, `HCHttpCallCloseHandle`, `HCHttpCallPerformAsync`, `HCHttpCallGetRequestUrl`, `HCHttpCallSetTracing`, `HCHttpCallRequest*`, and `HCHttpCallResponse*`), while keeping `HCHttpCallDuplicateHandle` (returns `HCCallHandle`), `HCTraceImplMessage` (`void`), and `HCTraceSetEtwEnabled` (`void`) as `ReturnClass::Other`. - Add unit tests for the new `libhttpclient.gdk.dll` `ReturnClass::HResult` / `ReturnClass::Other` rules in `runtime/test/unimplemented_policy_test.cpp`. ### Verification - Built with MSVC (`RelWithDebInfo`, Windows 11, CPU-only build without Vulkan headers) and ran `ctest -C RelWithDebInfo -R "^unimplemented_policy$" --output-on-failure`: **1/1 passed** (`unimplemented_policy`). - Verified `gta6rt.exe --dry-run` against a local `game_scarlett_master.exe` now reports `unimplemented by return policy: hresult=35 other=37` (up from `hresult=0 other=72`). - `python -I tests/test_build_runtime_fallback.py` and `python -I tests/test_text_write_line_endings.py` (run below before commit). - `git diff --check`: clean. *AI-assisted; synthetic tests + `--dry-run` import check on Windows 11 (CPU-only build; no game files included).*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:52:29 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-25 07:24 UTC · original

Independent verification (CPU-only): built unimplemented_policy_test + console_registry_test on native Windows and ran ctest -R "unimplemented_policy|console_registry|file_system" — 3/3 pass. Confirmed classify_import lowercases the DLL name so libHttpClient.GDK.dll matches, and function names compare against canonical GDK spellings consistently with existing rules. HCHttpCallDuplicateHandle/HCTraceImplMessage/HCTraceSetEtwEnabled correctly stay Other. AI-assisted verification.

**@⁠whoalin1** on GitHub · 2026-11-25 07:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1465#issuecomment-7155819563) Independent verification (CPU-only): built `unimplemented_policy_test` + `console_registry_test` on native Windows and ran `ctest -R "unimplemented_policy|console_registry|file_system"` — 3/3 pass. Confirmed `classify_import` lowercases the DLL name so `libHttpClient.GDK.dll` matches, and function names compare against canonical GDK spellings consistently with existing rules. `HCHttpCallDuplicateHandle`/`HCTraceImplMessage`/`HCTraceSetEtwEnabled` correctly stay `Other`. AI-assisted verification.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1465'
git switch 'github-bot/gh-1465'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1465'
git switch 'github-bot/gh-1465'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1465'
git switch 'main'
git merge --squash 'github-bot/gh-1465'
git switch 'main'
git merge --ff-only 'github-bot/gh-1465'
git switch 'main'
git merge 'github-bot/gh-1465'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.