Repository navigation
FIX: return aware UTC created_at from conversation stats - #3661
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Conversation
The raw MIN(timestamp) aggregate bypasses the UTCDateTime result processor on both backends, so the parsed value carried no offset and clients rendered conversation creation times shifted by their local UTC offset. Reattach UTC when the aggregate comes back naive. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
This branch has not been deployed
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.
Description
Fixes #3660
get_conversation_stats_asyncbuildscreated_atfrom a rawMIN(timestamp)aggregate that bypasses theUTCDateTimeresult processor, so the value came back timezone-naive on both SQLite and Azure SQL and serialized without an offset. Clients then rendered conversation creation times shifted by the viewer's local UTC offset, while the attackcreated_atnext to it in the same UI stayed aware.Both backends now reattach UTC when the aggregate comes back naive, so every timestamp PyRIT returns carries the same aware UTC form.
Tests and Documentation
Added a regression that inserts one message through the real store and asserts
created_atcarries a UTC offset. It fails on main and passes with the change. The full sqlite and azure memory suites pass (189 tests) and ruff is clean.No documentation change needed, so I did not run JupyText.