Files
romm/backend/handler
Zach Clendenen 6fb4e4ea1b perf(scan): skip the second write and reload for newly inserted roms (#5070)
* perf(scan): skip the second write and reload for newly inserted roms

A new rom is inserted and reloaded by the socket scan just before scan_rom, which then merged and reloaded it again before identification. Only existing roms take that write now. The insert carries the file hashes, size and title id so a scan that stops early still leaves a row rename detection can match.

* refactor(scan): address pr-ready code review

* chore(scan): pr-ready code-review pass

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor(scan): pr-ready simplify pass

Fold the new insert tests into TestIdentifyRomReassociation, rename
_added_rom to scanning_rom, and name the emit test after both checks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(scan): pr-ready review-polish pass

Assert the unset file columns one by one, since mypy rejects comparing
the int-typed fs_size_bytes against None in a tuple.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-03 10:23:13 -04:00
..