You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(libSceUserService): gate the accessibility helpers on initialization like the console - #25477
GetAccessibilityChatTranscription, GetAccessibilityVibration, GetAccessibilityZoomEnabled and GetAccessibilityPressAndHoldDelay on a PS5 Pro payload process (13.60) answer USER_SERVICE_ERROR_NOT_INITIALIZED (0x80960002) for a null destination before any sceUserServiceInitialize - the same gate position as the ten getters landed in #25454 and #25470; warm, they answer NOT_LOGGED_IN for the session-less user 0 (0x80960009) before the pointer check, which matches this implementation's order. All six accessibility getters share one helper here, so the gate is added once in that helper and covers all six; the two standalone family members (GetAccessibilityKeyremapEnable, GetAccessibilityZoom) were not probed and are left as they are, noted in the entry. Tests: the cold block in GuestUserService.cpp gains an accessibility pin, and the accessibility loop of the invalid-user bounds test (which runs before initialization) is re-pinned to NOT_INITIALIZED. The debt fragment is the same entry update as #25470 extended with this sentence; stacked branch. Evidence in the comment below.
Tested
Console measurement: PS5 Pro (firmware 13.60, kernel_get_fw_version = 0x13600007), payload process via elfldr, session tw49 (2026-11-22 ~04:33 UTC); a title process may differ. Raw output in the comment.
Several user-service queries now return an uninitialized-service error before validating arguments when called before initialization.
Traditional Chinese input-type queries continue to report no input variant.
Tests
Updated user-service tests to check initialization requirements, error responses, and whether output values remain unchanged when appropriate.
Added user-service initialization to keyboard, content-search, network-related, and other test setups to ensure they run under the required service state.
Measured on a PS5 Pro, firmware 13.60 (kernel_get_fw_version = 0x13600007), payload process via elfldr, session tw49, 2026-11-22 ~04:33 UTC; a title process may differ.
Probe: dlopen("libSceUserService.sprx"), resolve four accessibility getters, call each with a null destination before any sceUserServiceInitialize, then initialize and repeat (stdout flushed before every call):
Cold, all four answer 0x80960002 - the initialization check runs before the login and pointer checks, like the other gated getters (#25454, #25470). Warm, they answer 0x80960009 (USER_SERVICE_ERROR_NOT_LOGGED_IN) with the destination untouched: user 0 is not logged in in a session-less payload, and the login check precedes the pointer check - the same order this implementation's shared accessibility helper already has, so only the missing initialization check is added here. The two standalone family members were not probed; they keep their current behavior and the entry says so.
Independent Windows verification for b77af65274 on Windows 11 build 26200, UCRT64 GCC 16.2.0, Ninja Release. All 23 focused CTest cases passed three consecutive runs each (69 passes). guest_user_service exercised the new cold accessibility assertion, and guest_user_service_profiles_bounds exercised the updated accessibility checks before initialization and the logged-in setting checks. The run also covered the other UserService and dependent-library suites.
I tested the combined core/libs diff, including #25454 and #25470, on configured checkout 732c68c9fd. One hunk in GuestUserServiceProfilesBounds.cpp needed reduced context, and the age-bounds CMake target was shortened locally to fit the Windows build path. The PR assertions and CTest names were preserved.
9/19 Test #5518: guest_user_service ............................ Passed 0.02 sec
10/19 Test #5524: guest_user_service_kratos ..................... Passed 0.02 sec
11/19 Test #3828: guest_convert_keycode_title_malformed-json .... Passed 0.03 sec
12/19 Test #3823: guest_convert_keycode ......................... Passed 0.03 sec
13/19 Test #5529: guest_user_service_initial_user_bounds ........ Passed 0.02 sec
14/19 Test #5173: guest_np_manager .............................. Passed 0.02 sec
15/19 Test #3829: guest_convert_keycode_title_missing ........... Passed 0.02 sec
16/19 Test #1025: guest_np_common_runtime ....................... Passed 0.44 sec
17/19 Test #3822: guest_content_search .......................... Passed 0.02 sec
18/19 Test #5528: guest_user_service_account_name_limits ........ Passed 0.02 sec
19/19 Test #5530: guest_user_service_age_level_guest_bounds ..... Passed 0.02 sec
100% tests passed, 0 tests failed out of 19
Negative control: with core/libs/prx/libSceUserService/Export.cpp reverted to main and the new tests kept, the suite fails:
13/19 Test #5524: guest_user_service_kratos ..................... Passed 0.02 sec
14/19 Test #5518: guest_user_service ............................Subprocess aborted***Exception: 0.41 sec
15/19 Test #5530: guest_user_service_age_level_guest_bounds .....Subprocess aborted***Exception: 0.37 sec
16/19 Test #5173: guest_np_manager .............................. Passed 0.02 sec
17/19 Test #3829: guest_convert_keycode_title_missing ........... Passed 0.02 sec
18/19 Test #3822: guest_content_search .......................... Passed 0.02 sec
19/19 Test #5529: guest_user_service_initial_user_bounds ........Subprocess aborted***Exception: 0.27 sec
79% tests passed, 4 tests failed out of 19
Restoring the change makes it pass again.
Code reading:
Verified in core/libs/prx/libSceUserService/Export.cpp:58-60 that ReportAccessibilitySetting gates on initialized.load() and returns USER_SERVICE_ERROR_NOT_INITIALIZED (0x80960002) before checking IsUserLoggedIn or validating the destination pointer.
Verified that all six accessibility getters routed through ReportAccessibilitySetting (sceUserServiceGetAccessibilityChatTranscription, sceUserServiceGetAccessibilityPressAndHoldDelay, sceUserServiceGetAccessibilityTriggerEffect, sceUserServiceGetAccessibilityVibration, sceUserServiceGetAccessibilityZoomEnabled, and sceUserServiceGetAccessibilityZoomFollowFocus) consistently inherit the initialization gate.
Confirmed that the technical debt fragment replacement in docs/dev/debt/changes/fix-libsceuserservice-getter-init-gates-1360.md accurately records the console probe results, leaves standalone stubs noted, and complies with AGENTS.md conventions.
Verified cold call coverage in core/libs/tests/GuestUserService.cpp:129 and the pre-init loop in core/libs/tests/GuestUserServiceAgeLevelGuestBounds.cpp:141-143, ensuring output buffers are untouched on rejection.
Confirmed that CMakeLists.txt target links and initialization setup in dependent tests (Keyboard, KeyboardDialog, GuestNpManager, GuestNpCommonRuntime, GuestContentSearch, GuestConvertKeycode) cleanly maintain test suite isolation.
Audited strict AGENTS.md compliance: no unauthorized comments were added, no stubs return fake success, and atomic ordering/thread safety of initialized is respected.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed — looks good
Nothing blocks this change; the initialization gates and updated tests match the described behavior.
What I ran
Reviewed head b77af652742ac78d3651a4068763a848e64c1edf from the prepared diff and pinned reader. No commands or tests were run. Read every added line in all 18 changed files marked included; the deleted debt fragment has no added lines and was excluded. No additional files were excluded by rule.
Results
Check
Result
Note
Diff review
passed
Added lines reviewed
Automated tests
not run
Only author-reported results supplied
Console behavior
not verified
No console measurement performed
Findings
Blocking
None.
Non-blocking
None.
Not verified
The reported PS5 Pro measurement, Linux ctest run, conventions check, and PR overlap check were not independently run. The deleted debt fragment was not read; it contains no added text. The review bundle marked all other changed files included, and their added lines were read.
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.
Several getters now return USER_SERVICE_ERROR_NOT_INITIALIZED before existing validation or output handling. The Traditional Chinese input-type query now uses NoInputVariant. The debt note records measured behavior and corresponding implementation changes.
Query error and lifecycle tests core/libs/tests/GuestUserService*.cpp
Tests check initialization errors, output preservation, and argument handling before and after initialization or termination. Other assertions cover account IDs and repeated initialization.
Related test target setup core/libs/CMakeLists.txt, core/libs/prx/libSceKeyboard/..., core/libs/tests/GuestContentSearch.cpp, core/libs/tests/GuestConvertKeycode*.cpp, core/libs/tests/GuestNp*.cpp, core/libs/tests/GuestUserServiceUserName.cpp
Related test targets link to or initialize libSceUserService before running their checks.
Possibly related PRs
boykopovar/AnyPS5#25493: Adds initialization gates to two standalone accessibility getters that this PR identifies as unmeasured.
boykopovar/AnyPS5#25454: Adds initialization checks to other getters and shares cold-call test expectations with this PR.
boykopovar/AnyPS5#25470: Adds initialization gates to four getters and shares test expectations and test files with this PR.
Suggested reviewers:privacyonion, vasanthdev2004
Change: Bug fix
Merge Risk: Minimal · up to fbfc5
The change makes several user-service getters return a not-initialized error before the service is initialized, and the related tests and test targets are updated to match. No concrete merge-blocking risk was found.
Security architecture risk: Minimal · up to fbfc5
Affected getters now reject calls made before initialization and keep their existing checks afterward. This changes what callers see before initialization, but the reviewed change does not grant new access or weaken existing validation.
Security review details
Security Blast Radius
observed — The flagged CheckValueClasses range accepts an already-initialized result after the NP Manager test executable initializes the service in main. It does not add a production guest dispatch path.
Trust Boundaries and Controls
observed — In the shared accessibility path, a false initialization flag stops the call before the guest-supplied user ID or destination is processed. A true flag still leaves the existing login check and guarded guest-memory copy in place. The flag is a lifecycle precondition, not a caller identity check or a lock against concurrent termination.
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: 3d4ec812-2c7c-4cce-a318-2ce279a0f18a
Commits
Reviewing files that changed from the base of the PR and between 9d59cef and fbfc58e.
Files selected for processing: 1
core/libs/tests/GuestNpManager.cpp
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed — changes requested
Changes are required before merge: fix the initialization ordering and cold-state expectations in GuestUserServiceAccountNameLimits.
What I ran
Reviewed head 58a922b5f89fb4962ef874c7b80c5bbad0f7fb14 using the prepared review bundle and pinned repository reader. No shell commands or tests were run.
Results
Check
Result
Note
Changed code review
passed
19 included changed files inspected
Tests
not run
Author reports 37/37; not independently verified
Negative control
not run
No test runner was available
Findings
Blocking
GuestUserServiceAccountNameLimits.cpp:219 initializes the service before the test calls TestNpAccountIdQueryBounds and TestNullPointerValidation. Those tests still expect sceUserServiceGetNpAccountId to return USER_SERVICE_ERROR_NOT_INITIALIZED (lines 165–184 and 201–211), but after initialization the implementation returns USER_SERVICE_ERROR_INVALID_ARGUMENT for null output and USER_SERVICE_ERROR_UNKNOWN_USER for invalid IDs. This makes the test executable abort. Keep the cold-state checks before initialization or update the setup and expectations consistently. (test assertions, getter implementation)
Non-blocking
None.
Sources
The cited links point to the reviewed commit. The review covered the changed hunks and relevant surrounding context in core/libs/CMakeLists.txt, both keyboard CMake and test files, core/libs/prx/libSceUserService/Export.cpp, the changed GuestContentSearch, GuestConvertKeycode, GuestConvertKeycodeTitle, GuestNpCommonRuntime, GuestNpManager, and GuestUserService test files, and the new debt entry.
Not verified
Tests, build/toolchain checks, and console behavior were not independently run or confirmed. The deleted debt entry was reviewed in the diff; it has no head file to read.
To get this to a good state
Resolve the initialization state mismatch in GuestUserServiceAccountNameLimits; then rerun the user service test suite on this head.
The reason will be displayed to describe this comment to others. Learn more.
Architecture findings (1)
Advisory architecture findings (1)
Trivial — After UserService terminates, HttpCache Clear and ClearAll can return success without deleting matching entries for a previously registered non-system user with a valid cache. Termination leaves the user registration state intact, which the base getter could still report, but the head getter now rejects the lookup. HttpCache treats that error as non-registration and skips deletion. Its one-time startup flag also means another HttpCache initialization does not itself recheck UserService readiness after an earlier successful start.
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: 4fb09588-fa80-4e92-a3ae-50d09d06a8c9
Commits
Reviewing files that changed from the base of the PR and between 1b8f79a and 58a922b.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Thanks — you were right, guest_user_service_account_name_limits aborted at head 58a922b5f8. Root cause: the parent PR #25470 moved sceUserServiceInitialize(nullptr) to the top of main, so TestNpAccountIdQueryBounds and TestNullPointerValidation now run after initialization, but their GetNpAccountId expectations were left at the cold value. Because sceUserServiceGetNpAccountId checks !initialized before the null/lookup checks, in the initialized state it returns INVALID_ARGUMENT (null output) / UNKNOWN_USER (not logged in), not NOT_INITIALIZED.
Fixed in #25470 (new head 333da9d0, propagated here as 2b116f96):
TestNpAccountIdQueryBounds now brackets its cold boundary checks with Terminate() … Initialize() so they keep exercising the genuine cold NOT_INITIALIZED path and the sentinel-preservation assertions.
The two stale GetNpAccountId(..., nullptr) == NOT_INITIALIZED lines in TestNullPointerValidation (which runs warm, alongside the other INVALID_ARGUMENT getters) were updated to INVALID_ARGUMENT.
Verified locally on a fresh build of this head: guest_user_service_account_name_limits, guest_user_service_kratos, age_level_guest_bounds, profiles_bounds, initial_user_bounds, foreground_user, plus keyboard_input and keyboard_dialog all pass.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed — looks good
The changed initialization gates and corresponding pre-initialization assertions are consistent in the inspected code at head 2b116f96befc596b246a1b7d3f6d928e1cc3996b; repository tests were not run during this review.
What I ran
Read the prepared description, commits, manifest, and full diff; inspected changed implementation and test ranges using the pinned repository reader.
No commands or tests were run.
Results
Check
Result
Note
Diff and targeted code review
passed
No concrete defect found
Automated tests
not run
Author reports 37/37 ctest cases passed
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not independently run the reported tests, convention check, overlap check, or console measurements.
Read all included changed files listed in manifest.json. The deleted debt fragment was present only in the diff and has no head text to read. No files were excluded by a size or format rule in the manifest.
To get this to a good state
Nothing is required.
ycbuzi
added a commit
to ycbuzi/AnyPS5
that referenced
this pull request
Nov 30, 2026
The reason will be displayed to describe this comment to others. Learn more.
Architecture findings (1)
Advisory architecture findings (1)
Trivial — ContentSearch initializes independently, but SearchApplication now forwards USER_SERVICE_ERROR_NOT_INITIALIZED before reaching its SDK-specific service-unavailable response if UserService has not been initialized or has already terminated. The updated integration test initializes UserService before checking those responses, so those assertions do not cover the newly observable dependency failure.
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: e90e610e-def9-40c4-987f-2f8f9220e437
Commits
Reviewing files that changed from the base of the PR and between 58a922b and 2b116f9.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed — looks good
Nothing blocks this change; the inspected changes align the selected getters with the stated initialization behavior and update their callers and tests accordingly.
What I ran
Reviewed head 9d59cef262e449de2ae093b02cdbac7f5e2da640 using the prepared diff and repo_read.py at the pinned head. No build or test commands were run. Read the changed lines for all included files in the review bundle except the deleted debt fragment, which has no added lines; inspected the shared accessibility helper, its getter callers, and the initialization-related test setup. The full text of files.json was unavailable through the reader; the review folder listing and manifest identify the deleted file and included files.
Results
Check
Result
Note
Diff and changed lines
passed
Included changes inspected
Targeted code paths
passed
Helper and affected test setup inspected
Build and tests
not run
Author reports server tests passed
Console behavior
not run
Measurement is author reported
Findings
Blocking
None.
Non-blocking
None.
Not verified
No build or tests were run as part of this review. Console behavior and the author-reported test results were not independently verified. The deleted debt fragment's former text was not read; only its deletion and replacement entry were inspected.
The reason will be displayed to describe this comment to others. Learn more.
Architecture findings (1)
Advisory architecture findings (1)
Trivial — For a still-registered ordinary user with matching entries in an open HTTP cache, stopping User Service now causes Clear and ClearAll to return success without deleting those entries. The change conflates an unavailable membership check with a definitive nonmember result. Entries can survive reinitialization unless the caller explicitly clears them again.
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: 53c3c192-fca3-4d8d-b448-82de51b455c0
Commits
Reviewing files that changed from the base of the PR and between 2b116f9 and 9d59cef.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
I can’t produce a review from the available interface: the required repository reader is not exposed as a tool, and the environment is read-only. The prepared review files and the pinned source therefore remain unread.
Reviewed — no blocking findings
Changes are required before merge: review the prepared diff and source at the pinned head.
What I ran
Not run. No reader command or filesystem read/write tool is available in this session.
Results
Check
Result
Note
Prepared diff and source review
not run
Required inputs unavailable
Findings
Blocking
None verified; the change was not reviewed.
Non-blocking
None.
Not verified
The PR description, commits, diff, manifest, changed file contents, and source behavior were not read. No checks were run.
To get this to a good state
Review the prepared diff and changed source files at the pinned head, then issue a verdict supported by that evidence.
The reason will be displayed to describe this comment to others. Learn more.
Built and ran guest_user_service on Linux with this stacked head integrated. It passed. I traced the six shared accessibility getters through the common helper, which now checks initialization before login and argument handling.
AI-assisted: yes.
ycbuzi
added a commit
to ycbuzi/AnyPS5
that referenced
this pull request
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GetAccessibilityChatTranscription,GetAccessibilityVibration,GetAccessibilityZoomEnabledandGetAccessibilityPressAndHoldDelayon a PS5 Pro payload process (13.60) answerUSER_SERVICE_ERROR_NOT_INITIALIZED(0x80960002) for a null destination before anysceUserServiceInitialize- the same gate position as the ten getters landed in #25454 and #25470; warm, they answerNOT_LOGGED_INfor the session-less user 0 (0x80960009) before the pointer check, which matches this implementation's order. All six accessibility getters share one helper here, so the gate is added once in that helper and covers all six; the two standalone family members (GetAccessibilityKeyremapEnable,GetAccessibilityZoom) were not probed and are left as they are, noted in the entry. Tests: the cold block inGuestUserService.cppgains an accessibility pin, and the accessibility loop of the invalid-user bounds test (which runs before initialization) is re-pinned toNOT_INITIALIZED. The debt fragment is the same entry update as #25470 extended with this sentence; stacked branch. Evidence in the comment below.Tested
kernel_get_fw_version=0x13600007), payload process via elfldr, session tw49 (2026-11-22 ~04:33 UTC); a title process may differ. Raw output in the comment.ctest -R 'user_service|content_search|np_manager|convert_keycode|keyboard|np_common'- 37/37 passed with this branch applied on top of fix(libSceUserService): gate the remaining console-measured getters on initialization #25470.python3 tools/check_conventions.py --base origin/main: 1 finding (debt-length warning on the merged entry), 0 errors; isolated fold applies to exactly one entry.python3 tools/pr_overlap.pyfailed closed on PRs conflicting with the base, as under fix(libSceUserService): gate the getters on initialization like the console #25454; the accessibility-touching ones were diffed: feat(userservice): implement accessibility keyremap and zoom stubs #9828 adds keyremap/zoom stub bodies and refactor(libSceUserService): retain fail-fast settings call shapes #14829 reshapes settings calls - neither adds an initialization check, so no open PR implements this behavior.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit