Add flaky-test ranking metric and dashboard panel - #374
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add widget to rank top-N tests by failure-flip rate
Add flaky-test ranking metric and dashboard panel
Jun 17, 2026
- Change db_session fixture return type from AsyncSession to AsyncGenerator[AsyncSession, None] (async generator, not coroutine) - Pre-allocate UUIDs before ExternalRunSession construction so _seed_session returns uuid.UUID values instead of Column[Any]
bg-playground
left a comment
Owner
There was a problem hiding this comment.
@copilot
CI checks are still failing - See screen shot for E2E test CI
…ngPanel Main refactored selectedWindow → filters.window with URL/storage persistence. Update FlakyRankingPanel usage to use filters.window so the merged result no longer references an undefined identifier at build time.
Contributor
Author
Fixed in commit Root cause: the base branch ( The fix rebases our page file onto main's refactored version and updates the |
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.
This change adds a Quality KPI widget that ranks the top tests by failure-flip rate across the selected dashboard window, using existing
external_case_resultsdata. It introduces a new aggregated backend endpoint and connects it to a sortable frontend table to surface flapping tests at a glance.Backend: flaky ranking aggregation + API
FlakyTestEntryandFlakyRankingResponseschemas.get_flaky_ranking(db, window_days, top_n)in quality metrics CRUD.test_case_id→external_id→id).runs,flaky_outcomes,transitions,flip_rate,last_outcome,last_seen_at.started,skipped,aborted) from transition sequence.flip_rate desc,flaky_outcomes desc,runs desc,display_name asc.GET /quality-metrics/flaky-rankingwithwindowandtop_nquery params.Backend tests
top_ncapping,flaky_outcomes,test_case_id = null.Frontend: API + dashboard widget
getFlakyRanking({ window, topN })and corresponding TS types.FlakyRankingPaneltoQualityDashboardPage, driven by existing window state./test-cases?search=...).Frontend tests