fix(libSceNpTrophy2): reject unsupported extraction actions #15951

Merged
nikhilpanchal1 merged 3 commits from upstream-pr/15951 into main 2026-11-11 10:48:33 +00:00
nikhilpanchal1 commented 2026-11-05 02:18:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nikhilpanchal1 on 2026-11-05T02:18:24Z.


What

UDS extraction rules with unsupported action/output members were accepted as direct property copies. Raw input could therefore be persisted and unlock synthetic trophies. Reject these shapes before registering a rule, preserve supported sibling rules and direct unlocks, and escape unsupported member names in diagnostics.

Related to #8005 C3. Unknown metadata and explicit null extensions are also rejected. Other aggregation families and extraction conversions remain unsupported; no PRAGMATA compatibility improvement is established.

Tested

Linux x86-64, GCC 14.2, Release, BUILD_TESTING=ON. Base: acac7c8541; reviewed head: 76a5200da8.

  • All runtime libraries, NID patching and relinker build pass (cmake --build build --target libs relinker).
  • Fresh baseline: original tests 8/8 pass; both new regressions fail upstream, including false synthetic trophy/platinum unlocks. The escaping regression also fails the previous branch version. Final focused tests: 8/8 pass.
  • Coverage includes unknown fields, duplicate keys, supported rules before and after rejection, filters, latest/max updates, persisted values and fresh StatStore reload, repeated events, stable listener counts/timestamps/records, direct unlocks and platinum completion.
  • Adversarial checks strengthened member-name escaping, repeated-event assertions and supported-rule ordering coverage. Independent source probes passed ASan/UBSan.
  • A separate synthetic runtime probe passes 120 rule permutations across three process stages, including persisted progress, callbacks and trophy queries.
  • Conventions, whitespace and public-header audit pass (406 libraries, 28,357 exports).
  • Checked 1,890 open PRs: no confirmed implementation overlap. The checker leaves #14212's already-conflicting debt file unverified; manual review found formatting/count cleanup only. #14427, #14935 and #15673 merge independently.

No Windows, macOS, console or title execution or full-suite run. Fresh-process coverage is a separate synthetic probe, not a new CI test. Existing incorrect records are not repaired. Escaping covers member names, not every diagnostic field.

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5164963863 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15951). Originally posted by [nikhilpanchal1](https://github.com/nikhilpanchal1) on 2026-11-05T02:18:24Z. --- ### What UDS extraction rules with unsupported action/output members were accepted as direct property copies. Raw input could therefore be persisted and unlock synthetic trophies. Reject these shapes before registering a rule, preserve supported sibling rules and direct unlocks, and escape unsupported member names in diagnostics. Related to #8005 C3. Unknown metadata and explicit null extensions are also rejected. Other aggregation families and extraction conversions remain unsupported; no PRAGMATA compatibility improvement is established. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Linux x86-64, GCC 14.2, Release, `BUILD_TESTING=ON`. Base: `acac7c8541`; reviewed head: `76a5200da8`. - All runtime libraries, NID patching and relinker build pass (`cmake --build build --target libs relinker`). - Fresh baseline: original tests 8/8 pass; both new regressions fail upstream, including false synthetic trophy/platinum unlocks. The escaping regression also fails the previous branch version. Final focused tests: 8/8 pass. - Coverage includes unknown fields, duplicate keys, supported rules before and after rejection, filters, latest/max updates, persisted values and fresh `StatStore` reload, repeated events, stable listener counts/timestamps/records, direct unlocks and platinum completion. - Adversarial checks strengthened member-name escaping, repeated-event assertions and supported-rule ordering coverage. Independent source probes passed ASan/UBSan. - A separate synthetic runtime probe passes 120 rule permutations across three process stages, including persisted progress, callbacks and trophy queries. - Conventions, whitespace and public-header audit pass (406 libraries, 28,357 exports). - Checked 1,890 open PRs: no confirmed implementation overlap. The checker leaves #14212's already-conflicting debt file unverified; manual review found formatting/count cleanup only. #14427, #14935 and #15673 merge independently. No Windows, macOS, console or title execution or full-suite run. Fresh-process coverage is a separate synthetic probe, not a new CI test. Existing incorrect records are not repaired. Escaping covers member names, not every diagnostic field. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
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!15951
No description provided.