mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
Centralize the *_no_tags / *_no_ext / *_extension columns (derived from a file name) behind @validates hooks instead of computing them by hand at every write site: - Add pure helpers (compute_file_name_parts and friends) to models.base; the filesystem base handler now delegates to them. - Add @validates on Rom (fs_name), BaseAsset (file_name, inherited by all asset subclasses), and Firmware (file_name). - update_rom keeps the fs_name-derived columns in sync on bulk update(), which also fixes the rename path never updating fs_extension. - Drop the now-redundant computations at the scan/rename call sites. Also fix the migration backfill loop and a pre-existing list[str | None] type mismatch surfaced in scan_handler. Add tests for the helpers, the validators, and the update_rom bulk-sync path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>