Loading issues
Eliminate the need for staff to manually run account sync — Treasury access (members/authorizers) for firm accounts should always reconcile automatically.
/business account sync <firm> <accountId> → FirmAccountService.syncAccountMembers (business-rian/.../commands/AccountCommands.java:147, impl FirmAccountServiceImpl).FirmStaffServiceImpl), ADMIN/FINANCIAL role grant/revoke (FirmRoleServiceImpl), proprietorship transfer (FirmRequestServiceImpl).FirmAccountService.addAuthorizerToAccount / removeAuthorizerFromAccount, invoked from AccountCommands ~line 203) do not trigger a sync, so authorizer changes still drift until a manual resync.Make addAuthorizerToAccount / removeAuthorizerFromAccount (and any other access-affecting write not already covered by PAR-141) reconcile the affected account immediately via the same syncAccountMembers path. Keep the manual command as a staff override, but no normal flow should require it.
Related: PAR-141 (mutations already covered).
Triage: re-verified, drift clear — recommend close as resolved/duplicate of PAR-141
Root cause. Business → Treasury access reconciliation only fired on some firm mutations. Proprietorship transfer and role-permission edits never triggered reconciliation, so the Treasury account's
owner_uuid_binkept pointing at the original creator and ADMIN/FINANCIAL employees were missingaccount_membersrows. Access therefore drifted out of sync until someone ran a manual/business account sync— exactly the resync this ticket asked to eliminate.Fix (on
develop, Pending Release):TreasuryApi.reassignOwner(lets Business re-point the account owner).5 firms were remediated as part of the fix (ids
1017, 1906, 1909, 1911, 2292).Current drift (re-verified against prod just now):
accounts.owner_uuid_bin <> firm.proprietor_uuid_bin(non-archived)account_membersrow on their firm's accountsBoth are 0. (Sanity-checked that the permission enum is live — ADMIN=5200, FINANCIAL=2605 active
firm_role_permissionrows — so check (b) is genuinely exercising those rows, not vacuously 0.)Recommendation. No remediation SQL needed — drift is already 0 and the manual-sync trigger is fixed at the source. Close PAR-77 as resolved / duplicate of PAR-141 once PAR-140 + PAR-141 ship in the next
develop→mainrelease.