Skip to content

fix(libSceHttp2): retry a failed lookup the number of times sceHttp2SetResolveRetry sets - #11617

Merged
adriadam10 merged 4 commits into
boykopovar:mainfrom
milescoviello:fix/http2-resolve-retry
Oct 30, 2026
Merged

adriadam10 merged 4 commits into
boykopovar:mainfrom
milescoviello:fix/http2-resolve-retry

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

With #11616, MXGP 26 (PPSA30839) gets past sceHttp2GetMemoryPoolStats and exits 8 s after launch:

what():  sceHttp2SetResolveRetry not implemented

sceHttp2SetResolveRetry throws for any nonzero count. MXGP sets the count it keeps in its HTTP module's state on each template; Super Meat Boy 3D (PPSA31162) makes the same call. The count only matters when a lookup fails, and a failed lookup still throws here because its console error mapping is unknown. So the change is to keep the count and try the lookup up to that many more times before failing.

Call sites (the 25 bytes ending at each call's opcode occur once in the title's eboot.bin): MXGP 26 01.003.000 at 0x13A3B40, Super Meat Boy 3D 02.000.001 at 0x14123AC.

How

  • Transport.hpp: Settings gains resolveRetry, so a request copies it from its template like the other settings.
  • Export.cpp: sceHttp2SetResolveRetry stores the count. A negative count still throws, since what the console does with one is not known.
  • Transport.cpp: Connect submits the lookup up to resolveRetry + 1 times, each attempt with its own resolve deadline. It rethrows the last failure only after the final attempt.
  • GuestHttp2.cpp: a count of 3 now returns 0 and -1 throws.
  • Test hook: Transport.cpp's resolver worker calls an optional lookup hook before getaddrinfo; a nonzero return fails that lookup. Export.cpp exports the hook setter as Http2SetLookupHook_nid_no_patch, since the transport is a static library with hidden symbols.
  • GuestHttp2Transport.cpp, new Retries scenario with a counting hook:
    • With a count of 2, the first two lookups fail; the request succeeds, reads its body, and exactly 3 lookups were made.
    • With counts 0 and 1, every lookup fails; the send throws after exactly count + 1 lookups.
    • The success scenarios also set a count of 2 on the loopback template.
  • docs/dev/debt/libSceHttp2.md: the TLS-settings entry now lists negative resolve retries as throwing and says what a count does.

