Repository navigation
feat(cost): PlanetScale as a cost source, read through its integration - #2544
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Nov 13, 2026 in 1m 44s
Confidence 10/10 · No issues found
🟢 Confidence 10/10 · safe to merge. The delta folds three dialog steps onto one helper with no behavior lost; existing scene tests pin each step's loading, failure and footer.
no findings · tests covered · risk medium
Adds PlanetScale as a cost source read through the org's existing PlanetScale integration; since the last review the GitHub, Vercel and PlanetScale dialog steps share one connectionStep. Safe to merge. The two open VcsWebhookEnqueueFailure issues in apps/api/src/runtime/http-graph.ts are untouched by this change.
connectionStepin the page kit draws the header, connection read and the Back-plus-primary footer once- The GitHub, Vercel and PlanetScale steps pass their primary action as data (
ConnectionStepAction) - The GitHub step's loading spinner is announced and its failure renders in the
alertcallout - Lab gains
github-readingandgithub-unreadstates for the GitHub step
Production impact
Open errors in the changed files (1)
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/api/routes/VcsWebhookEnqueueFailure (2 issues) | maple-api | 9 | apps/api/src/runtime/http-graph.ts |
After this merges, Maple checks whether they stop.
Production traffic of the changed files (last 7 days)
| File | Calls/day | Busiest operations |
|---|---|---|
packages/backend/src/services/auth/PlanetScaleOAuthService.ts |
687 | PlanetScaleOAuthService.withAccessToken 687/day, 0.0% err |
packages/backend/src/services/cost/providers/planetscale/fake-planetscale.ts |
342 | POST /oauth/token 342/day, 0.0% err |
packages/backend/src/services/cost/providers/planetscale/normalize.ts |
199 | branch 199/day, 0.5% err |
Telemetry this change adds and removes (13)
- ➕ span name
HttpPlanetScaleCost.status·apps/api/src/routes/internal/planetscale-cost.http.ts:33 - ➕ span name
HttpPlanetScaleCost.add·apps/api/src/routes/internal/planetscale-cost.http.ts:47 - ➕ span name
HttpPlanetScaleCost.remove·apps/api/src/routes/internal/planetscale-cost.http.ts:61 - ➕ span name
CostSyncService.reconcilePlanetScale·packages/backend/src/services/cost/CostSyncService.ts:254 - ➕ span name
PlanetScaleCostSourceService.status·packages/backend/src/services/cost/PlanetScaleCostSourceService.ts:143 - ➕ span name
PlanetScaleCostSourceService.add·packages/backend/src/services/cost/PlanetScaleCostSourceService.ts:155 - ➕ span name
PlanetScaleCostSourceService.remove·packages/backend/src/services/cost/PlanetScaleCostSourceService.ts:222 - ➕ attribute
maple.cost.planetscale.error·packages/backend/src/services/cost/providers/planetscale/PlanetScaleCostProvider.ts:210 - ➕ attribute
maple.cost.planetscale.status·packages/backend/src/services/cost/providers/planetscale/PlanetScaleCostProvider.ts:211 - ➕ attribute
maple.cost.error_reason·packages/backend/src/services/cost/providers/planetscale/PlanetScaleCostProvider.ts:232 - ➕ span name
PlanetScaleCostProvider.read·packages/backend/src/services/cost/providers/planetscale/PlanetScaleCostProvider.ts:235 - ➕ span name
PlanetScaleCostProvider.check·packages/backend/src/services/cost/providers/planetscale/PlanetScaleCostProvider.ts:252 - ➕ attribute
maple.cost.planetscale.invoices·packages/backend/src/services/cost/providers/planetscale/pull.ts:54
What was checked
- Each step's footer, loading line and failure face are pinned by
cost.scene.test.ts:725-798and its Vercel/PlanetScale scenes alertkeepsrole="alert"(packages/views/src/ui/alert.ts:34), so the GitHub failure stays announced after the swapaddStepbecomes"github"only besideAsyncData.Loading()(apps/web/src/page/cost/update.ts:641), so the shared spinner face never hangs on an unrequested read
82a25d4 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading