Skip to content

fix: match CI query count to site by computing total from uploadable results#107

Open
veksen wants to merge 2 commits intomainfrom
veksen/ci-vs-site-query-count
Open

fix: match CI query count to site by computing total from uploadable results#107
veksen wants to merge 2 commits intomainfrom
veksen/ci-vs-site-query-count

Conversation

@veksen
Copy link
Copy Markdown
Member

@veksen veksen commented Apr 3, 2026

Summary

  • Removed the total counter that incremented during log parsing (counting raw, pre-dedup entries)
  • Compute total after optimization from deduplicated results filtered to uploadable states (improvements_available, no_improvement_found, error)
  • This ensures the CI comment's "X queries analyzed" matches the query list shown on the site

Test plan

  • All 153 tests pass (Node 24)

🤖 Generated with Claude Code

The `total` counter was incrementing during log parsing, counting raw
entries before deduplication and optimization. This caused the CI comment
to show a different query count than the site, which only displays
queries with uploadable states (improvements_available,
no_improvement_found, error).

Compute `total` from the deduplicated, optimized results filtered to
uploadable states so the CI comment and site always agree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Doctor Analysis

View full run details

2 queries analyzed

2 pre-existing issues

Using assumed statistics (10000 rows/table). For better results, sync production stats.

Extract UPLOADABLE_STATES and countUploadableQueries as exported
functions so they can be tested. Tests verify:
- Only improvements_available, no_improvement_found, error are counted
- not_supported, timeout, waiting, optimizing are excluded
- countUploadableQueries agrees with buildQueries for every state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@veksen veksen force-pushed the veksen/ci-vs-site-query-count branch from 4825d2a to 2d5aaa4 Compare April 3, 2026 05:58
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