Decisioning not firing
Diagnose why POST /api/v1/decide isn't returning a decision, or the decision funnel dashboard shows a gap.
Symptom
Section titled “Symptom”Decisioning is not firing — POST /api/v1/decide returns no reward or decision, or the decision funnel dashboard shows no evaluations for a project or window you expect.
Likely causes
Section titled “Likely causes”-
The scheduled aggregation cron (
computeDecisionFunnelDaily) has failed for several consecutive runs. The dashboard’s data-gap banner reflectscron_runsfailures — it does not mean the underlying/api/v1/decidecalls themselves failed.Console → Projects → Decision funnel — look for a data-gap banner on the affected date range.
-
A manual backfill was run, but the dashboard still shows a gap. Backfill does not clear the gap indicator directly — it clears automatically only after the next scheduled cron run succeeds.
This endpoint is SUPER_ADMIN-only (
requireSuperAdmin) — a project ADMIN/OWNER session cookie is rejected; only a platform operator account can run it.bash curl -X POST https://retidal.com/api/projects/{projectId}/decision-funnel/backfill \-H "Content-Type: application/json" -H "Cookie: <super-admin session>" \-d '{"fromDate": "2026-06-01", "toDate": "2026-07-03"}'# a non-empty errors[] in the response means some project-days did not backfill — safe to rerun -
The requested date range is older than the 90-day retention window — source tables for dates that old have been purged and cannot be recomputed at all.
Console → Projects → Decision funnel — the date-range picker shows no data for dates older than 90 days, by design, not as an error.
-
The
POST /api/v1/decidecall itself is failing before a decision can be evaluated — the dashboard and backfill causes above only explain a gap in the aggregated funnel; check whether the call is erroring outright.bash curl -s -o /dev/null -w "%{http_code}\n" -X POST https://api.retidal.com/api/v1/decide \-H "X-API-Key: $RETIDAL_API_KEY" -H "Content-Type: application/json" \-d '{"projectId": "prj_123", "profileId": "uid_456", "event": {"name": "checkout_abandoned"}}'# 401 = bad/missing key, 403 = key missing the decide/decision:call scope,# 404 = projectId doesn't match the key's project, 429 = over 30 req/min per# (project, IP), 503 = the decision cache/service binding is unavailable
Still stuck
Section titled “Still stuck”If the cron has run successfully and the gap remains, and POST /api/v1/decide itself returns 200, work through the health checklist.