Skip to content

feat(libSceNKWebKit): implement WKPreferences QTKitEnabled accessors - #24238

Closed
heditrigui wants to merge 1 commit into
boykopovar:mainfrom
heditrigui:feat/nkwebkit-preferences-qtkit
Closed

heditrigui wants to merge 1 commit into
boykopovar:mainfrom
heditrigui:feat/nkwebkit-preferences-qtkit

Conversation

@heditrigui

@heditrigui heditrigui commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What

Implements WKPreferencesGetQTKitEnabled and WKPreferencesSetQTKitEnabled in libSceNKWebKit:

  1. Replaces constant-0 and no-op stubs with functional boolean preference accessors backed by NKWebKit::Preferences (QTKitEnabled).
  2. Registers QTKitEnabled with default value false in Definitions() matching historical WebKit configuration.
  3. Removes old stub declarations from InventoryExports.hpp and NoOpExports.hpp, and constant assertions from tests/Constants.cpp and tests/NoOps.cpp.
  4. Adds unit test coverage in tests/Preferences.cpp validating default false, setter/getter roundtrip, copy propagation, and invalid reference argument rejection.
  5. Adds technical debt change fragment in docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md.

Tested

  • tools/pr_overlap.py --names WKPreferencesGetQTKitEnabled WKPreferencesSetQTKitEnabled confirmed 0 open PR overlaps across 2,039 open PRs.
  • tools/check_conventions.py passed with 0 errors.
  • tools/debt_fold.py --check passed cleanly.
  • git diff --check passed with 0 whitespace or formatting issues.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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

Summary by CodeRabbit

  • New Features
    • Added a QTKit preference that can be enabled or disabled. It defaults to off, and its current value can be read back.

@PrivacyOnion PrivacyOnion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 8327efa9cd:

  • Conventions: tools/check_conventions.py failed.
    (pull request): error: [pr-template] Fill in the pull request template: answer AI-assisted with yes or no
    (pull request): error: [pr-template] Fill in the pull request template: fill Depends on with #N or none
    2 findings, 2 errors; GitHub shows at most 10 error annotations, the job summary lists all
    
  • Build: nkwebkit_constants_tests, nkwebkit_noops_tests, nkwebkit_preferences_tests built cleanly.
  • CTest (nkwebkit_constants, nkwebkit_noops, nkwebkit_preferences):
    1/3 Test #4758: nkwebkit_noops ...................   Passed    0.26 sec
    2/3 Test #4771: nkwebkit_preferences .............   Passed    0.48 sec
    3/3 Test #4698: nkwebkit_constants ...............   Passed    0.24 sec
    100% tests passed, 0 tests failed out of 3
    

Requesting changes for the points above.

@heditrigui

Copy link
Copy Markdown
Contributor Author

@PrivacyOnion Thank you for the review! I have updated the PR description checklist with \Depends on: none\ and \AI-assisted: yes\ per the repository template.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

The preference accessors and their generic boolean tests are consistent with the stated behavior at head 8327efa9cde7bd090410dee1527c278336094630; I did not run programmatic checks, and InventoryExports.hpp was excluded from review.

What I ran

Read the prepared diff and targeted repository context through repo_read.py. No tests or builds were run.

Results

Check Result Note
Targeted code review passed Accessors use the registered boolean preference
Tests and builds not run No programmatic checks performed
Excluded file review not run InventoryExports.hpp was too large for the review folder

Findings

Blocking

None identified in the code reviewed.

Non-blocking

None.

Not verified

InventoryExports.hpp was excluded by the prepared review artifacts and could not be read through the reader. The changed declarations removed from that file therefore were not verified. No tests, builds, console behavior, or author-reported checks were independently verified. The full text of files marked included in the manifest was not retrieved from the review folder; targeted repository ranges were read for behavior and tests.

To get this to a good state

