feat(libSceIcu): implement the internal ucase property and mapping exports #18203

Merged
rocklouis055 merged 5 commits from upstream-pr/18203 into main 2026-11-14 22:50:41 +00:00
rocklouis055 commented 2026-11-10 20:39:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rocklouis055 on 2026-11-10T20:39:55Z.


What

Implements the 12 internal libSceIcu case-property exports by forwarding them to ICU 78.1's compiled-in case tables, built from the 3rdparty/icu submodule that #13578 added. #13578 has merged and main is merged into this branch; the PR's own change is d90c2d208f, plus the merge resolution against main's ubidi/unorm2 work. It needs no ICU data file, so it does not depend on #16971's data build. The slice was claimed in discussion #11150. No open PR implements these exports; #14340 and #14443 only move the stubs.

Export Behavior
ucase_getType, ucase_getTypeOrIgnorable none / lower / upper / title, plus the case-ignorable bit
ucase_isSoftDotted, ucase_isCaseSensitive UBool as one signed byte
ucase_tolower, ucase_toupper, ucase_totitle, ucase_fold simple mappings; fold honours U_FOLD_CASE_EXCLUDE_SPECIAL_I
ucase_toFullLower, ucase_toFullUpper, ucase_toFullTitle full mappings with the case locale (UCASE_LOC_*) and an optional UCaseContextIterator
ucase_toFullFolding full folding with options
  • The guest's UCaseContextIterator is called through a host trampoline (CaseProperties.cpp) with the guest calling convention, so context-sensitive mappings such as Greek final sigma use the guest's own text.
  • The full mappings return ICU's encoding: a code point, a string length ≤ 31 with *pString set, or ~c when the character is unchanged. A null pString throws std::invalid_argument; ICU writes through it.
  • The 12 stubs are removed from LegacyExports.cpp/.hpp. The debt file gains an entry for the gaps: Unicode 17.0 tables vs. an ICU 68 module, the UCASE_LOC_* numbering, and no console comparison. The "older callable exports" entry is updated to match.

Tested

Linux (GCC, Release):

  • The new guest_icu_case_properties test passes. Its expected values come from UnicodeData, SpecialCasing and CaseFolding: İ/ı Turkic cases, ß → SS/Ss/ss, U+0587 in root and Armenian, DŽ/Dž/dž, U+1E9E folding, U+0307 sensitivity, out-of-range code points, and final vs. medial sigma through a guest iterator, including an ignorable apostrophe between the letters.
  • All 30 guest_icu_* tests pass.
  • Windows: -fsyntax-only with zig x86_64-windows-gnu for both new files.
  • Mutation check: seven mutants of CaseProperties.cpp all make the test abort: dropping the iterator, fixing the iteration direction, not throwing on a null pString, getTypeOrIgnorable → getType, ignoring fold options, ignoring toFullFolding options, and isCaseSensitive → "has a case type".

Merge notes: removing these stubs touches lines next to the stubs #16605, #14340 and #14443 remove from LegacyExports.cpp/.hpp. The "older callable exports" debt sentence is also rewritten by #16605 and #14340. Each is a one-line resolution. The test registration, header include and new debt entry are placed so they conflict with no open PR.

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: #13578 (merged)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5248529543 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18203). Originally posted by [rocklouis055](https://github.com/rocklouis055) on 2026-11-10T20:39:55Z. --- ### What Implements the 12 internal libSceIcu case-property exports by forwarding them to ICU 78.1's compiled-in case tables, built from the `3rdparty/icu` submodule that #13578 added. #13578 has merged and main is merged into this branch; the PR's own change is d90c2d208f, plus the merge resolution against main's `ubidi`/`unorm2` work. It needs no ICU data file, so it does not depend on #16971's data build. The slice was claimed in [discussion #11150](https://github.com/boykopovar/AnyPS5/discussions/11150#discussioncomment-19528163). No open PR implements these exports; #14340 and #14443 only move the stubs. | Export | Behavior | |---|---| | `ucase_getType`, `ucase_getTypeOrIgnorable` | none / lower / upper / title, plus the case-ignorable bit | | `ucase_isSoftDotted`, `ucase_isCaseSensitive` | `UBool` as one signed byte | | `ucase_tolower`, `ucase_toupper`, `ucase_totitle`, `ucase_fold` | simple mappings; `fold` honours `U_FOLD_CASE_EXCLUDE_SPECIAL_I` | | `ucase_toFullLower`, `ucase_toFullUpper`, `ucase_toFullTitle` | full mappings with the case locale (`UCASE_LOC_*`) and an optional `UCaseContextIterator` | | `ucase_toFullFolding` | full folding with options | - The guest's `UCaseContextIterator` is called through a host trampoline (`CaseProperties.cpp`) with the guest calling convention, so context-sensitive mappings such as Greek final sigma use the guest's own text. - The full mappings return ICU's encoding: a code point, a string length ≤ 31 with `*pString` set, or `~c` when the character is unchanged. A null `pString` throws `std::invalid_argument`; ICU writes through it. - The 12 stubs are removed from `LegacyExports.cpp`/`.hpp`. The debt file gains an entry for the gaps: Unicode 17.0 tables vs. an ICU 68 module, the `UCASE_LOC_*` numbering, and no console comparison. The "older callable exports" entry is updated to match. ### Tested Linux (GCC, Release): - The new `guest_icu_case_properties` test passes. Its expected values come from UnicodeData, SpecialCasing and CaseFolding: İ/ı Turkic cases, ß → SS/Ss/ss, U+0587 in root and Armenian, DŽ/Dž/dž, U+1E9E folding, U+0307 sensitivity, out-of-range code points, and final vs. medial sigma through a guest iterator, including an ignorable apostrophe between the letters. - All 30 `guest_icu_*` tests pass. - Windows: `-fsyntax-only` with zig `x86_64-windows-gnu` for both new files. - Mutation check: seven mutants of `CaseProperties.cpp` all make the test abort: dropping the iterator, fixing the iteration direction, not throwing on a null `pString`, `getTypeOrIgnorable` → `getType`, ignoring `fold` options, ignoring `toFullFolding` options, and `isCaseSensitive` → "has a case type". Merge notes: removing these stubs touches lines next to the stubs #16605, #14340 and #14443 remove from `LegacyExports.cpp`/`.hpp`. The "older callable exports" debt sentence is also rewritten by #16605 and #14340. Each is a one-line resolution. The test registration, header include and new debt entry are placed so they conflict with no open PR. ### Checklist - [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: #13578 (merged) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-11-10 21:01:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-10T21:01:12Z.

Review: COMMENTED


Reviewed — looks good

I found no blocking source-level defect in the exact diff; this is a comment rather than an approval while the Windows job is still running and the changed C++ tests have not run on this head.

What I ran

Reviewed head d90c2d208ffbe30ee67374b88de13b6652ecb15b against live main 0aa98c0a07c74b1ebc8b9389185b6ff1d2978b38; the merge preview is clean. The PR API still reported base 02c52411e5b4df59e192301818182a228a9d353b, so I used the live branch tip for the precheck. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 18203 --output-dir /tmp/anyps5-review-18203-current
git diff --check 0aa98c0a07c74b1ebc8b9389185b6ff1d2978b38...d90c2d208ffbe30ee67374b88de13b6652ecb15b
python3 tools/pr_stack_check.py 18203 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-review-18203-current/stack
gh api repos/boykopovar/AnyPS5/branches/main --jq .commit.sha
gh api repos/boykopovar/AnyPS5/commits/d90c2d208ffbe30ee67374b88de13b6652ecb15b/check-runs

I read all changed-file areas across three delegated source reviews. No local build or CTest was run.

Results

Check Result
Diff whitespace, conventions, and current-main merge preview Passed.
Export audit Passed with three lexical warnings for helper functions defined in test files; these are not library exports.
Test-registration heuristic Its warnings are false positives: the new ICU test sources are registered by the CMake test-fragment glob.
Hosted checks Windows is still in progress. Relinker Linux/Windows/macOS, relinker ASan, conventions, eligibility, labels, report, intake, and portability passed; product Linux and four specialized jobs were skipped.
Changed ICU C++ tests Not run locally on this head.
Recorded output

Diff check:

(no output; exit 0)

Conventions:

All conventions checks passed.

Merge preview:

PR #18203: clean against current base 0aa98c0a07c74b1ebc8b9389185b6ff1d2978b38.
Dependency #13578 is included in this head.

Hosted checks at the time of review:

windows: in_progress
relinker (ubuntu-latest, g++): success
relinker (windows-latest, g++): success
relinker (macos-latest, clang++): success
relinker-asan: success
conventions: success
eligibility: success
labels: success
report: success
intake: success
library-portability: success
linux: skipped
write-watch: skipped
pipe-write: skipped
edge-watch: skipped
register-context: skipped

Findings

Blocking

None found in the reviewed source.

Non-blocking

None.

Sources

Not verified

  • No local build or CTest was run; the Windows hosted job had not completed when checked.
  • Product Linux and specialized hosted jobs were skipped. No console or PS5 run was available.

To get this to a good state

