feat(libSceNKWebKit): implement WKNavigationAction and WKNavigationResponse queries #15177

Closed
adriaespii wants to merge 2 commits from upstream-pr/15177 into main
adriaespii commented 2026-11-02 20:04:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriaespii on 2026-11-02T20:04:45Z.


What

Implement WKNavigationAction and WKNavigationResponse queries in libSceNKWebKit:

  • WKNavigationActionShouldPerformDownload: returns boolean indicating whether the navigation should perform a download.
  • WKNavigationResponseCanShowMIMEType: returns boolean indicating whether the response MIME type can be displayed.

The NavigationAction and NavigationResponse host objects store the respective flags in memory; null or wrong-type references throw std::invalid_argument via NKWebKit::Cast.

Tested

check_conventions.py --base origin/main passed. Added test coverage in Base.cpp covering getter return values, state mutations, and null reference exception handling.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5126631168 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15177). Originally posted by [adriaespii](https://github.com/adriaespii) on 2026-11-02T20:04:45Z. --- ### What Implement `WKNavigationAction` and `WKNavigationResponse` queries in `libSceNKWebKit`: - `WKNavigationActionShouldPerformDownload`: returns boolean indicating whether the navigation should perform a download. - `WKNavigationResponseCanShowMIMEType`: returns boolean indicating whether the response MIME type can be displayed. The `NavigationAction` and `NavigationResponse` host objects store the respective flags in memory; null or wrong-type references throw `std::invalid_argument` via `NKWebKit::Cast`. ### Tested `check_conventions.py --base origin/main` passed. Added test coverage in `Base.cpp` covering getter return values, state mutations, and null reference exception handling. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-02 20:24:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T20:24:47Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The getters have no production-created data source: their flags default false and are only set in tests; the PR also conflicts with three open WebKit PRs while declaring no dependency.

What I ran

Reviewed PR #15177 at head 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c against base/current main 096c45570f516de76a43bbe1b97781381c84f55f; its individual merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. No local C++ build or CTest was run.

git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c
python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f --head 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c --title "feat(libSceNKWebKit): implement WKNavigationAction and WKNavigationResponse queries" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15177-183bb08cd12e/pr-body.md
python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 096c45570f516de76a43bbe1b97781381c84f55f --head 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c --json
python3 tools/pr_stack_check.py 15177 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15177-183bb08cd12e/stack
git merge-tree --write-tree 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c 39817b04a53c24dc3402970c6a458e64e0122f43
git merge-tree --write-tree 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c e237c24e599a15328e269d1fcc90370471a3fed2
git merge-tree --write-tree 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c 3ae71a60432f41d5d1370727a7e9e4fcf9741deb
git grep -n 'shouldPerformDownload\|canShowMIMEType\|Make<NKWebKit::NavigationAction>\|Make<NKWebKit::NavigationResponse>' 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c -- core/libs/prx/libSceNKWebKit
gh pr checks 15177 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff and conventions passed Clean diff; conventions passed.
ABI lexical audit passed No findings; this does not certify binary ABI correctness.
Individual base merge preview passed Clean against current base.
Runtime flag population failed No production constructor or writer for either flag was found.
Pairwise integration previews failed Conflicts with #15178, #15176 and #15175.
C++ tests not run Exact-head binaries require a build.
Hosted policy checks not run Conventions, eligibility, intake and portability passed; labels, report and Windows remain pending; specialized jobs were skipped.
Negative control not run No exact-head test binary was built.
Precheck results and raw outputs
Check Status Command / reason
build_and_compile not_applicable The precheck deliberately does not configure, build, or compile AnyPS5.
diff_check passed Exact-head git diff --check.
conventions_and_pr_template passed Exact-head convention and PR-template check.
changed_export_abi_audit failed Helper absent from isolated PR snapshot; the same lexical audit passed from the reviewer workspace.
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed tools module.
python_test_registration not_applicable No changed Python tests.
live_dependency_and_mergeability_check passed Current base preview is clean; PR declares no dependencies.
build_dependent_cpp_tests not_applicable C++ tests require exact-head binaries; no build was run.
test_quality_heuristics failed Optional helper absent from the isolated PR snapshot.
negative_controls not_applicable No changed Python test module for a no-build base control.

Raw conventions output:

All conventions checks passed.

Raw ABI audit summary:

status: passed
findings: 0

Raw pairwise conflict output:

#15178
CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/src/Configuration.hpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/tests/Base.cpp
CONFLICT (content): Merge conflict in docs/dev/debt/libSceNKWebKit.md

#15176
CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/src/Configuration.hpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/tests/Base.cpp
CONFLICT (content): Merge conflict in docs/dev/debt/libSceNKWebKit.md

#15175
CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/tests/Base.cpp
CONFLICT (content): Merge conflict in docs/dev/debt/libSceNKWebKit.md

The precheck’s ABI/test-quality helper failures are snapshot availability failures, not findings from those analyzers.

Negative control

Not run; the new C++ tests require an exact-head build. They directly set the private flags and then read them, so they do not provide runtime producer coverage.

Findings

Blocking

  • The flag values are disconnected from runtime navigation data. Both flags are initialized to false; the exact-head search finds no production object construction or field writer, and the only assignments to true are in Base.cpp. The tests therefore show that the getters read manually modified fields, not that the navigation callback supplies the values. In WebKit’s API, a navigation-response object is passed into the decision callback and its MIME capability determines whether the policy listener uses, downloads or ignores the response. Please add or declare a dependency on the production object-population path and test values supplied through that path; if it is out of scope, leave these exports unimplemented until it exists.
  • The PRs have unresolved integration conflicts. Pairwise merge-tree previews against open #15178 and #15176 conflict in Configuration.hpp, Base.cpp and the WebKit debt file; the preview against #15175 conflicts in InventoryExports.hpp, Base.cpp and the WebKit debt file. This PR says Depends on: none. Please coordinate the landing order, declare it as required by the repository overlap rule, and resolve the conflicts on the appropriate updated head.

Non-blocking

None.

Sources

Not verified

I did not run a local build, CTest, Linux or console tests, or a negative control. Three hosted checks remain pending. The external WebKit caller is a behavior reference, not proof of PS5-specific behavior.

To get this to a good state

Add or identify the production path that creates and populates these objects, coordinate the conflicting PR order and update the dependency declaration, then push a new head. I’ll rerun the no-build checks and inspect the exact new head; C++ tests and all required hosted checks must pass before approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5742836545 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15177#pullrequestreview-5742836545). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T20:24:47Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The getters have no production-created data source: their flags default false and are only set in tests; the PR also conflicts with three open WebKit PRs while declaring no dependency. ## What I ran Reviewed PR #15177 at head `183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c` against base/current `main` `096c45570f516de76a43bbe1b97781381c84f55f`; its individual merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. No local C++ build or CTest was run. ```sh git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f --head 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c --title "feat(libSceNKWebKit): implement WKNavigationAction and WKNavigationResponse queries" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15177-183bb08cd12e/pr-body.md python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 096c45570f516de76a43bbe1b97781381c84f55f --head 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c --json python3 tools/pr_stack_check.py 15177 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15177-183bb08cd12e/stack git merge-tree --write-tree 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c 39817b04a53c24dc3402970c6a458e64e0122f43 git merge-tree --write-tree 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c e237c24e599a15328e269d1fcc90370471a3fed2 git merge-tree --write-tree 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c 3ae71a60432f41d5d1370727a7e9e4fcf9741deb git grep -n 'shouldPerformDownload\|canShowMIMEType\|Make<NKWebKit::NavigationAction>\|Make<NKWebKit::NavigationResponse>' 183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c -- core/libs/prx/libSceNKWebKit gh pr checks 15177 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | Clean diff; conventions passed. | | ABI lexical audit | passed | No findings; this does not certify binary ABI correctness. | | Individual base merge preview | passed | Clean against current base. | | Runtime flag population | failed | No production constructor or writer for either flag was found. | | Pairwise integration previews | failed | Conflicts with #15178, #15176 and #15175. | | C++ tests | not run | Exact-head binaries require a build. | | Hosted policy checks | not run | Conventions, eligibility, intake and portability passed; labels, report and Windows remain pending; specialized jobs were skipped. | | Negative control | not run | No exact-head test binary was built. | <details><summary>Precheck results and raw outputs</summary> | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | The precheck deliberately does not configure, build, or compile AnyPS5. | | diff_check | passed | Exact-head `git diff --check`. | | conventions_and_pr_template | passed | Exact-head convention and PR-template check. | | changed_export_abi_audit | failed | Helper absent from isolated PR snapshot; the same lexical audit passed from the reviewer workspace. | | python_syntax | not_applicable | No changed Python implementation files. | | related_python_unit_tests | not_applicable | No changed tools module. | | python_test_registration | not_applicable | No changed Python tests. | | live_dependency_and_mergeability_check | passed | Current base preview is clean; PR declares no dependencies. | | build_dependent_cpp_tests | not_applicable | C++ tests require exact-head binaries; no build was run. | | test_quality_heuristics | failed | Optional helper absent from the isolated PR snapshot. | | negative_controls | not_applicable | No changed Python test module for a no-build base control. | Raw conventions output: ```text All conventions checks passed. ``` Raw ABI audit summary: ```text status: passed findings: 0 ``` Raw pairwise conflict output: ```text #15178 CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/src/Configuration.hpp CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/tests/Base.cpp CONFLICT (content): Merge conflict in docs/dev/debt/libSceNKWebKit.md #15176 CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/src/Configuration.hpp CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/tests/Base.cpp CONFLICT (content): Merge conflict in docs/dev/debt/libSceNKWebKit.md #15175 CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp CONFLICT (content): Merge conflict in core/libs/prx/libSceNKWebKit/tests/Base.cpp CONFLICT (content): Merge conflict in docs/dev/debt/libSceNKWebKit.md ``` The precheck’s ABI/test-quality helper failures are snapshot availability failures, not findings from those analyzers. </details> ## Negative control Not run; the new C++ tests require an exact-head build. They directly set the private flags and then read them, so they do not provide runtime producer coverage. ## Findings ### Blocking - **The flag values are disconnected from runtime navigation data.** Both flags are initialized to `false`; the exact-head search finds no production object construction or field writer, and the only assignments to `true` are in `Base.cpp`. The tests therefore show that the getters read manually modified fields, not that the navigation callback supplies the values. In WebKit’s API, a navigation-response object is passed into the decision callback and its MIME capability determines whether the policy listener uses, downloads or ignores the response. Please add or declare a dependency on the production object-population path and test values supplied through that path; if it is out of scope, leave these exports unimplemented until it exists. - **The PRs have unresolved integration conflicts.** Pairwise merge-tree previews against open #15178 and #15176 conflict in `Configuration.hpp`, `Base.cpp` and the WebKit debt file; the preview against #15175 conflicts in `InventoryExports.hpp`, `Base.cpp` and the WebKit debt file. This PR says `Depends on: none`. Please coordinate the landing order, declare it as required by the repository overlap rule, and resolve the conflicts on the appropriate updated head. ### Non-blocking None. ## Sources - [Getter implementations and default flag values at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c/core/libs/prx/libSceNKWebKit/src/Navigation.cpp#L6-L14) - [Tests manually set the flags before checking the getters](https://github.com/boykopovar/AnyPS5/blob/183bb08cd12e6d6ccf6c56a0db36bcd8d29e4a9c/core/libs/prx/libSceNKWebKit/tests/Base.cpp#L354-L379) - [WebKit passes the response ref to a policy callback and uses MIME capability to choose a listener action](https://github.com/WebKit/WebKit/blob/131c95e85e08d2fa2684b193f536a59c3544265d/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp#L514-L541) - [Repository overlap rule requires agreeing on order and declaring `Depends on`](https://github.com/boykopovar/AnyPS5/blob/096c45570f516de76a43bbe1b97781381c84f55f/CONTRIBUTING.md#L71) ## Not verified I did not run a local build, CTest, Linux or console tests, or a negative control. Three hosted checks remain pending. The external WebKit caller is a behavior reference, not proof of PS5-specific behavior. ## To get this to a good state Add or identify the production path that creates and populates these objects, coordinate the conflicting PR order and update the dependency declaration, then push a new head. I’ll rerun the no-build checks and inspect the exact new head; C++ tests and all required hosted checks must pass before approval.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15177
No description provided.