Merge order. Checked with git merge-tree --write-tree against the current heads (#11575 d847910c69, #11611 b5eebed6ca, #10536):

  1. fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616, then this PR. This branch is stacked on fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616, because both change the same debt line.
  2. feat(http2): deliver redirect callbacks and follow HTTPS redirects #11575 (redirect callbacks): merges cleanly with this PR and with fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616, in either order. Earlier heads of this branch put the lookup hook next to CreateRequest_nid_no_patch, whose signature feat(http2): deliver redirect callbacks and follow HTTPS redirects #11575 changes. The hook now lives at the top of Transport.hpp, and Transport.cpp only gains the hook call and the retry loop.
  3. feat(http2): support synchronous HTTP/1.0 and HTTP/1.1 requests #11611 and feat(libSceHttp2): implement request option getters, header removal a… #10536: conflict with this PR and fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616 only on the TLS-settings entry of docs/dev/debt/libSceHttp2.md. Each rewrites other parts of that same line. Whichever lands second keeps the other's wording and these two PRs' sentences: the pool-stats sentence from fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616 and the resolve-retry clause from this PR.
  4. feat(http2): deliver redirect callbacks and follow HTTPS redirects #11575 and feat(http2): support synchronous HTTP/1.0 and HTTP/1.1 requests #11611 conflict with each other in the transport files, independently of these two PRs.

Tested

  • Rebased onto main 52c09d567d (MarcZX10's review): head d07f750857. main's request-options entry is kept in the debt file, and this PR's sentences replace only the resolve-retry ones. The 7 tests matching ^guest_http2 pass 3 of 3.

Linux (Ubuntu 26.04.1, GCC 15.2), Release.

  • Focused tests: the 48 tests of fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616's selection pass 3 of 3 on fe32b2a3c3, before the field move and the retry test. On this head cac330cff3, guest_http2, guest_http2_transport and guest_memory_pool_stats pass 3 of 3.
  • Retry-loop control: 52fd5f42aa (same loop and test as this head) with Connect back to a single lookup fails guest_http2_transport in the first Retries case: the send throws sceHttp2: DNS failed after the first failed lookup.
  • Red control: this branch's tests with fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616's Export.cpp abort in guest_http2 with sceHttp2SetResolveRetry not implemented.
  • MXGP 26: release libs, 600 s, controller input through APS5_PAD_INPUT_FILE.
    • On this branch (libs built from fe32b2a3c3) it passes sceHttp2SetResolveRetry and exits at 7 s on the next call, sceHttp2SetRedirectCallback not implemented.
    • On a local merge of this branch with feat(http2): deliver redirect callbacks and follow HTTPS redirects #11575, which implements redirect callbacks, it exits at 7 s on sceHttp2SendRequestAsync not implemented. Async requests are unimplemented on main.
  • Windows 11 VM (GT 1030, WinLibs GCC 15.2.0): guest_http2, guest_http2_transport and guest_memory_pool_stats pass 3 of 3 on both main 74acfad and 52fd5f42aa, the head before the hook moved to the header, including the hook exported from libSceHttp2.dll; the run of this head is in a comment below.
  • tools/check_conventions.py --base upstream/main passes.

God of War Ragnarök (PPSA08329 06.006.000), run by B-Howell on Windows 11 with an RTX 4080 SUPER (617.42), WinLibs GCC 15.2, Release: on main the title aborts 5 s after start with sceHttp2SetResolveRetry not implemented, with a non-zero retry count. With this PR (b5991e402f merged onto main 6e9b9134f6) it gets past that point and runs 150 s, to an unrelated AGC stop. None of 8 runs with this PR stopped in libSceHttp2.

Checklist

🤖 Generated with Claude Code

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 26, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head ee263a89964809faf2b0504ee46327db9aec56ed. Changes requested: exercise the retry path. The new transport test sets resolveRetry=2 on successful localhost lookups, so it only covers the first successful attempt. It would still pass if Connect() ignored the setting or never resubmitted a failed lookup. Please add a deterministic resolver test (for example, an injectable/counting lookup stub that fails once then succeeds, plus an exhausted-retry case) and assert the total lookup count is retry + 1. The loop in Connect() is the behavior this PR adds, so the current setter test and successful lookup scenarios do not validate it.

The dependency on #11616 is accurately declared; the hosted eligibility, conventions, intake, labels and report checks pass. Build/relinker/product checks are skipped by path policy. The author reports the focused Linux HTTP/2 tests and title progress, but neither forces a failed DNS lookup followed by a retry.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 11575 docs/dev/debt/libSceHttp2.md L31-33
PR 11586 docs/dev/debt/libSceHttp2.md L31-33
PR 11611 docs/dev/debt/libSceHttp2.md L31-33
PR 11630 core/libs/tests/GuestHttp2Transport.cpp L558
PR 11922 docs/dev/debt/libSceHttp2.md L32-33
PR 12306 docs/dev/debt/libSceHttp2.md L32-34

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 12456 core/libs/prx/libSceHttp2/Export.cpp
core/libs/prx/libSceHttp2/Transport.cpp
core/libs/prx/libSceHttp2/Transport.hpp
core/libs/tests/GuestHttp2.cpp
core/libs/tests/GuestHttp2Transport.cpp
docs/dev/debt/libSceHttp2.md

@milescoviello

Copy link
Copy Markdown
Contributor Author

@MarcZX10 you're right, the success scenarios never made a lookup fail. 52fd5f42aa adds a deterministic path:

  • The resolver worker calls an optional lookup hook before getaddrinfo, and a nonzero return fails that lookup. Export.cpp exports the setter as Http2SetLookupHook_nid_no_patch, because the transport library's symbols are hidden.
  • A new Retries scenario in guest_http2_transport uses a counting hook:
    • With a count of 2 and the first two lookups failing, the request succeeds, reads its body, and exactly 3 lookups were made.
    • With counts 0 and 1 and every lookup failing, the send throws after exactly count + 1 lookups.

Control: with Connect back to a single lookup and nothing else changed, guest_http2_transport fails in the first case. The send throws sceHttp2: DNS failed after the first failed lookup. On this head, guest_http2, guest_http2_transport and guest_memory_pool_stats pass 3 of 3.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed exact head 52fd5f42aa9116715126ba85d7104f24f7bcfd00. The new deterministic retry tests resolve my earlier request: they verify two failed lookups followed by success, and exhaustion after exactly retry-count + 1 attempts. Local git diff --check and tools/check_conventions.py --base upstream/main --head refs/review/11617 pass. I did not rerun the guest tests; the author reports the focused groups passing on Linux and Windows.

[P2] Resolve the current HTTP/2 integration conflicts and list the required order. I checked the current PR heads with git merge-tree --write-tree. #11617 merges cleanly with its declared base #11616, and #11575 merges cleanly with #11616; however, #11575 + #11617 conflict in core/libs/prx/libSceHttp2/Transport.cpp and Transport.hpp. #11611 + #11617 conflict in those two files and docs/dev/debt/libSceHttp2.md. The PR description currently says #11575 merges cleanly with #11617, which does not match these current-head results, and its Depends on line lists only #11616.

Please coordinate the merge order with #11575 and #11611, update the overlap statement, and record the dependencies/order needed to carry the retry change through those transport changes. I am not asking either contributor to close their work; the branches need an explicit integration plan before this can be approved.

@milescoviello

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks, the overlap line was out of date after the hook went in. In cac330cff3, the hook slot moved to the top of Transport.hpp, out of CreateRequest_nid_no_patch's neighbourhood. Transport.cpp now only gains the hook call in the resolver worker and the retry loop.

git merge-tree results on the current heads:

The order is now spelled out under Merge order in the description: #11616, then this PR, with #11575 at any point. On cac330cff3, guest_http2, guest_http2_transport and guest_memory_pool_stats pass 3 of 3; the Windows VM run of this head is in progress.

AI-assisted: yes (Claude Code)

@milescoviello

Copy link
Copy Markdown
Contributor Author

Windows 11 VM (GT 1030, WinLibs GCC 15.2.0, Release), this head cac330cff3 against main 74acfad. guest_http2, guest_http2_transport and guest_memory_pool_stats, 3 runs each:

  • main: 3 of 3 pass in all 3 runs.
  • This head: 3 of 3 pass in all 3 runs, with the lookup hook now in Transport.hpp.

AI-assisted: yes (Claude Code)

@milescoviello

Copy link
Copy Markdown
Contributor Author

Merged #11616's updated branch (a45f140d85, which merges main eece5da035) into this one (now b5991e402f; a merge, no force-push). The only conflict was the TLS-settings entry in docs/dev/debt/libSceHttp2.md. It keeps main's request-option wording and this PR's change: "negative resolve retries" throw, and "a failed lookup is retried up to the set count". I shortened that clause so the entry stays under 1000 characters (981). The code merged without conflicts.

At the merge, Linux Release, 3 runs each: guest_http2, guest_http2_transport (including Retries), guest_http2_options, guest_http2_cookies and guest_memory_pool_stats all pass: all 3 runs pass for each. check_conventions.py --base upstream/main passes.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 27, 2026
@B-Howell

Copy link
Copy Markdown
Contributor

Tested on God of War Ragnarök (PPSA08329, 06.006.000). Windows 11 Pro 26300, Ryzen 7 7800X3D, RTX 4080 SUPER (617.42), WinLibs GCC 15.2.0, Release.

  • Without this PR (libraries from main 6d40d8e527; sceHttp2SetResolveRetry is unchanged on main 6e9b9134f6), the title aborts 5 s after start with sceHttp2SetResolveRetry not implemented, called with a non-zero retry count.
  • With this PR (b5991e402f merged onto main 6e9b9134f6), the title gets past that point and runs 150 s, until an unrelated AGC stop. With fix(agc): keep buffer owners when a staged address space dissolves #10304 also merged, it runs about 225 s and presents frames. None of the 8 runs with this PR stopped in libSceHttp2.

Not checked: whether the title's lookups actually retry, since the machine resolves normally. I didn't run the guest tests.

AI-assisted (Claude Code).

@milescoviello

Copy link
Copy Markdown
Contributor Author

@B-Howell thanks, a title that stops on this call is the test this PR needed. I've added your God of War Ragnarök result to Tested and the title to Unblocks.

AI-assisted: yes (Claude Code)

@adriadam10 adriadam10 self-assigned this Oct 28, 2026
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 28, 2026 14:24

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

@edubox

edubox commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Hot Wheels (PPSA22408) is another title that sets a non-zero count and stops on main:

I did not exercise the failed-lookup path: this title's lookups resolve, so only the stored-count path ran.

Host: CachyOS, kernel 7.3.0-3, GCC 16.2.1, RTX 4080 SUPER (615.78.08), Vulkan 1.4.351. Release build, own dump.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — approved

The change merges cleanly onto current main. It builds, the libSceHttp2 tests pass 3 of 3, and the new Retries scenario fails when Connect goes back to a single lookup. Nothing is blocking. Two notes on the debt entry are below.

What I ran

  • Head: b5991e402f5c6a053e914ab241edb656e10f5755
  • main: b433c40f2f46aa2e59e19806010a839ac8572d64 (#11616 is already merged into it, so the merged diff is only this PR's 6 files; GuestMemoryPoolStats.cpp no longer differs)
  • Linux in a clean worktree: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, Release, Ninja
git fetch origin main pull/11617/head:refs/review/11617
git checkout --detach origin/main
git merge --no-ff --no-edit refs/review/11617
git diff --check origin/main...refs/review/11617
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10 --target libSceHttp2 guest_http2_tests guest_http2_cookie_tests guest_http2_options_tests guest_http2_transport_tests guest_http2_teardown_tests
cmake --build build -j10 --target libs
ctest --test-dir build -j4 -R 'guest_http2|guest_memory_pool_stats' --output-on-failure   # 3 runs
ctest --test-dir build -R '^guest_http2_transport$' -V                                       # confirm the Retries scenario runs

Results

Check Result
Merge onto main Clean (automatic merges in Export.cpp, Transport.cpp, both tests and the debt file)
git diff --check Clean
check_conventions.py --base origin/main All conventions checks passed.
Build of the libSceHttp2 targets and libs OK
guest_http2, guest_http2_cookies, guest_http2_options, guest_http2_transport, guest_http2_early_response, guest_http2_system_roots, guest_http2_teardown, guest_memory_pool_stats 8 of 8 pass in each of 3 runs
Test time guest_http2_transport 5.4–5.6 s, well under its 30 s limit
Retries scenario reached HTTP2 resolve retry scenarios appears in the -V log
ctest, one of the three runs
2/8 Test #1973: guest_http2_options ..............   Passed    0.00 sec
3/8 Test  #443: guest_memory_pool_stats ..........   Passed    0.00 sec
4/8 Test #1972: guest_http2_cookies ..............   Passed    0.00 sec
5/8 Test #1971: guest_http2 ......................   Passed    0.00 sec
6/8 Test #1976: guest_http2_system_roots .........   Passed    0.18 sec
7/8 Test #1975: guest_http2_early_response .......   Passed    0.69 sec
8/8 Test #1974: guest_http2_transport ............   Passed    5.43 sec
100% tests passed out of 8

Negative control

Each control was run on the merged tree, and the files were restored afterwards. All 7 guest_http2* tests passed again after the restore.

  1. Export.cpp, Transport.cpp and Transport.hpp restored from main. guest_http2_transport_tests does not compile because Http2SetLookupHook_nid_no_patch is not declared. guest_http2, rebuilt on its own, aborts with what(): sceHttp2SetResolveRetry not implemented.
  2. Only the retry loop disabled. I replaced if (attempt >= settings.resolveRetry) std::rethrow_exception(...) with an unconditional rethrow and kept the hook. guest_http2_transport aborts in the first Retries case:
    HTTP2 resolve retry scenarios
      what():  sceHttp2: DNS failed; console error mapping is unknown not implemented
    

This confirms what MarcZX10 accepted in their second review: the test exercises the retry path. It matches the author's own control.

Findings

Blocking

None.

Non-blocking

  1. The retry semantics are a host-side choice, but the debt entry does not say so. docs/dev/debt/libSceHttp2.md:33 says "a failed lookup is retried up to the set count". It does not say this is unverified. On main, the libSceNet resolver's retry argument (docs/dev/debt/libSceNet.md:70) suggests the console count may mean DNS query retransmissions within one resolve timeout, not whole new lookups after a failure. Two consequences of the choice in core/libs/prx/libSceHttp2/Transport.cpp:328-338 are not recorded:

    • Every attempt gets a fresh resolveTimeout deadline (line 329), so a request with count N can wait up to (N + 1) × the resolve timeout.
    • A timed-out attempt throws from Check(deadline) and is not retried. Only a lookup that completes with a failure is.

    Per CONTRIBUTING ("an entry states the gap first … what is unverified"), please record this. The TLS-settings entry is at 981 characters, so one short sentence fits better in the error-paths entry at line 32. For example: "Resolve retries resubmit a failed lookup, each with its own resolve timeout; timed-out lookups are not retried, and the console's retry semantics are unverified."

  2. The production code now has a test seam. Http2SetLookupHook_nid_no_patch (core/libs/prx/libSceHttp2/Export.cpp:385) and the atomic load per lookup (Transport.cpp:166) are new. The cost is negligible, and GuestArena::GuestArenaSetHostReadHook_nid_no_patch is a precedent on main, so I see no change needed. I mention it so a maintainer can confirm the pattern is wanted here.

Not verified

  • Windows/MinGW build and tests, including the hook exported from libSceHttp2.dll (the author reports passing runs on a Windows VM).
  • Any title. The title results come from the author, B-Howell and edubox.
  • A real failing DNS lookup followed by a successful retry, rather than one simulated through the hook.
  • Whether the merge-order notes for #11575 and #11611 are still accurate on their current heads. I did not re-run git merge-tree against them.
  • No GPU path is touched, so I ran no Vulkan validation.

@milescoviello
milescoviello force-pushed the fix/http2-resolve-retry branch from 88d2c6f to 3eae6e6 Compare October 29, 2026 04:27
@milescoviello

Copy link
Copy Markdown
Contributor Author

@XairRrR thanks. I added the sentence to the error-paths entry, in the wording you suggested, shortened to fit the 1000-character limit: "A resolve retry resubmits a failed lookup with a new timeout; a timed-out lookup isn't retried. The console's retry semantics are unverified." That's 3eae6e67ea, docs only; the code and tests are unchanged. I left the lookup hook as it is, as you suggested.

AI-assisted: yes (Claude Code)

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The only change since my last review is 3eae6e67ea, a one-sentence addition to the libSceHttp2 error-paths debt entry. It resolves my first note, and the code and tests have not changed.

What changed since my last review

  • One new commit, 3eae6e67ea7f85157706c28665356fdd108294dc, on top of b5991e402f. It touches only docs/dev/debt/libSceHttp2.md (1 line changed). git diff b5991e402f 3eae6e67ea -- core is empty.
  • An author reply that explains the commit and leaves the lookup hook as it is.
  • The description and checklist have not changed in any way that matters here.

What I ran

  • Head: 3eae6e67ea7f85157706c28665356fdd108294dc
  • main: b433c40f2f46aa2e59e19806010a839ac8572d64. This is the same main as my previous review, so the merged code is identical to the tree I built and tested then.
  • A clean worktree on Arch Linux 7.2.11-zen.
git fetch origin main pull/11617/head:refs/review/11617
git diff --stat b5991e402f5c6a053e914ab241edb656e10f5755 refs/review/11617
git merge-tree --write-tree origin/main refs/review/11617
git checkout --detach origin/main
git merge --no-ff --no-edit refs/review/11617
git diff --check origin/main...refs/review/11617
python3 tools/check_conventions.py --base origin/main

I did not rebuild or rerun tests, because no code, test or build file changed.

Check Result
Merge onto main Clean
git diff --check Clean
check_conventions.py --base origin/main All conventions checks passed.
Error-paths entry length 996 characters, under the 1000 limit

Previous findings

  1. The debt entry did not say the retry semantics are a host-side choice. Resolved. docs/dev/debt/libSceHttp2.md:18 now ends: "A resolve retry resubmits a failed lookup with a new timeout; a timed-out lookup isn't retried. The console's retry semantics are unverified."

    I checked this sentence against Transport.cpp:328-338, and it matches the code:

    • Each attempt computes a new Deadline(settings.resolveTimeout).
    • A timeout throws from Check(deadline) before the retry test is reached.
    • Only a completed lookup with job->failure set loops again.
  2. The production code has a test seam (Http2SetLookupHook_nid_no_patch). No longer applies. This was a note for maintainers with no change requested, and the author left the hook as it is.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • The tests were not rerun on this head, because the merged code is byte-identical to the tree tested in my previous review. That review found the libSceHttp2 tests passing 3 of 3 and the Retries negative control failing.
  • Everything listed as not verified in my previous review still applies: Windows/MinGW, any title, and a real failing DNS lookup followed by a successful retry.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — changes requested

The prior review evidence supports the retry-count behavior and the documented title stops, but current main has since changed every source/test/debt path this PR touches; the last reported run is on an older integration and needs to be repeated after refreshing the branch.

What I ran

  • Compared head 3eae6e67ea7f85157706c28665356fdd108294dc with current main 52c09d567d2fa453494dd720fcf53a98149468e4.
  • Ran a current-main merge preview and inspected the same-path changes since the PR base.
  • Checked the exact-head test/title report, latest hosted check results, and the updated debt sentence added after review.

Results

Check Result
Current-main preview Clean; tree ab69af1ffd...
Branch base Merge base a45f140d85eaf787a199015712029f9231bb802e; current main is much newer
Same files changed on current main Export.cpp, Transport.cpp, GuestHttp2.cpp, GuestHttp2Transport.cpp, and docs/dev/debt/libSceHttp2.md
Prior focused evidence Reviewer reports guest_http2 passes 3/3 and the Retries scenario fails when retry is changed back to one lookup; based on main b433c40f2f46aa2e59e19806010a839ac8572d64
Latest hosted checks Windows, conventions, eligibility, labels and report pass; other build jobs skipped by path policy
Raw output
$ git merge-tree --write-tree refs/review/main-20261029b refs/review/pr-11617-20261029
ab69af1ffd...
exit=0
merge-base: a45f140d85eaf787a199015712029f9231bb802e
current main: 52c09d567d2fa453494dd720fcf53a98149468e4
changed-path intersection:
core/libs/prx/libSceHttp2/Export.cpp
core/libs/prx/libSceHttp2/Transport.cpp
core/libs/tests/GuestHttp2.cpp
core/libs/tests/GuestHttp2Transport.cpp
docs/dev/debt/libSceHttp2.md

Negative control

  • The previous reviewer reports reverting Connect to a single lookup makes the Retries scenario fail. I did not rerun it on the current-main tree.

Findings

Blocking

  • The reported tests were run on an older base (b433c40f2f46aa2e59e19806010a839ac8572d64), while current main changed both implementation files, both related test files and the debt entry. The merge preview is clean, but this retry change and its current test interactions have not been verified on the integrated tree. Please refresh the branch and rerun guest_http2 and the relevant transport tests, plus conventions, on the new exact head.

Non-blocking

  • The added debt sentence addresses the prior documentation note, and the earlier title reports support the measured retry-count use cases. The title's failed-lookup error mapping remains explicitly unverified in the debt entry.

Sources

Not verified

  • I did not run the focused tests or negative control on current main; the cited results come from another reviewer on an older integration. No title was run locally.

To get this to a good state

Rebase onto current main, rerun the HTTP/2 retry and transport tests plus conventions, and update Tested with the exact head/base and results. Then the earlier behavior and debt feedback can be cleared.

@milescoviello
milescoviello force-pushed the fix/http2-resolve-retry branch from 3eae6e6 to d07f750 Compare October 29, 2026 05:59
@milescoviello

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks. Rebased onto main 52c09d567d; the head is d07f750857.

  • main had changed the libSceHttp2 debt file under this PR. Its new request-options entry and the "except for the request options below" wording are kept. This PR's sentences replace only the resolve-retry ones: negative counts throw, and a failed lookup is retried up to the set count, each with a new timeout.
  • The code files rebased without conflicts.
  • At this head, the 7 tests matching ^guest_http2 pass 3 of 3 (Ubuntu 26.04.1, GCC 15.2).

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed — approved

I reviewed exact head d07f750857d8f43157bfcc798d61982f4e7c9c6d against current main 2960e9a6e7e1fc99c4ed180c71495b5eb83464c7.

What I ran

  • Inspected the current diff in the HTTP/2 export, transport, tests and debt entry.
  • Ran git merge-tree --write-tree refs/remotes/upstream/main refs/review/upstream-11617; it returned clean tree c777d60cec8e12c2261d76c914840a9fe8ddc745.
  • Ran git diff --check refs/remotes/upstream/main...refs/review/upstream-11617; exit 0, no output.
  • Checked commits to the changed paths between the author's tested base 52c09d567d and current main; there are none.
  • I did not run a local build or tests.

Results

Check Result
Current-main merge preview Clean
Diff check Pass
Exact-head HTTP/2 tests Author reports all 7 ^guest_http2 tests passing 3/3 on Ubuntu 26.04.1 / GCC 15.2 after the rebase
Hosted checks Windows, conventions, eligibility, labels and report pass; other product jobs are skipped
Retry-count negative control Earlier reviewer reported the retry case fails when Connect is restored to one lookup; not rerun on this head

Negative control

I did not run the negative control locally. The earlier reviewer-reported control remains applicable: changing the retry loop back to one lookup makes the retry scenario fail. The production and test changes are present in this rebased head, and the author reports the focused suite on this exact head.

Findings

Blocking

None. The branch now includes the mainline changes to all touched paths, preserves current-main debt text, and has a clean merge preview. The refreshed focused test result addresses my previous integration request.

Non-blocking

The console's mapping for a failed DNS lookup remains explicitly unverified in the debt entry; the PR does not claim that behavior is measured.

Sources

Not verified

I did not independently rebuild or run the HTTP/2 suite, run a title, or reproduce a failed lookup followed by a successful retry. The exact-head focused tests are author-reported; the current-main path comparison and merge/diff checks were run locally.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
milescoviello and others added 4 commits October 30, 2026 00:33
…etResolveRetry sets

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…solve

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s semantics are unverified

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriadam10
adriadam10 force-pushed the fix/http2-resolve-retry branch from d07f750 to 4e921aa Compare October 29, 2026 23:42

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — new head, looks good

The retry-count logic and deterministic failure/success cases remain in the current diff; the new header-based hook keeps the resolver and test seam on the same atomic slot.

What I ran

  • Exact PR head: 4e921aa0e302fb59053a4925718c0a7242def62a; PR base and current main: 1189ec3003672bb364dd9f3119ead7b3976e3c83.
  • Current-main merge preview is clean, tree 7fd72e0a24fbec617aa2d591493c865dfb95f2bc.
  • Environment: Linux workspace; no compiler or build was invoked.
git merge-tree --write-tree upstream/main refs/review/pr-11617-current
git diff --check upstream/main...refs/review/pr-11617-current
python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-11617-current

Results

Check Result
Current-main merge preview Clean
git diff --check Passed; no output
Conventions Passed
Retry failure/success cases Source review confirms two failed lookups then success uses three attempts, and exhaustion uses retry + 1; not run locally
Hosted Windows job Queued when refreshed
Product Linux and specialized jobs Skipped by workflow policy
Unedited local command output
$ git merge-tree --write-tree upstream/main refs/review/pr-11617-current
7fd72e0a24fbec617aa2d591493c865dfb95f2bc
$ git diff --check upstream/main...refs/review/pr-11617-current
[no output; exit status 0]
$ python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-11617-current
All conventions checks passed.

Not verified

I did not build or run the HTTP/2 tests locally. The author-reported focused tests are tied to the earlier d07f7508 head; the current hosted Windows job is queued. I found no source-level issue in the current retry loop or its test seam that requires delaying approval.

Sources

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
@B-Howell

Copy link
Copy Markdown
Contributor

Focused qualification of exact #11617 head 4e921aa0e302fb59053a4925718c0a7242def62a, base 1189ec3003672bb364dd9f3119ead7b3976e3c83:

  • Windows 11, WinLibs GCC 15.2.0 r7, Release: two selected cases, three repetitions each, 6 passes, no skips (10.56 s).
  • Ubuntu 22.04 / WSL, GCC 11.4.0, Release: the same 6 passes, no skips (17.29 s).

Built guest_http2_tests and guest_http2_transport_tests with --parallel 2; ran ctest --test-dir build -R '^(guest_http2|guest_http2_transport)$' --repeat until-fail:3 -V --no-tests=error.

The unchanged transport fixture verifies two injected lookup failures followed by success/body delivery on attempt three, and exhaustion after exactly one/two attempts for retry counts zero/one. The setter fixture also covers count three and a negative count. PE imports and ELF dependency/symbol records confirm the executable calls Http2SetLookupHook_nid_no_patch in the actual built shared libSceHttp2.prx; the resolver's atomic slot is in that production module. No copied transport implementation or helper-only relink was used.

This fills the captured exact-head execution gap: the successful hosted Windows job skipped its CTest step. Both local source trees stayed clean at the exact head with matching dependency pins. No unmerged cache-size guard or install workaround was applied; conventions and whitespace checks pass.

These are existing loopback TLS fixtures with in-memory test certificates and the production failure hook. No external DNS outage, title, GPU, console, system-root/CA-file mode, install or full-suite result is claimed. Earlier title/reference/negative-control reports retain their original pins; no additional mutant was needed for these existing counter assertions.

AI-assisted: yes (Codex).

@adriadam10
adriadam10 merged commit 0f25653 into boykopovar:main Oct 30, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the diff, the Retries scenarios (two failed lookups then success = 3 lookups; counts 0 and 1 with every lookup failing = count + 1) and the debt entries; clean merge onto current main, Conventions and Windows green, third-party Linux/Windows reviews and title runs agree; merged.

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

Labels

docs prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants