Nointro rom verification - #153
Conversation
| public string[] GetVideoFiles(string path, bool allDirectories = true) | ||
| { | ||
| _logger.Debug("Scanning '{0}' for video files", path); | ||
| _logger.Debug("Scanning '{0}' for game files", path); |
|
|
||
| _logger.Trace("{0} files were found in {1}", filesOnDisk.Count, path); | ||
| _logger.Debug("{0} video files were found in {1}", mediaFileList.Count, path); | ||
| _logger.Debug("{0} game files were found in {1}", mediaFileList.Count, path); |
Three fixes from tonight's Sentry triage: - ImportExclusions had UNIQUE(IgdbId), and Steam-only games all carry IgdbId 0 — so only one Steam-only game could ever be excluded; the next delete-with-exclusion crashed the handler (Sentry 7624452260). Migration 16 rebuilds the table and enforces uniqueness through a partial index on real IGDB ids only. Numbered 16 because the in-flight No-Intro PR (#153) already claims 008-015. - Exclusion matching used SingleOrDefault, which throws when a report matches one exclusion by Steam id and a different one by IGDB id. - MediaCoversUpdatedEvent broadcasts re-fetch the game by id, which throws if it was deleted in between (Sentry 7624444111). The migration test is the fork's first, which surfaced two latent framework bugs: MigrationTest auto-resolved NLogLoggerProvider through AutoMoqer (Castle cannot proxy strong-named NLog 6 internals), and MigrationContext.Current was a plain static that parallel test fixtures nulled out from under each other mid-migration — now ThreadStatic; production migrates once at startup on one thread. Verified live: migration applied on an existing smoke database, two Steam-only games deleted with exclusions produced two IgdbId=0 rows and no constraint errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F92WBVAQREJSZ86yokPjp4
|
Did a first read-through — the shape is exactly what we discussed on #149 (slots only for confirmed catalog entries), and the catalog/verification split looks clean. Full review when you mark it ready, but two early notes from tonight's Sentry triage, since one of them bit your own instance:
Also for context from the same triage: the read-only-filesystem errors from your |
|
Early review part 2 — I went deeper into the component-side integration since that's the code I know best. Three performance items and one behavior item, all in the reconciliation path, plus a rebase heads-up. Flagging them now because reconciliation runs on every import/refresh/scan event, so they'll matter on real libraries:
Also a logistics note: tonight's main moved a lot in the files you touch ( None of this changes my overall take: the architecture is right and the catalog/verification split is clean. With items 1–2 addressed this should scale to real ROM libraries comfortably. |
# Conflicts: # src/NzbDrone.Core/Games/Components/GameComponentService.cs
order/properties-order wanted display -> align-items -> flex-direction. Last frontend blocker for PR gamarr-app#153's CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for this — it's a genuinely well-built subsystem. I rebased it onto current Green branch:
|
Live smoke test of the greened branch: the 27 libretro GitHub .dat sources sync cleanly (52,639 entries / 157,908 hashes), but all 5 datomatic:// sources fail with "DAT-o-MATIC did not return a numbered DAT download token" — the scrape flow (hardcoded dated form field + HTML-button regex) no longer matches the current site. Shipping them means 5 permanently-erroring sources. Drop the 5 niche datomatic:// seeds (GBA Multiboot/e-Reader/Play-Yan/Video, DSvision — DAT-o-MATIC-only peripheral systems) from both the seed migration and NoIntroCatalogDefaults so a fresh install syncs 27/27 clean with zero errored sources. The datomatic support code stays; re-seed once FetchDatOMaticNumbered is hardened. Test updated to assert they are not seeded. Verified live: fresh install seeds 27 sources, full sync completes with 0 errored sources and no datomatic re-added by EnsureDefaultSources. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Live smoke test — the feature works, with one confirmed breakRan the greened branch against real sources (fresh DB, triggered
Fix applied on
|
|
@Pfuenzle — over to you to land this. 👋 Thanks again for this — it's genuinely well-built (the dual XML/ClrMamePro DAT parsing, the raw-file + single-zip verification handling, the bad-dump status flagging). We'd like to see it merged. Where it stands: I rebased your work onto current What's needed to land it (details in the two comments above):
Both are optional-for-merge (the feature works without them — #1 just means those 5 systems stay unseeded), so land what you're comfortable with. Timing: no rush, but if the PR goes quiet for ~a week we'll likely adopt the greened branch as-is so it doesn't bit-rot against |
|
Small heads-up from Sentry: a dev build (0.0.1.0, so a local Release build — I'm guessing yours) hit the |
|
I’ve now rebased the branch onto the green nointro-rom-green baseline and addressed the follow-up review points. The PR now tolerates per-file hash/I/O failures without aborting verification or the component API, avoids rebuilding/loading the full No-Intro catalog on every reconciliation pass, hardens the DAT-o-MATIC numbered fetch path, and surfaces version/release-group metadata in the component UI with the more generic “Catalog” labeling. |
|
The rebase looks great and every review point is addressed properly — nice work on the catalog scoping in particular. CI was red though, so I checked the branch out and pushed a fix (aac4e38) rather than bounce it back to you. What was failing, in case it's useful:
Full suite is green locally (5,179 tests). Whenever you're happy with it, flip it out of draft and I'll do the final review pass. |
aac4e38 to
f3608ce
Compare
Reinstates the early-out when every entry is already numbered (the daily sync would otherwise fetch the zip per system for nothing) and gives the silent token-failure fallback a debug line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F92WBVAQREJSZ86yokPjp4
gamarr-bot2
left a comment
There was a problem hiding this comment.
Full final pass done — approving. Everything from the earlier reviews is addressed (per-file fault tolerance, catalog scoping, the DAT-o-MATIC hardening, unmonitored-by-default region slots), the rename semantics landed in a better place than my interim fix (original-filename identity means only verifiably catalog-named files are renamed into the scheme), and I verified the branch merged with current main: full backend suite (5,183 tests), frontend lint/tsc/stylelint/jest, and a live smoke — all 16 migrations apply cleanly on a fresh database, the seven catalog tables and 27 seeded sources come up, and the instance starts without errors. Thanks for a genuinely excellent contribution — this is the biggest outside feature Gamarr has taken and it sets up region variants exactly the way we sketched on #149.
CodeQL flagged the GetVideoFiles path logs after the #153 merge touched them (manual import passes arbitrary user paths into these). GetNonVideoFiles gets the same treatment for consistency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F92WBVAQREJSZ86yokPjp4
Database Migration
YES - 011, 012
Description
Adds No-Intro catalog coverage for Nintendo Game Boy, Game Boy Color, Game Boy Advance, and Nintendo DS ROM libraries, including platform detection, ROM extension handling, and default catalog source seeding.
Extends No-Intro catalog sync with numbered release metadata so rename profiles can produce DAT-style filenames such as
0201 - Mario Kart DS (Europe) (En,Fr,De,Es,It).nds. DAT-o-MATIC numbered DATs are used when available, with ADVANsCEne release-number fallback for DS/GBA when DAT-o-MATIC cannot provide a download token.Improves No-Intro visibility in the API and UI by surfacing catalog status in Metadata settings and exact ROM hash matches in game component tooltips.
Screenshot (if UI related)
Not included.
Todos