Commit 3f1932b
fix(noise-classifier): stop rejecting 007/Bond games as numbered slot artifact
The noise classifier in system_detection.go used the regex
`^\s*[0-9]{1,3}\s*-\s*[A-Za-z]` to detect emulator save-slot filenames
like "1 - Save Slot", "02 - Backup". This was over-broad — it also
matched real game titles that happen to start with 1-3 digits followed
by " - ", most notably the entire James Bond franchise:
007 - Everything or Nothing
007 - The World Is Not Enough
007 - GoldenEye
007 - Agent Under Fire
...
Repro from a live deploy (2026-06-07): SGM-Helper on a Steam Deck
attempting to upload `007 - Everything or Nothing (USA, Europe).srm`
gets HTTP 422 with body:
{"error":"Unprocessable Entity",
"message":"unsupported or unrecognized save format; only known
consoles/arcade are allowed",
"reason":"numbered mission/save-slot artifact"}
The .srm has a valid `3500DNOB` EA save header and 103 non-zero bytes
of real save data — definitely not a slot artifact.
Fix: scope the regex to require a slot-like keyword after the dash
(autosave|save|slot|auto|backup|mission|player|file|state|memory|sp\d*),
matching the actual naming patterns emulators (PCSX2, mGBA, etc) use
for their numbered slot files while leaving real game titles alone.
Adds a comprehensive test covering 12 true-positives (slot artifacts
the classifier MUST keep rejecting) and 10 false-positives (real game
titles the classifier MUST now accept), including the full 007 series
and other digit-prefixed real games like "3 - Count Bout",
"4 - Wheel Thunder".
Co-authored-by: terafin <terafin@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fa689a8 commit 3f1932b
2 files changed
Lines changed: 53 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments