PAR-24
Players are able to disband firms multiple times spamming chat
An already-disbanded firm can be disbanded again, re-running the disband flow and spamming chat with the broadcast.
Technical notes — FirmServiceImpl.disbandFirm has no isArchived() guard, and FirmMapper.getFirmByName/getFirmById return rows regardless of is_archived. Guard disbandFirm with an already-archived check (and surface "firm already disbanded" in FirmCommands.disband) to make disband idempotent; optionally exclude archived firms from the name/id lookups. Confirmed via code read.
Resources
- commit0c6024c Make firm disband idempotent (PAR-24)MCCitiesNetwork/Business
- PR · merged#6 Release: develop → mainMCCitiesNetwork/Business
Comments
tesks · Jun 4, 2026, 9:24 AM
Code context — business-rian/…/services/impl/FirmServiceImpl.disbandFirm has no isArchived() guard, and FirmMapper.getFirmByName/getFirmById return rows regardless of is_archived, so /firm disband <name> can be re-run on an already-disbanded firm — re-running the archive/withdraw flow and re-broadcasting the disband message (the chat spam).
Fix: guard disbandFirm with an already-archived check (surface "firm already disbanded" in FirmCommands.disband) to make disband idempotent; optionally exclude archived firms from the name/id lookups. Confirmed via code read — dropped the Unconfirmed label.
tesks · Jun 4, 2026, 2:57 PM
Fixed on develop (business-rian @ 0c6024c).
Change — disband is now idempotent:
FirmServiceImpl.disbandFirmthrowsBadCommandException("Firm already disbanded")whenfirm.getArchived()is true (before any account/archive work).FirmCommands.disbandshort-circuits with a new localized messagebusiness.firm.disband.alreadybefore the broadcast fires, so a repeat disband no longer spams chat.
Left the getFirmByName/getFirmById lookups returning archived rows (other read paths — info views, explorer — rely on that); the explicit archived guard is the surgical fix.
Added unit test disbandFirm_alreadyArchived_throws (asserts no re-archive / no account work). FirmServiceImplTest green under JDK 21.
Activity
- ParadauxIO linked a commit — Commit 0c6024c — Make firm disband idempotent (PAR-24)
- ParadauxIO changed status to Status → Done
- ParadauxIO linked a pull request — PR #6 merged — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- ParadauxIO linked a pull request — PR #6 open — Release: develop → main
- tesks changed status to Status → Pending Release
- tesks commented
- tesks description: Description updated
- tesks commented
- tesks assigned Assigned to rian
- tesks updated labels (Labels updated)
- tesks set priority to Priority → High