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

Merged
piyonchu merged 1 commit from upstream-pr/1465 into main 2026-11-28 20:18:43 +00:00
piyonchu commented 2026-11-25 00:47:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by piyonchu on 2026-11-25T00:47:11Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5482927641 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1465). Originally posted by [piyonchu](https://github.com/piyonchu) on 2026-11-25T00:47:11Z. --- 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).*
whoalin1 commented 2026-11-25 07:24:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T07:24:10Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7155819563 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1465#issuecomment-7155819563). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T07:24:10Z. --- 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.
MoonEyes commented 2026-11-28 20:18:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T20:18:41Z.


Red/green: On main unimplemented_policy_test fails because HCInitialize and HCCleanupAsync from libHttpClient.GDK.dll are not classified as HRESULT, and with the PR ctest -R ^unimplemented_policy$ passes on Windows 11 at OreoFR's (RTX 4070).
Independent tester (OreoFR, RTX 4070, Windows 11): PR head merged with the other PRs of its batch on main c1ecf04ed, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7245192430 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1465#issuecomment-7245192430). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T20:18:41Z. --- Red/green: On main unimplemented_policy_test fails because HCInitialize and HCCleanupAsync from libHttpClient.GDK.dll are not classified as HRESULT, and with the PR ctest -R ^unimplemented_policy$ passes on Windows 11 at OreoFR's (RTX 4070). Independent tester (OreoFR, RTX 4070, Windows 11): PR head merged with the other PRs of its batch on main c1ecf04ed, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.
OreoFR commented 2026-11-28 21:51:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:51:34Z.


Verified by OreoFR

  • Base: main c1ecf04ed + PR head 3e551e5cf; green run in a merge package of 12 PRs, no new ctest failure vs main
  • Test: ctest -R ^unimplemented_policy$
  • Red on main: FAIL (HCInitialize, HCCleanupAsync not classified as hresult)
  • Green with the PR: OK
  • Verdict: READY (registry.cpp and unimplemented_policy_test.cpp are also touched by #1206)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246325309 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1465#issuecomment-7246325309). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:51:34Z. --- **Verified by OreoFR** - Base: main `c1ecf04ed` + PR head `3e551e5cf`; green run in a merge package of 12 PRs, no new ctest failure vs main - Test: `ctest -R ^unimplemented_policy$` - Red on main: FAIL (HCInitialize, HCCleanupAsync not classified as hresult) - Green with the PR: OK - Verdict: READY (registry.cpp and unimplemented_policy_test.cpp are also touched by #1206) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
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
ProjectLeonida/mandy!1465
No description provided.