fix(libSceNpUniversalDataSystem): distinguish literal keys from troph… #14427
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14427"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by mkrieger95 on 2026-11-01T12:30:26Z.
What
UDS trophy statistics flatten nested object keys into dotted paths. A literal key named
player.stepswas therefore indistinguishable fromstepsinside aplayerobject. It could satisfy$.player.stepsby itself, or override a genuine nested value depending on insertion order. In the synthetic integration fixture, that incorrectly unlocked the progressive trophy and its platinum.Skip literal dotted and empty key segments when deriving the statistic-property paths. They cannot be addressed by the currently supported
$.namerule syntax. Keep the original event and its descriptions intact. A missing genuine path continues through the existing missing-property diagnostic rather than updating a counter.Add direct conversion checks for literal leaf and object keys, nested dotted keys, an empty internal key, both insertion orders, and unchanged source events. Add public-API integration checks that a literal dotted key cannot unlock a trophy or replace genuine progress; the existing checks still require the real nested value to unlock the trophy and platinum at the target. This is a consistency fix for AnyPS5's current rule interpreter, not a newly reverse-engineered PS5 export.
Tested
Linux x86-64, GCC 14.2, Release,
BUILD_TESTING=ON; rebased onto upstreamba627802e2210187d417deb64c8f2fed8e33011fon 2026-11-01 UTC.np_uds_events,guest_np_trophy_stats,guest_np_trophy_unlocks,guest_np_trophy_data,guest_np_uds_queries,np_trophy2_package.python3 core/libs/tests/test_public_headers.py --audit-only: 399 libraries, 26,227 exports pass.python3 tools/check_conventions.py --base origin/mainandgit diff --check: pass.np_uds_eventsreportsliteral property names were converted into nested stat paths;guest_np_trophy_statslogs the erroneous trophy 5 and platinum 0 unlocks, then aborts ata literal dotted key updated a nested statistic or unlocked its trophy. Both pass with the production fix.No Windows, macOS, console or game execution; no full-project build or PS5 parity test. The regression is synthetic; no title unblock is claimed.
Submission check at
6a175479707aedcce08eeddc5bc9f2e2ad4c318c: the repository'stools/pr_overlap.pycomparison functions checked this branch against 1,664 open upstream PRs on 2026-11-01 UTC, using one shared fetch of mainba627802e2210187d417deb64c8f2fed8e33011f. No duplicate exports, new files, conflicting lines or unverified shared-file comparisons were reported. Merge previews between every pair of the four trophy drafts are also clean. These remain separate, independent fixes.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T13:44:11Z.
Review: COMMENTED
Reviewed — no blocking findings
Dropping literal dotted and empty keys when deriving statistic paths is correct: the rule parser accepts only word segments joined by
., so such a key can never be addressed, and skipping it keeps a literal key from overriding a genuine nested value.What I ran
6a175479707aedcce08eeddc5bc9f2e2ad4c318c, base4768f0aeca680477597b2e42cba60ae49e48802c./usr/bin/python33.11.2, no build.python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14427 --output-dir /dev/shm/reviewer-run/precheck/14427python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 4768f0aeca680477597b2e42cba60ae49e48802c --head 6a175479707aedcce08eeddc5bc9f2e2ad4c318c --json(exit 0, 0 findings)core/libs/tests/GuestNpTrophyStats.cppandcore/libs/prx/libSceNpUniversalDataSystem/tests/Events.cppfrom head extracts. Each produced one literal-path registration heuristic; the registration is incore/libs/prx/libSceNpUniversalDataSystem/CMakeLists.txt(line 21 fortests/Events.cpp, line 59 forGuestNpTrophyStats.cpp).propertyPathinTrophyPackage.cpp.Results
Precheck report, checks table, unedited (
/dev/shm/reviewer-run/precheck/14427/report.md):The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check 4768f0aeca680477597b2e42cba60ae49e48802c...6a175479707aedcce08eeddc5bc9f2e2ad4c318c/usr/bin/python3 tools/check_conventions.py --base 4768f0aeca680477597b2e42cba60ae49e48802c --head 6a175479707aedcce08eeddc5bc9f2e2ad4c318c --title fix(libSceNpUniversalDataSystem): distinguish literal keys from troph… --body /dev/shm/reviewer-run/precheck/14427/pr-body.md/usr/bin/python3 tools/pr_abi_audit.py --base 4768f0aeca680477597b2e42cba60ae49e48802c --head 6a175479707aedcce08eeddc5bc9f2e2ad4c318c --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14427 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14427/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./usr/bin/python3 /dev/shm/reviewer-run/precheck/14427/head-6a175479707a-10f35e12/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14427/head-6a175479707a-10f35e12 --json core/libs/prx/libSceNpUniversalDataSystem/src/UdsEvent.cpp core/libs/prx/libSceNpUniversalDataSystem/tests/Events.cpp core/libs/tests/GuestNpTrophyStats.cppNo changed Python test module in tools/ can be run as a no-build base-source control.Negative control
Not run. The new cases in
testStatPropertyPathsandUnlockThroughStatswould fail on base, where a literalplayer.stepskey is flattened into the nested path, per the PR; that is from reading the code, not a run.Findings
Blocking: none.
Non-blocking: none.
Sources
.) at head:github.com/boykopovar/AnyPS5@6a17547970/core/libs/prx/libSceNpTrophy2/src/TrophyPackage.cpp (L339-L354)github.com/boykopovar/AnyPS5@6a17547970/core/libs/prx/libSceNpUniversalDataSystem/src/UdsEvent.cpp (L228-L232)Not verified
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T04:57:00Z.
Review: APPROVED
Reviewed — looks good
The reviewed change at
bc5a3e9fec490198a894154cb97fdda911b171a4consistently excludes empty or dotted key segments from trophy statistic paths, with direct conversion and public API regressions covering nested values and insertion order. Nothing blocks this; the points below are optional.What I ran
No commands or tests were run; the review bundle reports the author’s test results separately. I read all three changed files listed as reviewed in the manifest:
UdsEvent.cpp,Events.cpp, andGuestNpTrophyStats.cpp.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No excluded changed files are listed in the manifest. I did not run the tests or independently verify the author-reported build, CI checks, console behavior, or PS5 parity.
To get this to a good state
Nothing is required.