mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
Code-review pass fixes: - A hidden sibling's key is masked to NULL inside the group aggregate, so a rom the user hid can no longer drive its group's position. - The aggregate shares row_number's window spec with a whole-partition frame, so MariaDB sorts the derived table once instead of twice. - _mapped_sort_column resolves order_by only to mapped columns; a relationship or dunder name now falls back to the name sort instead of raising while the ORDER BY is built. - filter_roms takes everything after the query keyword-only. - Tests: hidden-sibling behavior test, grouped id-index test, the covering-index check compiles the window-level SELECT, alias-free ORDER BY assertions, MariaDB-dialect null-safe join assertion, and _make_rom/_ordered_names replace the copied fixture helpers. Known and deliberate, per review: the aggregate is direction-dependent (MAX on desc, MIN on asc), rating's 0 sentinel stays a real key, and non-aggregated (enum, lexical, roms-side) keys keep representative semantics. The stale-sidecar gap it flagged is fixed separately by the per-user cache versioning PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ldi4YaXJWDDmFdbKfQay8L