mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
Three defects the review pass turned up: `from_stored_criteria` raised on a smart collection whose stored `filter_criteria` holds a value the model rejects. That JSON is written unvalidated and read in a loop over every smart collection, so one bad row stopped all the later ones from refreshing on any ROM write, and 500'd a public smart collection. It now drops the entries it cannot honour, which is what the criteria reader did before it validated anything. Two comments claimed `metadata_providers` matches id columns on `Rom`. It matches them on the facets mirror, so a reader trusting the comment concludes the filter needs no join and cross-joins `roms_facets` into the query. Corrected, and pinned by a test asserting every registered filter joins the mirror exactly once. `as_query_dependency` silently mis-built a route for a field with an alias or a `default_factory`, the latter sharing one mutable default across requests. Both now fail at startup, and the helper has the tests it shipped without. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLreYqGLgHJLei6NThVXCz