Skip to content

feat(icu): report the UChars dictionary matcher type - #23028

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
MrSourceee:feat/icu-uchars-matcher-type
Nov 30, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
MrSourceee:feat/icu-uchars-matcher-type

Conversation

@MrSourceee

@MrSourceee MrSourceee commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What

Implement icu_68::UCharsDictionaryMatcher::getType() const (libSceIcu NID 6KsOlzLtoaE, named in #14016). The export accepts the implicit receiver and returns the 32-bit TRIE_TYPE_UCHARS tag (1) without reading or modifying the object, matching ICU 68.2. It does not implement dictionary loading, matching, or the bytes matcher. Add a focused ABI/return-value/receiver-preservation test and record the hardware-verification gap.

Tested

The submitted patch includes results from Linux x86-64 (GCC 14.2) on base 7f21ff3c8d: the old export threw; the patched export agreed with ICU 68.2 on three real UChars matcher objects. The upstream byte matcher returned 0 as a negative reference. The focused repository test and the adjacent resource test passed in the submitted checks.

On the PR base, all six file changes were checked against the current source. The Linux runtime checks were not rerun on this base. No full CMake build, Windows, PS5 hardware or game test; no title compatibility claim.

Checklist

  • Based on current main; no other open PR implementing the export was found in overlap checks
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt or required licence notices
  • Unimplemented paths throw; no silent stub added
  • No investigation notes, logs or images added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Summary by CodeRabbit

  • Bug Fixes
    • ICU character dictionary matcher type queries now return the expected type value rather than an unimplemented-result response.
    • The query accepts the expected matcher interface, improving compatibility for software that checks this ICU behavior. The returned value is consistent across calls, regardless of the contents of the matcher data.

@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 b485c04878:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_icu_uchars_matcher_type_tests built cleanly.
  • CTest (guest_icu_uchars_matcher_type):
    1/1 Test #3847: guest_icu_uchars_matcher_type ....   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceIcu/LegacyExports.cpp, core/libs/prx/libSceIcu/include/LegacyExports.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified upstream ICU 68.2 dictionarydata.cpp implementation of UCharsDictionaryMatcher::getType() const returning TRIE_TYPE_UCHARS (1) without inspecting or dereferencing the receiver pointer
    • Verified ABI signature std::int32_t APS5_VABI (const void*) in LegacyExports.hpp and LegacyExports.cpp matching C++ member function call convention on x86_64 SysV ABI / Windows ABI
    • Verified technical debt fragment docs/dev/debt/changes/feat-icu-uchars-matcher-type.md correctly records functional gap regarding hardware verification and dictionary loading
    • Verified test logic in core/libs/prx/libSceIcu/tests/UCharsMatcherType.cpp checks return value and ensures memory is not mutated across multiple receiver patterns
    • Verified AGENTS.md rules compliance: no prohibited comments, conventional commit PR title, and proper CMakeLists test registration with unwind and path configurations

Looks Good To Me

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Progress report (1f27e2a → 8619779)

📈 System libraries: 47.83% (+0.0025%, +1 implemented function)

✅ 1 implemented
Library Name
libSceIcu _ZNK6icu_6823UCharsDictionaryMatcher7getTypeEv_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libSceIcu 407/2766 (14.71%) 408/2766 (14.75%) +0.04%

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 18400 docs/dev/debt/changes/feat-icu-ulist.md L5

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 14123 core/libs/prx/libSceIcu/CMakeLists.txt
PR 14144 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 14340 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 14443 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 16250 core/libs/prx/libSceIcu/CMakeLists.txt
PR 18208 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 18210 core/libs/prx/libSceIcu/CMakeLists.txt
PR 18557 core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 19562 core/libs/prx/libSceIcu/CMakeLists.txt
PR 19628 core/libs/prx/libSceIcu/CMakeLists.txt
PR 19635 core/libs/prx/libSceIcu/CMakeLists.txt
PR 19645 core/libs/prx/libSceIcu/CMakeLists.txt
PR 19670 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 19720 core/libs/prx/libSceIcu/CMakeLists.txt
PR 21222 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 23917 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 23931 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 24255 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 24288 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 24297 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 24335 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 24336 core/libs/prx/libSceIcu/CMakeLists.txt
PR 25524 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 26131 core/libs/prx/libSceIcu/CMakeLists.txt
core/libs/prx/libSceIcu/LegacyExports.cpp
core/libs/prx/libSceIcu/include/LegacyExports.hpp
PR 26173 core/libs/prx/libSceIcu/CMakeLists.txt

@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 reviewed head is b485c04878131586c34165ab4902693463307417; the implementation and focused ABI/return-value test are consistent with the stated ICU behavior, but I could not run checks in this review environment.

What I ran

No commands or tests were run. I read the prepared diff and all six changed files at the pinned head; the manifest lists all six as included, with no excluded changed files.

Results

Check Result Note
Source review passed Changed implementation and test inspected
Focused test not run No command runner available
Hardware verification not run Console ABI and behavior remain unverified

Negative control

Not run; I could not execute the focused test or alter the implementation under test.

Findings

Blocking

None.

Non-blocking

None.

Sources

The changed implementation returns the ICU UChars trie tag (1) without using its receiver (core/libs/prx/libSceIcu/LegacyExports.cpp:1246). The focused test checks the function pointer signature, return value, and receiver preservation (core/libs/prx/libSceIcu/tests/UCharsMatcherType.cpp:7). Implementation at the reviewed commit · Test at the reviewed commit

Not verified

No build or test execution, Windows behavior, PS5 hardware behavior, or game compatibility was verified. The author-reported Linux checks were not rerun. I read core/libs/prx/libSceIcu/CMakeLists.txt, core/libs/prx/libSceIcu/LegacyExports.cpp, core/libs/prx/libSceIcu/include/LegacyExports.hpp, core/libs/prx/libSceIcu/tests/UCharsMatcherType.cpp, docs/dev/debt/changes/feat-icu-uchars-matcher-type.md, and docs/dev/debt/changes/feat-icu-ulist.md; no changed files were excluded by the manifest.

To get this to a good state

Nothing is required.

This was referenced Nov 21, 2026
@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head b485c04878, applied with git apply on main fd4aeed483 together with the other 26 PRs of one batch (#24498, #24665, #17297, #21499, #21726, #22534, #12900, #17843, #22051, #22075, #23087, #23206, #23222, #23227, #13147, #17482, #21935, #17477, #18272, #22858, #22929, #23295, #23916, #24179, #24706, #12619). 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
(the test file this PR changes could not be matched to a ctest name by me) - -

Whole batch: the full ctest -j 12 (6525 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: #18272 (guest_audio_out), #12900 (guest_user_service_initial_user_bounds); 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): guest_content_search. The 2125 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)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

This passed review on b485c04, but it now conflicts with main in feat-icu-ulist.md. Please merge main into the branch and push; it goes back to the merge queue on the new head.

# Conflicts:
#	docs/dev/debt/changes/feat-icu-ulist.md
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: UCharsDictionaryMatcher getType

Layer / File(s) Summary
Update the getType export
core/libs/prx/libSceIcu/include/LegacyExports.hpp, core/libs/prx/libSceIcu/LegacyExports.cpp, docs/dev/debt/changes/feat-icu-uchars-matcher-type.md, docs/dev/debt/changes/feat-icu-ulist.md
The export declaration and implementation now accept a const void* argument and return std::int32_t. The implementation returns 1. The debt documentation records the export, ABI and return-value caveats, and the remaining unimplemented dictionary functions.
Test and register the export
core/libs/prx/libSceIcu/tests/UCharsMatcherType.cpp, core/libs/prx/libSceIcu/CMakeLists.txt
The test checks the function signature and verifies that calls return 1 without changing the receiver for three fill patterns. CMake builds and registers the test when BUILD_TESTING is enabled, and configures Windows unwind support and PATH.

Suggested reviewers: privacyonion, kyon-eth, thimo188

Change: Feature

Merge Risk: Minimal · up to 86197

This change makes the ICU matcher type export return the expected constant, adds a test, and records the change in the debt docs. No concrete risk was found. The author still needs to resolve the reported documentation conflict with main before the merge queue.

Security architecture risk: Minimal · up to 86197

The existing export now returns a fixed type tag without reading or changing the caller’s object. The change does not add dictionary loading or matching, and no material security or state-management risk was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Any guest already able to invoke the export can now receive the fixed type tag instead of the not-implemented behavior. The replacement body does not use caller input to reach host data, another service, or a privileged operation.
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: dc668adf-554e-4764-a693-3d79cc966fed
Commits

Reviewing files that changed from the base of the PR and between 115a703 and 8619779.

Files selected for processing: 6

  • core/libs/prx/libSceIcu/CMakeLists.txt
  • core/libs/prx/libSceIcu/LegacyExports.cpp
  • core/libs/prx/libSceIcu/include/LegacyExports.hpp
  • core/libs/prx/libSceIcu/tests/UCharsMatcherType.cpp
  • docs/dev/debt/changes/feat-icu-uchars-matcher-type.md
  • docs/dev/debt/changes/feat-icu-ulist.md

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

@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 change; the implementation returns the documented ICU 68 UChars trie tag and the console ABI gap is recorded.

What I ran

Reviewed head 8619779625568ada3ad5dcf6c6048d861759d093. I read all six changed files and the prepared diff; no commands or tests were run. The author reports earlier Linux x86-64 checks, but says they were not rerun on this head.

Results

Check Result Note
Changed code review passed Six changed files read
Runtime/build checks not run Prior results are author-reported

Negative control

Not run; the changed behavior was not executed during this review.

Findings

Blocking

None.

Non-blocking

None.

Sources

The changed implementation returns 1 without accessing its receiver (core/libs/prx/libSceIcu/LegacyExports.cpp:1220-1223); the test checks the declared function type, return value, and receiver preservation (core/libs/prx/libSceIcu/tests/UCharsMatcherType.cpp:7-16). The test is registered under BUILD_TESTING (core/libs/prx/libSceIcu/CMakeLists.txt:356-365).

Not verified

No build or test execution, Windows validation, PS5 hardware verification, or game compatibility was performed. All files listed as changed in the manifest were read; no changed files were excluded.

To get this to a good state

Nothing is required.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 29, 2026
@oneandonlydean
oneandonlydean merged commit 0ed2560 into boykopovar:main Nov 30, 2026
15 of 17 checks passed
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.

5 participants