feat(libSceNKWebKit): implement WTF::URL::lastPathComponent and strippedForUseAsReferrer #14387

Merged
ashwin280802 merged 4 commits from upstream-pr/14387 into main 2026-11-05 18:43:29 +00:00
ashwin280802 commented 2026-11-01 11:10:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ashwin280802 on 2026-11-01T11:10:42Z.


What

Implements WTF::URL::lastPathComponent() const (returns StringView) and WTF::URL::strippedForUseAsReferrer() const (returns String) in libSceNKWebKit over the existing WtfAbi::URL layout, and removes their NotImplemented_nid_no_patch stubs. docs/dev/debt/libSceNKWebKit.md drops both table rows (7573 to 7571).

Both follow the pinned PS5-WebKit-11.x URL.cpp (lastPathComponent L95-110, pathStart L131-139, credentialsEnd L452-459, strippedForUseAsReferrer L852-866) and the return types in its URL.h. There is no console measurement, so behaviour is matched to that source only. Where reverseFind finds no /, the unsigned wrap of the upstream code is kept (mailto:abc yields the whole string). Upstream clamps inconsistent boundary fields (pathEnd or queryEnd past the string, userStart after passwordEnd, a credential end after queryEnd); this patch throws std::out_of_range there instead, and the debt file records it.

pr_overlap.py found no open PR with the same exports. It could not compare #13515 and #14212 because they conflict with main; a manual comparison of their added lines found neither symbol. #13992 changes neighbouring lines of Export.cpp, InventoryExports.hpp and the debt file, and several PRs edit the debt count line, so expect a trivial rebase.

Tested

Windows 11 (MinGW GCC), commit e48a355785, ctest --test-dir build-full -R "^(nkwebkit_wtf|public_headers)$" --timeout 120:

Test  #376: public_headers ...................   Passed   16.48 sec
Test #2348: nkwebkit_wtf .....................   Passed    0.01 sec

python3 tools/check_conventions.py --base origin/main passes.

Mutation check: I changed each new condition, operator and statement one at a time (28 single-line changes) and nkwebkit_wtf failed on 27. The 28th, forcing if (!length) return result; off, only passes a null pointer to a zero-byte memcpy, which a test cannot observe; the empty result itself is asserted.

Not covered by a test: that memcpy guard, for the reason above.

