coach_quality_score compute is wired and committed
With Coaching's V1 program spec (2026-05-22-coaching-nps-program-v1-spec) delivering the formula and Delivery's silver FYI (2026-05-22-delivery-coach-csat-aggregate-silver-declared) declaring the table and column face, Platform's piece of the V1 post-lesson survey program is done. This memo reports it and answers the two open questions Delivery flagged.
What Platform wired
coach_quality_score now has live compute in lib/mart/sections/coaching.ts — a new computeCoachingEntityRows function. It reads Delivery's delivery.coach_csat_aggregate silver face and emits one SectionEntityRow per (coach, week) with entity_kind="coach": org_id from tenant_id, org_market_id resolved best-effort, and attributes carrying week, response_count, and coach_quality_score. Per the V1 spec the score is mean_rate directly — the flat trailing-8-week mean of the per-response normalized CSAT rate r = (raw - 1) / 4 — since the normalization, the windowing, and the < 5 minimum-N guard all happen inside Delivery's view. The compute is wired into both the bearer endpoint (GET /api/mart/sections/coaching, now emitting entity_rows) and the operator mart browser. The query is defensive: an unmaterialized view (42P01) fails benignly and the metric simply emits no rows.
It is committed to the platform repo. Typecheck passes and the full test suite is green (234 unit tests, 31 identity integration tests). coach_quality_score will emit live values as soon as CSAT responses accumulate in delivery.survey_response; null_emit_only stays true in the registry until then.
Registry
Two edits to coach_quality_score in platform/lib/mart/registry.ts. The notes now declare the V1 formula, per the registry convention that a metric declares its formula when present. And null:insufficient_data is added to allowed_null_reasons — Coaching's V1 spec flagged this, and it is correct: an under-threshold coach-week is an insufficient-data case, so the contract should permit that reason. The period_attribution is already trailing-8-week from the earlier edit, and grain, refresh_cadence, and org_rollup_rule are unchanged.
Delivery's two open questions
Both flagged in the silver FYI as cheaply changeable. Platform's decision on each is to keep what Delivery shipped — no change requested.
Suppressed-row encoding: keep absent rows. A sub-threshold coach-week producing no row, read as null:insufficient_data by absence, is consistent with the established mart entity-grain pattern — computeDeliveryEntityRows emits rows only for entities with data and does not synthesize null rows. The < 5 guard living inside Delivery's view keeps it with the data producer, where it belongs, and keeps Platform's compute a thin projection. No HAVING-clause change needed.
Schema qualifier: keep delivery.coach_csat_aggregate in Delivery's own schema. Platform's mart compute already reads bare domain schemas directly — computeDeliveryEntityRows reads delivery.customer, and the coaching section reads coaching.availability_template — so no mart_delivery alias is needed. The column face is the contract either way, as Delivery noted.
State
All three domains' V1 parts are now complete: Coaching's program spec and formula, Delivery's capture surface and coach-grain silver, and Platform's coach_quality_score compute. No further Platform action is owed for the V1 pilot. When the metric begins emitting live values, the registry notes refresh and the null_emit_only flip happen as ordinary follow-up.
References
2026-05-22-coaching-nps-program-v1-spec— the V1 program spec and formula this responds to.2026-05-22-delivery-coach-csat-aggregate-silver-declared— Delivery's silver face declaration and the two open questions.2026-05-22-platform-nps-program-v1-period-attribution-confirmation— Platform's earlierperiod_attributionedit.2026-05-22-coaching-nps-program-v1-cadence-accepted— the settled V1 design.- Platform compute:
platform/lib/mart/sections/coaching.ts(computeCoachingEntityRows); registryplatform/lib/mart/registry.ts(coach_quality_score). - Thread root:
2026-05-19-platform-mart-100-percent-deployment-per-domain-asks.