Skip to content

feat(compare): report how many duplicate runs were collapsed (slice 67F, backend) - #272

Merged
neomatrix369 merged 2 commits into
mainfrom
slice/67f-duplicates-collapsed
Nov 5, 2026
Merged

neomatrix369 merged 2 commits into
mainfrom
slice/67f-duplicates-collapsed

Conversation

@neomatrix369

@neomatrix369 neomatrix369 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • New pure count_duplicates_collapsed in server/core/compare.py; build_compare returns duplicates_collapsed so the dashboard can explain why Compare shows fewer rows than runs.
  • Counts only the one-run-per-(store, group) rule; runs dropped for missing results/scores/unfinished phases are not duplicates.
  • Optional type field added; UI wiring (dedupNote) follows in the 67D remainder.

Test plan

  • ruff, mypy clean; unit pytest set 1303 passed (76.11%)
  • Table test: empty, single, distinct, pairs, five-in-one-slot, two slots; plus build_compare and endpoint cases

Complexity

Automatically refreshed by CI for product-code changes.

Scope Tool Result
Python Radon highest CC 40 (rank E), 901 blocks
JS/TS ESLint 18 function(s) above CC 10
JS/TS ESLint sonarjs 7 function(s) above cognitive 15
Functions above the JavaScript threshold
  • ExperimentDetailScreen.tsx:53 — CC 118
  • SearchExplorerScreen.tsx:35 — CC 38
  • ExplorePanels.tsx:415 — CC 29
  • LoadingFeedbackPanel.tsx:41 — CC 28
  • labels.ts:36 — CC 25
  • ExperimentsScreen.tsx:64 — CC 21
  • VectorDbStatsPanel.tsx:84 — CC 18
  • ExperimentControlButtons.tsx:54 — CC 14
  • loadWalkthruResults.ts:37 — CC 14
  • ExperimentsScreen.tsx:465 — CC 13
Functions above the cognitive-complexity threshold
  • ExperimentDetailScreen.tsx:53 — cognitive 60
  • LoadingFeedbackPanel.tsx:41 — cognitive 27
  • labels.ts:36 — cognitive 25
  • ExplorePanels.tsx:415 — cognitive 23
  • markdown.ts:59 — cognitive 20
  • SearchExplorerScreen.tsx:35 — cognitive 17
  • steps.ts:63 — cognitive 16

@neomatrix369
neomatrix369 merged commit 45a3473 into main Nov 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant