Skip to content

fix: make message chronological order validator resilient to timing v… - #220

Merged
sauagarwa merged 1 commit into
rh-ai-quickstart:mainfrom
ganeshmurthy:TEST-SEQUENCE-FIX
Jul 14, 2026
Merged

fix: make message chronological order validator resilient to timing v…#220
sauagarwa merged 1 commit into
rh-ai-quickstart:mainfrom
ganeshmurthy:TEST-SEQUENCE-FIX

Conversation

@ganeshmurthy

Copy link
Copy Markdown
Collaborator

…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.

…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.
@sauagarwa
sauagarwa merged commit 675c472 into rh-ai-quickstart:main Jul 14, 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.

2 participants