Nothing is required.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 23752 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 24868 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 24980 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 25140 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 25160 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 25548 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 25549 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 25565 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 26380 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp
core/libs/prx/libSceNKWebKit/tests/Constants.cpp
PR 26431 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
PR 26432 core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 8327efa9cd, applied with git apply on main fd4aeed483 together with the other 25 PRs of one batch (#24107, #24132, #15143, #22088, #22685, #23739, #24032, #16054, #20001, #20344, #24170, #24396, #16856, #17298, #20497, #23347, #24426, #24554, #24598, #21376, #21556, #22047, #22082, #14124, #18476). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
agc_driver_ldexp_f16_inline_constants, guest_crt_setup_constants, guest_freetype_ot_constants and 4 more (7 tests, matched by name to the test file this PR changes) all pass all pass

Whole batch: the full ctest -j 12 (6524 tests) on the RTX 3080 has 8 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Traced to other PRs of the batch, each by reverting it and testing again: #21556 (guest_json_allocator), #16856 (guest_kernel_sys_module_internal), #15143 (guest_math_exact); none is in this PR's area. Failing tests I could not trace to a single PR (reverting the likely candidates did not clear them): public_headers. The 2127 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

This was referenced Nov 21, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 21, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 21, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The reviewed changes consistently add the QTKitEnabled preference accessors and register the preference with a false default; no blocking defect was found in the inspected code.

What I ran

Reviewed head 0440b4caa9b0c06a4a16709682db76b7ee5eccff using repo_read.py to inspect the prepared diff and targeted source ranges. No commands or tests were run; the checks listed in the PR description are author-reported.

Results

Check Result Note
Diff and targeted source review passed Accessors and default agree
Automated checks not run Results reported by author only

Findings

Blocking

None.

Non-blocking

None.

Not verified

Automated checks and console behavior were not run. InventoryExports.hpp was excluded from the review bundle because it was too large; its changed hunk was inspected through the reader. All changed files listed in the manifest were reviewed via the diff or targeted source ranges; the full contents of large files were not read.

To get this to a good state

Nothing is required.

@PrivacyOnion PrivacyOnion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 0440b4caa9:

  • Conventions: tools/check_conventions.py passed.
  • Build: nkwebkit_constants_tests, nkwebkit_noops_tests, nkwebkit_preferences_tests built cleanly.
  • CTest (nkwebkit_constants, nkwebkit_noops, nkwebkit_preferences):
    1/3 Test #4851: nkwebkit_noops ...................   Passed    0.03 sec
    2/3 Test #4865: nkwebkit_preferences .............   Passed    0.06 sec
    3/3 Test #4782: nkwebkit_constants ...............   Passed    0.03 sec
    100% tests passed, 0 tests failed out of 3
    
  • Negative control: with core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp, core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp, core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libSceNKWebKit/src/Preferences.cpp: verified PreferencesFromRef correctly validates preferencesRef against null/invalid references and throws std::invalid_argument per NKWebKit conventions.
    • core/libs/prx/libSceNKWebKit/src/Preferences.cpp: verified Definitions() registration matches historical WebKit default (false, FeatureKind::Boolean) and consistent key string 'QTKitEnabled'.
    • core/libs/prx/libSceNKWebKit/src/Preferences.hpp: verified export signatures WKPreferencesGetQTKitEnabled(const void*) -> bool and WKPreferencesSetQTKitEnabled(const void*, bool) match calling convention APS5_VABI and upstream WebKit C API.
    • core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp & NoOpExports.hpp: verified clean removal of outdated stub declarations and removal of obsolete stub assertions in tests/Constants.cpp and tests/NoOps.cpp.
    • core/libs/prx/libSceNKWebKit/tests/Preferences.cpp: verified booleanCases table entry systematically covers default false, setter/getter roundtrip, copy propagation via WKPreferencesCreateCopy, and null reference rejection.
    • docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md: verified debt fragment syntax and accurate description matching AGENTS.md rules.

Looks Good To Me

@ycbuzi

ycbuzi commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Tested 0440b4caa9 merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Windows Server 2022 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 3 tests failed out of 6626; 99% tests passed, 4 tests failed out of 6626. 4 of the failing tests fail on main too. run
  • Windows Server 2025 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 100% tests passed, 0 tests failed out of 6626; 100% tests passed, 0 tests failed out of 6626. run

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 23, 2026
@heditrigui
heditrigui force-pushed the feat/nkwebkit-preferences-qtkit branch from 3d20965 to c388dcc Compare November 23, 2026 17:03

@PrivacyOnion PrivacyOnion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against c388dccaa8:

  • Conventions: tools/check_conventions.py passed.
  • Build: nkwebkit_constants_tests, nkwebkit_noops_tests, nkwebkit_preferences_tests built cleanly.
  • CTest (nkwebkit_constants, nkwebkit_noops, nkwebkit_preferences):
    1/3 Test #4883: nkwebkit_constants ...............   Passed    0.01 sec
    2/3 Test #4993: nkwebkit_noops ...................   Passed    0.01 sec
    3/3 Test #5013: nkwebkit_preferences .............   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 3
    
  • Negative control: with core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp, core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp, core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libSceNKWebKit/src/Preferences.cpp: Verified WKPreferencesGetQTKitEnabled and WKPreferencesSetQTKitEnabled forward to PreferencesFromRef(preferencesRef, func)->GetBool(u"QTKitEnabled") and Set(u"QTKitEnabled", flag), throwing std::invalid_argument on null/invalid references consistent with all NKWebKit preference accessors.
    • core/libs/prx/libSceNKWebKit/src/Preferences.cpp: Verified Definitions() registers u"QTKitEnabled" with default false and FeatureKind::Boolean matching historical WebKit configuration.
    • core/libs/prx/libSceNKWebKit/src/Preferences.hpp: Verified signatures WKPreferencesGetQTKitEnabled(const void*) -> bool and WKPreferencesSetQTKitEnabled(const void*, bool) match calling convention APS5_VABI and WebKit C API conventions.
    • core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp & NoOpExports.hpp: Verified clean removal of outdated stub declarations, and corresponding constant/noop assertions removed from tests/Constants.cpp and tests/NoOps.cpp.
    • core/libs/prx/libSceNKWebKit/tests/Preferences.cpp: Verified booleanCases table addition systematically tests default false, setter/getter roundtrip, copy propagation via WKPreferencesCreateCopy, and null reference rejection.
    • docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md: Verified valid technical debt fragment syntax and description per AGENTS.md.

Looks Good To Me

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 23, 2026
@Helldiverr

Copy link
Copy Markdown
Contributor

I reviewed head c388dccaa8, merged onto main bca96e3016 as 8cc925a634. The description lists no test run; this run is on Windows.

  • On Windows WKPreferencesGetQTKitEnabled and WKPreferencesSetQTKitEnabled default to false, round-trip both values, carry the value into WKPreferencesCreateCopy without sharing it, and throw std::invalid_argument for a null reference, as the new booleanCases row expects.
  • 7 of 10 mutations are caught. The 3 that survive all change the new Definitions() row: removing it, or changing its kind to Testable or None. The probe below tells each of them apart from the head.
  • Suggestions: cover the feature-key behaviour in the test, drop the leftover blank lines, and name the upstream source for the default and for storing the flag per object.

Lines in core/libs/prx/libSceNKWebKit/src/Preferences.cpp and core/libs/prx/libSceNKWebKit/tests/Preferences.cpp are at the head; neither file has changed on main since the base, so they are the same on the merge. Lines in ConstantExports.cpp and NoOpExports.cpp are given at the head and on the merge, because main has removed other stubs from both files.

Runs. ctest --test-dir build -R "^nkwebkit_(preferences|constants|noops)$" -V

test main merge 1 2 3
nkwebkit_preferences Passed 0.07 s Passed 0.07 s Passed 0.05 s Passed 0.04 s
nkwebkit_constants Passed 0.18 s Passed 0.10 s Passed 0.04 s Passed 0.03 s
nkwebkit_noops Passed 0.06 s Passed 0.06 s Passed 0.05 s Passed 0.03 s

On the merge, tools/check_conventions.py --base bca96e3016 passes and tools/debt_fold.py --check exits 0. tools/guest_pointer_audit.py libSceNKWebKit gives the same 341 lines on this main and on the merge, none of them in Preferences.cpp, ConstantExports.cpp or NoOpExports.cpp.

Existing runs.

  • PrivacyOnion ran nkwebkit_constants, nkwebkit_noops and nkwebkit_preferences on Linux at c388dccaa8 (pass), with a negative control: with the six source and header files reverted to main, the new tests do not build.
  • MarcZX10 read the code at 0440b4caa9 without running anything.
  • kiwe147 ran a combined tree of 26 pull requests on Windows at 8327efa9cd, and ycbuzi ran the full ctest suite on Windows Server 2022 and 2025 at 0440b4caa9 merged into main (pass).
  • This run adds a Windows negative control that builds and runs, the mutations and the probe.

Negative control. I kept the declarations, the Definitions() row and the test, and replaced the setter and getter bodies (Preferences.cpp:2080 and :2084) with NotImplemented_nid_no_patch(__func__), the form AGENTS.md gives for an export that is not implemented. nkwebkit_preferences then fails 3/3: the default check for the new row at core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:225 throws std::runtime_error ("WKPreferencesGetQTKitEnabled not implemented"), which ends the test.

Mutations. Each runs once against nkwebkit_preferences, nkwebkit_constants and nkwebkit_noops. nkwebkit_constants and nkwebkit_noops pass under all of them.

mutation caught at
Default true in the Definitions() row (Preferences.cpp:308) core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:227
Definitions() row removed (Preferences.cpp:308) not caught
Row kind FeatureKind::Testable (Preferences.cpp:308) not caught
Row kind FeatureKind::None (Preferences.cpp:308) not caught
Setter writes PunchOutWhiteBackgroundsInDarkMode (Preferences.cpp:2080) core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:235
Getter reads PunchOutWhiteBackgroundsInDarkMode (Preferences.cpp:2084) core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:235
Setter always stores true (Preferences.cpp:2080) core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:231
Setter ignores its arguments and getter returns false without reading the reference, like WKPreferencesGetHixie76WebSocketProtocolEnabled (Preferences.cpp:2079-2085) core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:235
Setter returns early for a null reference (Preferences.cpp:2080) core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:239
Getter returns false for a null reference (Preferences.cpp:2084) core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:238

The row survives removal because Preferences::GetBool returns false for a key with no definition (Preferences.cpp:476-482) and Preferences::Set stores a non-default value for such a key (:508-529), so the round trip in Booleans() behaves the same. The kind is read only by SetFeature, EnableAllExperimentalFeatures and ResetAllInternalDebugFeatures (:531-549), and the test calls none of them for QTKitEnabled.

Probe. It is a new function in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp, called from main before DialogElementFeatureKey() (:638) on the merge. It runs once on a fresh WKPreferencesCreate() object, and the test still passes with it.

step head row removed Testable None
WKPreferencesEnableAllExperimentalFeatures, then get false false true false
WKPreferencesSetExperimentalFeatureForKey(..., true, "QTKitEnabled"), then get true false true false
WKPreferencesSetInternalDebugFeatureForKey(..., false, "QTKitEnabled"), then get false false false false
Set true, WKPreferencesResetAllInternalDebugFeatures, then get true true true true

Suggestion. Two checks from the probe in Booleans() or Features() would catch all three surviving mutations: that WKPreferencesSetExperimentalFeatureForKey with the QTKitEnabled key sets the flag, and that WKPreferencesEnableAllExperimentalFeatures leaves it false.

Suggestion. Removing the stubs leaves three blank lines in a row in core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp (:320-322 at the head, :316-318 on the merge) and in core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp (:154-156 at the head, :136-138 on the merge). main has no run of two or more blank lines in either file.

Suggestion. The debt fragment says the default matches historical WebKit configuration but names no source. Here, several accessors that WebKit keeps only for compatibility ignore the reference and return a constant, for example WKPreferencesGetHixie76WebSocketProtocolEnabled (Preferences.cpp:2192-2197, checked with a null reference at core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:286-289). A link to the pinned upstream source for QTKitEnabled in the fragment would show whether it belongs with the stored flags or with those accessors. The test already tells the two apart: the mutation that switches to the constant pattern is caught at :235.

Host:

  • CPU: Ryzen 9 9950X3D
  • OS: Windows 11 Pro 26300
  • Toolchain: WinLibs GCC 15.2.0 (UCRT, POSIX threads, SEH) r7, Release

AI-assisted: yes

@heditrigui
heditrigui force-pushed the feat/nkwebkit-preferences-qtkit branch from c388dcc to 3db83d3 Compare November 24, 2026 17:16
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 24, 2026
@heditrigui
heditrigui force-pushed the feat/nkwebkit-preferences-qtkit branch from 3db83d3 to e85124e Compare November 24, 2026 20:15
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 24, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head e85124ee78cd46fc38e578bbc8dffdd512b1f4ae from the prepared diff and targeted source reads using repo_read.py. No build or test commands were run; the description reports convention, debt-fold, overlap, and whitespace checks, but these were not independently run.

Results

Check Result Note
Source review passed Accessors follow existing preference patterns
Build and tests not run Not run during this review
Author-reported checks not run Not independently verified

Findings

Blocking

None.

Non-blocking

None.

Not verified

Physical-console behavior and the author-reported checks were not verified. Reviewed all changed files listed in the manifest: core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp, core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp, core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.hpp, core/libs/prx/libSceNKWebKit/tests/Constants.cpp, core/libs/prx/libSceNKWebKit/tests/NoOps.cpp, core/libs/prx/libSceNKWebKit/tests/Preferences.cpp, and docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md. No changed files were excluded in the manifest.

To get this to a good state

Nothing is required.

@PrivacyOnion PrivacyOnion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against e85124ee78:

  • Conventions: tools/check_conventions.py passed.
  • Build: nkwebkit_constants_tests, nkwebkit_noops_tests, nkwebkit_preferences_tests built cleanly.
  • CTest (nkwebkit_constants, nkwebkit_noops, nkwebkit_preferences):
    1/3 Test #5364: nkwebkit_noops ...................   Passed    0.04 sec
    2/3 Test #5388: nkwebkit_preferences .............   Passed    0.06 sec
    3/3 Test #5230: nkwebkit_constants ...............   Passed    0.04 sec
    100% tests passed, 0 tests failed out of 3
    
  • Negative control: with core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp, core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp, core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified WKPreferencesSetQTKitEnabled and WKPreferencesGetQTKitEnabled in core/libs/prx/libSceNKWebKit/src/Preferences.cpp:2079-2086 handle null and invalid references via PreferencesFromRef throw pattern
    • Verified QTKitEnabled preference registration in Definitions() in core/libs/prx/libSceNKWebKit/src/Preferences.cpp:308 with default false and FeatureKind::Boolean
    • Verified declarations match exact linkage and APS5_VABI signatures in core/libs/prx/libSceNKWebKit/src/Preferences.hpp:214,429 and removed stubs from InventoryExports.hpp and NoOpExports.hpp
    • Verified table-driven unit test coverage in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:168 for default value, roundtrip mutation, copy propagation, and invalid reference rejection
    • Verified documentation of debt fragment in docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md conforms to repository debt tracking requirements

Looks Good To Me

# Conflicts:
#	core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
@heditrigui
heditrigui force-pushed the feat/nkwebkit-preferences-qtkit branch from e85124e to 41d336f Compare November 28, 2026 04:46
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: QTKit Preference Support

Layer / File(s) Summary
Define and expose the QTKit preference
core/libs/prx/libSceNKWebKit/src/Preferences.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.hpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp, core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp, core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp, core/libs/prx/libSceNKWebKit/tests/*, docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md
QTKitEnabled is defined with a false default. The getter and setter read and write the preference. Tests cover its initial value and boolean access. The documentation describes the API and its stated behavior. The prior constant getter and no-op setter exports and checks are removed.

Suggested reviewers: marczx10, privacyonion, edubox

Change: Feature

Merge Risk: Minimal · up to 41d33

This change makes the QTKit preference getter and setter work through stored preferences, with a default of false, instead of returning a constant and doing nothing. No concrete defect was found. The change is small and easy to revert, so the merge risk is minimal.

Security architecture risk: Minimal · up to 41d33

The QTKit preference now remembers a caller’s setting on the referenced object and still defaults to off. The reviewed change does not activate a media backend or grant callers broader access.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new effect observed in the reviewed source is confined to the referenced preferences object and values copied from it. No in-repository consumer was identified that uses this Boolean to activate QTKit or change another component’s behavior.

Trust Boundaries and Controls

  • observed — The new accessors use the same reference check as neighboring preference accessors. It rejects null references and live objects of the wrong type; it does not establish the validity of arbitrary or stale pointers.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e41f476c-9697-4c4e-8161-3760cac1601d
Commits

Reviewing files that changed from the base of the PR and between 4c7578e and 41d336f.

Files selected for processing: 10

  • core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
  • core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp
  • core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp
  • core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp
  • core/libs/prx/libSceNKWebKit/src/Preferences.cpp
  • core/libs/prx/libSceNKWebKit/src/Preferences.hpp
  • core/libs/prx/libSceNKWebKit/tests/Constants.cpp
  • core/libs/prx/libSceNKWebKit/tests/NoOps.cpp
  • core/libs/prx/libSceNKWebKit/tests/Preferences.cpp
  • docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md
Files with no reviewable changes: 5

  • core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp
  • core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp
  • core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp
  • core/libs/prx/libSceNKWebKit/tests/Constants.cpp
  • core/libs/prx/libSceNKWebKit/tests/NoOps.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@PrivacyOnion PrivacyOnion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 41d336f52f:

  • Conventions: tools/check_conventions.py passed.
  • Build: nkwebkit_constants_tests, nkwebkit_noops_tests, nkwebkit_preferences_tests built cleanly.
  • CTest (nkwebkit_constants, nkwebkit_noops, nkwebkit_preferences):
    1/3 Test #5453: nkwebkit_noops ...................   Passed    0.01 sec
    2/3 Test #5477: nkwebkit_preferences .............   Passed    0.02 sec
    3/3 Test #5315: nkwebkit_constants ...............   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 3
    
  • Negative control: with core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp, core/libs/prx/libSceNKWebKit/src/ConstantExports.cpp, core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified WKPreferencesGetQTKitEnabled and WKPreferencesSetQTKitEnabled in core/libs/prx/libSceNKWebKit/src/Preferences.cpp:2079-2086 handle null and invalid references via PreferencesFromRef throw pattern
    • Verified QTKitEnabled preference registration in Definitions() in core/libs/prx/libSceNKWebKit/src/Preferences.cpp:308 with default false and FeatureKind::Boolean
    • Verified declarations match exact linkage and APS5_VABI signatures in core/libs/prx/libSceNKWebKit/src/Preferences.hpp:214,429 and removed stubs from InventoryExports.hpp and NoOpExports.hpp
    • Verified table-driven unit test coverage in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:168 for default value, roundtrip mutation, copy propagation, and invalid reference rejection
    • Verified documentation of debt fragment in docs/dev/debt/changes/feat-nkwebkit-preferences-qtkit.md conforms to repository debt tracking requirements

Looks Good To Me

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing in the inspected implementation blocks merge; the preference accessors follow the existing pattern, and the test suite includes the new default, round-trip, copy, and invalid-reference cases.

What I ran

Reviewed head 41d336f52f37cc29c7fbf28f9f0411fc2080e133. No commands or tests were run; the review interface provided read-only access. I read all ten changed files listed as reviewed in manifest.json, focusing on changed lines and relevant surrounding code. No files were excluded.

Results

Check Result Note
Changed code review passed Accessors and tests inspected
Automated checks not run Read-only review interface
Console behavior not run No console available

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build and automated test results were not independently verified. Console behavior was not tested. The PR description reports convention, debt-fold, whitespace, and overlap checks, but those were not run during this review.

To get this to a good state

Nothing is required.

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built the branch’s changed sources and ran Preferences and NoOps and Constants on Linux against the existing runtime libraries. The test run passed and covered the QTKit preference accessors alongside the existing no-op and constant checks.

AI-assisted: yes.

@Plyxen Plyxen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the diff at 41d336f52f. Windows 11 with GCC 15.2 and Linux (Ubuntu 24.04 in WSL2, GCC 13.3), applied onto main at c1593e4e1dd together with other open PRs (so not an isolated build).

  • nkwebkit_preferences, nkwebkit_constants and nkwebkit_noops: pass on both.
  • No control: on main the two exports take no arguments.

Not checked: the values against a console.

AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

I'm closing this under a standing team decision on libSceNKWebKit: no title can reach these exports yet. On main, WKViewCreate still returns NotImplemented and there is no page creation, so nothing a game runs calls this code. This is about reachability, not the quality of the work.

If page or view creation lands, or you can show a title that calls these functions, reopen it and it will be reviewed on merit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants