feat(libSceNKWebKit): implement WebCore::computeSharedStringHash #14607

Merged
ashwin280802 merged 10 commits from upstream-pr/14607 into main 2026-11-07 01:09:03 +00:00
ashwin280802 commented 2026-11-01 16:21:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ashwin280802 on 2026-11-01T16:21:38Z.


What

Implements both WebCore::computeSharedStringHash overloads in libSceNKWebKit, (const char16_t*, unsigned) and (const WTF::String&), and removes their NotImplemented_nid_no_patch stubs. docs/dev/debt/libSceNKWebKit.md drops both table rows.

Both follow the pinned PS5-WebKit-11.x SharedStringHash.cpp: the unmasked StringHasher hash of the characters, passed through AlreadyHashed::avoidDeletedValue (StringHash.h L220-L227). The hash is the existing StringHasher in WtfString.cpp, which matches the pinned StringHasher.h (start value, two-character step, last-character step, final mixing, zero guard).

There is no console measurement, so behaviour is matched to source only. One deliberate divergence from the pinned source: its avoidDeletedValue ORs the sign bit in (hash | (!(hash + 1) << 31)), which leaves a raw hash of 0xFFFFFFFF, the hash-table deleted value, unchanged, and the same function asserts newHash != 0xFFFFFFFF. This patch XORs instead and returns 0x7FFFFFFF, as WebKit's fix of that function does. Which of the two the console module computes is unmeasured and is recorded in docs/dev/debt/libSceNKWebKit.md; the two differ only for a raw hash of 0xFFFFFFFF. A null String hashes as the empty string, as upstream does for a zero length; a null pointer with a nonzero length, or a null String pointer, throws.

