Skip to content

feat(libSceHttp): implement sceHttpSetHttp09Enabled and sceHttpSetDelayBuildRequestEnabled - #15401

Closed
Jawschamp wants to merge 1 commit into
boykopovar:mainfrom
Jawschamp:feat/http-option-setters
Closed

Jawschamp wants to merge 1 commit into
boykopovar:mainfrom
Jawschamp:feat/http-option-setters

Conversation

@Jawschamp

Copy link
Copy Markdown
Contributor

What

Implements sceHttpSetHttp09Enabled and sceHttpSetDelayBuildRequestEnabled (libSceHttp NIDs pk0AuomQM1o and 22buO-UufJY), which threw NotImplemented_nid_no_patch. They follow sceHttpCacheRedirectedConnectionEnabled in src/Options.cpp: ERROR_BEFORE_INIT (0x80431001) while no sceHttpInit context is alive, ERROR_INVALID_ID (0x80431100) for an id that is not a live template, connection or request, otherwise 0. The value is accepted as given and not kept: no request reaches the network, so HTTP/0.9 response parsing and delayed request building change nothing, and no getter reads them back. The declarations stay as they were in Http.hpp, with the parameter renamed to enable.

The behaviour is not measured on a PS5. The signature (int id, int enable) follows shadPS4, which only logs and returns 0; the order of the checks follows the neighbouring option calls, and whether the console refuses values above 1 as sceHttpSetCookieEnabled does is unverified. docs/dev/debt/libSceHttp.md gets a silent-stub entry that states this. The libSceHttp debt file keeps no export count, so there is no count to change.

guest_http_options is extended: both setters accept a template, a connection and a request with 0, 1, -1 and 7, refuse an unknown id and id 0 with ERROR_INVALID_ID, and return ERROR_BEFORE_INIT after the last sceHttpTerm.

Tested

Linux x86_64, GCC 14.2 (g++ extracted from Debian trixie packages), -DBUILD_TESTING=ON, full configure with all submodules. Hardware and titles: not tested.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

…ayBuildRequestEnabled

Replace the NotImplemented placeholders with the offline option setters of
sceHttpCacheRedirectedConnectionEnabled: BEFORE_INIT without a live context,
INVALID_ID for an unknown object, 0 for a live template, connection or
request. The unverified behaviour is recorded in the libSceHttp debt file.

@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 — changes requested

Both setters are success-only no-ops without the title-specific UI unblock required for a silent stub, and the test pins unmeasured value handling.

What I ran

Reviewed exact head d120593f744aeec02bd7ec03346862b12b56ee64 against base d1ae628bc2f62459cce1e9872ba5632c938c71f2. The merge preview against that base was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. The author reports Linux x86_64/GCC 14.2 builds and focused tests; I did not independently run them.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15401
python3 tools/pr_abi_audit.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head d120593f744aeec02bd7ec03346862b12b56ee64 --json
git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...d120593f744aeec02bd7ec03346862b12b56ee64
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/tests/GuestHttpOptions.cpp
git grep -n -E 'guest_http_options|GuestHttpOptions.cpp' refs/review/15401/20261103 -- core/libs
 gh pr checks 15401 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff and conventions passed Exact-head checks passed.
Base merge preview passed Clean against the recorded base.
Export audit passed No declaration or definition mismatch found.
Test registration passed The existing guest_http_options target includes this test.
Test-quality heuristic failed It flagged registration; manual CMake inspection confirmed the test is registered.
Hosted checks not run All reported jobs were pending at the final refresh.
Build and CTest not run No local compilation or runtime tests.
Precheck, local helper, registration and hosted-check output

The precheck's overall status was checks failed because its isolated PR worktree does not contain the optional local reviewer helper scripts. The ABI audit and test-quality heuristic were also run from the reviewer checkout as shown above.

# Precheck rows
| diff_check | passed | git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...d120593f744aeec02bd7ec03346862b12b56ee64 |
| conventions_and_pr_template | passed | All conventions checks passed. |
| changed_export_abi_audit | failed | /usr/bin/python3: can't open file '.../tools/pr_abi_audit.py': [Errno 2] No such file or directory |
| live_dependency_and_mergeability_check | passed | PR #15401: clean against current base; no declared dependencies. |
| test_quality_heuristics | failed | /usr/bin/python3: can't open file '.../tools/pr_test_quality.py': [Errno 2] No such file or directory |
# Local ABI audit summary
{
  "status": "passed",
  "findings": []
}
# Test-quality heuristic finding
{
  "path": "core/libs/tests/GuestHttpOptions.cpp",
  "line": 1,
  "kind": "possible-unregistered-cpp-test",
  "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
}
# Manual CMake registration
refs/review/15401/20261103:core/libs/prx/libSceHttp/CMakeLists.txt:42:    add_test_executable(guest_http_options_tests ${LIBS_INCLUDE_DIR}/tests/GuestHttpOptions.cpp)
refs/review/15401/20261103:core/libs/prx/libSceHttp/CMakeLists.txt:46:    add_test(NAME guest_http_options COMMAND guest_http_options_tests)
# Hosted checks at final refresh
conventions pending
eligibility pending
intake pending
labels pending
library-portability pending
report pending