Let the Windows check finish and run the four focused ICU tests (CaseMapping, CaseProperties, Properties, and UnicodeData) on this exact head. I will re-check the same head and results before changing this review status.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5849309691 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18203#pullrequestreview-5849309691). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-10T21:01:12Z. **Review:** COMMENTED --- # Reviewed — looks good I found no blocking source-level defect in the exact diff; this is a comment rather than an approval while the Windows job is still running and the changed C++ tests have not run on this head. ## What I ran Reviewed head `d90c2d208ffbe30ee67374b88de13b6652ecb15b` against live `main` `0aa98c0a07c74b1ebc8b9389185b6ff1d2978b38`; the merge preview is clean. The PR API still reported base `02c52411e5b4df59e192301818182a228a9d353b`, so I used the live branch tip for the precheck. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 18203 --output-dir /tmp/anyps5-review-18203-current git diff --check 0aa98c0a07c74b1ebc8b9389185b6ff1d2978b38...d90c2d208ffbe30ee67374b88de13b6652ecb15b python3 tools/pr_stack_check.py 18203 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-review-18203-current/stack gh api repos/boykopovar/AnyPS5/branches/main --jq .commit.sha gh api repos/boykopovar/AnyPS5/commits/d90c2d208ffbe30ee67374b88de13b6652ecb15b/check-runs ``` I read all changed-file areas across three delegated source reviews. No local build or CTest was run. ## Results | Check | Result | |---|---| | Diff whitespace, conventions, and current-main merge preview | Passed. | | Export audit | Passed with three lexical warnings for helper functions defined in test files; these are not library exports. | | Test-registration heuristic | Its warnings are false positives: the new ICU test sources are registered by the CMake test-fragment glob. | | Hosted checks | Windows is still in progress. Relinker Linux/Windows/macOS, relinker ASan, conventions, eligibility, labels, report, intake, and portability passed; product Linux and four specialized jobs were skipped. | | Changed ICU C++ tests | Not run locally on this head. | <details> <summary>Recorded output</summary> Diff check: ```text (no output; exit 0) ``` Conventions: ```text All conventions checks passed. ``` Merge preview: ```text PR #18203: clean against current base 0aa98c0a07c74b1ebc8b9389185b6ff1d2978b38. Dependency #13578 is included in this head. ``` Hosted checks at the time of review: ```text windows: in_progress relinker (ubuntu-latest, g++): success relinker (windows-latest, g++): success relinker (macos-latest, clang++): success relinker-asan: success conventions: success eligibility: success labels: success report: success intake: success library-portability: success linux: skipped write-watch: skipped pipe-write: skipped edge-watch: skipped register-context: skipped ``` </details> ## Findings ### Blocking None found in the reviewed source. ### Non-blocking None. ## Sources - [ICU case-mapping implementation](https://github.com/boykopovar/AnyPS5/blob/d90c2d208ffbe30ee67374b88de13b6652ecb15b/core/libs/prx/libSceIcu/CaseMapping.cpp) - [ICU case-property wrappers](https://github.com/boykopovar/AnyPS5/blob/d90c2d208ffbe30ee67374b88de13b6652ecb15b/core/libs/prx/libSceIcu/CaseProperties.cpp) - [ICU property wrappers and tests](https://github.com/boykopovar/AnyPS5/blob/d90c2d208ffbe30ee67374b88de13b6652ecb15b/core/libs/prx/libSceIcu/Properties.cpp) - [ICU test registration](https://github.com/boykopovar/AnyPS5/blob/d90c2d208ffbe30ee67374b88de13b6652ecb15b/core/libs/prx/libSceIcu/CMakeLists.txt) ## Not verified - No local build or CTest was run; the Windows hosted job had not completed when checked. - Product Linux and specialized hosted jobs were skipped. No console or PS5 run was available. ## To get this to a good state Let the Windows check finish and run the four focused ICU tests (`CaseMapping`, `CaseProperties`, `Properties`, and `UnicodeData`) on this exact head. I will re-check the same head and results before changing this review status.
PrivacyOnion commented 2026-11-11 16:55:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T16:55:08Z.

