Repository navigation
Add persistent covers and backgrounds for PS5 and Switch - #60
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| }; | ||
| bool ppsa=word.size()>4&&lower(word[0])=='p'&&lower(word[1])=='p'&&lower(word[2])=='s'&&lower(word[3])=='a'; | ||
| for(unsigned i=4;ppsa&&i<word.size();++i)ppsa=word[i]>='0'&&word[i]<='9'; | ||
| if(equals("ps5")){if(!emulation)platform=1;break;} |
There was a problem hiding this comment.
🟡 R1: a leading PS5 tag makes every title share one cache key
key() stops at the first ps5 word, so a title whose first word is the platform tag ends up with an empty normalized title. For example, [PS5] Astro Bot and [PS5] Gran Turismo 7 both skip [ and hit ps5, then break with length==0. Both produce the same key: an empty prefix, the FNV offset hash, out[104]=2 and out[105]=1. This contradicts the guarantee stated above that a missing title must never share an entry.
The resolver handles this title shape: clean_title() removes [...] and resolves Astro Bot. So the service returns the correct art for the first game, and the native app stores it under the shared key. After that, retainedCovers_.load() in Artwork::request() and cache.load() in the worker return that same image for every other [PS5] … release. This affects rankings, search, Activity, Library and the hero background. The image persists in /download0 across restarts, and the app never asks the service again.
On a single page with two such titles, both slots download, but the second store() overwrites the first. When you come back to the page, both slots show the same picture.
Suggested fix: when the ps5 marker is reached with length==0, skip that word and keep normalizing instead of breaking. Alternatively, fall back to the ID-based key whenever the normalized length is 0. Add an artwork_cache_test assertion that [PS5] Game A and [PS5] Game B produce different keys.
Claude review: Code review: no findingsReviewed commits 8d6b0f8..1c0940d · checks: Code review complete; host checks pending · host validation source: pending isolated
Files reviewed
Bottom line: Wait for the combined CI verdictTo fix before merge: nothing. Notes (no action needed):
Not verified: PS5 runtime acceptance, including |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d6b0f82f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const auto found=std::find_if(display_.begin(),display_.end(),[&](const auto& entry){return entry.second.id==id||entry.second.artworkId==id;}); | ||
| if(found==display_.end())return {}; | ||
| try{containedExisting(root(),found->first);if(sourceIdentity(found->first)!=found->second.identity)return {};}catch(...){return {};} | ||
| return found->second.data.value("name",std::string{}); |
There was a problem hiding this comment.
Resolve artwork using the projected emulation title
When an emulation entry has no readable Control NACP, this returns an empty title even when the inventory displays a valid game name. For example, project() assigns installed DLC its base game's name, and entry() can obtain a game name from a verified receipt, but neither name is copied into Cached::data. Consequently, /api/artwork returns 404 without contacting the resolver, leaving these entries without portraits or backgrounds on a cold native cache. Preserve the projected display name for artwork resolution rather than relying exclusively on the raw NACP metadata.
Useful? React with 👍 / 👎.
|
✅ Ready to merge. Claude's review of |
Returning to a ranking or the Emulation page discarded decoded artwork and briefly displayed placeholders even when an image was already cached. PS5 and Switch now share consistently sized portraits and selected-game backgrounds, with decoded RAM retention and checksummed persistent caches.
[PS5]tags without cache collisions and resolve Switch artwork using receipt/base-game display names. Include a sanitized Prowlarr audit tool that checks fallback providers on cold caches, plus default identity mappings.Validation: final local Cubic review passed with no findings after corrections. 41 resolver tests and all 80 repository contracts passed. Native tests, packaging tests, service search/emulation integration and PS5 builds passed on the dedicated VPS. Live auditing covered 571 release titles, including successful portrait responses for all 189 PS5 releases; NHL 27 and Dragon’s Dogma 2: Dark Arisen portraits/backgrounds also passed authenticated HTTPS checks. Those figures cover the sampled release corpus, not every future title.
Deployment: matching native/service executables and corresponding sources are refreshed in
packages/; deploy the artwork resolver with the identity mappings and a server-only SteamGridDB key at/opt/botty-artwork/steamgriddb-api-key. Existing console caches and operator overrides are preserved. Earlier development builds and the resolver were installed in the tested setup; the final Cubic fixes have additional host/build validation and still require rollout. This PR does not deploy services or create a release tag. No credentials, console backups or diagnostic logs are included.Host-rendered preview with simulated catalog data (not a PS5 capture):