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

Merged
leonida/mandy
piyonchu merged 1 commit from pr/unimpl-libhttpclient-classify into main 2026-11-28 20:18:43 +00:00

Pull request successfully merged and closed

piyonchu commented 2026-11-25 00:47:11 +00:00

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

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

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.

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

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.

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

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

**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 description provided.