courier-message-raise.gs · proxy debug instrumentation · stress-test plan not back-filled
message-raise Tinybird cutover COMPLETE 2026-05-17 (legacy retired, perf panel ~5x faster, silently fixed 2x overcount bug). Dead "+Add new sender" button RESOLVED 2026-06-30 via the Agency Editor. Remaining: optional test-send to TMP Test; resolve the older open issues.
schema_mapper.py.STEP3_ACTIVE in _scribe-lib/phase1-assembly.mjs: whole-email perf-ranked corpus block in the prompt (top 3 client-scoped records ranked by performance.dollars_raised desc, deduped by source_doc_id, no Layer B cross-client). Step 2 (full profile excerpt minus radar sections, client-agnostic name-pattern exclusion) shipped earlier same session. Performance data wired into the corpus for the first time: 222 / 373 records (60%) carry refund-netted dollars + donor counts via message_raise_v2 Tinybird join + a hardcoded MVE-FC archive table from TVE profile §7 (retired committee never in donations_v2). 6 prompt blocks now (preamble + URL rule + principles + profile excerpt + corpus + directives) totaling ~8.3K projected tokens for STPC (vs ~4.9K Step 2, ~2.4K Step 1, ~30K old-prod-mode bloat). Three production hard-directive bugs fixed first: voice (3-class structured AUTHORITATIVE override of past-hits sender patterns), channel (explicit email branch with ONLY-email exclusivity), tone (renamed Length hint → Tone AUTHORITATIVE). Brief + output cards now clear on client switch. New infrastructure: ScribeCorpus under git for the first time at github.com/amwaldeck/scribecorpus (private, follows ParquetPipeline precedent). Phase 1 corpus pipeline + retrieval module + bundled-Doc parser all shipped earlier; corpus consumed from local deploy bundle (_scribe-corpus/*.jsonl via netlify.toml included_files). Update 2026-06-11 — Step 3 CLOSED: relevance-primary corpus selection live (cosine 0.65 / dollar-tiebreak band 0.03, validated for variety); "The arc" structural principles + meta-narration opener fix shipped 6/4; the 6/5-staged trio deployed 6/11 (ce6e14d) — anti-fabrication + rubric pinned on both selection paths, the 8-angle angle menu as a retrievable principles section (embeddings regenerated, 21→22 sections), 388M stat scrub (upstream Google Docs also fixed; "owed source commits" closed as moot). Validated in production via URL-anchored STPC draft. First recurring-surrogate profile entry (Boykin) added to STPC profile + mirror (8d062c7).7cc7078, multiple clean runs); anti-fabrication ranking fixed via the 6/11 pin; angle toolkit superseded by the in-principles angle menu (live). Still outstanding: Tinybird frontporch_read token rotation (pasted in chat 6/2). 151 corpus records still null (11 SWP slug misses, 4 MVE-FC without §7 entry, 135 M1/TNF/AJE with no upstream donations_v2 data — accepted accurate nulls).