Negative control

I did not run a negative control; this C++ test requires the compiled PR head. The pending hosted jobs had not supplied a result.

Findings

Blocking

  • sceHttpSetHttp09Enabled and sceHttpSetDelayBuildRequestEnabled discard enable and return success for live objects. The PR says neither option changes behavior because no request reaches the network and declares Unblocks: none. The repository permits a silent stub only when it unblocks a title and affects only its UI. Please leave these exports throwing while behavior is unknown, or provide the required title-specific evidence that makes these UI-only silent stubs eligible.
  • GuestHttpOptions.cpp asserts both setters accept -1 and 7, although the PR explicitly says PS5 behavior for values above 1 is unverified and notes a neighboring setter may reject them. Remove assertions for unmeasured values or provide PS5 evidence before pinning this behavior.

Non-blocking

None.

Sources

Not verified

I did not build or run CTest locally, test PS5 behavior, or run a negative control. The author-reported Linux build and tests were not independently reproduced. All hosted checks were pending at the final status refresh.

To get this to a good state

Keep unknown behavior throwing unless the silent-stub rule is satisfied, and remove or substantiate the -1/7 assertions. I will rerun the same no-build checks and review the exact new head after an update.

@MarcZX10

MarcZX10 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Re-checked — corrected evidence formatting

The prior review's collapsed block abbreviated the precheck output and omitted part of the heuristic output; the findings and results remain unchanged, and the exact recorded outputs are below.

What I ran

I reran the local ABI summary and test-quality helper at head d120593f744aeec02bd7ec03346862b12b56ee64 against base d1ae628bc2f62459cce1e9872ba5632c938c71f2 to capture their complete output. No build or CTest was run.

python3 tools/pr_abi_audit.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head d120593f744aeec02bd7ec03346862b12b56ee64 --json | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps({"status":d.get("status"),"findings":d.get("findings")},indent=2))'
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/tests/GuestHttpOptions.cpp

Results

Check Result Note
ABI audit passed No findings in the local audit summary.
Test-quality heuristic failed It flagged registration; manual CMake inspection confirmed it is registered.
Precheck helper availability failed The isolated PR snapshot lacks the two local reviewer scripts.
Exact recorded output
All conventions checks passed.
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15401-d120593f744a/head-d120593f744a-a9c2f68e/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15401-d120593f744a/head-d120593f744a-a9c2f68e/tools/pr_test_quality.py': [Errno 2] No such file or directory
{
  "status": "passed",
  "findings": []
}
{
  "findings": [
    {
      "path": "core/libs/tests/GuestHttpOptions.cpp",
      "line": 1,
      "kind": "possible-unregistered-cpp-test",
      "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
    }
  ],
  "negative_control_candidates": [],
  "limits": [
    "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
    "A test that passes against base is not by itself proof that the PR test is inadequate.",
    "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
  ]
}
refs/review/15401/20261103:core/libs/prx/libSceHttp/CMakeLists.txt:42:    add_test_executable(guest_http_options_tests ${LIBS_INCLUDE_DIR}/tests/GuestHttpOptions.cpp)
refs/review/15401/20261103:core/libs/prx/libSceHttp/CMakeLists.txt:46:    add_test(NAME guest_http_options COMMAND guest_http_options_tests)
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41584254801/job/125745961108
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41584255117/job/125745960262
intake	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41584254677/job/125745960738
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41584254646/job/125745960395
library-portability	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41584255598/job/125745961388
report	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41584255088/job/125745959583

The changes-requested findings in the review remain the same.

@Jawschamp Jawschamp closed this Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head d120593 merged onto main 7feb37e · tested 2026-11-03 06:03 UTC · 18 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,126 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 7 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,137 of 3,743 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (539 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.5 s, ⚠️ public_headers 76.8 s, ⚠️ agc_driver_image_sample_unnormalized 46.6 s, ⚠️ agc_driver_lazy_resolved_abi 43.1 s, ⚠️ agc_driver_sample_multisample_target 33.3 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 5 of the last 7 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
Validated but not compared (1, not in the main baseline's validation pass)
trace_digest_TraceDigestTests_test_cli_rejects_invalid_event_fields_without_partial_output
Validation IDs already present on main (4 IDs in 460 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (460 tests): agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, agc_driver_bindless_images, and 452 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (7)
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
Reproduce
git fetch origin d120593f744aeec02bd7ec03346862b12b56ee64 7feb37ee3e30e10139b483fb4df689d5b5b69ab8
git checkout 7feb37ee3e30e10139b483fb4df689d5b5b69ab8 && git merge --no-ff d120593f744aeec02bd7ec03346862b12b56ee64
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Progress report (d1ae628 → d120593)

📈 System libraries: 26.48% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceHttp sceHttpSetDelayBuildRequestEnabled
libSceHttp sceHttpSetHttp09Enabled

Changed libraries (implemented exports)

Library Before After Change
libSceHttp 94/123 (76.42%) 96/123 (78.05%) +1.63%

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.

3 participants