Skip to content

fix(integrations): vendor refusals and outages are connection health, not error issues - #2708

Merged
Makisuo merged 3 commits into
mainfrom
triage/integrations-health
Nov 16, 2026
Merged

Makisuo merged 3 commits into
mainfrom
triage/integrations-health

fix(integrations): an undecodable Supabase answer fails its span again

9fda746
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 16, 2026 in 2m 43s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. The classifier the four wrappers use is pinned by a test through supabaseCallSpan itself; the wiring only moves each span onto that helper.
no findings · tests covered · risk medium · 1/1 new units observable

Adds a supabaseCallSpan/vendorCallSpan wrapper so a refusal or outage stays on the span as error.type while an undecodable answer still fails it, and gives Supabase decode mismatches their own invalid_response kind. Safe to merge.

  • supabaseCallSpan keeps a refusal Ok and fails only invalid_response
  • Supabase decode mismatches now carry kind: "invalid_response"
  • queryLogs, listLogDrains, getAdvisors, getTopQueries spans move to that helper

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
packages/backend/src/services/integrations/vercel/api.ts 58k VendorHttp.request 29k/day, 14.8% err
VendorHttp.request 21k/day, 0.6% err
VendorHttp.request 4.3k/day, 0.1% err
packages/backend/src/services/integrations/vendor-http.ts 54k VendorHttp.request 29k/day, 14.8% err
VendorHttp.request 21k/day, 0.6% err
VendorHttp.request 4.3k/day, 0.1% err
packages/backend/src/services/integrations/supabase/logs.ts 1.4k SupabaseApi.queryLogs 1.4k/day, 0.3% err
packages/backend/src/services/integrations/supabase/insights.ts 431 SupabaseApi.getTopQueries 287/day, 0.1% err
SupabaseApi.getAdvisors 144/day, 0.2% err
packages/backend/src/services/integrations/supabase/api.ts 96 SupabaseApi.listLogDrains 96/day, 0.4% err
What was checked
  • supabaseCallSpan fails only invalid_response (supabase/api.ts:28), which every Supabase decode path now sets (logs.ts:97, insights.ts:128, api.ts:329).
  • queryLogs' { error } body still fails the span via SupabaseLogsQueryError, as the dismissed F3 required (logs.ts:101).
  • Health handling still keyed on kind: rate_limited in SupabaseLogsService.ts:350 and SupabaseInsightsService.ts:263, unauthorized in SupabaseOAuthService.ts:231.
Observability coverage: 1 of 1 changes observable
Change Kind Observable Evidence
Supabase Management API call spans (SupabaseApi.queryLogs, getAdvisors, getTopQueries, listLogDrains) client yes supabaseCallSpan → vendorCallSpan's Effect.withSpan(name) (supabase/api.ts:26, vendor-http.ts:184), wrapped as Effect.fnUntraced(body, supabaseCallSpan(...))

9fda746 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.