feat(libSceNpTrophy2): report the title's trophy data from trophyNN.ucp #7262

Merged
EagleBearerYS merged 4 commits from upstream-pr/7262 into main 2026-10-18 02:00:54 +00:00
EagleBearerYS commented 2026-10-17 20:17:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-17T20:17:33Z.


What

The trophy queries report the title's own trophy data. Nothing is bundled: the title's own sce_sys/trophy2/trophyNN.ucp is read once per service label, on first use. This is the read-only first half of the split asked for in review: it writes no host files and leaves libSceNpUniversalDataSystem's code as on main. Recording unlocks and statistics is #7335, stacked on this PR.

  • The title's trophy data. sceNpTrophy2GetTrophyInfo, GetTrophyInfoArray, GetGameInfo, GetGroupInfo and GetGroupInfoArray report the names, descriptions, rewards, grades, groups, hidden and reward flags, trophy and grade counts, and a progressive trophy's target from trophyNN.ucp. Texts follow ANYPS5_LANGUAGE, then en-US, then the file's defaultLanguage. The first query prints what was read: [trophy] <file>: <n> trophies, <m> groups, texts in <tag>.
  • Every trophy reports as locked. Nothing records unlocks yet, so a trophy reports unlocked = false with no unlock time, a progressive trophy reports a progress of 0, and the unlocked counts and progress_percentage are 0, as on main. #7335 records unlocks and connects these queries to them.
  • Contexts remember their user and service label, so a query reads the data of its own label. sceNpTrophy2CreateContext returns 1, 2, 3 and so on, where main always returned 1, and DestroyContext forgets the context.

Planet of Lana (PPSA19450) reads its own trophy data at boot. This line comes from this PR's reader:

[trophy] /app0/sce_sys/trophy2/trophy00.ucp: 25 trophies, 1 group, texts in en-US

Titles that ship no trophyNN.ucp behave as before: every return code is the same, and the queries keep today's placeholders. A missing file is silent (a [uds] line with APS5_TRACE_UDS). A malformed file logs one [trophy] <file> is malformed, so ...: <reason> line, and the queries keep the placeholders.

How:

  • The files. A bounds-checked reader for the .ucp container and a strict JSON reader (RFC 8259, with a 64-level depth limit and a cap of 1,048,576 values per document), both in libSceNpTrophy2, with no new dependency. Parsing does no I/O and throws with the reason on malformed input.
  • One layout change (its own commit): NpTrophy2Progress becomes {int32 type; 4 reserved bytes; uint64 value}, 16 bytes. It was a bare uint32, with no public source, while the constants already defined a progress type with no field to hold it. This puts a trophy's name at offset 32 and makes GetTrophyInfoArray's stride 1312 bytes. All six structure sizes are now pinned with static_asserts.
  • The console language. The parser sceSystemServiceParamGetInt used for the language moves inline into SystemService.hpp, so Trophy2 can use it without linking libSceSystemService. The error text is unchanged.
  • No host files. The only file this PR opens is trophyNN.ucp, for reading. guest_np_trophy_data is registered with the other trophy guest tests in libSceNpUniversalDataSystem's CMakeLists.txt, but at this PR it calls no UDS function.

Choices the public data leaves open, each listed as debt:

  • With trophy data loaded, a trophy or group id that isn't in the file throws, naming the id and the file, where main returned a placeholder for any id. The console's error codes for it aren't confirmed.
  • The base group is −1, listed first only when some trophy has no groupId. Hidden trophies report their names as they are.
  • The reader's limits: 256 MiB per file, 4,096 files per container, 64 nesting levels and 1,048,576 values per JSON document. A file past one is malformed, so the title runs without it. The console's limits aren't known.

Sources. Interface facts only, no code, from KytyPS5 (GPL-2.0) at 9e41d8320a:

  • src/common/trophies.cpp: the .ucp container layout, the file paths, tropconf.json's and tropmeta_<tag>.json's keys, and the locale tags;
  • src/libs/libTrophy.cpp: the query structures' layout.

KytyPS5's error codes aren't adopted, since no other public source confirms them. The return codes are unchanged.

Commits (each builds and passes the tests that exist at it):

  1. refactor(libSceSystemService): share the console language setting: the console language parser moves inline, for Trophy2.
  2. fix(libSceNpTrophy2): give progress values a type and a 64-bit value: the layout change above.
  3. feat(libSceNpTrophy2): report the title's trophy data from trophyNN.ucp: the reader with its limits, the trophy data in the queries, the contexts, and np_trophy2_package plus guest_np_trophy_data.
  4. docs: describe trophy data in USAGE: the "Trophies" section, saying that every trophy reports as locked for now.

Overlap (checked against main f1af6c5915 and the 33 open PRs that touch the same files; the ones that merge into main merge with this PR too):

  • #6361 (fogydes, export stubs for the remaining libraries) changes libSceNpUniversalDataSystem's CMakeLists.txt, where this PR registers guest_np_trophy_data. None of its stubs is a function this PR defines, so whichever lands second keeps both.
  • Fifteen more PRs that conflict with main themselves weren't merged against this one. They share only libSceSystemService/Export.cpp (#7201, #6447, #6248), USAGE.md (#6946, #6788, #6171, #6111, #5925, #4891, #3998) or libSceNpTrophy2's test registration in its CMakeLists.txt (#6044); #6977, #6947, #6222 and #5021 share none of this PR's files.

Tested

Every test builds its own synthetic .ucp files in a fresh directory; none uses a title's data.

  • np_trophy2_package (unit):
    • the container: names, contents, every truncation of a valid file rejected, and malformed headers and entries;
    • the JSON reader: escapes, surrogate pairs, the BOM, duplicate keys, number ranges, the depth limit, and malformed documents;
    • the value cap: exactly 1,048,576 values parse, one more is refused, and a tropconf.json padded past the cap is refused as malformed;
    • the message for missing texts names each language it tried once;
    • the trophy data: grades, groups, flags, platinum ids, the unlock conditions, the progressive target and the language fallbacks; malformed data (bad grades, ids and groups, a missing or invalid tropconf.json, too many groups, a file that isn't a container) throws;
    • progress and counts with nothing unlocked.
  • guest_np_trophy_data, through the built libraries' exports only: every query's names, grades, groups, flags and progressive target; an unknown trophy id throwing; the lists in id order from their offsets; no unlocks before any event; and a missing and a malformed file leaving the placeholders. guest_nptrophy2 still passes unchanged.
  • Linux (Ubuntu 24.04, GCC 13.3, CI's configure flags, as an unprivileged user), on main 5361e69de3: 1,407 tests, 1,334 passed, 68 skipped, 5 failed. main on the same machine gives 1,405, 1,332, 68 and 5.
    • Per test, the only difference is the 2 tests this PR adds, both passing.
    • The 5 failures are the IPv6 tests (guest_datagram_* and guest_tcp), which fail on that machine on main too, and guest_sce_net skips there for the same reason.
    • Each of the 4 commits builds and passes the trophy and system-service tests that exist at it (3, then 5), and check_test_registration.py and check_conventions.py pass.
  • Windows, the Build workflow's Windows job on my fork, at 61e12c75fd: 1,434 tests, 0 failed (run). The macOS and Ubuntu jobs pass too.
  • Planet of Lana (PPSA19450), Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42), played by hand into Chapter 1, on our test tree for the title (not main; it carries the open fixes the title needs) with the whole trophy series before the split: the title read its trophy data as shown under What, and the log has no fatal error and no [trophy] error.

Not covered, and why:

  • Unlocks and statistics: #7335.
  • Trophy icons: an icon query stops the title with an error, because the icon files' names inside trophyNN.ucp aren't public. USAGE says so.

Checklist

  • Based on main 5361e69de3; 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 (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (#7335 unblocks PPSA19450's trophies)
  • GPUs tested: not GPU-related
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4903588453 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7262). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-17T20:17:33Z. --- ### What The trophy queries report the title's own trophy data. Nothing is bundled: the title's own `sce_sys/trophy2/trophyNN.ucp` is read once per service label, on first use. This is the read-only first half of the split asked for in review: it writes no host files and leaves libSceNpUniversalDataSystem's code as on `main`. Recording unlocks and statistics is #7335, stacked on this PR. - **The title's trophy data.** `sceNpTrophy2GetTrophyInfo`, `GetTrophyInfoArray`, `GetGameInfo`, `GetGroupInfo` and `GetGroupInfoArray` report the names, descriptions, rewards, grades, groups, hidden and reward flags, trophy and grade counts, and a progressive trophy's target from `trophyNN.ucp`. Texts follow `ANYPS5_LANGUAGE`, then en-US, then the file's `defaultLanguage`. The first query prints what was read: `[trophy] <file>: <n> trophies, <m> groups, texts in <tag>`. - **Every trophy reports as locked.** Nothing records unlocks yet, so a trophy reports `unlocked = false` with no unlock time, a progressive trophy reports a progress of 0, and the unlocked counts and `progress_percentage` are 0, as on `main`. #7335 records unlocks and connects these queries to them. - **Contexts** remember their user and service label, so a query reads the data of its own label. `sceNpTrophy2CreateContext` returns 1, 2, 3 and so on, where `main` always returned 1, and `DestroyContext` forgets the context. **Planet of Lana (PPSA19450)** reads its own trophy data at boot. This line comes from this PR's reader: ``` [trophy] /app0/sce_sys/trophy2/trophy00.ucp: 25 trophies, 1 group, texts in en-US ``` Titles that ship no `trophyNN.ucp` behave as before: every return code is the same, and the queries keep today's placeholders. A missing file is silent (a `[uds]` line with `APS5_TRACE_UDS`). A malformed file logs one `[trophy] <file> is malformed, so ...: <reason>` line, and the queries keep the placeholders. How: - **The files.** A bounds-checked reader for the `.ucp` container and a strict JSON reader (RFC 8259, with a 64-level depth limit and a cap of 1,048,576 values per document), both in libSceNpTrophy2, with no new dependency. Parsing does no I/O and throws with the reason on malformed input. - **One layout change** (its own commit): `NpTrophy2Progress` becomes `{int32 type; 4 reserved bytes; uint64 value}`, 16 bytes. It was a bare `uint32`, with no public source, while the constants already defined a progress type with no field to hold it. This puts a trophy's name at offset 32 and makes `GetTrophyInfoArray`'s stride 1312 bytes. All six structure sizes are now pinned with `static_assert`s. - **The console language.** The parser `sceSystemServiceParamGetInt` used for the language moves inline into `SystemService.hpp`, so Trophy2 can use it without linking libSceSystemService. The error text is unchanged. - **No host files.** The only file this PR opens is `trophyNN.ucp`, for reading. `guest_np_trophy_data` is registered with the other trophy guest tests in libSceNpUniversalDataSystem's `CMakeLists.txt`, but at this PR it calls no UDS function. Choices the public data leaves open, each listed as debt: - With trophy data loaded, a trophy or group id that isn't in the file throws, naming the id and the file, where `main` returned a placeholder for any id. The console's error codes for it aren't confirmed. - The base group is −1, listed first only when some trophy has no `groupId`. Hidden trophies report their names as they are. - The reader's limits: 256 MiB per file, 4,096 files per container, 64 nesting levels and 1,048,576 values per JSON document. A file past one is malformed, so the title runs without it. The console's limits aren't known. **Sources.** Interface facts only, no code, from KytyPS5 (GPL-2.0) at 9e41d8320a: - `src/common/trophies.cpp`: the `.ucp` container layout, the file paths, `tropconf.json`'s and `tropmeta_<tag>.json`'s keys, and the locale tags; - `src/libs/libTrophy.cpp`: the query structures' layout. KytyPS5's error codes aren't adopted, since no other public source confirms them. The return codes are unchanged. Commits (each builds and passes the tests that exist at it): 1. `refactor(libSceSystemService): share the console language setting`: the console language parser moves inline, for Trophy2. 2. `fix(libSceNpTrophy2): give progress values a type and a 64-bit value`: the layout change above. 3. `feat(libSceNpTrophy2): report the title's trophy data from trophyNN.ucp`: the reader with its limits, the trophy data in the queries, the contexts, and `np_trophy2_package` plus `guest_np_trophy_data`. 4. `docs: describe trophy data in USAGE`: the "Trophies" section, saying that every trophy reports as locked for now. **Overlap** (checked against `main` f1af6c5915 and the 33 open PRs that touch the same files; the ones that merge into `main` merge with this PR too): - #6361 (fogydes, export stubs for the remaining libraries) changes libSceNpUniversalDataSystem's `CMakeLists.txt`, where this PR registers `guest_np_trophy_data`. None of its stubs is a function this PR defines, so whichever lands second keeps both. - Fifteen more PRs that conflict with `main` themselves weren't merged against this one. They share only `libSceSystemService/Export.cpp` (#7201, #6447, #6248), `USAGE.md` (#6946, #6788, #6171, #6111, #5925, #4891, #3998) or libSceNpTrophy2's test registration in its `CMakeLists.txt` (#6044); #6977, #6947, #6222 and #5021 share none of this PR's files. ### Tested Every test builds its own synthetic `.ucp` files in a fresh directory; none uses a title's data. - **`np_trophy2_package`** (unit): - the container: names, contents, every truncation of a valid file rejected, and malformed headers and entries; - the JSON reader: escapes, surrogate pairs, the BOM, duplicate keys, number ranges, the depth limit, and malformed documents; - the value cap: exactly 1,048,576 values parse, one more is refused, and a `tropconf.json` padded past the cap is refused as malformed; - the message for missing texts names each language it tried once; - the trophy data: grades, groups, flags, platinum ids, the unlock conditions, the progressive target and the language fallbacks; malformed data (bad grades, ids and groups, a missing or invalid `tropconf.json`, too many groups, a file that isn't a container) throws; - progress and counts with nothing unlocked. - **`guest_np_trophy_data`**, through the built libraries' exports only: every query's names, grades, groups, flags and progressive target; an unknown trophy id throwing; the lists in id order from their offsets; no unlocks before any event; and a missing and a malformed file leaving the placeholders. `guest_nptrophy2` still passes unchanged. - **Linux** (Ubuntu 24.04, GCC 13.3, CI's configure flags, as an unprivileged user), on `main` 5361e69de3: 1,407 tests, 1,334 passed, 68 skipped, 5 failed. `main` on the same machine gives 1,405, 1,332, 68 and 5. - Per test, the only difference is the 2 tests this PR adds, both passing. - The 5 failures are the IPv6 tests (`guest_datagram_*` and `guest_tcp`), which fail on that machine on `main` too, and `guest_sce_net` skips there for the same reason. - Each of the 4 commits builds and passes the trophy and system-service tests that exist at it (3, then 5), and `check_test_registration.py` and `check_conventions.py` pass. - **Windows**, the Build workflow's Windows job on my fork, at 61e12c75fd: 1,434 tests, 0 failed ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39082399483/job/117541909598)). The macOS and Ubuntu jobs pass too. - **Planet of Lana (PPSA19450)**, Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42), played by hand into Chapter 1, on our test tree for the title (not `main`; it carries the open fixes the title needs) with the whole trophy series before the split: the title read its trophy data as shown under What, and the log has no fatal error and no `[trophy]` error. **Not covered, and why:** - **Unlocks and statistics:** #7335. - **Trophy icons:** an icon query stops the title with an error, because the icon files' names inside `trophyNN.ucp` aren't public. USAGE says so. ### Checklist - [x] Based on `main` 5361e69de3; 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical 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 (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none (#7335 unblocks PPSA19450's trophies) - [x] GPUs tested: not GPU-related - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-17 20:34:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T20:34:32Z.


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.

Pull request Shared files not compared
PR 3998 docs/user/USAGE.md
PR 4891 docs/user/USAGE.md
PR 5021 docs/user/USAGE.md
PR 5925 docs/user/USAGE.md
PR 6044 core/libs/prx/libSceNpTrophy2/CMakeLists.txt
PR 6111 docs/user/USAGE.md
PR 6171 docs/user/USAGE.md
PR 6248 core/libs/prx/libSceSystemService/Export.cpp
PR 6361 core/libs/prx/libSceNpUniversalDataSystem/CMakeLists.txt
PR 6447 core/libs/prx/libSceSystemService/Export.cpp
PR 6788 docs/user/USAGE.md
PR 6946 docs/user/USAGE.md
PR 6947 docs/user/USAGE.md
PR 7201 core/libs/prx/libSceSystemService/Export.cpp
PR 7332 core/libs/prx/libSceSystemService/Export.cpp
docs/user/USAGE.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240592459 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7262#issuecomment-6240592459). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T20:34:32Z. --- <!-- pr-overlap --> 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. | Pull request | Shared files not compared | |---|---| | [PR 3998](https://www.github.com/boykopovar/AnyPS5/pull/3998) | `docs/user/USAGE.md` | | [PR 4891](https://www.github.com/boykopovar/AnyPS5/pull/4891) | `docs/user/USAGE.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/user/USAGE.md` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `docs/user/USAGE.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceNpTrophy2/CMakeLists.txt` | | [PR 6111](https://www.github.com/boykopovar/AnyPS5/pull/6111) | `docs/user/USAGE.md` | | [PR 6171](https://www.github.com/boykopovar/AnyPS5/pull/6171) | `docs/user/USAGE.md` | | [PR 6248](https://www.github.com/boykopovar/AnyPS5/pull/6248) | `core/libs/prx/libSceSystemService/Export.cpp` | | [PR 6361](https://www.github.com/boykopovar/AnyPS5/pull/6361) | `core/libs/prx/libSceNpUniversalDataSystem/CMakeLists.txt` | | [PR 6447](https://www.github.com/boykopovar/AnyPS5/pull/6447) | `core/libs/prx/libSceSystemService/Export.cpp` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `docs/user/USAGE.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `docs/user/USAGE.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `docs/user/USAGE.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceSystemService/Export.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceSystemService/Export.cpp`<br>`docs/user/USAGE.md` |
oneandonlydean commented 2026-10-17 22:19:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T22:19:18Z.


Thanks for this. The code reads correct to me, and full CI on 34af9a6ed passed on both lanes with all six new tests. Before it goes further, could you split it into two stacked PRs? It changes what nearly every title gets back at boot from two libraries, and two halves keep a regression bisectable to the half that caused it.

  1. Report the title's trophy data (read-only). Parsing trophyNN.ucp (TrophyPackage), TitleTrophies, the GameInfo/GroupInfo/TrophyInfo changes, the shared console language (ccd6799) and the typed 64-bit progress values (e9af6b6), with np_trophy2_package and the reporting half of guest_np_trophy_data. This half writes no host files and leaves UDS as it is on main.
  2. Record unlocks and statistics, stacked on 1. TrophyStore writes, unlock callbacks in Context, UDS event properties, PostEvent, stat rules and the refused unlocks (9073ee6), CreateContext ids, with np_trophy2_store, np_uds_events, guest_np_trophy_unlocks, guest_np_trophy_stats and the posting half of guest_np_trophy_data. The invalid_argument from PostEvent for an event CreateEvent didn't make is fine here, together with its test in Events.cpp.

One thing to decide: the reporting code in 1 asks UnlockedBy / TitleStore().UnlockTick whether a trophy is unlocked (GameInfo.cpp:43, GroupInfo.cpp:40, TrophyInfo.cpp:58). Since nothing records unlocks until 2, part 1 can report everything as locked and 2 can connect the query, or 1 can carry a read-only lookup of the store. Either works; go with whichever keeps 1 smaller.

Two small things for part 2, not blocking:

  • StatStore::Set rewrites and renames the stats file on every stat-setting event (TrophyStore.cpp:169-176). Skipping the write when the value hasn't changed would keep a title that maps a frequent event to a stat off synchronous file I/O.
  • A malformed line in a host record now throws into every PostEvent/unlock query for that user and label, where main returned 0. That's the usual handling for host errors here; a line in the debt entry saying so would help.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6242114453 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7262#issuecomment-6242114453). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T22:19:18Z. --- Thanks for this. The code reads correct to me, and full CI on 34af9a6ed passed on both lanes with all six new tests. Before it goes further, could you split it into two stacked PRs? It changes what nearly every title gets back at boot from two libraries, and two halves keep a regression bisectable to the half that caused it. 1. **Report the title's trophy data (read-only).** Parsing `trophyNN.ucp` (`TrophyPackage`), `TitleTrophies`, the GameInfo/GroupInfo/TrophyInfo changes, the shared console language (ccd6799) and the typed 64-bit progress values (e9af6b6), with `np_trophy2_package` and the reporting half of `guest_np_trophy_data`. This half writes no host files and leaves UDS as it is on main. 2. **Record unlocks and statistics, stacked on 1.** `TrophyStore` writes, unlock callbacks in Context, UDS event properties, PostEvent, stat rules and the refused unlocks (9073ee6), CreateContext ids, with `np_trophy2_store`, `np_uds_events`, `guest_np_trophy_unlocks`, `guest_np_trophy_stats` and the posting half of `guest_np_trophy_data`. The `invalid_argument` from PostEvent for an event CreateEvent didn't make is fine here, together with its test in `Events.cpp`. One thing to decide: the reporting code in 1 asks `UnlockedBy` / `TitleStore().UnlockTick` whether a trophy is unlocked (GameInfo.cpp:43, GroupInfo.cpp:40, TrophyInfo.cpp:58). Since nothing records unlocks until 2, part 1 can report everything as locked and 2 can connect the query, or 1 can carry a read-only lookup of the store. Either works; go with whichever keeps 1 smaller. Two small things for part 2, not blocking: - `StatStore::Set` rewrites and renames the stats file on every stat-setting event (TrophyStore.cpp:169-176). Skipping the write when the value hasn't changed would keep a title that maps a frequent event to a stat off synchronous file I/O. - A malformed line in a host record now throws into every PostEvent/unlock query for that user and label, where main returned 0. That's the usual handling for host errors here; a line in the debt entry saying so would help.
EagleBearerYS commented 2026-10-18 00:51:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T00:51:35Z.


@oneandonlydean split as you asked. This PR is now part 1, the read-only half: 4 commits on main 5361e69de3, head 61e12c75fd. It reports the title's trophy data with every trophy locked, which kept it smallest: the unlock predicate, UnlockedBy and PlatinumToUnlock moved to part 2, and nothing here writes a host file or changes UDS's code. It does carry the context registry, since a query needs a context's user and service label to find its trophyNN.ucp.

Part 2 is #7335 (head 8e927be27f, 9 commits on this PR's head). It records unlocks and statistics and connects these queries to the store. For your two notes on it:

  • StatStore::Set already returns before writing when a statistic's value hasn't changed (TrophyStore.cpp:173), so only a changed value rewrites the file.
  • Its last commit adds the debt entry for a damaged record line: it now throws in every query and post that reads that record, where main returned 0.

With main merged into the head you reviewed, #7335's tree is the same apart from that debt entry. A run that mirrors CI's Linux job, and the Windows job on my fork, pass on both heads; the numbers are in each PR's Tested section.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243919521 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7262#issuecomment-6243919521). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T00:51:35Z. --- @oneandonlydean split as you asked. This PR is now part 1, the read-only half: 4 commits on `main` 5361e69de3, head 61e12c75fd. It reports the title's trophy data with every trophy locked, which kept it smallest: the unlock predicate, `UnlockedBy` and `PlatinumToUnlock` moved to part 2, and nothing here writes a host file or changes UDS's code. It does carry the context registry, since a query needs a context's user and service label to find its `trophyNN.ucp`. Part 2 is #7335 (head 8e927be27f, 9 commits on this PR's head). It records unlocks and statistics and connects these queries to the store. For your two notes on it: - `StatStore::Set` already returns before writing when a statistic's value hasn't changed (TrophyStore.cpp:173), so only a changed value rewrites the file. - Its last commit adds the debt entry for a damaged record line: it now throws in every query and post that reads that record, where `main` returned 0. With `main` merged into the head you reviewed, #7335's tree is the same apart from that debt entry. A run that mirrors CI's Linux job, and the Windows job on my fork, pass on both heads; the numbers are in each PR's Tested section.
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!7262
No description provided.