Activate sharding pipeline — wire DurationStore, add tests, clean dead column#230
Merged
Conversation
added 6 commits
April 14, 2026 09:35
…eamAndTest, add tests - Wire DurationStore.UpsertFromResults into ReportsHandler.Create (inside transaction) - Add DurationStore.GetByTeamAndTest with targeted WHERE test_name = query - Update ShardingHandler.GetDuration to use GetByTeamAndTest instead of O(N) Go filter - Refactor UpsertFromResults to accept DBTX interface (pgxpool.Pool or pgx.Tx) - Add DurationStore field to ReportsHandler, wire in routes.go - Add comprehensive DurationStore integration tests (14 tests) - Add test_duration_history to integration test truncation list - Verified triage_status column IS wired (triage job writes it) - no migration needed
…ion response shape 1. GetByTeamMap uses composite key (testName\0suite) to avoid silently dropping entries with same test_name across different suites. Added DurationMapKey helper and updated EnrichWithHistory to aggregate durations across suites from composite-keyed map. 2. UpsertFromResults ON CONFLICT now updates p95_duration_ms using GREATEST(previous_p95, new_duration) instead of leaving it at the initial value forever. 3. GetDuration handler always returns a JSON array for consistent API shape, removing the single-object vs bare-array inconsistency. All unit tests pass with -race.
…erbose anonymous struct in EnrichWithHistory
…eterministicSuite test
791bde0 to
be90d7a
Compare
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.
Closes droplet sc-kcdwu.