fix: make message chronological order validator resilient to timing v… - #220
Merged
Merged
Conversation
ganeshmurthy
force-pushed
the
TEST-SEQUENCE-FIX
branch
from
July 14, 2026 20:26
1809ae2 to
be2ecaa
Compare
…ariations The test validator was checking for strict sequential order of messages (user1, assistant1, user2, assistant2), but when messages are created milliseconds apart, the exact interleaving order is not guaranteed and may vary between test runs or due to database transaction timing. The validator now: - Verifies timestamps are in chronological order (monotonically increasing) - Verifies all expected messages are present (order-independent content check) - Does not assume specific user/assistant interleaving This makes the test more robust while still validating that messages appear in timestamp order and all expected content is present.
ganeshmurthy
force-pushed
the
TEST-SEQUENCE-FIX
branch
from
July 14, 2026 20:29
be2ecaa to
f1a7391
Compare
sauagarwa
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ariations
The test validator was checking for strict sequential order of messages (user1, assistant1, user2, assistant2), but when messages are created milliseconds apart, the exact interleaving order is not guaranteed and may vary between test runs or due to database transaction timing.
The validator now:
This makes the test more robust while still validating that messages appear in timestamp order and all expected content is present.