social-reporting-tool/v2/pipeline/lib
DJP 508804b84f Manifest: transcripts advisory + rebuild after backfill trim
The Dove run hit 51% manifest coverage with 17 transcripts + 9 bundles
missing. Three real bugs uncovered in sequence by the manifest jq
introspection:

1. Transcripts gated as required. The Apify TIKTOK_TRANSCRIPTS actor
   only returns text for videos with captions/subtitles; haircare,
   beauty, dance, ASMR, and lifestyle TikTok content (which IS the
   target audience for this kind of brief) often has none. Stage 6's
   prompt already handles bundle.transcript === null gracefully — it
   logs "(no transcript)" and Claude analyses on caption + 30 comments
   + frame note. Made transcripts advisory by default; opt back into
   strict via MANIFEST_TRANSCRIPT_REQUIRED=true.

2. Backfill-exhaustion path didn't rebuild the manifest. When Stage 5
   ran out of pass1 candidates to backfill with, it trimmed
   selected_video_ids to survivors and broke the loop — but never
   re-evaluated the manifest against the trimmed list. coverage_pct
   stayed at the pre-trim value (e.g. 51%) and the gate failed even
   though every remaining id was 100% bundled. Now rebuilds.

3. Added a fast-fail when fewer than 5 videos pass the gate. Stage 8b
   trends require ≥5 supporting videos per trend; running Stage 6 + 7
   on 3 passing videos burns Claude budget for an unsatisfiable
   downstream schema. The cli error now distinguishes "coverage too
   low" from "passing-set too small" and points at the right remedy
   (lower min_likes/min_plays vs. raise min_plays to filter junk).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 10:30:03 -04:00
..
apify_client.ts Run page liveness: heartbeat banner + fix Apify $0 + Stage 4 budget cap 2026-04-29 21:12:53 -04:00
backfill_covers.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
claude.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
drift_log.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
engagement_floor.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
frames.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
ids.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
live_activity.ts Run page liveness: heartbeat banner + fix Apify $0 + Stage 4 budget cap 2026-04-29 21:12:53 -04:00
manifest.ts Manifest: transcripts advisory + rebuild after backfill trim 2026-04-30 10:30:03 -04:00
mom_compare.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
paths.ts Run page liveness: heartbeat banner + fix Apify $0 + Stage 4 budget cap 2026-04-29 21:12:53 -04:00
recipes.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
retry.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
rubrics.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
translate.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00