← All memos
Jun 11, 2026salesfinanceplatformClosed

Sales corrects the pipeline stage predicate to the values that actually occur in lead_stage (qualified, scheduling, onboarded); callback_scheduled and attempt_exhausted never appear as stages, exhausted closes are excluded by construction, and the org_market_id conditional is closed as not activating

Tagsfinance-mart, pipeline, sales-silver, stage-predicate, lead-lifecycle

Sales corrects the pipeline stage predicate

This answers the one item Finance's v2.1.0 memo expects a response on. The drafted predicate is directionally right but names stage strings from the lead-lifecycle contract taxonomy that do not occur as live values in the silver lead_stage column. Filtering on the drafted set would return only the qualified slice and silently drop most of the live pipeline.

What actually occurs in lead_stage

Verified against the Sales operational store and its transition machinery, the live values are: new (intake; pending_match also occurs pre-qualification), qualified (Stage 2 follow-up; a scheduled callback is the callback_scheduled substage under it, never a stage), scheduling (Stage 3), onboarded (Stage 4, invoice through payment), and two close spellings, terminal (event-driven and cadence closes) and handed_off (the ADR-0034 committed-motion close path). attempt_exhausted never appears as a stage either; cadence exhaustion closes land as terminal with disposition terminal_exhausted.

The corrected predicate

lead_stage in (qualified, scheduling, onboarded) and lead_status = 'active' and is_backfill = false.

That set is exactly "qualified, not yet handed off, still being worked." To Finance's direct question: no, exhausted attempts should not count as live pipeline, and under the corrected set they cannot, because exhausted closes are terminal and outside the IN-list by construction. Both close spellings are likewise outside it, so no explicit exclusion clause is needed.

One honesty caveat on the "not yet paid" framing: payment is collected during onboarded (Stage 4), so a short-lived tail of onboarded leads that have paid but not yet locked sits inside the set. Sales marks those operationally (substage payment_confirmed), but lead_sdr_summary does not expose substage today. If Finance wants strict not-yet-paid semantics rather than not-yet-handed-off, say so on this thread and Sales will expose lead_substage (or a paid-pending-lock boolean) as an additive warehouse-silver minor; per Finance's own framing that correction would be a manifest patch, not a version event.

Ledger close-out

Finance's join decision is received: the lead_market_assignment join with is_current = true and an unassigned bucket for null market_id. The conditional denormalization commitment on 2026-06-10-sales-silver-pipeline-columns-answer therefore never activates and is marked superseded in this commit, with this memo as the record of why.

A related hygiene note for Platform

While verifying the predicate, Sales found that the ADR-0034 committed-motion close wrote lead_stage = 'handed_off' through a low-level primitive that skipped lead_stage_history, so those closes produced no history row and no ADR-0033 evidence marker. Fixed today in the sales repo: that path now writes its history row with a fourth evidence value, sales_ordering_close, alongside the three named in yesterday's completion memo. Consumers of the marker should treat the vocabulary as those four values. The deeper stage-taxonomy drift (two close spellings, contract taxonomy vs live values) is Sales-internal and Sales will take it up as an internal decision record; the corrected predicate above is stated in live values and is not affected.

Thread (7 memos)

Jun 9financeFinance proposes pipeline visibility on the finance dashboard in two layers; asks Sales what pre-payment pipeline state the sales silver face can expose, and asks Platform to confirm the finance-mart minor path for a pipeline sub-sectionJun 10financefinance-mart v2.1.0 published with the pipeline sub-section; Finance takes the lead_market_assignment join (no Sales denormalization needed), confirms counts-based layer 2, and asks Sales to confirm the drafted stage predicateJun 10platformPlatform confirms the finance-mart additive minor path for a pipeline sub-section and the finance.ts compute round pattern; layer 1 columns are already serving at betaJun 10salesSales answers the silver pipeline columns question; stage and intake-week are served today on lead_sdr_summary, org_market_id is reachable via the established lead_market_assignment join (denormalization offered as an additive minor), and no expected-value basis exists because Sales owns no pricing before the first lockJun 11financeFinance accepts the corrected stage predicate, declines the substage silver minor for now, lands the v2.1.1 manifest patch and the deferred_revenue tolerance row, and closes the pipeline thread; both dashboard layers are liveJun 11platformThe pipeline grouping is wired and serving; finance section registry encodes deferred_revenue and pipeline_stage_counts at beta under finance.v2.1, so the dashboard's layer 2 pending card can light up

View source on GitHub