feat(platform): add overnight v1 foundation - #7
Conversation
Switch discovery off Exa Websets to plain search so the local lead pipeline works on the current Exa plan. Add local Supabase migrations and provider plumbing needed for DeepSeek, Inngest, and safer retry/state handling.\n\nCapture the agreed product plan, current state, and overnight execution plan in root docs and docs/superpowers so the next session can resume from facts instead of scratch.
|
@TheophilusChinomona is attempting to deploy a commit to the CMN Labs Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThe PR replaces Websets discovery with synchronous Exa search, adds shared OpenAI-compatible provider plumbing, improves enrichment retry state, and introduces local Supabase setup.
Confidence Score: 3/5The PR should not merge until valid enrichment bios are preserved and failed enrichment-event publication becomes retryable. The current parser deterministically discards generated lead bios, while transient Inngest publication failures leave newly created leads permanently pending even though discovery reports success. Files Needing Attention: packages/autogtm-core/src/ai/enrichLead.ts; apps/autogtm/src/app/api/queries/_lib/startQueryRun.ts
|
| Filename | Overview |
|---|---|
| apps/autogtm/src/app/api/queries/_lib/startQueryRun.ts | Implements synchronous discovery and direct lead creation, but silently loses enrichment work when event publication fails. |
| packages/autogtm-core/src/ai/enrichLead.ts | Ports enrichment to chat completions but drops the requested bio field during response parsing. |
| packages/autogtm-core/src/ai/client.ts | Centralizes OpenAI-compatible client and model configuration without an independently established defect. |
| apps/autogtm/src/inngest/functions.ts | Preserves enriched status when a completed lead is retried. |
| packages/autogtm-core/src/clients/exa.ts | Adds plain Exa search normalization for the existing lead-ingestion shape. |
| supabase/migrations/0001_autogtm_init.sql | Adds a local migration representing the application schema and existing broad authenticated-user RLS model. |
Reviews (1): Last reviewed commit: "feat(platform): add overnight v1 foundat..." | Re-trigger Greptile
| @@ -21,12 +22,6 @@ const EnrichedLeadSchema = z.object({ | |||
| email: z.string().nullable().catch(null), | |||
| }); | |||
There was a problem hiding this comment.
Every successful response is parsed through EnrichedLeadSchema, which omits the explicitly requested bio field and therefore strips it before persistence, leaving campaign personalization, digests, and the dashboard without the generated summary.
| const EnrichedLeadSchema = z.object({ | |
| category: AllowedCategorySchema.catch('other'), | |
| full_name: z.string().catch('Unknown'), | |
| title: z.string().catch(''), | |
| bio: z.string().catch(''), | |
| expertise: z.array(z.string()).catch([]), | |
| social_links: z.record(z.unknown()).catch({}), | |
| total_audience: z.number().catch(0), | |
| content_types: z.array(z.string()).catch([]), | |
| promotion_fit_score: z.number().catch(5), | |
| promotion_fit_reason: z.string().catch(''), | |
| email: z.string().nullable().catch(null), | |
| }); |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| await inngest.send(enrichmentEvents); | ||
| } catch (error) { | ||
| console.error('Lead enrichment dispatch skipped:', error); | ||
| } |
There was a problem hiding this comment.
Switch discovery off Exa Websets to plain search so the local lead pipeline works on the current Exa plan. Add local Supabase migrations and provider plumbing needed for DeepSeek, Inngest, and safer retry/state handling.\n\nCapture the agreed product plan, current state, and overnight execution plan in root docs and docs/superpowers so the next session can resume from facts instead of scratch.