mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 20:57:45 +00:00
When creating a version stack, the sortIndex was previously extracted by taking files[0] from the database query result. Because findMany without orderBy is non-deterministic, this resulted in flakiness where the sortIndex would sometimes be null (from file2) instead of 'abc' (from file1), causing tests to fail. We now look up the first file specifically based on the ordered fileIds array parameter.