My Wise transfer stuck for 11 months and the thMenu dormancy cron zombified my account — in-flight payout gate (PR #598 AAA F3)
Rhys Cardiff Cathays 36-yo indie food blogger handle scotsfood 6-yr summer 2024 thMenu affiliate referred 3 Welsh + Scottish restaurants 4 months £580 commission. August 2024 first Wise international transfer compliance review AML first-time recipient setup. Review continues email then heads-down 11-month grandmother's-care stretch dropped freelance + dropped blog + dropped Wise notifications. July 2025 back to dashboard. Top widget Your account has been anonymised contact support to restore. Deleted User #affiliate_8104 profile photo placeholder Wise IBAN blank BUT Wise transfer status: processing August 2024 transfer still in flight 11 months. Rhys shock did money disappear suspicion dormancy auto-anonymisation concern recovery procedure support 12 months no touch Wise still pending. Engineering 3 questions (1) was Rhys anonymised Supabase SELECT display_name email payout_info_id yes closeDormantAffiliates; (2) was Wise transfer really processing GET /v1/transfers/{id} status processing amount £580 destination RHYS IBAN cached pre-anonymisation 11-month compliance ongoing; (3) what triggered audit log 2025-07-04 03:00 UTC closeDormantAffiliates affiliate_id rhys_id last_activity 2024-07-03 12 months elapsed action anonymise + purge payout_info. 3 yeses Rhys anonymised Wise transfer in flight IBAN/recipient wiped → Wise compliance finishes transfer success thMenu surfaces no money movement compliance rejects reversal handler no destination. Wrong theory (1) D1 backup restore Rhys's affiliate_payout_info August 2024 backup IBAN recover but GDPR risky restoring deleted record violates data subject right implicit consent dormancy = deletion crosses line; (2) Rhys fresh signup bind transfer to new account source-destination mismatch Wise compliance recipient August 2024 Rhys Davies IBAN xxx fresh signup different person compliance reject. Correct theory dormancy cron should never have anonymised because in-flight payout gate missing. Forensic cloudflare/src/cron-jobs/affiliate.ts:closeDormantAffiliates (1) pull affiliates last_activity_at < now - 12 months; (2) iterate; (3) UPDATE affiliate_profiles SET display_name Deleted User + email NULL; (4) DELETE FROM affiliate_payout_info WHERE affiliate_id; (5) audit log. Missing check affiliate_payouts.status IN (requested approved processing) rows skip the affiliate. PR #593 ZZ F1 reverse_affiliate_payout RPC no recipient no reversal Wise webhook funds_refunded/charged_back reverse SELECT iban NULL recipient_missing manual intervention flag. Edge case chain dormancy → anonymise → purge payout_info → in-flight payout reversal impossible Rhys £580 limbo. PR #598 batch AAA F3 3-layer fix Layer 1 batched in-flight payout fetch Supabase SELECT affiliate_id FROM affiliate_payouts WHERE status IN (requested approved processing) Set<affiliate_id> inFlightSet. Layer 2 iteration if inFlightSet.has(affiliate.id) skip dormancy in-flight payout continue. Layer 3 fetch fail soft-fail return early safer to err on not anonymising than anonymising delayed dormancy recoverable anonymisation + missing-recipient reversal not. Rhys manual reconcile super-admin D1 backup affiliate_profiles restore + affiliate_payout_info original IBAN reinsert + journal entry reconcile + money_movement_journal special manual_reconcile entry. Email + Wise arrival + 1-year Pro credit + Hall of Fame blog post 2.7k. Production audit 24-month dormancy cron audit log + affiliate_payouts in-flight cross-correlate 3 affiliates edge case manual reconcile each. PR #598 deploy 7-month 0 new incidents. Pelin Sivas Merkez @pelin-design freelance grafic designer + affiliate marketing 6-yr handle March 2024 $640 commission Wise compliance review 11-month parallel. Pattern irreversible state-change cron (anonymise archive purge hard-delete) check in-flight external commitment soft-fail skip retry. Wise pending transfer + Stripe pending refund + ACH pending settlement + PayPal pending dispute + IRS 1099 pending file + Resend pending email queue every irreversible cron enumerate + skip-set. Sibling sweep process-deletions + prune-orphan-customer-artefacts + prune-affiliate-coupon-daily-count AAA-B. Implementation identify irreversible side-effects + batch-fetch external commitments + build inFlightSet + iteration skip + soft-fail early return + audit log skipped: in-flight + production audit cross-correlate + PR template checkbox. PR #598 reference.
thMenu Team
thmenu.com
Found this helpful? Share it.
Related articles
Why Digital Menus Increase Restaurant Revenue by Up to 30%
Studies show restaurants using digital QR menus see measurable increases in aver…
When a Customer Downgrades, What Happens to Old Features? — The Silent Feature-Drift Problem in SaaS
Most SaaS apps run a single line of code when a customer downgrades — but old fe…
JWT alg-confusion attack — why Supabase's HS256 → RS256/JWKS migration breaks legacy verifiers
Verifiers that never decode the JWT header are wide open to `alg=none` and alg-c…