[FIX]: Preserve reports with duplicate timestamps - #179
Merged
Nina Chikanov (nina-msft) merged 3 commits intoSep 4, 2026
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
@microsoft-github-policy-service agree |
Rio Yu (rioyu123)
force-pushed
the
codex/fix-report-filename-collisions
branch
from
August 27, 2026 12:59
7a7f44e to
489675a
Compare
Nina Chikanov (nina-msft)
previously approved these changes
Aug 27, 2026
Nina Chikanov (nina-msft)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for flagging this Rio Yu (@rioyu123)! Let me know what you think of the following comments :-)
Nina Chikanov (nina-msft)
dismissed
their stale review
August 28, 2026 00:49
Whoops - meant to comment only instead of approval :-)
Signed-off-by: Rio Yu <52408936+rioyu123@users.noreply.github.com>
Nina Chikanov (nina-msft)
approved these changes
Sep 4, 2026
Nina Chikanov (nina-msft)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for your contribution Rio Yu (@rioyu123) :-)
Nina Chikanov (nina-msft)
merged commit Sep 4, 2026
7395a37
into
microsoft:main
17 of 18 checks passed
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
JsonFileReportSinkused a seconds-precision timestamp withwrite_text(). Two reports emitted within the same second therefore resolved to the same path, allowing the later report to silently replace the first.This change preserves every report while keeping the common filename concise:
run_report_2026-04-25T14-30-00-123.json.x, so an existing report is never overwritten.The usage guide and API documentation now describe the concise common filename, collision fallback, and remaining error cases. Tests cover repeated timestamps, existing-file preservation, a forced fallback collision, and serialization failure.
Validation:
uv run pre-commit run --all-files— passeduv run pytest tests/unit/reporting -q— 46 passeduv run pytest tests/unit -q— 1035 passed on Linux; 1033 passed and 2 skipped on Windowsuv run --group docs mkdocs build --strict— passed on LinuxBreaking changes
There are no public API or report-schema changes. Generated filenames now include milliseconds and may include a UUID suffix on collision. Consumers using
run_report_*.jsonare unaffected; consumers parsing the exact timestamp format should account for the additional millisecond segment.Checklist
pre-commit run --all-filespasses