Skip to content

Add cancellable IPv4 resolver operations (depends on #846) - #956

Draft
RobiiAragon wants to merge 6 commits into
seedds:mainfrom
RobiiAragon:codex/upstream-cancellable-resolver
Draft

RobiiAragon wants to merge 6 commits into
seedds:mainfrom
RobiiAragon:codex/upstream-cancellable-resolver

Conversation

@RobiiAragon

@RobiiAragon RobiiAragon commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What and why

I implement the SDK C/C++ cancellable IPv4 GetHostByName calls with real Apple DNSService operations. Each query owns its result and native reference on one serial queue; cancellation and finalization retire the operation, and a queued cancellation cannot affect a later query reusing its ID.

I keep synchronous GetAddrInfo and default offline behavior unchanged. Numeric answers require no DNS query. I add no provider routing, account state or authorization UI.

Dependency and draft scope

I am stacking this contribution on #846 for its native socket backend and blocking HLE entry, and on the small synthetic-fixture correction in #958. GitHub’s main-based Files changed view includes both dependencies.

My resolver contribution alone is eight files, 445 added / 6 removed lines: isolated comparison.

I refreshed this draft onto main 1ae435d5 plus #958. The four #846 commits and the resolver commit replay unchanged (git range-diff), and I did not alter #846’s branch. I will rebase only the resolver contribution onto main after its dependencies are integrated; I keep this PR as a draft until then.

Checked

  • I reran 333 synthetic callback checks, the real Apple DNSService localhost smoke and the complete local-network fixture target on the refreshed stack; all pass. The original resolver validation also passes ASan/UBSan and TSan.
  • On the original contribution baseline I also passed sanitized LAN/LDN fixtures, the complete host tests, a host link with 999 unique forced hooks, all 190 iOS source compiles, 11 docs tests and LLVM 23.1.4 checks of the affected sources. The fresh GitHub checks apply to the refreshed head.
  • My negative controls catch cancellation becoming a no-op and mutation by a late callback.
  • I used an Apple M5 Max, macOS 27.2 and Xcode 27.2. I have not requalified game routes, the full Metal GPU fixture suite or Internet gameplay on this upstream revision.

Docs

  • I added the resolver lifetime finding to docs/reference/services.md and regenerated the symptom index.
  • No game files, keys, credentials or extracted game data are included.

I did not change the shader chain.

Translate the Horizon IPv4 socket ABIs, retain generation-safe descriptor lifetimes and bound local discovery. Publish real guest contexts across blocking hooks using the existing per-thread gate stack. Add LDN discovery, membership and lifecycle plus local play-history registration from privately imported resources. Preserve upstream offline account and TLS boundaries.

Synthetic and real loopback fixtures, ASan/UBSan, the full host suite, the production HLE registry, iPhoneOS compilation and synthesized resource-decoder tests pass. Mario Kart 3.0.5 hardware results are owner reports from the originating fork, documented separately from this rebased branch. No frontend, Nextendo integration or game/firmware data is included.
Keep the test thread heap-owned like production, release its handle after joining, and include it in the local-network test target. Stop socket fixtures at failed prerequisites rather than continuing with invalid descriptors.
Add the system permission description required by the native socket transport. Remove redirect-only resolver bookkeeping from the upstream local-only backend; no routing provider or UI is included.
Use owned DNSService queries and cancellation identities instead of leaving resolver work and late completions alive. Retire native references on one serial queue, fence finalization, and retain the offline and synchronous resolver paths.
@RobiiAragon
RobiiAragon force-pushed the codex/upstream-cancellable-resolver branch from 5f36cc4 to 3d1991d Compare November 2, 2026 12:00
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.

1 participant