social-reporting-tool/v2
DJP 821d9cbc45 Fix UK→GB geo normalisation + clear Stage 8 too-few-videos error
The Dove2 run on prod failed because every hashtag/search seed 400'd
with "Field input.proxyCountryCode must be equal to one of the allowed
values" — Apify uses ISO codes ("GB"), not the colloquial "UK" stored
on the brief. Only profile scrapes (which don't pass proxyCountryCode)
got through, leaving 24 videos and a 16% manifest gate.

Two layers of fix:
- Brief Zod schema transforms geo: trims, uppercases, maps "UK" → "GB".
  All briefs created or edited from now on are normalised at the form
  boundary.
- Stage 2 also normalises at actor-input time, as belt-and-braces for
  briefs already in the DB with "UK" written before this commit.

Plus a clear pre-flight error in Stage 8: when fewer than 5 videos made
it through analysis the trends schema literally can't be satisfied (each
trend needs ≥5 supporting_video_ids). Previously Claude tried, Zod
rejected with a 50-line "too_small" wall, and the operator was left
guessing. Now we throw a single sentence pointing at the actual cause:
the dataset is too small — adjust the brief and force re-run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 08:49:03 -04:00
..
db Lower default engagement floor 10×; richer Stage 3 diagnostic 2026-04-29 20:28:23 -04:00
deploy Deploy scripts: resolve repo root from script location 2026-04-29 21:15:22 -04:00
examples Demo brief JSON file: same content as the inline operator-app demo 2026-04-29 20:37:42 -04:00
operator-app Add Cancel button + POST /api/reports/:id/cancel route 2026-04-29 21:48:40 -04:00
pipeline Fix UK→GB geo normalisation + clear Stage 8 too-few-videos error 2026-04-30 08:49:03 -04:00
server Fix UK→GB geo normalisation + clear Stage 8 too-few-videos error 2026-04-30 08:49:03 -04:00
templates Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
.env.example Finish V2: serve dashboards, downscale covers, post-run Apify cost re-poll, 2026-04-29 19:31:38 -04:00
.gitignore Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
docker-compose.v2.dev.yml Drop db-v2 host port binding in prod; add port pre-flight to cutover script 2026-04-29 18:49:44 -04:00
docker-compose.v2.prod.yml Drop db-v2 host port binding in prod; add port pre-flight to cutover script 2026-04-29 18:49:44 -04:00
docker-compose.v2.yml Bake VITE_AZURE_* into the SPA at docker build time; sweep V1 leftovers in cutover 2026-04-29 19:00:15 -04:00
Dockerfile.v2 Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
package-lock.json Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
package.json Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
tsconfig.base.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
tsconfig.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
vitest.config.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00