Skip to content

Instantly share code, notes, and snippets.

@zminkovich-collab
zminkovich-collab / facebook-enrichment-architecture.md
Created February 26, 2026 01:31
Facebook Candidate Enrichment — Architecture

Facebook Candidate Enrichment — Architecture

Overview

A 5-job agentic workflow that discovers a candidate's official Facebook page via the Facebook Graph API, extracts page metadata and recent posts, and stores the results as a Website record and CANDIDATE:FACEBOOK_ACTIVITY AI attribute.

Workflow file: apps/user-task-service/agentic_workflows/candidate_facebook_enrich.yaml


@zminkovich-collab
zminkovich-collab / 2026-02-25-facebook-workflow-design.md
Last active February 26, 2026 01:31
Facebook Candidate Enrichment Workflow — Architecture Document (v2.0 Graph API)

Facebook Candidate Enrichment — Architecture

Overview

A 5-job agentic workflow that discovers a candidate's official Facebook page via the Facebook Graph API, extracts page metadata and recent posts, and stores the results as a Website record and CANDIDATE:FACEBOOK_ACTIVITY AI attribute.

Workflow file: apps/user-task-service/agentic_workflows/candidate_facebook_enrich.yaml


@zminkovich-collab
zminkovich-collab / happy-churning-matsumoto.md
Created February 20, 2026 05:56
Plan: Add batching to AI regen dashboard for large elections

Plan: Add Batching to AI Regen for Large Elections

Context

The AI regen dashboard triggers regeneration of AI attributes for entire elections. For massive elections (50+ races, 400+ candidates), all entities are processed simultaneously via Promise.allSettled(), creating 4,000+ BullMQ workflow jobs at once. This overwhelms the queue/Redis.

Queue explosion math (force-regen on a large election):

  • Per candidate: ~10 jobs (4 workflows + person + ~5 endorsements)
  • Per race: ~81 jobs (1 position + 8 candidates × 10)
  • Per measure: ~9 jobs (3-4 workflows + ~5 endorsements)