Repository navigation
feat(api): mint submission, run and report IDs as UUIDv7 - #1579
Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Conversation
UUIDv7 encodes the creation time in its leading bits, so new submission, request, run and report IDs sort chronologically. Grouping the runs list by submission ID now orders by time without a separate timestamp. Existing v4 IDs remain valid; content-addressed v5 IDs are unchanged. Fixes microsoft#572 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
requested review from
Cedric Vidal (cedricvidal) and
Wassim Chegham (manekinekko)
as code owners
October 27, 2026 05:09
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.
Summary
Fixes #572.
The API now mints these IDs with UUIDv7 (RFC 9562) instead of UUIDv4:
submissionId(single, multi-run, profile-variation and bulk-resubmit submissions, plus the fallback minted when an uploaded run archive has none)_idand each attempt'srun._id, including retries_id(POST /reports, bulk create, bulk trigger)UUIDv7 puts a millisecond timestamp in the most significant bits, so string and binary sort order is creation order. Grouping the runs list by
submissionIdnow sorts chronologically by default, and index inserts become append-mostly.What doesn't change
uuid@^11.1.1is already a dependency ofapps/apiand shipsv7, so there's no new dependency.Tests
apps/api/src/endpoints.test.ts:submissionId, request_idandrun._idmatch a strict v7 patterncount: 2submission gets v7 request and run IDs and shares the submission IDPOST /reportsreturns a v7 report IDnpx vitest run apps/api/src: 37 files, 791 tests pass.tsc --noEmitforapps/apiis clean.Docs
docs/architecture/app-design.md(Run submission flow) documents which IDs are v7, why, and how legacy v4 IDs behave.🤖 Generated with Claude Code