Repository navigation
feat(ces): add eight sparse single-byte profiles - #10056
atharvjairath wants to merge 1 commit into
Conversation
Progress report (f8e3c7f → 1ae7a83)📈 System libraries: 48.89% (+0.06%, +8 implemented functions) ✅ 8 implemented
Changed libraries (implemented exports)
|
|
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.
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.
|
|
OK. Independent checks, including a byte-level comparison against the upstream mapping tables and a recompute of the test's own constants:
Envelope: current Disclosure: Windows host; upstream file downloaded from unicode.org during review; checksum/mask recomputation scripted against the branch tree. The console-side mapping truth (as opposed to the Microsoft CP857 source of truth) remains unverified, which the debt entry already states. |
a4eb638 to
03e6516
Compare
03e6516 to
d5b132d
Compare
e697c53 to
93050a9
Compare
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head 93050a9a0c1bea1dd2d1db32c8b7af717592ce9e29.
MarcZX10
left a comment
There was a problem hiding this comment.
Correction and complete review on exact head 93050a9a0c1bea1dd2d1db32c7e3eda86a9be8: my immediately preceding review had a mistyped head hash and did not state the finding; this review replaces it. The sparse-profile implementation has broad coverage and the description reports exact-head Linux 16/16 and Windows 16/16 focused runs, plus baseline regression controls. Hosted eligibility, conventions, labels and report checks pass; product jobs are path-skipped. I have not independently run the CES test suite.
A contribution-rule sequencing issue remains. Direct merge previews of this PR with #10183, #10185 and #10186 produce content conflicts in core/libs/prx/libSceCesCs/Export.cpp; the #10056/#10184 preview is clean. These are real shared-helper conflicts, not duplicate implementations of the profile getters. Please coordinate with the affected author and declare the agreed landing order with Depends on, then ensure the rebased second change preserves both the sparse-profile semantics and the console-measured conversion behavior. #10185 already depends on #10183 and #10184, and #10186 depends on #10185, so please keep that stack coherent. This is a keep-both integration request; no PR should be closed because of queue size.
93050a9 to
b4670f6
Compare
MarcZX10
left a comment
There was a problem hiding this comment.
Approved exact head b4670f6e8a915b3f5715e0885102109e83ecc5d4. The author-to-author landing order is now explicit: #10183/#10184, then #10185, then #10186, then this PR; the checklist declares Depends on: #10186, and this branch contains the exact current #10186 head. The sparse follow-up rejects undefined-byte sentinels in both decode and reverse lookup, keeps the shared measured conversion behavior, and adds broad profile/conversion/canary coverage. I independently compiled and ran the exact-head Export.cpp plus GuestCesSparseProfiles.cpp fixture with GCC C++20 and section garbage collection; it passed. Exact-head conventions and git diff --check pass, and current upstream main is an ancestor of the reviewed head. The author separately reports 16/16 Linux and 16/16 Windows focused CES runs with negative controls; hosted eligibility/conventions/labels/report checks pass and product build jobs are skipped by path policy. The full project build and console validation were not run here; the debt entry accurately leaves sparse mappings unverified on console.
|
@atharvjairath This PR now conflicts with main in |
1e2bee2 to
32dad00
Compare
32dad00 to
ef9dd9c
Compare
ef9dd9c to
e9b1b5c
Compare
|
I checked the eight profiles against firmware 13.42's own All eight match this head's Three runs, identical output. Not checked: the MBCS string and length functions, and which error wins when several apply. |
e9b1b5c to
78d8eea
Compare
78d8eea to
2af27ff
Compare
2af27ff to
423be4b
Compare
423be4b to
e635486
Compare
e635486 to
1ae7a83
Compare
What
The eight profile getters for ISO-8859-3/6/7/8/11 and CP857/869/874 currently throw. They now return profiles usable by the existing scalar UTF-8/UCS-2/UTF-16/UTF-32 converters and MBCS string/length APIs. Undefined bytes return
UNASSIGNED_CODE. UTF-8 scalar output/length handling and string termination/partial counts use the console-measured shared paths now merged into main. Reverse lookup excludes the undefined-entry marker, so U+FFFF cannot encode to a hole.Mappings are regenerated from the Unicode-hosted ISO tables, Microsoft PC tables and CP874.TXT. Getter signatures follow the Orbital type database at b321fcd. CP874 uses the strict mapping, without Windows best-fit substitutions. Opaque profile layout, unmeasured error precedence and physical-console verification remain open in the library debt entry. The added mappings have the attributed firmware-module checks below; those checks do not validate string paths or every error contract.
tools/progress.pyreports 8 additional completed exports (CES: 228 to 236 of 287). The scanner on the tested branch is unchanged, and the newer main scanner gives the same CES counts; this measures declared export coverage, not game compatibility. The final source has 51 pending exports, recomputed after main's JIS2004 initializers and measured GB18030 ranges landed. Upstream profile and encoder improvements are separate from this PR's eight profile getters.The shared lookup rejects both the measured dependency's zero marker and the sparse profiles' U+FFFF marker. Tests cover all eight profiles across wide scalar and string APIs, including optional lengths, zero capacity, prefix preservation and U+FFFF reverse rejection.
Integration with current main: Rebased onto main
8f255109caeee67251202cb98598a517b712acf5after #10739 (measured GB18030 ranges) merged. Only the Chinese fixture conflicted. Main's GB18030-2000 BMP-only range, GB18030-2005 plane-2 supplementary range, 24 preserved PUA mappings and measured A8BC/8135F437 swap are retained. The Chinese fixture now uses supported inputs while preserving partial counts, terminators, short-pair capacity, canaries and UCS-2 supplementary rejection. Its 2000 BMP case succeeds where the 2005 supplementary case rejects UCS-2. Our production/header patch payload and all other fixture payloads are unchanged.SingleByte.hpp,Cp936.hppand the sparse fixture are byte-identical to the prior head; main'sGb18030.hpp, JIS X 0213 table and JIS2004 fixture are byte-identical to main. All earlier CP858, JIS2004, Big5, rejected-decoder, strict JIS, EUC-KR/UHC and generic encoder work is preserved. This refresh adds no exports beyond our original eight.The sparse fixture now follows the merged rejected-decoder contract: an unassigned byte reports one consumed byte and zero output length, clears a UTF-32 scalar destination, and preserves adjacent canaries and UTF-8 buffer bytes. It also verifies the scalar result when the consumed-length pointer is omitted. These checks cover every undefined byte across all eight profiles. Those expectations were corrected during the earlier decoder integration and are unchanged in this refresh. The sparse fixture and production payload are unchanged; the Chinese integration assertions are adapted to the supported inputs above. No assertion or production check was disabled.
The sparse fixture now also checks the merged generic UTF-32 and UTF-8 encoders for every assigned byte in all eight profiles. It verifies the encoded byte, reported lengths, adjacent canaries, zero-capacity behavior and U+FFFF rejection. The existing coverage is retained, with rejected-decoder expectations updated as described above. Main's full generic-encoder sweeps and measured Chinese/DBCS/Japanese expectations are retained.
The public-header review remains addressed using canonical CES declarations and profile types. The eight getter placeholders have their actual
const uint8_t*return type; the sparse fixture includes the umbrella header without local export declarations. Main's GB18030 tables, four-byte UTF-8 encoder, UTF-16 surrogate-pair adapters, UCS-2 supplementary rejection,isGbselector, measured decoder/string loop, strict versus measured JIS behavior and Korean/Big5 checks are preserved. The Chinese fixture retains the partial-count, termination, short-pair capacity and canary checks.Landing order: No open prerequisites remain. The measured stack, #9175, #10718, #10722, #10738, #10214, #10426 and #10739 are integrated main history. CP858 is preserved as upstream work; it no longer needs to wait for this PR.
Tested
Exact tested head:
1ae7a83f3433710606d09c1c45419def687ebfd6; parent and main base:8f255109caeee67251202cb98598a517b712acf5; tree:4e9942e02c11d6045e78d4855aa51a611649ef83. Recovery ref:backup/pr-10056-before-main-refresh-20261027-1354preserves prior remote heade635486ca84a28c046d7f7e9cc142ef06c19dcd0. Author and committer:atharvjairath <54663702+atharvjairath@users.noreply.github.com>.-Werror; implementation and fixtures compile against canonical declarations on both tested platforms. Upstream test(libkernel): use the libkernel public header in the macOS unwind module info test #11718 is now included, so the earlier duplicate macOS unwind declaration failure is resolved on this tested head. No audit check was disabled.Both complete matrices passed in this refresh. The interrupted Docker run from the prior JIS2004 refresh remains historical evidence in its original receipts.
Later main audit: Both remaining owned branches merge cleanly with
5d52b06ff3de0b2ce640dd296db465295c80e7fa. Later libc stream read-to-write handling and mutex-name wrapper declarations/fixtures, kernel memory/time changes and workflow test-path handling were inspected where relevant. No owned module or fixture changed after the exact runtime-tested base above. This scoped source/merge audit is not runtime validation of newer main or the whole project.Focused builds use the complete real libraries and libc with repository-pinned dependencies. Native hardware, native Windows desktop, whole-project, title and PS5 console validation were not performed. The attributed firmware-module report below covers selected scalar paths; independent physical-console verification and unmeasured string/error-precedence paths remain open. Full upstream product CI requires maintainer dispatch.
Attributed firmware-module evidence: BunnyFl reports three identical runs of firmware 13.42
libSceCesCs.sprx(SHA-25600c01529bc13223be8afabbde566fcbdc027a0366c6d6224effc86ba6cba3173) loaded natively on an x86-64 PC. Their SBC-to-UTF32/UTF8 sweep over all 256 bytes and UTF32-to-SBC sweep over U+0000–U+10FFFF matched all eight tables. Undefined cells returned0x805C0020, had no reverse encoding, and U+FFFF was rejected. Reported hole counts were 7/45/3/36/8 for ISO-8859-3/6/7/8/11 and 3/9/31 for CP857/869/874. This is attributed firmware-module execution on a PC, not independently reproduced here or physical-console validation. It did not cover MBCS strings/lengths or general error precedence and is not an approval.Focused build reproduction
Save the following as
CMakeLists.txtin a separate harness directory. Initialize the checkout's3rdparty/ZArchiveand3rdparty/zstd, and place copies or symlinks to those directories under the harness's3rdparty/. They match the base pins965b66c8d67b6b7e30fd63b3b75aa91a99ff303bandf8745da6ff1ad1e7bab384bd1f9d742439278e99.On an x86-64 Linux host:
cmake -S /path/to/harness -B /path/to/ces-build -G Ninja -DANYPS5_SOURCE_ROOT=/path/to/checkout -DCMAKE_BUILD_TYPE=Release cmake --build /path/to/ces-build --parallel 4 ctest --test-dir /path/to/ces-build -R '^guest_ces' --output-on-failure --timeout 30The reported ARM-host Linux run additionally sets
CMAKE_CROSSCOMPILING_EMULATORto QEMU 11.0.3's native ARMqemu-x86_64. The Windows build uses the same harness with WinLibscmake.exe,ninja.exe,gcc.exeandg++.exe; all eighteen generated test programs are run through QEMU/Wine.WINELOADERNOEXEC=1preserves QEMU execution, andWINEPATHincludes the libc, CES, CES-module and compiler-runtime DLL directories. A host-side CTest manifest runs each executable with the same 30-second timeout.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)