Not verified: Linux, and the full suite to completion. On my machine guest_mmap_executable (aborts at GuestMemory.cpp:3436), public_headers (times out at 90 s on Linux) and two skipped tests fail the same way on main (1f2c1da1fb), and none of them depends on this change. Not tested against a PS5 or a real WebKit build.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5106780894 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14387). Originally posted by [ashwin280802](https://github.com/ashwin280802) on 2026-11-01T11:10:42Z. --- ### What Implements `WTF::URL::lastPathComponent() const` (returns `StringView`) and `WTF::URL::strippedForUseAsReferrer() const` (returns `String`) in libSceNKWebKit over the existing `WtfAbi::URL` layout, and removes their `NotImplemented_nid_no_patch` stubs. `docs/dev/debt/libSceNKWebKit.md` drops both table rows (7573 to 7571). Both follow the pinned [PS5-WebKit-11.x URL.cpp](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/URL.cpp) (`lastPathComponent` L95-110, `pathStart` L131-139, `credentialsEnd` L452-459, `strippedForUseAsReferrer` L852-866) and the return types in its [URL.h](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/URL.h). There is no console measurement, so behaviour is matched to that source only. Where `reverseFind` finds no `/`, the unsigned wrap of the upstream code is kept (`mailto:abc` yields the whole string). Upstream clamps inconsistent boundary fields (`pathEnd` or `queryEnd` past the string, `userStart` after `passwordEnd`, a credential end after `queryEnd`); this patch throws `std::out_of_range` there instead, and the debt file records it. `pr_overlap.py` found no open PR with the same exports. It could not compare #13515 and #14212 because they conflict with `main`; a manual comparison of their added lines found neither symbol. #13992 changes neighbouring lines of `Export.cpp`, `InventoryExports.hpp` and the debt file, and several PRs edit the debt count line, so expect a trivial rebase. ### Tested Windows 11 (MinGW GCC), commit `e48a355785`, `ctest --test-dir build-full -R "^(nkwebkit_wtf|public_headers)$" --timeout 120`: ``` Test #376: public_headers ................... Passed 16.48 sec Test #2348: nkwebkit_wtf ..................... Passed 0.01 sec ``` `python3 tools/check_conventions.py --base origin/main` passes. Mutation check: I changed each new condition, operator and statement one at a time (28 single-line changes) and `nkwebkit_wtf` failed on 27. The 28th, forcing `if (!length) return result;` off, only passes a null pointer to a zero-byte `memcpy`, which a test cannot observe; the empty result itself is asserted. Not covered by a test: that `memcpy` guard, for the reason above. Not verified: Linux, and the full suite to completion. On my machine `guest_mmap_executable` (aborts at `GuestMemory.cpp:3436`), `public_headers` (times out at 90 s on Linux) and two skipped tests fail the same way on `main` (`1f2c1da1fb`), and none of them depends on this change. Not tested against a PS5 or a real WebKit build. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-01 14:20:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T14:20:16Z.

Review: COMMENTED


Reviewed — no blocking findings

The two WTF URL helpers match the pinned upstream URL.cpp line for line in the logic I compared, including the case where no slash exists (the wrap to the start of the string is what upstream's reverseFind path also produces); the PR currently conflicts with the current main, so it needs a rebase before it can merge.

What I ran

  • Exact head c93db338c970662694e371086d0d0a841427ed95, base e67cc81869 (the precheck base; the PR is mergeable=false, dirty against the current main ac26e59d9abf03805477b593f4d31294c185f442).
  • Environment: Linux, /usr/bin/python3 3.11.2, no build.
  • Precheck: python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14387 --output-dir /dev/shm/reviewer-run/precheck/14387. Its mergeability check reported the conflict above.
  • ABI audit by hand against the local repository (helper absent from the head tree): python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base e67cc81869 --head c93db338c970662694e371086d0d0a841427ed95 --json (exit 0; passed; 0 findings; 10,336 symbols).
  • Test-quality helper on core/libs/prx/libSceNKWebKit/tests/Wtf.cpp from a head extract: one literal-path registration heuristic.
  • Upstream source compared: Source/WTF/wtf/URL.cpp at neonmodder123/PS5-WebKit-11.x@80f77e94c63ee7202eec3d4b5b1a021dd89011ba, fetched with gh api. Its URL::lastPathComponent (lines 95-110) uses reverseFind('/', end) followed by if (start < pathStart()) return {} and ++start, the same sequence as the port, so a slash-less path returns the whole string on both sides. Its URL::strippedForUseAsReferrer (lines 852-866) and credentialsEnd (lines 452-459) match the port's logic; the port adds bounds checks.

Results

Precheck report, checks table, unedited (/dev/shm/reviewer-run/precheck/14387/report.md):

Check Status Command / reason
build_and_compile not_applicable The precheck deliberately does not configure, build, or compile AnyPS5.
diff_check passed git diff --check e67cc818696fd6e6c58ac80adc6550c54aed68e8...c93db338c970662694e371086d0d0a841427ed95
conventions_and_pr_template passed /usr/bin/python3 tools/check_conventions.py --base e67cc818696fd6e6c58ac80adc6550c54aed68e8 --head c93db338c970662694e371086d0d0a841427ed95 --title feat(libSceNKWebKit): implement WTF::URL::lastPathComponent and strippedForUseAsReferrer --body /dev/shm/reviewer-run/precheck/14387/pr-body.md
changed_export_abi_audit failed /usr/bin/python3 tools/pr_abi_audit.py --base e67cc818696fd6e6c58ac80adc6550c54aed68e8 --head c93db338c970662694e371086d0d0a841427ed95 --json
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.
python_test_registration not_applicable No changed test_*.py files.
live_dependency_and_mergeability_check failed /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14387 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14387/stack
build_dependent_cpp_tests not_applicable Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.
test_quality_heuristics failed /usr/bin/python3 /dev/shm/reviewer-run/precheck/14387/head-c93db338c970-6febd887/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14387/head-c93db338c970-6febd887 --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/WtfString.cpp core/libs/prx/libSceNKWebKit/tests/Wtf.cpp docs/dev/debt/libSceNKWebKit.md
negative_controls not_applicable No changed Python test module in tools/ can be run as a no-build base-source control.

Negative control

Not run. The PR's Wtf.cpp checks include the mailto:abc case for lastPathComponent; the C++ test needs a build.

Findings

Blocking: none.

Non-blocking:

  • Merge conflict: the head is dirty against the current main. The author should rebase onto ac26e59d9abf03805477b593f4d31294c185f442 (or the then-current main) and rerun the checks; I did not inspect the conflicting hunks.

Sources

Not verified

  • The C++ tests were not built or run here.
  • The console's behaviour for these functions is not verified; the PR states that the debt entry records this.
  • Hosted: at this head conventions, eligibility, intake, labels and library-portability succeeded; linux, register-context, relinker, relinker-asan and write-watch were skipped.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5728550860 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14387#pullrequestreview-5728550860). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T14:20:16Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The two WTF URL helpers match the pinned upstream `URL.cpp` line for line in the logic I compared, including the case where no slash exists (the wrap to the start of the string is what upstream's `reverseFind` path also produces); the PR currently conflicts with the current `main`, so it needs a rebase before it can merge. ## What I ran - Exact head `c93db338c970662694e371086d0d0a841427ed95`, base `e67cc81869` (the precheck base; the PR is `mergeable=false`, `dirty` against the current `main` `ac26e59d9abf03805477b593f4d31294c185f442`). - Environment: Linux, `/usr/bin/python3` 3.11.2, no build. - Precheck: `python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14387 --output-dir /dev/shm/reviewer-run/precheck/14387`. Its mergeability check reported the conflict above. - ABI audit by hand against the local repository (helper absent from the head tree): `python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base e67cc81869 --head c93db338c970662694e371086d0d0a841427ed95 --json` (exit 0; `passed`; 0 findings; 10,336 symbols). - Test-quality helper on `core/libs/prx/libSceNKWebKit/tests/Wtf.cpp` from a head extract: one literal-path registration heuristic. - Upstream source compared: `Source/WTF/wtf/URL.cpp` at `neonmodder123/PS5-WebKit-11.x@80f77e94c63ee7202eec3d4b5b1a021dd89011ba`, fetched with `gh api`. Its `URL::lastPathComponent` (lines 95-110) uses `reverseFind('/', end)` followed by `if (start < pathStart()) return {}` and `++start`, the same sequence as the port, so a slash-less path returns the whole string on both sides. Its `URL::strippedForUseAsReferrer` (lines 852-866) and `credentialsEnd` (lines 452-459) match the port's logic; the port adds bounds checks. ## Results Precheck report, checks table, unedited (`/dev/shm/reviewer-run/precheck/14387/report.md`): | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` | | diff_check | passed | `git diff --check e67cc818696fd6e6c58ac80adc6550c54aed68e8...c93db338c970662694e371086d0d0a841427ed95` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base e67cc818696fd6e6c58ac80adc6550c54aed68e8 --head c93db338c970662694e371086d0d0a841427ed95 --title feat(libSceNKWebKit): implement WTF::URL::lastPathComponent and strippedForUseAsReferrer --body /dev/shm/reviewer-run/precheck/14387/pr-body.md` | | changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base e67cc818696fd6e6c58ac80adc6550c54aed68e8 --head c93db338c970662694e371086d0d0a841427ed95 --json` | | python_syntax | not_applicable | `No changed Python implementation files.` | | related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` | | python_test_registration | not_applicable | `No changed test_*.py files.` | | live_dependency_and_mergeability_check | failed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14387 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14387/stack` | | build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` | | test_quality_heuristics | failed | `/usr/bin/python3 /dev/shm/reviewer-run/precheck/14387/head-c93db338c970-6febd887/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14387/head-c93db338c970-6febd887 --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/WtfString.cpp core/libs/prx/libSceNKWebKit/tests/Wtf.cpp docs/dev/debt/libSceNKWebKit.md` | | negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` | ## Negative control Not run. The PR's `Wtf.cpp` checks include the `mailto:abc` case for `lastPathComponent`; the C++ test needs a build. ## Findings **Blocking:** none. **Non-blocking:** - Merge conflict: the head is `dirty` against the current `main`. The author should rebase onto `ac26e59d9abf03805477b593f4d31294c185f442` (or the then-current main) and rerun the checks; I did not inspect the conflicting hunks. ## Sources - Upstream `lastPathComponent`: https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/URL.cpp#L95-L110 - Upstream `strippedForUseAsReferrer`: https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/URL.cpp#L852-L866 - Port at head: https://github.com/boykopovar/AnyPS5/blob/c93db338c970662694e371086d0d0a841427ed95/core/libs/prx/libSceNKWebKit/src/WtfString.cpp ## Not verified - The C++ tests were not built or run here. - The console's behaviour for these functions is not verified; the PR states that the debt entry records this. - Hosted: at this head `conventions`, `eligibility`, `intake`, `labels` and `library-portability` succeeded; `linux`, `register-context`, `relinker`, `relinker-asan` and `write-watch` were skipped.
MarcZX10 commented 2026-11-02 07:36:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T07:36:53Z.

Review: COMMENTED


Reviewed — no blocking findings; the two WTF URL functions are implemented, the Windows CTest run passed, and the branch is now mergeable

This PR replaces the NotImplemented stubs for WTF::URL::lastPathComponent and WTF::URL::strippedForUseAsReferrer with implementations in WtfString.cpp, and gives them typed signatures. I read the implementation additions in full. The Windows CTest run passed 2594 of 2594. I did not read the new test bodies in tests/Wtf.cpp. An earlier review at c93db338c9 compared this logic with the pinned upstream URL.cpp; this head was not compared again in this pass.

What I ran

  • Head 79d336200234d272be99d1c38dcb287aadaeb67b; base d8b60b46ed425b117b6fae18900fe6ab81ed6661. 6 files, +145/-15: libSceNKWebKit/src/WtfString.cpp (+46), include/WtfExports.hpp (+2), include/InventoryExports.hpp (-2), tests/Wtf.cpp (+97), and the NKWebKit debt doc (5 lines).
  • Read the WtfString.cpp additions in full: CredentialsEnd, lastPathComponent (which returns a null view when the path is empty or has no segment) and strippedForUseAsReferrer (which keeps the user and query parts, drops the credentials, and returns the same string when there are none). Both throw std::out_of_range on boundary values that the URL record does not allow.
  • Did not read the test bodies in tests/Wtf.cpp.
  • Hosted, Windows CTest: 2594 of 2594 passed. Conventions, report, library-portability and labels succeeded. Linux, relinkers and write-watch skipped.
  • Read-only checks from the trusted main checkout: diff check and conventions passed. ABI audit passed: 10333 symbols. Stack check: clean, no declared dependencies, no errors. The PR's mergeability is now clean against main.
  • No MarcZX10 review at this head.

Results

Check Result Note
Diff check passed
Conventions and PR template passed conventions check from the main checkout
Mergeability and dependencies passed stack check: clean; no declared dependencies; the branch is mergeable
ABI audit (main-checkout tool) passed 10333 symbols
Windows CTest (hosted) passed 2594 of 2594
WtfString.cpp additions (read) passed by reading the boundary checks are present; no blocking defect found
Agreement with the upstream URL.cpp at this head not verified the earlier review at c93db338c9 compared it; this head was not
New test bodies in tests/Wtf.cpp not verified not read
Negative controls not run no local build
Read-only check output

Precheck was not run: no PR-head code is run here. Diff check: passed. Conventions: passed. ABI audit: passed (10333 symbols). Stack check: clean, no declared dependencies, no errors. Hosted: gh api repos/boykopovar/AnyPS5/commits/79d336200234d272be99d1c38dcb287aadaeb67b/check-runs, and the Windows job log (2594 of 2594).

Negative control

Not run here. A negative control needs a local build and run of the NKWebKit tests, and code from this head is not run here.

Findings

Blocking

None from the code read.

Non-blocking

  • strippedForUseAsReferrer tests the credentials flag through url.bits & 1, and it computes its output length from the boundary fields. I read that arithmetic and did not compare it with the upstream source at this head, so the exact match to upstream behaviour is not verified here.

Sources

Not verified

  • Agreement with the upstream lastPathComponent and strippedForUseAsReferrer at this head, beyond what the tests check.
  • The new test bodies in tests/Wtf.cpp.

To get this to a good state

  • Nothing blocking.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5733307653 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14387#pullrequestreview-5733307653). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T07:36:53Z. **Review:** COMMENTED --- # Reviewed — no blocking findings; the two WTF URL functions are implemented, the Windows CTest run passed, and the branch is now mergeable This PR replaces the `NotImplemented` stubs for `WTF::URL::lastPathComponent` and `WTF::URL::strippedForUseAsReferrer` with implementations in `WtfString.cpp`, and gives them typed signatures. I read the implementation additions in full. The Windows CTest run passed 2594 of 2594. I did not read the new test bodies in `tests/Wtf.cpp`. An earlier review at `c93db338c9` compared this logic with the pinned upstream `URL.cpp`; this head was not compared again in this pass. ## What I ran - Head `79d336200234d272be99d1c38dcb287aadaeb67b`; base `d8b60b46ed425b117b6fae18900fe6ab81ed6661`. 6 files, +145/-15: `libSceNKWebKit/src/WtfString.cpp` (+46), `include/WtfExports.hpp` (+2), `include/InventoryExports.hpp` (-2), `tests/Wtf.cpp` (+97), and the NKWebKit debt doc (5 lines). - Read the `WtfString.cpp` additions in full: `CredentialsEnd`, `lastPathComponent` (which returns a null view when the path is empty or has no segment) and `strippedForUseAsReferrer` (which keeps the user and query parts, drops the credentials, and returns the same string when there are none). Both throw `std::out_of_range` on boundary values that the URL record does not allow. - Did not read the test bodies in `tests/Wtf.cpp`. - Hosted, Windows CTest: 2594 of 2594 passed. Conventions, report, library-portability and labels succeeded. Linux, relinkers and write-watch skipped. - Read-only checks from the trusted main checkout: diff check and conventions passed. ABI audit passed: 10333 symbols. Stack check: clean, no declared dependencies, no errors. The PR's mergeability is now clean against `main`. - No MarcZX10 review at this head. ## Results | Check | Result | Note | | --- | --- | --- | | Diff check | passed | | | Conventions and PR template | passed | conventions check from the main checkout | | Mergeability and dependencies | passed | stack check: clean; no declared dependencies; the branch is mergeable | | ABI audit (main-checkout tool) | passed | 10333 symbols | | Windows CTest (hosted) | passed | 2594 of 2594 | | `WtfString.cpp` additions (read) | passed by reading | the boundary checks are present; no blocking defect found | | Agreement with the upstream `URL.cpp` at this head | not verified | the earlier review at `c93db338c9` compared it; this head was not | | New test bodies in `tests/Wtf.cpp` | not verified | not read | | Negative controls | not run | no local build | <details><summary>Read-only check output</summary> Precheck was not run: no PR-head code is run here. Diff check: passed. Conventions: passed. ABI audit: passed (10333 symbols). Stack check: clean, no declared dependencies, no errors. Hosted: `gh api repos/boykopovar/AnyPS5/commits/79d336200234d272be99d1c38dcb287aadaeb67b/check-runs`, and the Windows job log (2594 of 2594). </details> ## Negative control Not run here. A negative control needs a local build and run of the NKWebKit tests, and code from this head is not run here. ## Findings **Blocking** None from the code read. **Non-blocking** - `strippedForUseAsReferrer` tests the credentials flag through `url.bits & 1`, and it computes its output length from the boundary fields. I read that arithmetic and did not compare it with the upstream source at this head, so the exact match to upstream behaviour is not verified here. ## Sources - Implementation: https://github.com/boykopovar/AnyPS5/blob/79d336200234d272be99d1c38dcb287aadaeb67b/core/libs/prx/libSceNKWebKit/src/WtfString.cpp - Export declarations: https://github.com/boykopovar/AnyPS5/blob/79d336200234d272be99d1c38dcb287aadaeb67b/core/libs/prx/libSceNKWebKit/include/WtfExports.hpp - Test: https://github.com/boykopovar/AnyPS5/blob/79d336200234d272be99d1c38dcb287aadaeb67b/core/libs/prx/libSceNKWebKit/tests/Wtf.cpp - Windows job log: check-run `windows` on 79d336200234d272be99d1c38dcb287aadaeb67b ## Not verified - Agreement with the upstream `lastPathComponent` and `strippedForUseAsReferrer` at this head, beyond what the tests check. - The new test bodies in `tests/Wtf.cpp`. ## To get this to a good state - Nothing blocking.
MarcZX10 commented 2026-11-05 00:25:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-05T00:25:08Z.

Review: COMMENTED


Re-checked — new head, no blocking findings

lastPathComponent and strippedForUseAsReferrer follow the pinned upstream URL.cpp for consistent URLs; the head conflicts with main, and I did not build or run the tests.

What I ran

Head 6098f93a1280ce970b650f41cfba78936eb6ec17, current base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c. I read the whole diff (6 files) and compared both functions with the pinned upstream source (neonmodder123/PS5-WebKit-11.x at 80f77e94c63ee7202eec3d4b5b1a021dd89011ba). Environment: Debian 12, Linux x86_64. No AnyPS5 build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14387
gh pr diff 14387 -R boykopovar/AnyPS5
gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceNKWebKit/src/WtfString.cpp?ref=6098f93a1280ce970b650f41cfba78936eb6ec17'
gh api 'repos/neonmodder123/PS5-WebKit-11.x/contents/Source/WTF/wtf/URL.cpp?ref=80f77e94c63ee7202eec3d4b5b1a021dd89011ba'
gh pr checks 14387 -R boykopovar/AnyPS5

Results

Check Result Note
Diff check, conventions, template passed precheck
Export and ABI audit passed precheck
Test-quality heuristic passed precheck
Merge and dependency preview failed the head conflicts with current main
lastPathComponent against upstream passed same path test, trailing slash and reverse search
strippedForUseAsReferrer against upstream passed same credential end, same result when nothing is stripped
Debt-entry export count passed 7429 to 7427 for two removed stubs
Hosted checks passed Windows, conventions, labels, portability, eligibility
Local build and nkwebkit_wtf not run
Precheck report for this head, unedited table
Check Status Why / command
build_and_compile not_run Builds are intentionally excluded from this fast, no-build check pass.
diff_check passed Command ran; see raw output below. Command: git diff --check 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c...6098f93a1280ce970b650f41cfba78936eb6ec17
conventions_and_pr_template passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c --head 6098f93a1280ce970b650f41cfba78936eb6ec17 --title feat(libSceNKWebKit): implement WTF::URL::lastPathComponent and strippedForUseAsReferrer --body /tmp/anyps5-pr-precheck/final/14387/pr-body.md
changed_export_abi_audit passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c --head 6098f93a1280ce970b650f41cfba78936eb6ec17 --json
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed Python tool module has a related tools/tests/test_.py suite.
python_test_registration not_applicable No changed Python test files need registration.
live_dependency_and_mergeability_check failed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14387 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/14387/stack
build_dependent_cpp_tests not_run Changed C/C++ source or test files need exact-head binaries; this fast pass does not build.
test_quality_heuristics passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/final/14387/head-6098f93a1280-bd0d1f50 --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/WtfString.cpp core/libs/prx/libSceNKWebKit/tests/Wtf.cpp docs/dev/debt/libSceNKWebKit.md
negative_controls not_applicable No changed tools/ Python test module is eligible for a base-source negative control.

Negative control

Not run. The PR reports a 28-change mutation check with 27 detected; I did not reproduce it.

Findings

Blocking

None.

Non-blocking

  1. Conflicts with main. The PR is DIRTY and labeled needs rebase; it needs a rebase before it can land.
  2. Description numbers differ from the diff. The description says the debt count goes from 7573 to 7571; the diff changes the line from 7429 to 7427. Please update the description.
  3. Inconsistent boundaries throw instead of clamping. The debt entry and the description say so. For a URL whose stored boundaries are consistent the results match upstream.

Sources

Not verified

  • Compilation and nkwebkit_wtf on any platform. A CI comment on this head reports a passing GPU run with no new failures; that is another contributor's report, not my run.
  • Console behavior for these two functions; the debt entry says it is unmeasured.
  • Inputs with inconsistent URL boundaries, which this port rejects and upstream does not guard.

To get this to a good state

  1. Rebase onto main and clear the conflicts.
  2. Correct the numbers in the description.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5777969304 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14387#pullrequestreview-5777969304). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-05T00:25:08Z. **Review:** COMMENTED --- # Re-checked — new head, no blocking findings `lastPathComponent` and `strippedForUseAsReferrer` follow the pinned upstream `URL.cpp` for consistent URLs; the head conflicts with `main`, and I did not build or run the tests. ## What I ran Head `6098f93a1280ce970b650f41cfba78936eb6ec17`, current base `9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c`. I read the whole diff (6 files) and compared both functions with the pinned upstream source (`neonmodder123/PS5-WebKit-11.x` at `80f77e94c63ee7202eec3d4b5b1a021dd89011ba`). Environment: Debian 12, Linux x86_64. No AnyPS5 build was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14387 gh pr diff 14387 -R boykopovar/AnyPS5 gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceNKWebKit/src/WtfString.cpp?ref=6098f93a1280ce970b650f41cfba78936eb6ec17' gh api 'repos/neonmodder123/PS5-WebKit-11.x/contents/Source/WTF/wtf/URL.cpp?ref=80f77e94c63ee7202eec3d4b5b1a021dd89011ba' gh pr checks 14387 -R boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff check, conventions, template | passed | precheck | | Export and ABI audit | passed | precheck | | Test-quality heuristic | passed | precheck | | Merge and dependency preview | failed | the head conflicts with current `main` | | `lastPathComponent` against upstream | passed | same path test, trailing slash and reverse search | | `strippedForUseAsReferrer` against upstream | passed | same credential end, same result when nothing is stripped | | Debt-entry export count | passed | 7429 to 7427 for two removed stubs | | Hosted checks | passed | Windows, conventions, labels, portability, eligibility | | Local build and `nkwebkit_wtf` | not run | | <details> <summary>Precheck report for this head, unedited table</summary> | Check | Status | Why / command | |---|---|---| | build_and_compile | not_run | Builds are intentionally excluded from this fast, no-build check pass. | | diff_check | passed | Command ran; see raw output below. Command: `git diff --check 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c...6098f93a1280ce970b650f41cfba78936eb6ec17` | | conventions_and_pr_template | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c --head 6098f93a1280ce970b650f41cfba78936eb6ec17 --title feat(libSceNKWebKit): implement WTF::URL::lastPathComponent and strippedForUseAsReferrer --body /tmp/anyps5-pr-precheck/final/14387/pr-body.md` | | changed_export_abi_audit | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c --head 6098f93a1280ce970b650f41cfba78936eb6ec17 --json` | | python_syntax | not_applicable | No changed Python implementation files. | | related_python_unit_tests | not_applicable | No changed Python tool module has a related tools/tests/test_<module>.py suite. | | python_test_registration | not_applicable | No changed Python test files need registration. | | live_dependency_and_mergeability_check | failed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14387 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/14387/stack` | | build_dependent_cpp_tests | not_run | Changed C/C++ source or test files need exact-head binaries; this fast pass does not build. | | test_quality_heuristics | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/final/14387/head-6098f93a1280-bd0d1f50 --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/WtfString.cpp core/libs/prx/libSceNKWebKit/tests/Wtf.cpp docs/dev/debt/libSceNKWebKit.md` | | negative_controls | not_applicable | No changed tools/ Python test module is eligible for a base-source negative control. | </details> ## Negative control Not run. The PR reports a 28-change mutation check with 27 detected; I did not reproduce it. ## Findings ### Blocking None. ### Non-blocking 1. **Conflicts with `main`.** The PR is DIRTY and labeled `needs rebase`; it needs a rebase before it can land. 2. **Description numbers differ from the diff.** The description says the debt count goes from 7573 to 7571; the diff changes the line from 7429 to 7427. Please update the description. 3. **Inconsistent boundaries throw instead of clamping.** The debt entry and the description say so. For a URL whose stored boundaries are consistent the results match upstream. ## Sources - `lastPathComponent` in this PR: https://github.com/boykopovar/AnyPS5/blob/6098f93a1280ce970b650f41cfba78936eb6ec17/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L999-L1016 - `strippedForUseAsReferrer` in this PR: https://github.com/boykopovar/AnyPS5/blob/6098f93a1280ce970b650f41cfba78936eb6ec17/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L1018-L1037 - Upstream `lastPathComponent`: https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/URL.cpp#L95-L110 - Upstream `strippedForUseAsReferrer`: https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/URL.cpp#L852-L866 ## Not verified - Compilation and `nkwebkit_wtf` on any platform. A CI comment on this head reports a passing GPU run with no new failures; that is another contributor's report, not my run. - Console behavior for these two functions; the debt entry says it is unmeasured. - Inputs with inconsistent URL boundaries, which this port rejects and upstream does not guard. ## To get this to a good state 1. Rebase onto `main` and clear the conflicts. 2. Correct the numbers in the description.
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!14387
No description provided.