September 2025 Debug Handoff
Status
- Stage 0 mapping is correct (Credit/Debit columns are correct).
- September raw CSV shows 4TK Holdings ONLY under Robin Bundy (payee_agent_id=721995).
- Credit = 1 per employee (12 employees → $12 total). This matches Stage 1 output.
- No Richard Ballard slice exists for 4TK in September raw data.
Failure Observed
- Stage 3 generated agent_total_sum = $36 for business “4TK Holdings”.
- This exceeds Stage 1 net payout ($12), producing negative owner residual.
- This is NOT a column mapping issue.
Current Hypothesis
One of the following: A) Stage 3 is attaching agent allocations to the wrong business_key (collision / normalization drift). B) Stage 3 is allocating at business-level while Stage 1 is payee-slice-level. C) Business identity mismatch between Stage1.business_label and Stage3.business_name.Next Required Queries
-
Stage3 (shadow):
- Group by business_name, downline_agent_name
- SUM(agent_total), absorbed_count
- Filter: period = 2025-09 AND business_name LIKE ‘%4TK%’
-
Stage1 (shadow):
- Group by payee_agent_id, business_label
- SUM(credit), SUM(total), COUNT(DISTINCT member_id)
- Filter: period = 2025-09 AND business_label LIKE ‘%4TK%‘
Explicit Non-Fixes
- Do NOT change Stage 0 column mapping.
- Do NOT multiply Credit.
- Do NOT search for a different money column.
Contract Question to Resolve
Should CEO dashboard aggregation be:- Business-level combined across CEO anchors (recommended, Repo A behavior), OR
- Payee-slice-level (would require constraining Stage 3 allocations)?