Repository navigation
fix: correct surface run bounds for unordered samples - #74
Merged
Merged
Conversation
Contributor
Author
|
Merged as 40accf7. Validation: Exact PR head a6e8a63 passed CI, CodeQL, and Main Surface RTT, including the real loopback Gateway RPC and mocked browser/Gateway measurement and import lanes. No retries were needed. Historical records were not rewritten. |
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 Problem This Solves
Fixes incorrect or negative surface-run durations when sample files are not in chronological order, and prevents invalid timestamps in intermediate samples from being silently imported.
User Impact
RPC and Control UI imports now record the full time span of all samples. Equivalent timestamp offsets normalize to UTC before run IDs are built, so re-importing the same new run using a different offset is rejected as a duplicate.
Why This Change Was Made
The importer previously parsed only the first start and last finish. It now validates every interval and uses the earliest start and latest finish while preserving sample order and measurements. Existing canonical UTC IDs remain unchanged; historical records are not rewritten.
Evidence
npm test: 206 passed;npm run check, per-file syntax checks, andactionlint -color=false: passed.