ReviewOS

stacks/ts-analytics

Background jobs never run on either documented production deploy path

#168
Closed glennmichael123 opened this 9 days ago ·
9 days ago

bootstrapJobs() only runs in server/index.ts behind ANALYTICS_ENABLE_JOBS=true; the Lambda handler never calls it (POST /api/jobs/tick iterates an EMPTY jobs array); no deploy provisions an EventBridge schedule; CDK/CFN generators point at a nonexistent index.aggregationHandler. Net: rollups/alerts/digests/webhooks never run in production — with the 30-day raw TTL this is guaranteed data loss. Fix: bootstrapJobs from all entrypoints, default flag on, EventBridge rule -> /api/jobs/tick, remove phantom handler.

From the production-readiness audit (docs/research/production-readiness.md, eacf996). Verified with live probes where stated.

9 days ago

Fixed in 92ef233 — jobs registered from createRouter (all entrypoints), scheduler default-on for the long-lived server, EventBridge tick rule + secret in the Lambda CFN, phantom aggregationHandler removed from both generators. Verified live: tick 403s without the secret; with it, heartbeat/uptime/digests ran.

Sign in to comment on this issue.