No open PR implements these functions. pr_overlap.py could not compare 6 PRs that conflict with main (#13515, #13766, #14152, #14212, #14303, #14345); I read their diffs and none mentions computeSharedStringHash. #14479 (mimeTypeFromDataURL and URL::stringCenterEllipsizedToLength, same author) appends at the same end of WtfString.cpp, and #13930, #13947, #13992, #14138, #14172, #14259 and #14391 edit the debt count line, so whichever merges second needs a trivial rebase.

Tested

Windows 11 (MinGW GCC), commit 1145addee8, ctest -R nkwebkit --output-on-failure in the build directory (all nine tests that depend on libSceNKWebKit; the nkwebkit_wtf line and the total are shown):

9/9 Test #2361: nkwebkit_wtf .....................   Passed    0.01 sec
100% tests passed out of 9

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

The new test checks the hash of the empty string, a, ab, abc and a URL through both overloads (8-bit and 16-bit strings, with the representation asserted), a non-Latin-1 pair, the raw-hash 0xFFFFFFFF case (expecting 0x7FFFFFFF), and the null inputs. The expected values come from a separate Python implementation of the algorithm (not from this code), which reproduces all seven.

Mutation check: the mutation tool lists no mutants for these lines, so I changed five expressions by hand, one at a time (^ to |, which restores the pinned OR; dropping the deleted-value step; and masking or mislabelling the input in each overload). The test failed on all five.

Not covered by a test: nothing; all five mutants failed it.

Full suite on this machine, run on the first commit of this PR (e1d94e4545, which still had the OR and no notices), before the XOR change: Windows 3273 of 3284 passed, 0 failed, 11 skipped (guest_fopen_errors is among the skips; it needs symlink creation). Linux in Docker 3051 of 3167 passed, 1 failed, 115 skipped. The Linux failure is guest_mmap_executable (aborts at GuestMemory.cpp:3436), and guest_http_uri_locale and savedata_memory_growth_read_failure skip. On main (f2d874c1fd), same machine, the same three tests fail and skip the same way, so none of them depends on this change. The full suite was not re-run on the current head.

Not verified: no PS5 or real WebKit build was used.

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:5109215388 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14607). Originally posted by [ashwin280802](https://github.com/ashwin280802) on 2026-11-01T16:21:38Z. --- ### What Implements both `WebCore::computeSharedStringHash` overloads in libSceNKWebKit, `(const char16_t*, unsigned)` and `(const WTF::String&)`, and removes their `NotImplemented_nid_no_patch` stubs. `docs/dev/debt/libSceNKWebKit.md` drops both table rows. Both follow the pinned [PS5-WebKit-11.x SharedStringHash.cpp](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/SharedStringHash.cpp#L206-L221): the unmasked `StringHasher` hash of the characters, passed through `AlreadyHashed::avoidDeletedValue` ([StringHash.h L220-L227](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/StringHash.h#L220-L227)). The hash is the existing `StringHasher` in `WtfString.cpp`, which matches the pinned [StringHasher.h](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/StringHasher.h#L230-L290) (start value, two-character step, last-character step, final mixing, zero guard). There is no console measurement, so behaviour is matched to source only. One deliberate divergence from the pinned source: its `avoidDeletedValue` ORs the sign bit in (`hash | (!(hash + 1) << 31)`), which leaves a raw hash of `0xFFFFFFFF`, the hash-table deleted value, unchanged, and the same function asserts `newHash != 0xFFFFFFFF`. This patch XORs instead and returns `0x7FFFFFFF`, as [WebKit's fix](https://github.com/WebKit/WebKit/commit/7d181b38a42c5e4af12be76f3b10775ffa196c21) of that function does. Which of the two the console module computes is unmeasured and is recorded in `docs/dev/debt/libSceNKWebKit.md`; the two differ only for a raw hash of `0xFFFFFFFF`. A null `String` hashes as the empty string, as upstream does for a zero length; a null pointer with a nonzero length, or a null `String` pointer, throws. No open PR implements these functions. `pr_overlap.py` could not compare 6 PRs that conflict with `main` (#13515, #13766, #14152, #14212, #14303, #14345); I read their diffs and none mentions `computeSharedStringHash`. #14479 (`mimeTypeFromDataURL` and `URL::stringCenterEllipsizedToLength`, same author) appends at the same end of `WtfString.cpp`, and #13930, #13947, #13992, #14138, #14172, #14259 and #14391 edit the debt count line, so whichever merges second needs a trivial rebase. ### Tested Windows 11 (MinGW GCC), commit `1145addee8`, `ctest -R nkwebkit --output-on-failure` in the build directory (all nine tests that depend on libSceNKWebKit; the `nkwebkit_wtf` line and the total are shown): ``` 9/9 Test #2361: nkwebkit_wtf ..................... Passed 0.01 sec 100% tests passed out of 9 ``` `python3 tools/check_conventions.py --base origin/main` passes. The new test checks the hash of the empty string, `a`, `ab`, `abc` and a URL through both overloads (8-bit and 16-bit strings, with the representation asserted), a non-Latin-1 pair, the raw-hash `0xFFFFFFFF` case (expecting `0x7FFFFFFF`), and the null inputs. The expected values come from a separate Python implementation of the algorithm (not from this code), which reproduces all seven. Mutation check: the mutation tool lists no mutants for these lines, so I changed five expressions by hand, one at a time (`^` to `|`, which restores the pinned OR; dropping the deleted-value step; and masking or mislabelling the input in each overload). The test failed on all five. Not covered by a test: nothing; all five mutants failed it. Full suite on this machine, run on the first commit of this PR (`e1d94e4545`, which still had the OR and no notices), before the XOR change: Windows 3273 of 3284 passed, 0 failed, 11 skipped (`guest_fopen_errors` is among the skips; it needs symlink creation). Linux in Docker 3051 of 3167 passed, 1 failed, 115 skipped. The Linux failure is `guest_mmap_executable` (aborts at `GuestMemory.cpp:3436`), and `guest_http_uri_locale` and `savedata_memory_growth_read_failure` skip. On `main` (`f2d874c1fd`), same machine, the same three tests fail and skip the same way, so none of them depends on this change. The full suite was not re-run on the current head. Not verified: no PS5 or real WebKit build was used. ### 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 16:48:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T16:48:50Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The new test requires both overloads to return the hash-table deleted sentinel 0xffffffff, although the implementation's referenced helper asserts that this value must be avoided.

What I ran

Reviewed head 44633d6e5791750f490b8e3afd5a7d0757494c49 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the merge preview is clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or C++ test was run.

git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...44633d6e5791750f490b8e3afd5a7d0757494c49
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14607
python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 44633d6e5791750f490b8e3afd5a7d0757494c49 --json

Results

Check Result Note
Diff and conventions passed No whitespace errors; convention and PR-template checks passed.
Merge preview passed Clean against the current base.
Export audit passed Both declarations and definitions were found; NIDs match the PR's named exports.
Test registration passed The existing CMake GLOB includes tests/Wtf.cpp.
Test-quality helper not run The detached precheck snapshot did not contain the untracked helper script.
Hosted checks not run Required checks are queued on this head.
C++ test and negative control not run They require the exact-head test binary.
Precheck and audit details
Precheck report table (check | status):
build_and_compile | not_applicable
diff_check | passed
conventions_and_pr_template | passed
changed_export_abi_audit | failed (helper missing in detached snapshot)
python_syntax | not_applicable
related_python_unit_tests | not_applicable
python_test_registration | not_applicable
live_dependency_and_mergeability_check | passed
build_dependent_cpp_tests | not_applicable
test_quality_heuristics | failed (helper missing in detached snapshot)
negative_controls | not_applicable

ABI audit result for the two changed exports:
{"name":"_ZN7WebCore23computeSharedStringHashEPKDsj","computed_nid":"mxfm5iKxLJk","declarations":["core/libs/prx/libSceNKWebKit/include/WtfExports.hpp"],"definitions":["core/libs/prx/libSceNKWebKit/src/WtfString.cpp"],"explicit_aliases":[],"version":"not encoded by these source declarations; not verified"}
{"name":"_ZN7WebCore23computeSharedStringHashERKN3WTF6StringE","computed_nid":"STrp1nbSFLw","declarations":["core/libs/prx/libSceNKWebKit/include/WtfExports.hpp"],"definitions":["core/libs/prx/libSceNKWebKit/src/WtfString.cpp"],"explicit_aliases":[],"version":"not encoded by these source declarations; not verified"}
Audit status: passed; no findings.

Negative control

Not run: the changed C++ test needs a built executable. The review did not exercise its assertions.

Findings

Blocking: AvoidDeletedHashValue uses hash | (static_cast<unsigned>(!(hash + 1)) << 31). For hash == 0xffffffff, the expression returns 0xffffffff unchanged. The added deletedValue assertions require exactly that result for both exported functions. The pinned AlreadyHashed::avoidDeletedValue reference has ASSERT(newHash != 0xFFFFFFFF), so the test pins a result the referenced implementation explicitly rejects, and this value is the hash-table deleted sentinel. Please use an operation that avoids the sentinel (the current WebKit implementation uses XOR) and change the expected result to 0x7fffffff, or provide target evidence that this legacy behavior is intentional and revise the test and debt claim to describe the known sentinel limitation rather than treating it as a valid hash.

    return hash ^ (static_cast<unsigned>(!(hash + 1)) << 31);

Non-blocking: None.

Sources

Not verified

No PS5 runtime behavior was measured. The author-reported test runs, other operating systems, full build, and queued hosted checks were not independently verified.

To get this to a good state

Please resolve the deleted-sentinel case or provide evidence for preserving it. I will rerun the same applicable checks on the new head; the C++ test requires a build.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729192154 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14607#pullrequestreview-5729192154). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T16:48:50Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The new test requires both overloads to return the hash-table deleted sentinel `0xffffffff`, although the implementation's referenced helper asserts that this value must be avoided. ## What I ran Reviewed head `44633d6e5791750f490b8e3afd5a7d0757494c49` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; the merge preview is clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or C++ test was run. ```sh git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...44633d6e5791750f490b8e3afd5a7d0757494c49 python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14607 python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 44633d6e5791750f490b8e3afd5a7d0757494c49 --json ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | No whitespace errors; convention and PR-template checks passed. | | Merge preview | passed | Clean against the current base. | | Export audit | passed | Both declarations and definitions were found; NIDs match the PR's named exports. | | Test registration | passed | The existing CMake `GLOB` includes `tests/Wtf.cpp`. | | Test-quality helper | not run | The detached precheck snapshot did not contain the untracked helper script. | | Hosted checks | not run | Required checks are queued on this head. | | C++ test and negative control | not run | They require the exact-head test binary. | <details><summary>Precheck and audit details</summary> ```text Precheck report table (check | status): build_and_compile | not_applicable diff_check | passed conventions_and_pr_template | passed changed_export_abi_audit | failed (helper missing in detached snapshot) python_syntax | not_applicable related_python_unit_tests | not_applicable python_test_registration | not_applicable live_dependency_and_mergeability_check | passed build_dependent_cpp_tests | not_applicable test_quality_heuristics | failed (helper missing in detached snapshot) negative_controls | not_applicable ABI audit result for the two changed exports: {"name":"_ZN7WebCore23computeSharedStringHashEPKDsj","computed_nid":"mxfm5iKxLJk","declarations":["core/libs/prx/libSceNKWebKit/include/WtfExports.hpp"],"definitions":["core/libs/prx/libSceNKWebKit/src/WtfString.cpp"],"explicit_aliases":[],"version":"not encoded by these source declarations; not verified"} {"name":"_ZN7WebCore23computeSharedStringHashERKN3WTF6StringE","computed_nid":"STrp1nbSFLw","declarations":["core/libs/prx/libSceNKWebKit/include/WtfExports.hpp"],"definitions":["core/libs/prx/libSceNKWebKit/src/WtfString.cpp"],"explicit_aliases":[],"version":"not encoded by these source declarations; not verified"} Audit status: passed; no findings. ``` </details> ## Negative control Not run: the changed C++ test needs a built executable. The review did not exercise its assertions. ## Findings **Blocking:** `AvoidDeletedHashValue` uses `hash | (static_cast<unsigned>(!(hash + 1)) << 31)`. For `hash == 0xffffffff`, the expression returns `0xffffffff` unchanged. The added `deletedValue` assertions require exactly that result for both exported functions. The pinned `AlreadyHashed::avoidDeletedValue` reference has `ASSERT(newHash != 0xFFFFFFFF)`, so the test pins a result the referenced implementation explicitly rejects, and this value is the hash-table deleted sentinel. Please use an operation that avoids the sentinel (the current WebKit implementation uses XOR) and change the expected result to `0x7fffffff`, or provide target evidence that this legacy behavior is intentional and revise the test and debt claim to describe the known sentinel limitation rather than treating it as a valid hash. ```suggestion return hash ^ (static_cast<unsigned>(!(hash + 1)) << 31); ``` **Non-blocking:** None. ## Sources - [Hash transformation and exported functions at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/44633d6e5791750f490b8e3afd5a7d0757494c49/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L274-L276) - [Test requiring `0xffffffff`](https://github.com/boykopovar/AnyPS5/blob/44633d6e5791750f490b8e3afd5a7d0757494c49/core/libs/prx/libSceNKWebKit/tests/Wtf.cpp#L797-L801) - [Pinned source helper and its assertion](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/StringHash.h#L220-L226) - [Pinned source call site](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/SharedStringHash.cpp#L206-L221) ## Not verified No PS5 runtime behavior was measured. The author-reported test runs, other operating systems, full build, and queued hosted checks were not independently verified. ## To get this to a good state Please resolve the deleted-sentinel case or provide evidence for preserving it. I will rerun the same applicable checks on the new head; the C++ test requires a build.
MarcZX10 commented 2026-11-01 19:06:16 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Reviewed — changes requested

The sentinel fix is present, but the PR description still documents the previous implementation and claims a compatibility gap is recorded when the debt file contains no such note.

What I ran

Reviewed head 2945a395d46463e4712fe33dd967923650474c52 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the merge preview is clean. Environment: Debian 12, Linux 6.1, Python 3.11.2, GCC 12.2.0, Git 2.39.5. I did not build or run C++ tests locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14607
python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 2945a395d46463e4712fe33dd967923650474c52 --json
git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...2945a395d46463e4712fe33dd967923650474c52
gh pr checks 14607 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff, conventions, and merge preview passed Precheck passed.
Export declaration/NID audit passed No findings.
Test registration passed CMake's tests/*.cpp glob includes Wtf.cpp.
Hosted checks passed Windows and required policy checks passed; Linux and GPU jobs were skipped.
Local C++ tests not run No build was made.
Precheck result table
Check Status
build_and_compile not_applicable
diff_check passed
conventions_and_pr_template passed
changed_export_abi_audit failed to start: helper absent from isolated PR checkout
python_syntax not_applicable
related_python_unit_tests not_applicable
python_test_registration not_applicable
live_dependency_and_mergeability_check passed
build_dependent_cpp_tests not_applicable
test_quality_heuristics failed to start: helper absent from isolated PR checkout
negative_controls not_applicable

Negative control

I did not run a mutation or negative control. The author reports that four of five manual mutations failed the test; the fifth (removing the sentinel adjustment) is observationally equivalent for the tested values.

Findings

Blocking

The PR description's What section says this head follows the pinned PS5-WebKit source's OR operation, produces 0xffffffff for the deleted-value input, and records that uncertainty in docs/dev/debt/libSceNKWebKit.md. This head instead uses XOR and expects 0x7fffffff; the debt file only removes the two stub inventory rows and has no compatibility note. The Tested section also says omitting the deleted-value adjustment is unobservable under OR, but with this head's XOR the 0xffffffff vector distinguishes that mutation. The pinned PS5-WebKit source contains the OR expression and an assertion excluding 0xffffffff, while the later WebKit fix changes OR to XOR. Please update the description and mutation results to match this head, and retain a debt note that console behavior is unmeasured, or provide PS5 evidence supporting the XOR behavior and update the description accordingly.

Non-blocking

None.

Sources

Not verified

I did not run a local C++ build, the nkwebkit_wtf test, Linux tests, or PS5 runtime tests. Linux and GPU hosted jobs were skipped. The author's test results are self-reported.

To get this to a good state

Please correct the PR description and document the unmeasured PS5 behavior, or provide PS5 evidence. I will rerun the same checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729778141 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14607#pullrequestreview-5729778141). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T19:06:16Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The sentinel fix is present, but the PR description still documents the previous implementation and claims a compatibility gap is recorded when the debt file contains no such note. ## What I ran Reviewed head `2945a395d46463e4712fe33dd967923650474c52` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; the merge preview is clean. Environment: Debian 12, Linux 6.1, Python 3.11.2, GCC 12.2.0, Git 2.39.5. I did not build or run C++ tests locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14607 python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 2945a395d46463e4712fe33dd967923650474c52 --json git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...2945a395d46463e4712fe33dd967923650474c52 gh pr checks 14607 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff, conventions, and merge preview | passed | Precheck passed. | | Export declaration/NID audit | passed | No findings. | | Test registration | passed | CMake's `tests/*.cpp` glob includes `Wtf.cpp`. | | Hosted checks | passed | Windows and required policy checks passed; Linux and GPU jobs were skipped. | | Local C++ tests | not run | No build was made. | <details><summary>Precheck result table</summary> | Check | Status | |---|---| | build_and_compile | not_applicable | | diff_check | passed | | conventions_and_pr_template | passed | | changed_export_abi_audit | failed to start: helper absent from isolated PR checkout | | python_syntax | not_applicable | | related_python_unit_tests | not_applicable | | python_test_registration | not_applicable | | live_dependency_and_mergeability_check | passed | | build_dependent_cpp_tests | not_applicable | | test_quality_heuristics | failed to start: helper absent from isolated PR checkout | | negative_controls | not_applicable | </details> ## Negative control I did not run a mutation or negative control. The author reports that four of five manual mutations failed the test; the fifth (removing the sentinel adjustment) is observationally equivalent for the tested values. ## Findings ### Blocking The PR description's `What` section says this head follows the pinned PS5-WebKit source's OR operation, produces `0xffffffff` for the deleted-value input, and records that uncertainty in `docs/dev/debt/libSceNKWebKit.md`. This head instead uses XOR and expects `0x7fffffff`; the debt file only removes the two stub inventory rows and has no compatibility note. The `Tested` section also says omitting the deleted-value adjustment is unobservable under OR, but with this head's XOR the `0xffffffff` vector distinguishes that mutation. The pinned PS5-WebKit source contains the OR expression and an assertion excluding `0xffffffff`, while the later WebKit fix changes OR to XOR. Please update the description and mutation results to match this head, and retain a debt note that console behavior is unmeasured, or provide PS5 evidence supporting the XOR behavior and update the description accordingly. ### Non-blocking None. ## Sources - [Implementation and tests at the reviewed head](https://github.com/boykopovar/AnyPS5/tree/2945a395d46463e4712fe33dd967923650474c52/core/libs/prx/libSceNKWebKit) - [Pinned PS5-WebKit hash helper](https://raw.githubusercontent.com/neonmodder123/PS5-WebKit-11.x/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/StringHash.h) - [Pinned PS5-WebKit shared hash function](https://raw.githubusercontent.com/neonmodder123/PS5-WebKit-11.x/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/SharedStringHash.cpp) - [WebKit fix changing OR to XOR](https://github.com/WebKit/WebKit/commit/7d181b38a42c) ## Not verified I did not run a local C++ build, the `nkwebkit_wtf` test, Linux tests, or PS5 runtime tests. Linux and GPU hosted jobs were skipped. The author's test results are self-reported. ## To get this to a good state Please correct the PR description and document the unmeasured PS5 behavior, or provide PS5 evidence. I will rerun the same checks on the updated head.
MarcZX10 commented 2026-11-01 20:01:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T20:01:07Z.

Review: COMMENTED


Reviewed — no blocking findings

I found no source-level blocker at head 1145addee812c38b9a0737280f5db5fa1bc630c2; the Windows check is still pending, so this is a comment and not an approval.

What I ran

Reviewed head 1145addee812c38b9a0737280f5db5fa1bc630c2 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the PR previews cleanly against current main. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not configure or build locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14607 --output-dir /tmp/anyps5-pr-precheck/14607-1145addee812-20261101
git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...1145addee812c38b9a0737280f5db5fa1bc630c2
python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 1145addee812c38b9a0737280f5db5fa1bc630c2 --json
python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/14607-1145addee812-20261101/head-1145addee812-b2d2def2 --json core/libs/prx/libSceNKWebKit/tests/Wtf.cpp

I inspected all six changed files, the StringHasher/null handling paths, the test assertions and CMake registration. The precheck's ABI and test-quality invocations could not find workspace-only helper scripts in its isolated PR snapshot; I reran them from the workspace against the exact head/base or snapshot.

Results

Check Result Note
Diff whitespace passed No patch errors.
Conventions and template passed Hosted and local precheck passed.
ABI audit passed No lexical findings.
Test registration passed The heuristic warning is a false positive; CMake glob-registers tests/*.cpp.
Merge preview passed Clean against current main; no declared dependencies.
Hosted checks not run Windows is pending; conventions, labels, eligibility, portability and report passed. Linux and specialized jobs were skipped.
Local build and C++ tests not run No build per initial-review rules.
Negative control not run Requires running the C++ test against a changed implementation.
Selected unedited output

Conventions:

All conventions checks passed.

ABI audit summary:

status: passed
findings: 0

Test-quality heuristic finding:

{'path': 'core/libs/prx/libSceNKWebKit/tests/Wtf.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.'}

CMake registration uses a glob:

file(GLOB nkWebKitTests CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp)

Current hosted status:

conventions pass
labels pass
windows pending
linux skipping
register-context skipping
relinker skipping
relinker-asan skipping
write-watch skipping
eligibility pass
library-portability pass
report pass

Negative control

Not run. Testing that these assertions detect a wrong implementation requires building and executing the C++ target; the PR author reports five manual mutations failed, but I did not reproduce those runs.

Findings

Blocking

None found in the source review.

Non-blocking

For a raw hash of 0xFFFFFFFF, this implementation XORs the sign bit and returns 0x7FFFFFFF; the pinned PS5-WebKit source uses an OR expression that leaves that sentinel unchanged in a release build. The PR records that the console result is unmeasured and explains the intended hash-table invariant. I found no evidence in this review that resolves the console behavior, so I am treating it as a disclosed limitation rather than asserting equivalence for that input.

Sources

Not verified

No local build, CTest, console run, or independent PS5 hash measurement was performed. The PR's Windows tests, full-suite comparison, and mutation results are author-reported; the current hosted Windows job has not completed.

To get this to a good state

No code change is requested from this source review. Once the Windows check completes, I will refresh the head and checks and decide whether an approval is supported.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729961001 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14607#pullrequestreview-5729961001). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T20:01:07Z. **Review:** COMMENTED --- # Reviewed — no blocking findings I found no source-level blocker at head `1145addee812c38b9a0737280f5db5fa1bc630c2`; the Windows check is still pending, so this is a comment and not an approval. ## What I ran Reviewed head `1145addee812c38b9a0737280f5db5fa1bc630c2` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; the PR previews cleanly against current `main`. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not configure or build locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14607 --output-dir /tmp/anyps5-pr-precheck/14607-1145addee812-20261101 git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...1145addee812c38b9a0737280f5db5fa1bc630c2 python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 1145addee812c38b9a0737280f5db5fa1bc630c2 --json python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/14607-1145addee812-20261101/head-1145addee812-b2d2def2 --json core/libs/prx/libSceNKWebKit/tests/Wtf.cpp ``` I inspected all six changed files, the `StringHasher`/null handling paths, the test assertions and CMake registration. The precheck's ABI and test-quality invocations could not find workspace-only helper scripts in its isolated PR snapshot; I reran them from the workspace against the exact head/base or snapshot. ## Results | Check | Result | Note | |---|---|---| | Diff whitespace | passed | No patch errors. | | Conventions and template | passed | Hosted and local precheck passed. | | ABI audit | passed | No lexical findings. | | Test registration | passed | The heuristic warning is a false positive; CMake glob-registers `tests/*.cpp`. | | Merge preview | passed | Clean against current `main`; no declared dependencies. | | Hosted checks | not run | Windows is pending; conventions, labels, eligibility, portability and report passed. Linux and specialized jobs were skipped. | | Local build and C++ tests | not run | No build per initial-review rules. | | Negative control | not run | Requires running the C++ test against a changed implementation. | <details> <summary>Selected unedited output</summary> Conventions: ```text All conventions checks passed. ``` ABI audit summary: ```text status: passed findings: 0 ``` Test-quality heuristic finding: ```text {'path': 'core/libs/prx/libSceNKWebKit/tests/Wtf.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.'} ``` CMake registration uses a glob: ```text file(GLOB nkWebKitTests CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp) ``` Current hosted status: ```text conventions pass labels pass windows pending linux skipping register-context skipping relinker skipping relinker-asan skipping write-watch skipping eligibility pass library-portability pass report pass ``` </details> ## Negative control Not run. Testing that these assertions detect a wrong implementation requires building and executing the C++ target; the PR author reports five manual mutations failed, but I did not reproduce those runs. ## Findings ### Blocking None found in the source review. ### Non-blocking For a raw hash of `0xFFFFFFFF`, this implementation XORs the sign bit and returns `0x7FFFFFFF`; the pinned PS5-WebKit source uses an OR expression that leaves that sentinel unchanged in a release build. The PR records that the console result is unmeasured and explains the intended hash-table invariant. I found no evidence in this review that resolves the console behavior, so I am treating it as a disclosed limitation rather than asserting equivalence for that input. ## Sources - [Hash and null-buffer handling at this head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L249-L275) - [Both shared-hash exports at this head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L1070-L1075) - [Hash tests at this head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/core/libs/prx/libSceNKWebKit/tests/Wtf.cpp#L770-L807) - [Test discovery at this head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/core/libs/prx/libSceNKWebKit/CMakeLists.txt#L49-L62) - [Documented sentinel limitation at this head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/docs/dev/debt/libSceNKWebKit.md#L17) - [Pinned WebKit fix referenced by the author](https://github.com/WebKit/WebKit/commit/7d181b38a42c5e4af12be76f3b10775ffa196c21) ## Not verified No local build, CTest, console run, or independent PS5 hash measurement was performed. The PR's Windows tests, full-suite comparison, and mutation results are author-reported; the current hosted Windows job has not completed. ## To get this to a good state No code change is requested from this source review. Once the Windows check completes, I will refresh the head and checks and decide whether an approval is supported.
MarcZX10 commented 2026-11-02 18:56:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T18:56:07Z.

Review: APPROVED


Re-checked — same head, approved

The source review already found no blocker on this head, and the previously pending Windows job has now passed along with the required policy checks, so I approve this exact revision.

What I ran

Confirmed open PR #14607 is still at head 1145addee812c38b9a0737280f5db5fa1bc630c2, based on f2d874c1fdccf781c0fa5d86619bb5dd8894b958. The exact head previews cleanly against current main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8. The diff since 2945a395d46463e4712fe33dd967923650474c52 changes only the debt note; implementation and test files are unchanged. Environment: Debian 12, Linux 6.1.0-54-amd64, Python 3.11.2, Git 2.39.5. No local build or C++ test was run.

git diff --name-status 2945a395d46463e4712fe33dd967923650474c52...1145addee812c38b9a0737280f5db5fa1bc630c2
git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...1145addee812c38b9a0737280f5db5fa1bc630c2
python3 tools/pr_stack_check.py 14607 --repo boykopovar/AnyPS5 --output-dir /tmp/review-14607-final
gh pr checks 14607 --repo boykopovar/AnyPS5

The author reports the focused nkwebkit CTest group passed 9/9 on this exact head; this is author-reported, not a local run. The author also reports five manual mutations caused the test to fail; I did not reproduce those controls.

Results

Check Result Note
Diff check passed No whitespace errors.
Current-main merge preview passed Clean at a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8.
Hosted policy checks passed Conventions, labels, eligibility, portability, and report.
Hosted Windows job passed Completed on the exact head.
Focused nkwebkit CTest passed Author-reported, exact head.
Local build and C++ tests not run No local build was performed.
Linux and specialized hosted jobs not run Skipped by the workflow.
Selected unedited command output
git diff --name-status:
M\tdocs/dev/debt/libSceNKWebKit.md

git diff --check:
[no output]

Stack preview:

Target branch tip: `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8`
All heads unchanged: **True**
- PR #14607: **clean** against current base; head `1145addee812c38b9a0737280f5db5fa1bc630c2`
No declared PR dependencies were found in the target PR chain.

Hosted check output:

conventions\tpass\t25s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343992649/job/124959801154
labels\tpass\t7s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343992588/job/124959784645
windows\tpass\t9m2s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959736838
linux\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738207
register-context\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738541
relinker\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738238
relinker-asan\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738625
write-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959737966
eligibility\tpass\t5s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959707654
library-portability\tpass\t1m44s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967427/job/124959707212
report\tpass\t47s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967381/job/124959706973

Author-reported focused CTest output:

9/9 Test #2361: nkwebkit_wtf .....................   Passed    0.01 sec
100% tests passed out of 9

Negative control

The author reports the test failed under five manual mutations, including changing XOR back to OR and removing the deleted-value adjustment. I did not run those mutations locally, so their outcomes are not independently verified here.

Findings

Blocking

None found in the full source review of this head.

Non-blocking

The console's result for a raw hash of 0xFFFFFFFF remains unmeasured; this head returns 0x7FFFFFFF while the pinned PS5-WebKit expression leaves 0xFFFFFFFF in a non-asserting build. The PR and debt note disclose this difference, so this approval does not claim the console result was measured.

Sources

Not verified

No local build, CTest, full-suite run on this head, or PS5 runtime measurement was performed. Linux and specialized hosted jobs were skipped. The focused CTest and mutation results are author-reported.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5741735628 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14607#pullrequestreview-5741735628). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T18:56:07Z. **Review:** APPROVED --- # Re-checked — same head, approved The source review already found no blocker on this head, and the previously pending Windows job has now passed along with the required policy checks, so I approve this exact revision. ## What I ran Confirmed open PR #14607 is still at head `1145addee812c38b9a0737280f5db5fa1bc630c2`, based on `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`. The exact head previews cleanly against current `main` `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8`. The diff since `2945a395d46463e4712fe33dd967923650474c52` changes only the debt note; implementation and test files are unchanged. Environment: Debian 12, Linux 6.1.0-54-amd64, Python 3.11.2, Git 2.39.5. No local build or C++ test was run. ```sh git diff --name-status 2945a395d46463e4712fe33dd967923650474c52...1145addee812c38b9a0737280f5db5fa1bc630c2 git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...1145addee812c38b9a0737280f5db5fa1bc630c2 python3 tools/pr_stack_check.py 14607 --repo boykopovar/AnyPS5 --output-dir /tmp/review-14607-final gh pr checks 14607 --repo boykopovar/AnyPS5 ``` The author reports the focused `nkwebkit` CTest group passed 9/9 on this exact head; this is author-reported, not a local run. The author also reports five manual mutations caused the test to fail; I did not reproduce those controls. ## Results | Check | Result | Note | |---|---|---| | Diff check | passed | No whitespace errors. | | Current-main merge preview | passed | Clean at `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8`. | | Hosted policy checks | passed | Conventions, labels, eligibility, portability, and report. | | Hosted Windows job | passed | Completed on the exact head. | | Focused `nkwebkit` CTest | passed | Author-reported, exact head. | | Local build and C++ tests | not run | No local build was performed. | | Linux and specialized hosted jobs | not run | Skipped by the workflow. | <details><summary>Selected unedited command output</summary> ```text git diff --name-status: M\tdocs/dev/debt/libSceNKWebKit.md git diff --check: [no output] ``` Stack preview: ```text Target branch tip: `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8` All heads unchanged: **True** - PR #14607: **clean** against current base; head `1145addee812c38b9a0737280f5db5fa1bc630c2` No declared PR dependencies were found in the target PR chain. ``` Hosted check output: ```text conventions\tpass\t25s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343992649/job/124959801154 labels\tpass\t7s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343992588/job/124959784645 windows\tpass\t9m2s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959736838 linux\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738207 register-context\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738541 relinker\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738238 relinker-asan\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959738625 write-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959737966 eligibility\tpass\t5s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967454/job/124959707654 library-portability\tpass\t1m44s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967427/job/124959707212 report\tpass\t47s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41343967381/job/124959706973 ``` Author-reported focused CTest output: ```text 9/9 Test #2361: nkwebkit_wtf ..................... Passed 0.01 sec 100% tests passed out of 9 ``` </details> ## Negative control The author reports the test failed under five manual mutations, including changing XOR back to OR and removing the deleted-value adjustment. I did not run those mutations locally, so their outcomes are not independently verified here. ## Findings ### Blocking None found in the full source review of this head. ### Non-blocking The console's result for a raw hash of `0xFFFFFFFF` remains unmeasured; this head returns `0x7FFFFFFF` while the pinned PS5-WebKit expression leaves `0xFFFFFFFF` in a non-asserting build. The PR and debt note disclose this difference, so this approval does not claim the console result was measured. ## Sources - [Implementation and hash handling at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L249-L275) - [Both exported overloads at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L1070-L1075) - [Focused test vectors at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/core/libs/prx/libSceNKWebKit/tests/Wtf.cpp#L770-L807) - [Documented console limitation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1145addee812c38b9a0737280f5db5fa1bc630c2/docs/dev/debt/libSceNKWebKit.md#L17) - [Pinned WebKit fix](https://github.com/WebKit/WebKit/commit/7d181b38a42c5e4af12be76f3b10775ffa196c21) ## Not verified No local build, CTest, full-suite run on this head, or PS5 runtime measurement was performed. Linux and specialized hosted jobs were skipped. The focused CTest and mutation results are author-reported.
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!14607
No description provided.