🔧 UAT 2 Remediation Complete — Session 15

August 6, 2026 · Wednesday
End of Day Report

Fourteen UAT findings turned out to be
four defects wearing costumes.

Morning walkthrough produced 14 symptoms. Diagnosis found they were surface expressions of a much smaller set of structural problems — one RLS policy breaking 29 database reads, a signup handler putting invited leaders into the wrong organization, and a repeated habit of discarding write errors. 11 of 14 findings closed. 10 new defects found and fixed underneath them. Everything verified by execution with real non-admin sessions.

Session 15 Deliverables
What shipped and closed today
11
UAT Findings Closed
10
New Defects Found & Fixed
15
Total Defects Closed
29
Dead Database Reads Fixed
✅ RLS Policy Breach Fixed
29 Dead Database Reads
public.profiles had one SELECT policy: auth.uid() = user_id. Any read of another person's profile returned nothing silently. Affected: getMyLeader, AE picker, 1:1 counterpart names, AE Command Center, team leaderboard, and 24 more read sites. Solution: org_directory security-definer view, bound to shared org_members, exposing 14 work columns only.
✅ Invited Leaders Fixed
Two-Org Problem Closed
Leader signup created personal workspace, profiles.org_id pointed at it instead of shared org. Claim handler tried to repoint, write failed, error discarded. Now: ordering fixed, result checked. Affected leader's row repaired. Sister defect (U96) on AE side still open.
✅ Leaders Were Read-Only
Role Assignment Fixed
Accepted leaders landed as org_members.role = 'participant' — a value privileged nowhere. Sales leader function broken silently. Now: manager role (team assignment write without org write). Repaired 2 affected profiles.
✅ Server Error Capture Live
Observability Shipped
apm_events had 4,340 rows; 4,309 were cron heartbeats, zero from 439 server functions. Middleware now records every server-function throw. First use: three rows showing exactly why a chat message wouldn't send. This change moves defects from screenshots to queryable data.
⚠️ Leaderboard Was Dead
Column Name Error
Default metric queried handoffs.rep_user_id — column that doesn't exist. PostgREST returned 42703, error coalesced to empty array, everyone scored zero. Column corrected. Now returns real rows (though accepted-only filter means zero still on demo data).
⚠️ Pattern Identified
Silent Error Discards
Four separate defects, one shape: code destructures { data } and throws error away. Claim handler, non-existent full_name query, leaderboard rep_user_id all did this. Session 14 found 20 instances on write paths. This should be a lint rule, not a defect list next month.
🔴 Decision Needed
U76: External Handoffs Product or Gate?
System can send handoffs to unaccepted AEs by email (SDR works day one, AE gets email). Two products: keep it (better adoption, worse data integrity) or gate it (cleaner record, SDR blocked on day one). This changes what the onboarding checklist should say. Answer before Session 16.
"The database, not the codebase, produced the two biggest findings. Every wrong call was a confident inference from a correct code trace. Reading the code told us what the code does; it did not tell us what the database contained."
Working rule from Session 15
UAT 2 Walkthrough Findings — Status
14 findings → 11 closed, 2 retest, 1 decision
Closed Today (11 findings)
U73 Leader never appeared (three stacked defects) · U82 Team Chat empty (wrong profile ID join) · U86 Tuning request didn't fire (wrong org) · U74 Leader accept route (not located yet) · U79+U80 Add to Today button (same bug, state rendering) · U83 Raw UUIDs (name map not consumed) · U77 step 1 profile completion (missing job_title not surfaced) · U72 AE invite auth error (session lost across tabs)
Pending Retest (2 findings)
U75 — Un-accepted AEs show active (badge logic exists, needs invite to fire first) · U87 — Password reset sent nothing (correct behavior, no auth user exists, retest scheduled)
Waiting on Your Decision (1 finding)
U76 — Send handoff with no accepted AE: Keep external email handoffs (SDR works day one) or gate them (cleaner record, SDR blocked). Decision changes U75, U77, and onboarding checklist behavior.
Found Underneath the Findings
10 new defects discovered and fixed during diagnosis
What Worked Today
Three practices worth keeping
Do Betters
Three things that cost time
Session 16 Priorities
Next steps and blockers
FIRST: Run the walkthrough again
Fifteen defects closed, each verified in isolation against probe accounts or single surfaces. Not tested: whether they compose. SDR invites AE, AE accepts, handoff moves, leader sees it. This run also settles U75 and U87 without a prompt. Answer U76 first — walkthrough hits it in first two minutes.
Decisions only Kevin can make
U76 — External handoffs: Product or gate? (changes U75, U77, onboarding)
Demo data visibility: Exclude everywhere, include everywhere labelled, or split personal from competitive? (needs is_demo column on accounts/opportunities first)
D33 reversal: Work Now opens full qualifier sheet instead of drawer — confirm reversal vs reaction
D41 contradiction: Unshare toggle on 1:1 self-assessment vs append-only rule in RELATIONSHIP_THREAD_MODEL.md — which wins?
Queued for build after walkthrough
Finish bucket B (5 of 29 reads remain) · Silent-error lint rule (U94 + four instances from Session 14) · U93 + U97 together (three columns, one fact) · U98 demo data cleanup · Check Playwright "authenticated session injection" blocker