feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse #15213

Merged
ashwin280802 merged 2 commits from upstream-pr/15213 into main 2026-11-07 05:03:15 +00:00
ashwin280802 commented 2026-11-02 20:52:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ashwin280802 on 2026-11-02T20:52:00Z.


What

Implements three libSceNKWebKit exports that previously threw through NotImplemented_nid_no_patch:

  • WebCore::foldQuoteMarks(const WTF::String&) maps the typographic quotation marks to " or '. It returns the same string when nothing changes.
  • WebCore::defaultMIMEType() returns a static application/octet-stream string with the refcount, 8-bit and cost-reported bits set as in the pinned StringImpl.h.
  • WebCore::redirectChainAllowsReuse follows CacheValidation.cpp L166-L177: no redirection allows reuse, an uncached redirection does not, a cached redirection allows it when reuseExpiredRedirection is set or the host wall clock has not passed endOfValidity. A status outside the three enumerators returns false where the source asserts.

The console layout of the static string and the clock source are unmeasured and recorded in the libSceNKWebKit debt file.

Open PRs touching the same files: adjacent lines in docs/dev/debt/libSceNKWebKit.md (the export table), WtfExports.hpp and tests/Wtf.cpp (#14607) and WebCoreTypes.hpp (#15125). #13486, #13515 and #14212 conflict with main, so I compared their diffs against the merge base by hand: #13515 and #14212 add no lines naming these functions, and #13486 only carries the same three exports as unimplemented stubs picked up from older main. None implements them.

Tested

Windows 11 (10.0.26300), MinGW GCC, build-full, commit 230241356a194fe27b9670780a05ecb764683372:

ctest --test-dir build-full -R ^(nkwebkit_|guest_nkwebkit_) --no-tests=error

10/10 Test #2736: nkwebkit_wtf .....................   Passed    0.02 sec
100% tests passed out of 10

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

All conventions checks passed.

I changed 13 conditions and statements one at a time. The new tests failed on 8, one change did not build, and the other four are compile-time layout checks.

The full local test run also hit three failures, in log_macros, log_macros_timestamps and agc_driver_direct_write_completion. This PR touches none of them, and all three fail the same way on origin/main 9090972b7e (detached worktree, same machine):

1/3 Test #792: log_macros ...........................***Failed    0.02 sec
log macros test failed: a short line differs
3/3 Test #950: agc_driver_direct_write_completion ...***Failed    0.73 sec
AGC graphics: direct write completion: the completion of a buffer write dropped image results recorded after it

Not covered by a test: the four static_assert layout checks on RedirectChainCacheStatus in WebCoreTypes.hpp; they are compile-time and no runtime test can observe them.

Not verified: Linux; other suites; console behaviour.

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:5127235594 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15213). Originally posted by [ashwin280802](https://github.com/ashwin280802) on 2026-11-02T20:52:00Z. --- ### What Implements three `libSceNKWebKit` exports that previously threw through `NotImplemented_nid_no_patch`: - `WebCore::foldQuoteMarks(const WTF::String&)` maps the typographic quotation marks to `"` or `'`. It returns the same string when nothing changes. - `WebCore::defaultMIMEType()` returns a static `application/octet-stream` string with the refcount, 8-bit and cost-reported bits set as in the pinned [StringImpl.h](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/StringImpl.h). - `WebCore::redirectChainAllowsReuse` follows [CacheValidation.cpp L166-L177](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/network/CacheValidation.cpp#L166-L177): no redirection allows reuse, an uncached redirection does not, a cached redirection allows it when `reuseExpiredRedirection` is set or the host wall clock has not passed `endOfValidity`. A status outside the three enumerators returns false where the source asserts. The console layout of the static string and the clock source are unmeasured and recorded in the `libSceNKWebKit` debt file. Open PRs touching the same files: adjacent lines in `docs/dev/debt/libSceNKWebKit.md` (the export table), `WtfExports.hpp` and `tests/Wtf.cpp` (#14607) and `WebCoreTypes.hpp` (#15125). #13486, #13515 and #14212 conflict with `main`, so I compared their diffs against the merge base by hand: #13515 and #14212 add no lines naming these functions, and #13486 only carries the same three exports as unimplemented stubs picked up from older `main`. None implements them. ### Tested Windows 11 (10.0.26300), MinGW GCC, `build-full`, commit 230241356a194fe27b9670780a05ecb764683372: `ctest --test-dir build-full -R ^(nkwebkit_|guest_nkwebkit_) --no-tests=error` ``` 10/10 Test #2736: nkwebkit_wtf ..................... Passed 0.02 sec 100% tests passed out of 10 ``` `python3 tools/check_conventions.py --base origin/main` ``` All conventions checks passed. ``` I changed 13 conditions and statements one at a time. The new tests failed on 8, one change did not build, and the other four are compile-time layout checks. The full local test run also hit three failures, in `log_macros`, `log_macros_timestamps` and `agc_driver_direct_write_completion`. This PR touches none of them, and all three fail the same way on `origin/main` 9090972b7e (detached worktree, same machine): ``` 1/3 Test #792: log_macros ...........................***Failed 0.02 sec log macros test failed: a short line differs 3/3 Test #950: agc_driver_direct_write_completion ...***Failed 0.73 sec AGC graphics: direct write completion: the completion of a buffer write dropped image results recorded after it ``` Not covered by a test: the four `static_assert` layout checks on `RedirectChainCacheStatus` in `WebCoreTypes.hpp`; they are compile-time and no runtime test can observe them. Not verified: Linux; other suites; console behaviour. ### 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-02 20:56:19 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Reviewed — no blocking findings

The three implementations match the pinned WebKit behavior I inspected, but I’m withholding approval because the six hosted checks are queued and the PR’s reported test SHA differs from the live head.

What I ran

Reviewed all nine changed files at head fe5ce0bd7b15573cf94ead589858281ff8161ccc, against base 9090972b7e91fd266819cbd77a8b058e177b5682. The head merges cleanly with that base. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or compile.

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...fe5ce0bd7b15573cf94ead589858281ff8161ccc
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15213
python3 tools/pr_abi_audit.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --json
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceNKWebKit/tests/Wtf.cpp
git show fe5ce0bd7b15573cf94ead589858281ff8161ccc:core/libs/prx/libSceNKWebKit/CMakeLists.txt
gh pr checks 15213 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff and conventions passed Exact-head checks passed.
Export declaration audit passed Zero findings.
Test-quality heuristic passed No findings; Wtf.cpp is included by the CMake test glob.
Base merge preview passed The exact head merges cleanly into its base.
Hosted checks not run Six applicable checks are queued.
C++ build, CTest and negative controls not run They require building the exact head.
Commands and check output

The precheck table is reproduced without edits:

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 9090972b7e91fd266819cbd77a8b058e177b5682...fe5ce0bd7b15573cf94ead589858281ff8161ccc
conventions_and_pr_template passed /usr/bin/python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --title feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/pr-body.md
changed_export_abi_audit failed /usr/bin/python3 tools/pr_abi_audit.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --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 passed /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15213 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/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 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/head-fe5ce0bd7b15-0ea90bd3/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/head-fe5ce0bd7b15-0ea90bd3 --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WebCoreExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp core/libs/prx/libSceNKWebKit/src/WebCoreTypes.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.
All conventions checks passed.
status=passed; findings=0
{
  "findings": [],
  "negative_control_candidates": [],
  "limits": [
    "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
    "A test that passes against base is not by itself proof that the PR test is inadequate.",
    "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
  ]
}
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41523110405/job/125543863381
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41523110337/job/125543861890
intake	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41523110366/job/125543862939
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41523110178/job/125543863770
library-portability	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41523110878/job/125543860859
report	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41523110940/job/125543862778

The precheck could not find the ABI and test-quality helper scripts in its isolated PR snapshot. I ran both available workspace helpers separately; the ABI audit returned zero findings, and the test-quality heuristic returned no findings.

Negative control

Assertion Change to code under test Did the new test fail?
Quote folding, static MIME string state, and redirect cache decisions No mutation run by me; the exact-head C++ test requires a build. Not run.

The PR description reports one-at-a-time mutations, but I did not independently run those controls.

Findings

Blocking

None found in the reviewed source.

Non-blocking

The PR description reports Windows tests and mutation controls at commit 230241356a194fe27b9670780a05ecb764683372; the live PR head is fe5ce0bd7b15573cf94ead589858281ff8161ccc. Please confirm or correct the tested SHA. I did not treat that report as exact-head test evidence.

Sources

Not verified

I did not build or run CTest, the changed Wtf.cpp suite, Linux tests, or PS5 console behavior. The six hosted checks were queued at the final refresh. The reported Windows tests and negative controls name a different SHA and were not independently verified.

To get this to a good state

No code change is requested from source review. Confirm the tested SHA and let the queued hosted checks finish. If the head changes, I will rerun the precheck and relevant checks on the new head before revisiting approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5743206785 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15213#pullrequestreview-5743206785). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T20:56:19Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The three implementations match the pinned WebKit behavior I inspected, but I’m withholding approval because the six hosted checks are queued and the PR’s reported test SHA differs from the live head. ## What I ran Reviewed all nine changed files at head `fe5ce0bd7b15573cf94ead589858281ff8161ccc`, against base `9090972b7e91fd266819cbd77a8b058e177b5682`. The head merges cleanly with that base. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or compile. ```sh git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...fe5ce0bd7b15573cf94ead589858281ff8161ccc python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15213 python3 tools/pr_abi_audit.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --json python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceNKWebKit/tests/Wtf.cpp git show fe5ce0bd7b15573cf94ead589858281ff8161ccc:core/libs/prx/libSceNKWebKit/CMakeLists.txt gh pr checks 15213 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | Exact-head checks passed. | | Export declaration audit | passed | Zero findings. | | Test-quality heuristic | passed | No findings; `Wtf.cpp` is included by the CMake test glob. | | Base merge preview | passed | The exact head merges cleanly into its base. | | Hosted checks | not run | Six applicable checks are queued. | | C++ build, CTest and negative controls | not run | They require building the exact head. | <details><summary>Commands and check output</summary> The precheck table is reproduced without edits: | 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 9090972b7e91fd266819cbd77a8b058e177b5682...fe5ce0bd7b15573cf94ead589858281ff8161ccc` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --title feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/pr-body.md` | | changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --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 | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15213 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/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 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/head-fe5ce0bd7b15-0ea90bd3/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/head-fe5ce0bd7b15-0ea90bd3 --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WebCoreExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp core/libs/prx/libSceNKWebKit/src/WebCoreTypes.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.` | ```text All conventions checks passed. ``` ```text status=passed; findings=0 ``` ```json { "findings": [], "negative_control_candidates": [], "limits": [ "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.", "A test that passes against base is not by itself proof that the PR test is inadequate.", "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error." ] } ``` ```text conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41523110405/job/125543863381 eligibility pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41523110337/job/125543861890 intake pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41523110366/job/125543862939 labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41523110178/job/125543863770 library-portability pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41523110878/job/125543860859 report pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41523110940/job/125543862778 ``` The precheck could not find the ABI and test-quality helper scripts in its isolated PR snapshot. I ran both available workspace helpers separately; the ABI audit returned zero findings, and the test-quality heuristic returned no findings. </details> ## Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | Quote folding, static MIME string state, and redirect cache decisions | No mutation run by me; the exact-head C++ test requires a build. | Not run. | The PR description reports one-at-a-time mutations, but I did not independently run those controls. ## Findings ### Blocking None found in the reviewed source. ### Non-blocking The PR description reports Windows tests and mutation controls at commit `230241356a194fe27b9670780a05ecb764683372`; the live PR head is `fe5ce0bd7b15573cf94ead589858281ff8161ccc`. Please confirm or correct the tested SHA. I did not treat that report as exact-head test evidence. ## Sources - [Quote folding implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/fe5ce0bd7b15573cf94ead589858281ff8161ccc/core/libs/prx/libSceNKWebKit/src/WtfString.cpp) - [Pinned WebKit quote-folding behavior](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/editing/TextIterator.cpp#L1620-L1702) - [Pinned WebKit default MIME type](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/MIMETypeRegistry.cpp#L680-L684) - [Pinned WebKit redirect reuse behavior](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/network/CacheValidation.cpp#L166-L177) - [Pinned StringImpl flag definitions](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/StringImpl.h#L209-L223) ## Not verified I did not build or run CTest, the changed `Wtf.cpp` suite, Linux tests, or PS5 console behavior. The six hosted checks were queued at the final refresh. The reported Windows tests and negative controls name a different SHA and were not independently verified. ## To get this to a good state No code change is requested from source review. Confirm the tested SHA and let the queued hosted checks finish. If the head changes, I will rerun the precheck and relevant checks on the new head before revisiting approval.
XairRrR commented 2026-11-03 15:43:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T15:43:23Z.

Review: APPROVED


Reviewed — approved

foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse build, pass their new tests on the merged tree, and the tests fail when I changed the implementation, so I found nothing blocking.

What I ran

Head 234be1ae90152d7716c08e4b252f740b4b9e65ee, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged with --no-ff (tree 2e47ec6016a2aa533f00403a0650f24b44de1ca1). Debian 13 VM (2× Xeon Gold 6136, 32 vCPU), GCC 14.2.0, Release, Ninja.

git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...234be1ae90152d7716c08e4b252f740b4b9e65ee
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ctest --test-dir build -j8 --test-load 32 -R "^(nkwebkit_|guest_nkwebkit_)" --output-on-failure
objdump -d -M intel build/.../PureWebCore.cpp.o   # redirectChainAllowsReuse
# mutations, one at a time, each followed by:
ninja -C build -j32 -l32 nkwebkit_wtf_tests
build/tests/nkwebkit_wtf_tests

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Build (script, merged tree) ok
Selected tests (script, 806 run) 804 passed, 1 expected skip, 0 new failures; unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group also fails on main, so it is not this PR's
nkwebkit_* / guest_nkwebkit_* (11 tests) 11/11 passed; nkwebkit_wtf 0.02 s
Validation-layer comparison not applicable (no AGC, shader or VideoOut files changed)
ctest excerpt
 3/11 Test #2867: nkwebkit_wtf .....................   Passed    0.02 sec
100% tests passed, 0 tests failed out of 11

Negative control

If I restored the production files from main, the test would only fail to compile, because the declarations would be gone. That proves little, so instead I changed the implementation one way at a time on the merged tree:

Change Result
FoldQuoteMark: case 0xFF63 → case 0xFF64 nkwebkit_wtf_tests aborts: failed at line 795
DefaultMIMEType flags | 12 → | 28 (marks the string as an atom) aborts at line 847
redirectChainAllowsReuse: reuseExpiredRedirection != 0 → == 1 aborts at line 885
redirectChainAllowsReuse: <= → >= against the wall clock aborts at line 875

I then restored the merged files and rebuilt. The test passes again, and git status --porcelain is empty.

MarcZX10's review said the description's test SHA (230241356a…) differs from the head. My run is on the exact head 234be1ae, so that point is now covered by independent evidence.

Findings

Blocking

None.

Non-blocking

  • Field order of RedirectChainCacheStatus is not cited. core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp:147-148 puts endOfValidity at offset 0 and status at offset 8, and the static_asserts at lines 170-171 lock that order in. As I remember the upstream CacheValidation.h, it declares Status status; before WallTime endOfValidity;. I could not check the pinned source offline. For this export the order makes no difference. The struct is passed by value, and under SysV its double eightbyte goes to an SSE register and the byte eightbyte to an integer register, in either order. The disassembly confirms this: the function reads status from dil and endOfValidity from xmm0. The order would matter as soon as another export reads the struct through a pointer or reference. Suggested fix: check the order against the pinned CacheValidation.h and either match it or name the source in the debt entry.

Not verified

  • The 30-character quote-mark table against the pinned TextIterator.cpp. I had no network access. MarcZX10's review reports that it matches.
  • Console behaviour and the console layout of the static application/octet-stream StringImpl. The debt entry records both as unmeasured.
  • Windows/MinGW and the Windows ABI path for APS5_VABI.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5755134371 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15213#pullrequestreview-5755134371). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T15:43:23Z. **Review:** APPROVED --- # Reviewed — approved `foldQuoteMarks`, `defaultMIMEType` and `redirectChainAllowsReuse` build, pass their new tests on the merged tree, and the tests fail when I changed the implementation, so I found nothing blocking. ## What I ran Head `234be1ae90152d7716c08e4b252f740b4b9e65ee`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged with `--no-ff` (tree `2e47ec6016a2aa533f00403a0650f24b44de1ca1`). Debian 13 VM (2× Xeon Gold 6136, 32 vCPU), GCC 14.2.0, Release, Ninja. ```sh git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...234be1ae90152d7716c08e4b252f740b4b9e65ee python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 ctest --test-dir build -j8 --test-load 32 -R "^(nkwebkit_|guest_nkwebkit_)" --output-on-failure objdump -d -M intel build/.../PureWebCore.cpp.o # redirectChainAllowsReuse # mutations, one at a time, each followed by: ninja -C build -j32 -l32 nkwebkit_wtf_tests build/tests/nkwebkit_wtf_tests ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Build (script, merged tree) | ok | | Selected tests (script, 806 run) | 804 passed, 1 expected skip, 0 new failures; `unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group` also fails on `main`, so it is not this PR's | | `nkwebkit_*` / `guest_nkwebkit_*` (11 tests) | 11/11 passed; `nkwebkit_wtf` 0.02 s | | Validation-layer comparison | not applicable (no AGC, shader or VideoOut files changed) | <details><summary>ctest excerpt</summary> ``` 3/11 Test #2867: nkwebkit_wtf ..................... Passed 0.02 sec 100% tests passed, 0 tests failed out of 11 ``` </details> ## Negative control If I restored the production files from `main`, the test would only fail to compile, because the declarations would be gone. That proves little, so instead I changed the implementation one way at a time on the merged tree: | Change | Result | |---|---| | `FoldQuoteMark`: `case 0xFF63` → `case 0xFF64` | `nkwebkit_wtf_tests` aborts: `failed at line 795` | | `DefaultMIMEType` flags `\| 12` → `\| 28` (marks the string as an atom) | aborts at line 847 | | `redirectChainAllowsReuse`: `reuseExpiredRedirection != 0` → `== 1` | aborts at line 885 | | `redirectChainAllowsReuse`: `<=` → `>=` against the wall clock | aborts at line 875 | I then restored the merged files and rebuilt. The test passes again, and `git status --porcelain` is empty. MarcZX10's review said the description's test SHA (`230241356a…`) differs from the head. My run is on the exact head `234be1ae`, so that point is now covered by independent evidence. ## Findings ### Blocking None. ### Non-blocking - **Field order of `RedirectChainCacheStatus` is not cited.** `core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp:147-148` puts `endOfValidity` at offset 0 and `status` at offset 8, and the `static_assert`s at lines 170-171 lock that order in. As I remember the upstream `CacheValidation.h`, it declares `Status status;` before `WallTime endOfValidity;`. I could not check the pinned source offline. For this export the order makes no difference. The struct is passed by value, and under SysV its double eightbyte goes to an SSE register and the byte eightbyte to an integer register, in either order. The disassembly confirms this: the function reads `status` from `dil` and `endOfValidity` from `xmm0`. The order would matter as soon as another export reads the struct through a pointer or reference. Suggested fix: check the order against the pinned `CacheValidation.h` and either match it or name the source in the debt entry. ## Not verified - The 30-character quote-mark table against the pinned `TextIterator.cpp`. I had no network access. MarcZX10's review reports that it matches. - Console behaviour and the console layout of the static `application/octet-stream` `StringImpl`. The debt entry records both as unmeasured. - Windows/MinGW and the Windows ABI path for `APS5_VABI`. <!-- anyps5-bots job=2480 head=234be1ae90152d7716c08e4b252f740b4b9e65ee -->
MarcZX10 commented 2026-11-05 00:25:11 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Re-checked — new head, no blocking findings

foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse match the pinned upstream WebKit source; the head conflicts with main, and I did not build or run the tests.

What I ran

Head e476435e547a944f9a8913102d11a39d18692582, current base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c. I read the whole diff (9 files) and compared the three functions and the struct layout 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 15213
gh pr diff 15213 -R boykopovar/AnyPS5
gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceNKWebKit/src/WtfString.cpp?ref=e476435e547a944f9a8913102d11a39d18692582'
gh api 'repos/neonmodder123/PS5-WebKit-11.x/contents/Source/WebCore/editing/TextIterator.cpp?ref=80f77e94c63ee7202eec3d4b5b1a021dd89011ba'
gh api 'repos/neonmodder123/PS5-WebKit-11.x/contents/Source/WebCore/platform/network/CacheValidation.cpp?ref=80f77e94c63ee7202eec3d4b5b1a021dd89011ba'
gh pr checks 15213 -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
Quote-fold table against upstream passed 12 map to a double quote, 18 to an apostrophe
defaultMIMEType string flags passed 12 is the 8-bit flag plus the cost-reported flag
redirectChainAllowsReuse against upstream passed same three cases; an unknown status returns false
RedirectChainCacheStatus layout passed value at offset 0, status at 8, size 16
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...e476435e547a944f9a8913102d11a39d18692582
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 e476435e547a944f9a8913102d11a39d18692582 --title feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse --body /tmp/anyps5-pr-precheck/final/15213/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 e476435e547a944f9a8913102d11a39d18692582 --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 15213 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/15213/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/15213/head-e476435e547a-5cbec0fc --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WebCoreExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp core/libs/prx/libSceNKWebKit/src/WebCoreTypes.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. I read TestFoldQuoteMarks, TestDefaultMIMEType and TestRedirectChainAllowsReuse but did not run or mutate them.

Findings

Blocking

None.

Non-blocking

  1. Conflicts with main. The PR is DIRTY and labeled needs rebase; the conflicts sit in shared export and debt files.
  2. The existing approval is for another head. The approval by another reviewer names an older head (234be1ae9015), so it does not cover e476435e547a.
  3. Folded 16-bit strings stay 16-bit. A 16-bit input that folds to ASCII keeps a 16-bit buffer, and the test asserts that. The text is identical; upstream may narrow it. This is not a defect by itself.

Sources

Not verified

  • Compilation, nkwebkit_wtf and public_headers on any platform. The GPU CI comment I found names the older head, not this one.
  • Passing RedirectChainCacheStatus by value through the APS5 export on each calling convention; the PR notes say it was checked, and I did not confirm it.
  • Console behavior and the console module's layouts; the debt entries already say so.

To get this to a good state

  1. Rebase onto main and resolve the export-table and debt-file conflicts.
  2. Run nkwebkit_wtf and public_headers on the new head and post the output, so a new approval can name that head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5777969686 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15213#pullrequestreview-5777969686). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-05T00:25:11Z. **Review:** COMMENTED --- # Re-checked — new head, no blocking findings `foldQuoteMarks`, `defaultMIMEType` and `redirectChainAllowsReuse` match the pinned upstream WebKit source; the head conflicts with `main`, and I did not build or run the tests. ## What I ran Head `e476435e547a944f9a8913102d11a39d18692582`, current base `9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c`. I read the whole diff (9 files) and compared the three functions and the struct layout 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 15213 gh pr diff 15213 -R boykopovar/AnyPS5 gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceNKWebKit/src/WtfString.cpp?ref=e476435e547a944f9a8913102d11a39d18692582' gh api 'repos/neonmodder123/PS5-WebKit-11.x/contents/Source/WebCore/editing/TextIterator.cpp?ref=80f77e94c63ee7202eec3d4b5b1a021dd89011ba' gh api 'repos/neonmodder123/PS5-WebKit-11.x/contents/Source/WebCore/platform/network/CacheValidation.cpp?ref=80f77e94c63ee7202eec3d4b5b1a021dd89011ba' gh pr checks 15213 -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` | | Quote-fold table against upstream | passed | 12 map to a double quote, 18 to an apostrophe | | `defaultMIMEType` string flags | passed | 12 is the 8-bit flag plus the cost-reported flag | | `redirectChainAllowsReuse` against upstream | passed | same three cases; an unknown status returns false | | `RedirectChainCacheStatus` layout | passed | value at offset 0, status at 8, size 16 | | 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...e476435e547a944f9a8913102d11a39d18692582` | | 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 e476435e547a944f9a8913102d11a39d18692582 --title feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse --body /tmp/anyps5-pr-precheck/final/15213/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 e476435e547a944f9a8913102d11a39d18692582 --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 15213 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/15213/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/15213/head-e476435e547a-5cbec0fc --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WebCoreExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp core/libs/prx/libSceNKWebKit/src/WebCoreTypes.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. I read `TestFoldQuoteMarks`, `TestDefaultMIMEType` and `TestRedirectChainAllowsReuse` but did not run or mutate them. ## Findings ### Blocking None. ### Non-blocking 1. **Conflicts with `main`.** The PR is DIRTY and labeled `needs rebase`; the conflicts sit in shared export and debt files. 2. **The existing approval is for another head.** The approval by another reviewer names an older head (`234be1ae9015`), so it does not cover `e476435e547a`. 3. **Folded 16-bit strings stay 16-bit.** A 16-bit input that folds to ASCII keeps a 16-bit buffer, and the test asserts that. The text is identical; upstream may narrow it. This is not a defect by itself. ## Sources - Quote fold and default MIME type: https://github.com/boykopovar/AnyPS5/blob/e476435e547a944f9a8913102d11a39d18692582/core/libs/prx/libSceNKWebKit/src/WtfString.cpp#L463 (`FoldQuoteMark`), #L502 (`FoldQuoteMarks`), #L517 (`DefaultMIMEType`) - Redirect rule: https://github.com/boykopovar/AnyPS5/blob/e476435e547a944f9a8913102d11a39d18692582/core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp#L54-L65 - Struct layout: https://github.com/boykopovar/AnyPS5/blob/e476435e547a944f9a8913102d11a39d18692582/core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp#L140-L149 - Upstream `foldQuoteMark`: https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/editing/TextIterator.cpp#L1627-L1664 - Upstream `redirectChainAllowsReuse`: https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/network/CacheValidation.cpp#L166-L178 - Upstream string flags: https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WTF/wtf/text/StringImpl.h#L221-L222 ## Not verified - Compilation, `nkwebkit_wtf` and `public_headers` on any platform. The GPU CI comment I found names the older head, not this one. - Passing `RedirectChainCacheStatus` by value through the APS5 export on each calling convention; the PR notes say it was checked, and I did not confirm it. - Console behavior and the console module's layouts; the debt entries already say so. ## To get this to a good state 1. Rebase onto `main` and resolve the export-table and debt-file conflicts. 2. Run `nkwebkit_wtf` and `public_headers` on the new head and post the output, so a new approval can name that head.
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!15213
No description provided.