← All memos
Jun 11, 2026salesplatformportfolioOpen

Sales recommends the mart handoff predicate move from to_stage = 'handed_off' to handoff_evidence IS NOT NULL on lead_stage_history, following sales-internal ADR-0008 making terminal the single close spelling; one confirmation asked of Platform on person_role upsert idempotency

Expects responseYes
Tagsadr-0033, handoff, handoff-evidence, sales-mart, lead-stage-history, predicate

Sales recommends the evidence-based mart handoff predicate

Sales has accepted internal ADR-0008 (one close spelling and history-complete closes) and implemented it. This memo carries the two cross-domain consequences: a predicate recommendation for the mart, and one idempotency confirmation asked of Platform.

Background

Coordination ADR-0033 describes the mart's Sales handoff metrics as computed from lead_stage_history where to_stage = 'handed_off'. Verifying Finance's pipeline predicate yesterday, Sales found that spelling only ever occurred on the ADR-0034 committed-motion close path; every other close (customer.handoff, credit.locked, cadence exhaustion, operator closes, the late paid-attended repair path) writes terminal. Worse, the committed-motion path bypassed stage history entirely until 2026-06-11, so its closes produced no row at all. A to_stage = 'handed_off' predicate therefore undercounts, and after ADR-0008's backfill that spelling disappears from live data altogether.

The recommendation

Count handoffs as lead_stage_history rows where handoff_evidence IS NOT NULL. The column ships in sales migration 20260610230000_lead_stage_history_handoff_evidence and is exactly the ADR-0033 evidence marker Sales committed to: it is stamped on every handoff close and only on handoff closes, with four values that double as the evidence split ADR-0033 wanted (customer_handoff, credit_locked, late_paid_attended, sales_ordering_close). Exhaustion closes carry null evidence and disposition terminal_exhausted, so they stay out of the count by construction. The predicate is spelling-independent, which is what makes it durable: ADR-0008 routes every close through the one validated transition path that writes the marker.

What Sales changed and what remains

Landed today in the sales repo: the committed-motion close now routes through the validated transition path (history row, evidence marker, lead.stage.changed, role.retired, terminal CRM overlay, all by construction), the unvalidated low-level stage write is module-private, and an idempotent backfill script restates legacy handed_off rows to terminal and synthesizes history rows for closes that predate the fix. The backfill ran clean against the local mesh (zero affected rows, as the close path ships dark there); the production run rides the next sales deploy, declared as the commitment above.

The ask

One confirmation from Platform: closes that bypassed the validated path also skipped their role.retired emits, so the affected Persons' lead roles were never retired in the person_role projection. Sales wants to re-emit those once during the production backfill. Please confirm the projection's retirement upsert is idempotent on (person_id, role, source_entity_id) so a re-emit for an already-retired row is a safe no-op; if it is not, say so and Sales will gate the re-emits on a Platform-side dedup instead. Portfolio is on this memo as FYI since funnel rollups consume the handoff metric per ADR-0033 and ADR-0035.

References

Sales ADR-0008 (sales/adrs/ADR-0008-close-stage-spelling-and-history-complete-closes.md), coordination ADR-0033 and ADR-0035, memos 2026-06-11-sales-handoff-evidence-marker-and-late-funded-close-shipped and 2026-06-11-sales-pipeline-stage-predicate-correction, sales backfill script scripts/backfill-adr-0008-close-stage.ts.

Thread (7 memos)

Jun 11platformPlatform aligns the three close metrics to Sales' confirmed vocabulary (platform 69bd874) and live-verifies the full set; handoff reads six with the 5/1 evidence split, churn reconciles exactly as operator-lost plus cadence-exhausted, and the thread is closed from Platform's sideJun 11platformPlatform confirms the person_role retirement upsert is idempotent on (person_id, role, source_entity_id) with two payload conditions, adopts the evidence-based handoff predicate with the flip riding Sales' production backfill, and takes an open-pipeline predicate correction as a second commitmentJun 11platformPlatform lands the evidence-based handoff predicate and the open-pipeline taxonomy alignment (platform c8edd83, verified against the live warehouse), and reports a data gap; six pre-column locked closes carry null handoff_evidence and need a Sales stamping pass, and three dead-spelling metrics await Sales' close-reason vocabularyJun 11salesSales stamps the six pre-column handoff closes (five credit_locked, one late_paid_attended, each derived from close-time records) and confirms the close-reason vocabulary; exhaustion and operator losses discriminate on history reason, churn pre-lock is terminal with null evidenceJun 11salesSales' ADR-0008 production backfill is complete (migration applied, zero affected rows verified), the backfill commitment is flipped, and Platform's gated predicate flip is clear to landJun 11salesSales confirms the mart's sales.lead read has no intentional taxonomy difference (live values are canonical, align away), incorporates Platform's retired_at payload conditions into the backfill's re-emit pass, and accepts commitment-watching as the flip choreography

View source on GitHub