fix(libSceNpTrophy2): keep stat rules labelled with their stat's name #18642
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18642"
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 JJenkx on 2026-11-11T23:28:47Z.
What
Since
47101d6e4b(#15951),ParseStatRulesskips a statistics rule whoseoutputhas any member other thanstatId. The rules that titles ship insce_sys/uds/udsNN.ucplabel nearly every output with the stat'sstatName, and most also with itssourceId:These rules are now dropped with a
[trophy] ... has unsupported output member "statName"line. In 21 of the titles below, this includes rules that feed a trophy'sudsStatId, so those trophies no longer show progress or unlock through their statistic.This keeps a rule whose output has
statNameorsourceIdwhen each one is the string of the same name in the definition of the rule'sstatId. A label that names something else, or is not a string, still skips the rule with a[trophy]line. Output members other than these two are still skipped, as #15951 intended.Evidence
Survey of the
udsNN.ucpfiles of the 116 extracted titles here that have one:statId,statNameandsourceId. In every one,statNameandsourceIdequal the members of the same name in that stat'sstats_definition.jsonentry. No output has a label that differs.latest/maxstat of a supported type, a$.nameinput and a supported condition). 334 of them write a stat that a trophy names inudsStatId, in 21 titles.ResetAllCountersat start-up, and its record from 2 November holds stats 132 to 139, 143 and 269 to 273, all written bystatName-labelled rules.Tested
Current-main refresh, 2026-11-12: head
6bd7fa6b6d0655b225d37e22b824cf496fe2cfa8rebases the approved change onto maina9e688d0a07659a45b55ae609ca22dd5a819aea2without merge commits. Production/test changed lines are identical toc3d3d6a64a. The only conflict was adjacent debt text: retained this PR's extraction-label paragraph and main's merged #18640 greater-than condition paragraph.Matched Linux CPU checks, with the same new
TrophyPackage.cppfixture on both arms, three full repetitions ofctest -R 'trophy|uds|universal' -V:np_trophy2_packageat the stat-label regression. The other 12 fixtures pass each time.673c517827f7is clean; that newer preview tree was not executed.Exact source pins, preservation/resolution proof, builds, verbose logs and JUnit, SHA-256
7d3ac37699fbe9e8802db7cac3c9f85838713c25c9b86cd2fd2eb78318fa8924; archive and all 26 members downloaded and hash-verified. This is a CPU refresh; the prior Astro Bot runs below keep their original pins. No new native, Windows, GPU, console or performance result is claimed.np_trophy2_package_tests: the newtestStatLabelskeeps rules whosestatNameandsourceIdmatch their stat's definition, skips a rule labelled with another stat's name or source or with a null label, and checks that only the kept rules copy their input. It fails on main at the first check and passes with this change.ctest -R 'trophy|uds|universal') pass on this head (c3d3d6a64a), Linux, GCC 16, Release.main9c9b19dd6eand this change on it (d735d4bb0d), two runs each:mainwrites no record and logs 86statNameskips per run; this change logs none and writes stats 132 to 139, 143 and 269 to 273 (all 0 after the title'sResetAllCounters), as its record from before #15951 holds. Linux 7.2.14, RX 6650 XT, RADV Mesa 26.2.6, Release. Details: https://github.com/boykopovar/AnyPS5/pull/18642#issuecomment-6812568741Related
#18640 has merged into main. This refresh retains its greater-than rule-condition support and its debt explanation alongside this PR’s output-label behavior. No open dependency is introduced.
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 PrivacyOnion on 2026-11-12T06:11:52Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
c3d3d6a64a:tools/check_conventions.pypassed;git diff --checkclean.np_trophy2_package_testsbuilt cleanly.np_trophy2_package):core/libs/prx/libSceNpTrophy2/src/TrophyPackage.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Generated withfooter from the description; the AI-assisted checkbox can stay.Looks Good To Me