Skip to content

Bugfix unstable database order - #137

Merged
olivhoenen merged 1 commit into
iterorganization:developfrom
Louwrensth:bugfix/unstable-database-order
Oct 1, 2026
Merged

olivhoenen merged 1 commit into
iterorganization:developfrom
Louwrensth:bugfix/unstable-database-order

Conversation

@Louwrensth

Copy link
Copy Markdown
Contributor

Summary

This PR fixes unstable pagination in the database layer (src/simdb/database/database.py) by making simulation listing order deterministic.

Changes

  • Make database pagination use a stable, deterministic sort order.
  • Raise DatabaseError when an unknown sort column is requested.
  • Update the database test fixture to simulate unordered query results by rotating rows on each Query.all() call.
  • Add regression coverage to show duplicate entries in query pagination (limit) when no stable sort is applied.

Validation

  • 24 passed in tests/database/test_metadata_queries.py

Comment thread src/simdb/database/database.py Outdated
Comment thread src/simdb/database/database.py
@Louwrensth
Louwrensth force-pushed the bugfix/unstable-database-order branch from 0579ffa to a193816 Compare October 1, 2026 09:13
@Louwrensth
Louwrensth force-pushed the bugfix/unstable-database-order branch from a193816 to 150301b Compare October 1, 2026 13:53
@Louwrensth
Louwrensth force-pushed the bugfix/unstable-database-order branch from 150301b to e94e3ef Compare October 1, 2026 13:57
@olivhoenen
olivhoenen merged commit 962ceca into iterorganization:develop Oct 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants