Skip to content

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

Merged
MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
piyonchu:pr/unimpl-libhttpclient-classify
Nov 28, 2026
Merged

MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
piyonchu:pr/unimpl-libhttpclient-classify

Conversation

@piyonchu

Copy link
Copy Markdown
Contributor

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
piyonchu force-pushed the pr/unimpl-libhttpclient-classify branch from 4fed2ee to 3e551e5 Compare November 25, 2026 02:34
@whoalin1

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Collaborator

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 c1ecf04, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.

@MoonEyes
MoonEyes merged commit 73d9383 into ProjectLeonida:main Nov 28, 2026
5 of 12 checks passed
@OreoFR

OreoFR commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Verified by OreoFR

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants