Skip to content

fix: deterministic ordering in get_change_logs_for_table (#953)#954

Merged
maxachis merged 1 commit intodevfrom
fix/953-flaky-change-log-order
May 2, 2026
Merged

fix: deterministic ordering in get_change_logs_for_table (#953)#954
maxachis merged 1 commit intodevfrom
fix/953-flaky-change-log-order

Conversation

@maxachis
Copy link
Copy Markdown
Contributor

@maxachis maxachis commented May 2, 2026

Summary

  • Adds ORDER BY created_at ASC, id ASC to DatabaseClient.get_change_logs_for_table so logs are returned in a deterministic order.
  • Fixes the intermittent CI failure in tests/test_database.py::test_agencies_table_logic where the INSERT and UPDATE rows could be returned in either order when their created_at timestamps matched.

Closes #953.

Test plan

  • CI green on tests/test_database.py::test_agencies_table_logic
  • Full pytest suite passes

🤖 Generated with Claude Code

Closes #953. The change_log query had no ORDER BY, so when an INSERT and
a subsequent UPDATE had identical created_at timestamps, their relative
order in the result was undefined, causing intermittent CI failures in
test_agencies_table_logic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@maxachis maxachis merged commit 05ebf31 into dev May 2, 2026
5 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.

1 participant