System architectureTrace launch, state, and dependencies

Audit snapshot

Branch
codex/supabase-portfolio-ledger
Observed commit
11fb3974ea84e769827f576a2e790d015ae77a23Short reference: 11fb3974
Status
unmerged
Divergence at audit
14 commits ahead, 2 behind main
Changed files
65
Diff size
+10,026 / −152 lines

What the branch changes

These are the curated architecture implications of the observed branch. They are not an endorsement of merge readiness.

  • Replaces canonical main's static PortfolioMockData composition with customer-scoped repository/store state.
  • Adds Supabase migrations for ledger tables, atomic mutation RPCs, and zero-balance account provisioning.
  • Routes order placement, funding, balances, holdings, history, and performance through persisted domain models.
  • Touches ContentView, AppDependencies, RootView, Stock Detail, Watchlist, Profile, localization, project.pbxproj, and tests.

Generated comparison signals

  • Adds repository-backed portfolio state and an in-memory implementation seam.
  • Adds Supabase portfolio ledger migrations, RLS/RPC behavior, and database tests.
  • Moves paper orders, funding, holdings, and performance toward persisted state.
Files changed from canonical main by repository area
AreaFiles
Documentation31
iOS app27
Supabase5
Xcode project1
iOS tests1
Change types45 added · 20 modified · 0 deleted

Evaluation checklist

  1. Rebase or otherwise reconcile the two main commits missing from the branch before evaluating merge readiness.
  2. Re-run KYC submission/approval guards and prove non-approved customers cannot access portfolio or mutate balances.
  3. Review atomicity, idempotency, authorization, RLS, concurrent debit behavior, error taxonomy, and reconciliation.
  4. Confirm demo/paper terminology and ensure no UI implies a brokerage, RDN, or withdrawable real balance.
  5. Split or justify the broad 65-file scope; review project-file changes separately.

Freshness

State
verified
Audited commit
11fb3974ea84e769827f576a2e790d015ae77a23
Audited on
2026-08-03
Audit note
Git ancestry check at audit time: branch is 14 commits ahead and 2 commits behind main; it is not an ancestor of main.