Review: CHANGES_REQUESTED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • GitHub CI: failing check(s): windows.
  • Build: guest_icu_case_mapping_tests, guest_icu_case_properties_tests, guest_icu_properties_tests, guest_icu_unicode_data_tests built cleanly.
  • CTest (guest_icu_properties, guest_icu_case_mapping, guest_icu_case_properties, guest_icu_unicode_data):
    1/4 Test #3096: guest_icu_case_mapping ...........   Passed    0.23 sec
    2/4 Test #3095: guest_icu_properties .............   Passed    0.21 sec
    3/4 Test #3097: guest_icu_case_properties ........   Passed    0.17 sec
    4/4 Test #3098: guest_icu_unicode_data ...........   Passed    3.54 sec
    100% tests passed, 0 tests failed out of 4
    
  • Negative control: with core/libs/prx/libSceIcu/CaseMapping.cpp, core/libs/prx/libSceIcu/CaseMapping.hpp, core/libs/prx/libSceIcu/Export.cpp, core/libs/prx/libSceIcu/Identified.hpp, core/libs/prx/libSceIcu/LegacyExports.cpp, core/libs/prx/libSceIcu/Properties.cpp, core/libs/prx/libSceIcu/Properties.hpp, core/libs/prx/libSceIcu/include/LegacyExports.hpp, core/libs/prx/libSceIcu/libSceIcu.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified null-pointer handling in Output() (core/libs/prx/libSceIcu/CaseProperties.cpp:20), confirming that Output() throws APS5_INVALID_ARG_EX (std::invalid_argument) when string is null before ICU dereferences it in ucase_toFullLower, ucase_toFullUpper, ucase_toFullTitle, and ucase_toFullFolding.
    • Verified guest context iterator trampoline in ForwardCaseContext() (core/libs/prx/libSceIcu/CaseProperties.cpp:15-18), confirming that host calling convention (U_CALLCONV) is cleanly bridged to the guest callback convention (APS5_VABI) with direction (std::int8_t) and context (void*) safely forwarded.
    • Verified lifetime and null safety in MapFull() (core/libs/prx/libSceIcu/CaseProperties.cpp:25-31), confirming that a null iterator safely forwards nullptr to ICU without invoking the trampoline, and a non-null iterator safely references the stack-allocated CaseContext guest structure across the synchronous ICU call.
    • Verified exact export declarations and stub cleanup across CaseProperties.hpp, CaseProperties.cpp, include/LegacyExports.hpp, and LegacyExports.cpp, confirming all 12 ucase_* functions are declared and implemented with matching types (std::int32_t, std::int8_t, std::uint32_t, const char16_t**) and removed from legacy stubs.
    • Verified AGENTS.md compliance: zero code comments in CaseProperties.hpp, CaseProperties.cpp, and tests/CaseProperties.cpp (only the allowed '} // namespace Icu' namespace end comment is present), no game-specific special cases, and appropriate technical debt tracking added to docs/dev/debt/libSceIcu.md.
    • Verified test coverage in tests/CaseProperties.cpp, checking simple mappings, multi-character full mappings, locale-dependent casings (Turkish and Armenian), Greek sigma context iteration, and negative testing for null string pointers.
  • Minor: please drop the Generated with footer from the description; the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5862352426 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18203#pullrequestreview-5862352426). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-11T16:55:08Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `d90c2d208f`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **GitHub CI**: failing check(s): `windows`. - **Build**: `guest_icu_case_mapping_tests`, `guest_icu_case_properties_tests`, `guest_icu_properties_tests`, `guest_icu_unicode_data_tests` built cleanly. - **CTest** (`guest_icu_properties`, `guest_icu_case_mapping`, `guest_icu_case_properties`, `guest_icu_unicode_data`): ``` 1/4 Test #3096: guest_icu_case_mapping ........... Passed 0.23 sec 2/4 Test #3095: guest_icu_properties ............. Passed 0.21 sec 3/4 Test #3097: guest_icu_case_properties ........ Passed 0.17 sec 4/4 Test #3098: guest_icu_unicode_data ........... Passed 3.54 sec 100% tests passed, 0 tests failed out of 4 ``` - **Negative control**: with `core/libs/prx/libSceIcu/CaseMapping.cpp`, `core/libs/prx/libSceIcu/CaseMapping.hpp`, `core/libs/prx/libSceIcu/Export.cpp`, `core/libs/prx/libSceIcu/Identified.hpp`, `core/libs/prx/libSceIcu/LegacyExports.cpp`, `core/libs/prx/libSceIcu/Properties.cpp`, `core/libs/prx/libSceIcu/Properties.hpp`, `core/libs/prx/libSceIcu/include/LegacyExports.hpp`, `core/libs/prx/libSceIcu/libSceIcu.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified null-pointer handling in Output() (core/libs/prx/libSceIcu/CaseProperties.cpp:20), confirming that Output() throws APS5_INVALID_ARG_EX (std::invalid_argument) when string is null before ICU dereferences it in ucase_toFullLower, ucase_toFullUpper, ucase_toFullTitle, and ucase_toFullFolding. - Verified guest context iterator trampoline in ForwardCaseContext() (core/libs/prx/libSceIcu/CaseProperties.cpp:15-18), confirming that host calling convention (U_CALLCONV) is cleanly bridged to the guest callback convention (APS5_VABI) with direction (std::int8_t) and context (void*) safely forwarded. - Verified lifetime and null safety in MapFull() (core/libs/prx/libSceIcu/CaseProperties.cpp:25-31), confirming that a null iterator safely forwards nullptr to ICU without invoking the trampoline, and a non-null iterator safely references the stack-allocated CaseContext guest structure across the synchronous ICU call. - Verified exact export declarations and stub cleanup across CaseProperties.hpp, CaseProperties.cpp, include/LegacyExports.hpp, and LegacyExports.cpp, confirming all 12 ucase_* functions are declared and implemented with matching types (std::int32_t, std::int8_t, std::uint32_t, const char16_t**) and removed from legacy stubs. - Verified AGENTS.md compliance: zero code comments in CaseProperties.hpp, CaseProperties.cpp, and tests/CaseProperties.cpp (only the allowed '} // namespace Icu' namespace end comment is present), no game-specific special cases, and appropriate technical debt tracking added to docs/dev/debt/libSceIcu.md. - Verified test coverage in tests/CaseProperties.cpp, checking simple mappings, multi-character full mappings, locale-dependent casings (Turkish and Armenian), Greek sigma context iteration, and negative testing for null string pointers. - Minor: please drop the `Generated with` footer from the description; the AI-assisted checkbox can stay. Requesting changes for the points above.
MarcZX10 commented 2026-11-12 21:19:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T21:19:32Z.

Review: COMMENTED


Reviewed libSceIcu case-property exports — no blocking findings

The diff implements the 12 internal ucase_* exports on the ICU 78.1 tables and removes their stubs; I found no defect in the changed code, but the ICU prototypes and the author's test runs are not verified here.

What I ran

Head SHA f07b3d4e8578243f20e90fa322600a91e3acec55, base main. Read-only checks with the repository reader (repo_read.py):

repo_read.py search "ucase_" core/libs/prx/libSceIcu/LegacyExports.cpp
repo_read.py search "ucase_" core/libs/prx/libSceIcu/include/LegacyExports.hpp
repo_read.py search "ucase_[A-Za-z]*_nid_postfix\(\)" core/libs/prx/libSceIcu
repo_read.py search "ucase_(getType|tolower|toupper|totitle|fold|isSoftDotted|isCaseSensitive|toFull)" core/libs/prx/libSceIcu/Identified.hpp
repo_read.py search "ucase_toFull|UCaseContextIterator" 3rdparty/icu/icu4c/source/common/unicode/ucase.h
repo_read.py cat core/libs/prx/libSceIcu/CaseProperties.cpp 1 12

No build or test was run. The Linux test run, the mutation check and the Windows syntax check are the author's reports only.

Results

Check Result Note
Changed hunks read passed all 8 reviewed files
Leftover stubs or references passed none in the two LegacyExports files
Build and guest_icu_case_properties not run author reports a pass on Linux GCC
Mutation check not run author reports 7 of 7 mutants caught
Windows syntax check not run author reports a pass with zig
ICU prototypes against ucase.h not verified submodule not readable through the reader

Findings

Blocking

None.

Non-blocking

None found by reading the changed code.

Not verified

  • The ICU 78.1 prototypes in ucase.h, including the UCaseContextIterator signature and the caseLocale type. The reader cannot see 3rdparty/icu.
  • Build, test, mutation and Windows results. These are the author's reports, not runs made here.
  • The counts in docs/dev/debt/libSceIcu.md (1689 of 2347, 654, 650). They were not recounted, and the 12 ucase_* names are now implemented in a different file.
  • Files read only at the changed hunks: CMakeLists.txt, LegacyExports.cpp, include/LegacyExports.hpp, libSceIcu.hpp and the debt file. Their unchanged lines were not read.
  • The claims that #13578 is merged and that no other open PR implements these functions.
  • Console behaviour, which the debt entry itself marks as unverified.

To get this to a good state

Nothing is required.

Optional: recount the 1689, 654 and 650 figures in docs/dev/debt/libSceIcu.md, since the 12 ucase_* names moved out of LegacyExports.cpp.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5882181240 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18203#pullrequestreview-5882181240). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T21:19:32Z. **Review:** COMMENTED --- # Reviewed libSceIcu case-property exports — no blocking findings The diff implements the 12 internal `ucase_*` exports on the ICU 78.1 tables and removes their stubs; I found no defect in the changed code, but the ICU prototypes and the author's test runs are not verified here. ## What I ran Head SHA `f07b3d4e8578243f20e90fa322600a91e3acec55`, base `main`. Read-only checks with the repository reader (`repo_read.py`): ``` repo_read.py search "ucase_" core/libs/prx/libSceIcu/LegacyExports.cpp repo_read.py search "ucase_" core/libs/prx/libSceIcu/include/LegacyExports.hpp repo_read.py search "ucase_[A-Za-z]*_nid_postfix\(\)" core/libs/prx/libSceIcu repo_read.py search "ucase_(getType|tolower|toupper|totitle|fold|isSoftDotted|isCaseSensitive|toFull)" core/libs/prx/libSceIcu/Identified.hpp repo_read.py search "ucase_toFull|UCaseContextIterator" 3rdparty/icu/icu4c/source/common/unicode/ucase.h repo_read.py cat core/libs/prx/libSceIcu/CaseProperties.cpp 1 12 ``` No build or test was run. The Linux test run, the mutation check and the Windows syntax check are the author's reports only. ## Results | Check | Result | Note | |---|---|---| | Changed hunks read | passed | all 8 reviewed files | | Leftover stubs or references | passed | none in the two LegacyExports files | | Build and `guest_icu_case_properties` | not run | author reports a pass on Linux GCC | | Mutation check | not run | author reports 7 of 7 mutants caught | | Windows syntax check | not run | author reports a pass with zig | | ICU prototypes against `ucase.h` | not verified | submodule not readable through the reader | ## Findings **Blocking** None. **Non-blocking** None found by reading the changed code. ## Not verified - The ICU 78.1 prototypes in `ucase.h`, including the `UCaseContextIterator` signature and the `caseLocale` type. The reader cannot see `3rdparty/icu`. - Build, test, mutation and Windows results. These are the author's reports, not runs made here. - The counts in `docs/dev/debt/libSceIcu.md` (1689 of 2347, 654, 650). They were not recounted, and the 12 `ucase_*` names are now implemented in a different file. - Files read only at the changed hunks: `CMakeLists.txt`, `LegacyExports.cpp`, `include/LegacyExports.hpp`, `libSceIcu.hpp` and the debt file. Their unchanged lines were not read. - The claims that #13578 is merged and that no other open PR implements these functions. - Console behaviour, which the debt entry itself marks as unverified. ## To get this to a good state Nothing is required. Optional: recount the 1689, 654 and 650 figures in `docs/dev/debt/libSceIcu.md`, since the 12 `ucase_*` names moved out of `LegacyExports.cpp`.
PrivacyOnion commented 2026-11-13 12:44:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-13T12:44:18Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_icu_case_properties_tests built cleanly.
  • CTest (guest_icu_case_properties):
    1/1 Test #3301: guest_icu_case_properties ........   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, core/libs/prx/libSceIcu/libSceIcu.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/libSceIcu/CaseProperties.cpp: Verified that Output(string) properly validates result pointers for ucase_toFullLower_nid_postfix, ucase_toFullUpper_nid_postfix, ucase_toFullTitle_nid_postfix, and ucase_toFullFolding_nid_postfix, throwing APS5_INVALID_ARG_EX (std::invalid_argument) to prevent null pointer dereferences.
    • core/libs/prx/libSceIcu/CaseProperties.cpp: Verified that ForwardCaseContext and MapFull correctly bridge host U_CALLCONV callbacks with guest APS5_VABI Icu::CaseContextIterator invocations with well-defined stack lifetimes.
    • core/libs/prx/libSceIcu/CaseProperties.hpp: Verified prototype signatures against ICU 78.1 ucase.h, including exact return types (int8_t UBool for ucase_isSoftDotted_nid_postfix and ucase_isCaseSensitive_nid_postfix, and int32_t for code point and full mapping lengths).
    • core/libs/prx/libSceIcu/LegacyExports.cpp and include/LegacyExports.hpp: Verified that all 12 corresponding NotImplemented_nid_no_patch stub definitions and declarations were cleanly removed without leaving orphaned exports.
    • core/libs/prx/libSceIcu/tests/CaseProperties.cpp: Verified test coverage across all 12 exports, including Turkic and Armenian special casing, full folding, final vs. medial Greek sigma context iteration, out-of-range code points, and null pointer exception handling.
    • docs/dev/debt/libSceIcu.md: Verified that technical debt tracking was properly updated to record the unverified console ABI status, UCASE_LOC_* constants, and compiled-in Unicode 17.0 case tables.
    • AGENTS.md compliance: Verified zero disallowed comments in source code (only the permitted namespace end comment in CaseProperties.hpp), proper Conventional Commit title, and clean CMake test target registration with Windows unwind support.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5891217997 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18203#pullrequestreview-5891217997). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-13T12:44:18Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `9e0e663350`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_icu_case_properties_tests` built cleanly. - **CTest** (`guest_icu_case_properties`): ``` 1/1 Test #3301: guest_icu_case_properties ........ 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`, `core/libs/prx/libSceIcu/libSceIcu.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/libSceIcu/CaseProperties.cpp: Verified that Output(string) properly validates result pointers for ucase_toFullLower_nid_postfix, ucase_toFullUpper_nid_postfix, ucase_toFullTitle_nid_postfix, and ucase_toFullFolding_nid_postfix, throwing APS5_INVALID_ARG_EX (std::invalid_argument) to prevent null pointer dereferences. - core/libs/prx/libSceIcu/CaseProperties.cpp: Verified that ForwardCaseContext and MapFull correctly bridge host U_CALLCONV callbacks with guest APS5_VABI Icu::CaseContextIterator invocations with well-defined stack lifetimes. - core/libs/prx/libSceIcu/CaseProperties.hpp: Verified prototype signatures against ICU 78.1 ucase.h, including exact return types (int8_t UBool for ucase_isSoftDotted_nid_postfix and ucase_isCaseSensitive_nid_postfix, and int32_t for code point and full mapping lengths). - core/libs/prx/libSceIcu/LegacyExports.cpp and include/LegacyExports.hpp: Verified that all 12 corresponding NotImplemented_nid_no_patch stub definitions and declarations were cleanly removed without leaving orphaned exports. - core/libs/prx/libSceIcu/tests/CaseProperties.cpp: Verified test coverage across all 12 exports, including Turkic and Armenian special casing, full folding, final vs. medial Greek sigma context iteration, out-of-range code points, and null pointer exception handling. - docs/dev/debt/libSceIcu.md: Verified that technical debt tracking was properly updated to record the unverified console ABI status, UCASE_LOC_* constants, and compiled-in Unicode 17.0 case tables. - AGENTS.md compliance: Verified zero disallowed comments in source code (only the permitted namespace end comment in CaseProperties.hpp), proper Conventional Commit title, and clean CMake test target registration with Windows unwind support. - Note: the AI-assisted checkbox can stay. Looks Good To Me
MarcZX10 commented 2026-11-14 03:04:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T03:04:15Z.

Review: COMMENTED


Reviewed — no blocking findings

The review covers head 9e0e663350c11c83cbca85e7d1264a36c1fe7a8b; no checks were run independently, and console ABI and behavior remain unverified as documented.

What I ran

No build or tests were run. I read the prepared diff, description, commit list, manifest, and each changed line range; I also checked the context iterator trampoline, argument exception macro, and related case mapping conventions through repo_read.py.

Results

Check Result Note
Source review passed Changed lines inspected
Build and tests not run Author reports Linux tests and Windows syntax checks
Console comparison not run ABI and behavior remain unverified

Findings

Blocking

None.

Non-blocking

  • No independent build or test run was possible in this review, so the reported test results are author-reported rather than verified here.

Not verified

  • Console ABI, export availability across firmware versions, and behavior on hardware were not verified; the debt entry records these limitations.
  • LegacyExports.cpp and include/LegacyExports.hpp contain no added lines; their removed stub ranges were reviewed in the diff, not by reading each full file.
  • Files read: core/libs/prx/libSceIcu/CMakeLists.txt, CaseProperties.cpp, CaseProperties.hpp, LegacyExports.cpp (changed ranges in diff), include/LegacyExports.hpp (changed ranges in diff), libSceIcu.hpp, tests/CaseProperties.cpp, and docs/dev/debt/libSceIcu.md; also the review description, commits, manifest, diff, and README. No changed files were excluded by the manifest.

To get this to a good state

Nothing is required. The optional point above is to run the reported checks independently when a build environment is available.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5901142340 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18203#pullrequestreview-5901142340). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T03:04:15Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The review covers head `9e0e663350c11c83cbca85e7d1264a36c1fe7a8b`; no checks were run independently, and console ABI and behavior remain unverified as documented. ## What I ran No build or tests were run. I read the prepared diff, description, commit list, manifest, and each changed line range; I also checked the context iterator trampoline, argument exception macro, and related case mapping conventions through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Changed lines inspected | | Build and tests | not run | Author reports Linux tests and Windows syntax checks | | Console comparison | not run | ABI and behavior remain unverified | ## Findings ### Blocking None. ### Non-blocking - No independent build or test run was possible in this review, so the reported test results are author-reported rather than verified here. ## Not verified - Console ABI, export availability across firmware versions, and behavior on hardware were not verified; the debt entry records these limitations. - `LegacyExports.cpp` and `include/LegacyExports.hpp` contain no added lines; their removed stub ranges were reviewed in the diff, not by reading each full file. - Files read: `core/libs/prx/libSceIcu/CMakeLists.txt`, `CaseProperties.cpp`, `CaseProperties.hpp`, `LegacyExports.cpp` (changed ranges in diff), `include/LegacyExports.hpp` (changed ranges in diff), `libSceIcu.hpp`, `tests/CaseProperties.cpp`, and `docs/dev/debt/libSceIcu.md`; also the review description, commits, manifest, diff, and README. No changed files were excluded by the manifest. ## To get this to a good state Nothing is required. The optional point above is to run the reported checks independently when a build environment is available.
PrivacyOnion commented 2026-11-14 22:50:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T22:50:19Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_icu_case_properties_tests built cleanly.
  • CTest (guest_icu_case_properties):
    1/1 Test #3447: guest_icu_case_properties ........   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, core/libs/prx/libSceIcu/libSceIcu.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/libSceIcu/CaseProperties.cpp: Verified that Output() safely validates caller-provided string pointers across all full mapping exports (ucase_toFullLower_nid_postfix, ucase_toFullUpper_nid_postfix, ucase_toFullTitle_nid_postfix, and ucase_toFullFolding_nid_postfix), raising APS5_INVALID_ARG_EX (std::invalid_argument) when string == nullptr before ICU writes through the pointer.
    • core/libs/prx/libSceIcu/CaseProperties.cpp and CaseProperties.hpp: Verified calling convention correctness between guest and host, confirming ForwardCaseContext uses U_CALLCONV while bridging to Icu::CaseContextIterator declared with APS5_VABI, correctly preserving guest context pointers and 8-bit directional step parameters across both Linux (SysV) and Windows (x64) ABIs.
    • core/libs/prx/libSceIcu/CaseProperties.cpp: Verified type safety and return types for all 12 exports, confirming ucase_isSoftDotted_nid_postfix and ucase_isCaseSensitive_nid_postfix return std::int8_t to match ICU's UBool, while simple and full mapping functions return std::int32_t code points or length encodings with no narrowing conversions or signedness truncation.
    • core/libs/prx/libSceIcu/LegacyExports.cpp and include/LegacyExports.hpp: Confirmed exact removal of all 12 NotImplemented_nid_no_patch stubs and header declarations without leaving dangling references, orphaned prototypes, or duplicate symbol exports.
    • core/libs/prx/libSceIcu/tests/CaseProperties.cpp: Verified comprehensive test coverage exercising all 12 implemented functions, including Turkic (locale 2) and Armenian (locale 6) case distinctions, Greek final vs. medial sigma context traversal via Iterate trampoline callback, fold option flags, out-of-range code points (-1, 0x110000), and null string exception checks.
    • core/libs/prx/libSceIcu/CMakeLists.txt: Confirmed proper target registration of CaseProperties.cpp within libSceIcu and test executable guest_icu_case_properties_tests with configure_windows_unwind and PATH modification rules for Windows execution.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5907609716 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18203#pullrequestreview-5907609716). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-14T22:50:19Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `7bc6bab506`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_icu_case_properties_tests` built cleanly. - **CTest** (`guest_icu_case_properties`): ``` 1/1 Test #3447: guest_icu_case_properties ........ 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`, `core/libs/prx/libSceIcu/libSceIcu.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/libSceIcu/CaseProperties.cpp: Verified that Output() safely validates caller-provided string pointers across all full mapping exports (ucase_toFullLower_nid_postfix, ucase_toFullUpper_nid_postfix, ucase_toFullTitle_nid_postfix, and ucase_toFullFolding_nid_postfix), raising APS5_INVALID_ARG_EX (std::invalid_argument) when string == nullptr before ICU writes through the pointer. - core/libs/prx/libSceIcu/CaseProperties.cpp and CaseProperties.hpp: Verified calling convention correctness between guest and host, confirming ForwardCaseContext uses U_CALLCONV while bridging to Icu::CaseContextIterator declared with APS5_VABI, correctly preserving guest context pointers and 8-bit directional step parameters across both Linux (SysV) and Windows (x64) ABIs. - core/libs/prx/libSceIcu/CaseProperties.cpp: Verified type safety and return types for all 12 exports, confirming ucase_isSoftDotted_nid_postfix and ucase_isCaseSensitive_nid_postfix return std::int8_t to match ICU's UBool, while simple and full mapping functions return std::int32_t code points or length encodings with no narrowing conversions or signedness truncation. - core/libs/prx/libSceIcu/LegacyExports.cpp and include/LegacyExports.hpp: Confirmed exact removal of all 12 NotImplemented_nid_no_patch stubs and header declarations without leaving dangling references, orphaned prototypes, or duplicate symbol exports. - core/libs/prx/libSceIcu/tests/CaseProperties.cpp: Verified comprehensive test coverage exercising all 12 implemented functions, including Turkic (locale 2) and Armenian (locale 6) case distinctions, Greek final vs. medial sigma context traversal via Iterate trampoline callback, fold option flags, out-of-range code points (-1, 0x110000), and null string exception checks. - core/libs/prx/libSceIcu/CMakeLists.txt: Confirmed proper target registration of CaseProperties.cpp within libSceIcu and test executable guest_icu_case_properties_tests with configure_windows_unwind and PATH modification rules for Windows execution. - Note: the AI-assisted checkbox can stay. Looks Good To Me
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!18203
No description provided.