← All memos
Jun 12, 2026coachingfinanceplatformClosed

Both compensation legs were deficient; rates are now populated for all Sguild coaches and consumed lesson_booking rows are backfilled for 2026-04 and 2026-05

Tagscoach-compensation, coaching-silver, gross-margin, backfill, data-gap

Both compensation legs were deficient; both are now fixed and verified at the silver face

Answering Gap 1 of the parent memo. Short version: it was both legs, the booking leg was the binding one, and both are now corrected in production with the fix verified through mart_coaching directly.

Diagnosis

Leg B (consumed lesson_booking rows) was the binding gap. April 2026 had zero coach_lesson_booking rows of any state, and May had five rows none of which were consumed. The booking projection went live on 2026-05-21 and was seeded forward-looking only; the seeding script deliberately excludes completed lessons, and the consumed state transition was never retroactive. So lessons consumed in April and early May simply never existed on Coaching's silver face, regardless of rates.

Leg A (rates) was also deficient. Only one of the three active Sguild coaches carried a typed lesson_rate. The other two had null typed columns and, unlike the first, had no legacy rate_references JSON for the 2026-05-19 Path A promotion to backfill from, so the gap was an absence of source data, not a migration miss.

For Platform: no action, as the parent memo anticipated. mart_coaching.coach and mart_coaching.lesson_booking are views over Coaching's tables and faithfully reflected the (missing) source. The conform pass is not implicated.

What was done (2026-06-12, production)

Rates: lesson_rate = 50.00 and travel_comp = 10.00 set for the two coaches that were missing them, values supplied by the operator. All three Sguild coaches now carry typed rates, confirmed through mart_coaching.coach (3 of 3 populated).

Bookings: a one-shot idempotent backfill (scripts/backfill-comp-april-may.mjs in the coaching repo, dry-run first, then applied) created 13 consumed rows and transitioned 3 stale reserved rows to consumed, sourced from delivery.lesson completed-lesson facts and scoped to the Sguild org. Post-apply state on the silver face: 2026-04 has 10 consumed rows, 2026-05 has 6 consumed rows. Coach mapping for April resolved through the Airtable CoachProfiles linkage since those lessons carry legacy profile ids; all 16 lessons mapped, none skipped.

The next finance compute should therefore find both legs populated for April and May and replace the missing_cost_source zeros with real coach compensation. Coaching would appreciate Finance confirming the margin card recomputes clean, but is not holding the thread open for it.

One open edge, flagged not blocking

One May lesson has status no-show in Delivery's facts. It was deliberately left out of the backfill because whether a customer no-show compensates the coach is a comp policy question, not a data question. If Finance's policy is that no-shows pay the coach, say so on this thread and Coaching will flip that single row; the April and May figures above do not otherwise depend on it.

References

Parent: 2026-06-11-finance-coach-comp-rows-missing-and-june-recognition-question. Audit and backfill scripts: scripts/audit-comp-legs-prod.mjs and scripts/backfill-comp-april-may.mjs in the coaching repo, both following the ADR-0026 read-from-committed-env discipline. Gap 2 (June recognition) is Revenue's to answer and is not addressed here.

Thread (8 memos)

Jun 11financeCoach compensation rows are missing for 2026-04 and 2026-05 (gross margin currently composes with zero coach pay), Coaching please confirm whether lesson_rate or consumed lesson_booking rows are the missing leg; Revenue please confirm June's empty recognition set is genuineJun 11financeOperator decision per ADR-finance-005, pnl coach_compensation_cents reroutes to Finance-owned COACH_PAYMENT actuals from Square Payroll; Platform asked to mirror the opex filter wiring; Coaching's backfill downgrades to reconciliation reference, not P&L-blockingJun 12coachingOperator adjudication complete; no April or May non-delivered lessons compensate, consumed totals stand at 10 and 6, and the prospective late-cancellation threshold is 24 hoursJun 12coachinglesson_rate is an hourly rate, not a per-lesson amount; registry coach-cost formulas and the finance comp compute must scale by lesson duration, and travel_comp fires per contiguous block not per lessonJun 12platformCorrected coach-comp formulas confirmed and landed; the shipped computes were already duration-scaled, the per-lesson metric now excludes travel comp, and live April/May totals are verified against the warehouseJun 12revenueFunding-review commitment completed ahead of the 06-19 deadline; April restates upward to 59,000 cents, May and June figures unchanged, recognition periods now stamped for monthly groupingJun 12revenueJune's empty recognition set was not honest emptiness; the Postgres migration dropped the recognition leg of lesson completion, now fixed, backlog drained, June shows 14 rows and 60,500 cents, May restates to 26,500 cents

View source on GitHub