[v18] fix: out of sequence audit logs for same timestamp logs#63613
Merged
nibrasohin merged 1 commit intobranch/v18from Feb 12, 2026
Merged
[v18] fix: out of sequence audit logs for same timestamp logs#63613nibrasohin merged 1 commit intobranch/v18from
nibrasohin merged 1 commit intobranch/v18from
Conversation
nibrasohin
commented
Feb 6, 2026
| message: formatter.format(json as any), | ||
| id: getId(json), | ||
| code: json.code, | ||
| eventIndex: json.ei, |
Contributor
Author
There was a problem hiding this comment.
Instead of exposing it here I could use raw.ei in downstream, but validated that the ei is available for other event types also so decided to expose it formally, but open to using the raw event if there is a good reason for it.
b821771 to
061fd16
Compare
061fd16 to
8b2bd5e
Compare
avatus
approved these changes
Feb 9, 2026
greedy52
approved these changes
Feb 12, 2026
nibrasohin
added a commit
that referenced
this pull request
Feb 13, 2026
Merged
1 task
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.
What Changed
Added manual sorting to sort audit logs by event index only when the log timestamp is the same. This fixes the issue where in some cases MCP Session Started audit logs where being displayed after MCP Session Request which should be the other way round, more details in the issue attached.
Automated Testing
Added a test to show that now when multiple events have the same timestamp we use the event index for sorting.
Also added a sanity test case to validate existing behaviour of sorting by timestamp.
Manual Testing Done
Manually rendered the audit page and validated that the existing sorting behaviour is not broken.
It is hard to generate two audit logs at the exact same timestamp so used tdd to validate when timestamps are same the bug is reproducible.
Related Issue
#58322
Changelog
changelog: Fixed out of sequent audit logs rendering in ui for same timestamp logs