PAR-144
Audit + guard player-name ↔ GOVERNMENT-account-name collisions across all bare-name resolvers
Why
Governments are operated as Minecraft player alt-accounts whose usernames equal same-named Treasury GOVERNMENT accounts, so each such entity has two wallets with the same name. Any code that resolves a bare name (no explicit account type) or resolves by owner UUID can silently land on the player's personal wallet. PAR-142 fixes the /pay instance and PAR-143 the Realty instance — this issue closes it once and for all by sweeping every other bare-name surface and preventing new collisions.
Current collisions (prod, for remediation/awareness)
Names existing as BOTH a GOVERNMENT account and a player alt:
DCGovernmentAV→ GOV#49929/ PERSONAL#104237DCGovernmentOR→ GOV#27107/ PERSONAL#104236
Player alts with NO matching gov account (no ambiguity today, but same pattern): DCGovernmentAG #79295, DCgovernmentDH #77276, DCGovernmentDOJ #49046. Gov accounts with no alt: DCGovernment #2, DCGovernmentJUD #99393.
Audit query (keep as an admin/CI check):
SELECT a.account_id gov_id, a.display_name, pa.account_id personal_id, fp.current_name
FROM accounts a
JOIN firm_players fp ON fp.current_name = a.display_name
LEFT JOIN accounts pa ON pa.account_type='PERSONAL' AND pa.owner_uuid_bin = fp.player_uuid_bin
WHERE a.account_type='GOVERNMENT';
Scope
- Sweep every bare-name / owner-UUID resolver for the same ambiguity and make each deterministic (explicit type or defined precedence + collision refusal). Known surfaces to check: Treasury
/pay(PAR-142 ✔), Realty payouts (PAR-143), ChestShop sign-owner resolution (ChestShop-3 TreasuryListener.onAccountQuery), the Vault economy adapter (name-basedgetBalance/deposit/withdraw→ resolves player names), andtreasury-rest-apiby-name lookups. File follow-ups for any new instances found. - Guard at the source: when creating a GOVERNMENT account, warn/flag if a player with that exact username already exists (and vice-versa surface it), so new collisions are visible rather than silent.
- Decide the canonical policy: one documented rule for "what does the bare name
DCGovernmentXresolve to" across the whole economy, so all surfaces agree. (Recommended: bare-name government references require explicit typing; governments should not be silently addressable as players.) - Provide the remediation list for existing mis-routed balances (coordinate with PAR-143 for the Realty money in
#104236).
Acceptance
- No bare-name/owner-UUID resolver can silently pick the wrong account type for a colliding name.
- Audit query wired as a recurring check; existing collisions documented + remediation planned.
Umbrella for PAR-142 (Treasury /pay) and PAR-143 (Realty payouts).
Resources
- PR#2 Last major release ParadauxIO/hibernia-economy
- commit9aa5bb1 Guard player↔GOVERNMENT name collisions across remaining resolvers (PAR-144)ParadauxIO/hibernia-economy
Comments
No comments yet.
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 9aa5bb1 — Guard player↔GOVERNMENT name collisions across remaining resolvers (PAR-144)
- tesks created the issue