PAR-77
Remove manual account sync
Goal
Eliminate the need for staff to manually run account sync — Treasury access (members/authorizers) for firm accounts should always reconcile automatically.
State (grounded)
- Manual command:
/business account sync <firm> <accountId>→FirmAccountService.syncAccountMembers(business-rian/.../commands/AccountCommands.java:147, implFirmAccountServiceImpl). - PAR-141 (shipped/pending) already auto-syncs on the major mutations: hire/fire (
FirmStaffServiceImpl), ADMIN/FINANCIAL role grant/revoke (FirmRoleServiceImpl), proprietorship transfer (FirmRequestServiceImpl). - Remaining gap — the "authorisers in DMs" complaint: direct authorizer add/remove (
FirmAccountService.addAuthorizerToAccount/removeAuthorizerFromAccount, invoked fromAccountCommands~line 203) do not trigger a sync, so authorizer changes still drift until a manual resync.
Fix
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.
Acceptance
- Adding/removing an authorizer reflects in Treasury access with no manual sync.
- Drift audit (per PAR-141) shows 0 after these operations.
Related: PAR-141 (mutations already covered).
Resources
- PR#2 Last major release ParadauxIO/hibernia-economy
- commitc1bbb01 Reconcile firm-account access on every manual member/authorizer write (PAR-77)ParadauxIO/hibernia-economy
Comments
tesks · Jun 11, 2026, 11:20 AM
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_bin kept pointing at the original creator and ADMIN/FINANCIAL employees were missing account_members rows. 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):
- PAR-140 —
TreasuryApi.reassignOwner(lets Business re-point the account owner). - PAR-141 — Business now reconciles Treasury access on proprietorship transfer + role-permission edits.
5 firms were remediated as part of the fix (ids 1017, 1906, 1909, 1911, 2292).
Current drift (re-verified against prod just now):
| Check | Count |
|---|---|
(a) Live firm accounts where accounts.owner_uuid_bin <> firm.proprietor_uuid_bin (non-archived) | 0 |
(b) Current ADMIN/FINANCIAL employees missing an active account_members row on their firm's accounts | 0 |
Both are 0. (Sanity-checked that the permission enum is live — ADMIN=5200, FINANCIAL=2605 active firm_role_permission rows — 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 → main release.
Activity
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a commit — Commit c1bbb01 — Reconcile firm-account access on every manual member/authorizer write (PAR-77)
- tesks description: Description updated
- tesks commented
- paradaux changed status to Status → Planned
- tesks changed status to Status → Backlog
- tesks created the issue