Skip to content

feat(ci): include explain plans in site API payload#96

Merged
veksen merged 1 commit intomainfrom
veksen/ci-explain-plan
Mar 25, 2026
Merged

feat(ci): include explain plans in site API payload#96
veksen merged 1 commit intomainfrom
veksen/ci-explain-plan

Conversation

@veksen
Copy link
Member

@veksen veksen commented Mar 25, 2026

Summary

  • Add explainPlan and optimizedExplainPlan fields to the CiOptimization type
  • Thread explain plans from the optimizer through mapResultToQuery for all result states (recommendation, no_improvement, zero_cost_plan, cost_past_threshold)
  • Add explainPlan to the no_improvement QueryProcessResult variant so baseline plans are preserved
  • Fix missing nudges field in no_improvement return and test fixtures (pre-existing issue from nudges merge)

Companion PR

Site (frontend + types): Query-Doctor/Site#2610 — adds PostgresExplainStageSchema, updates CI types, and renders explain plans in the CI query detail panel.

Test plan

  • Verify typecheck passes (npm run typecheck)
  • Verify existing tests pass
  • Deploy analyzer and verify explain plan data appears in CI run payloads
  • Confirm the site renders explain plans correctly with the companion PR

🤖 Generated with Claude Code

Copy link

@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

28 queries analyzed

2 pre-existing issues

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

@veksen veksen force-pushed the veksen/ci-explain-plan branch from 85af42f to 2c737d6 Compare March 25, 2026 15:43
Thread baseExplainPlan and optimizedExplainPlan through the CI payload
so the site can render explain plan visualizations for CI queries.

- Add explainPlan/optimizedExplainPlan to CiOptimization type
- Map explain plans from QueryProcessResult in all result states
- Add explainPlan to no_improvement QueryProcessResult variant

Companion to query-doctor-monorepo PR that adds the explain plan
renderer to the CI query detail panel.

Closes query-doctor/query-doctor-monorepo#2586

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@veksen veksen force-pushed the veksen/ci-explain-plan branch from 2c737d6 to b3ac6d7 Compare March 25, 2026 15:47
@veksen veksen merged commit 3041cec into main Mar 25, 2026
6 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