Paradaux
IssuesPAR-58PlannedOpen ↗
0

Investigate taxation system bug in StateCraft

Taxation appears broken: players with no money show no tax (a global 1% is applied), but SCGovernment receives no funds. Investigate whether this is StateCraft-specific or also affects DemocracyCraft.

Technical notes — this looks like a per-server misconfiguration, not a code bug. On StateCraft, tax.balance.government-account is set to DCGovernment, but LedgerServiceImpl.bootstrapGovernmentAccounts() only creates starting-balances, the tax-income account (SCGovernment) and the fines account — it never bootstraps the balance-tax destination. So findGovernmentAccountByName("DCGovernment") returns null, BalanceTaxService.resolveDestinationAccountId() logs a WARN and silently falls back to the default tax account (SCGovernment). Money is collected and credited to SCGovernment — but the configured DCGovernment stays empty, which reads as "not receiving funds."

The "no-money players pay no tax" part is correct/expected: processLoginLocked returns early at balance ≤ 0 and the 0% bracket.

Fix: set SC's tax.balance.government-account to SCGovernment; and/or bootstrap the balance-tax destination like the others + upgrade the silent WARN fallback to a startup validation error (a misrouted tax destination is a money-integrity issue).

Comments

tesks · Jun 4, 2026, 9:57 AM

Code context — this looks like a per-server misconfiguration, not a code bug. On StateCraft, tax.balance.government-account is set to DCGovernment, but LedgerServiceImpl.bootstrapGovernmentAccounts() only creates starting-balances, the tax-income account (SCGovernment) and the fines account — it never bootstraps the balance-tax destination. So findGovernmentAccountByName("DCGovernment") returns null, BalanceTaxService.resolveDestinationAccountId() logs a WARN and silently falls back to the default tax account (SCGovernment). Money is collected and credited to SCGovernment — but the configured DCGovernment stays empty, which reads as "SCGovernment not receiving funds."

The "players with no money pay no tax" part is correct/expected: processLoginLocked returns early at balance ≤ 0 and at the 0% bracket.

Fix: set SC's tax.balance.government-account to SCGovernment; and/or bootstrap the balance-tax destination like the others + upgrade the silent WARN fallback to a startup validation error (a misrouted tax destination is a money-integrity issue).

tesks · Jun 5, 2026, 6:57 AM

Skipping — this is a live-config fix, not a code change. As diagnosed, StateCraft's tax.balance.government-account is set to DCGovernment, which is never bootstrapped, so resolveDestinationAccountId logs a WARN and silently falls back to the default tax account — money is collected, just credited to the wrong (fallback) account, so the configured DCGovernment looks empty. The fix is to set SC's tax.balance.government-account to a bootstrapped account (e.g. SCGovernment) on the live server config — the agent can't touch live config. (Optional code hardening for later: upgrade the silent WARN fallback to a fail-fast startup validation so a misrouted tax destination can't happen silently — flag if wanted.)

Activity

  • paradaux changed status to Status → PlannedJun 7, 2026, 9:06 PM
  • paradaux description: Description updatedJun 7, 2026, 9:06 PM
  • tesks commentedJun 5, 2026, 6:57 AM
  • tesks moved to Moved to TreasuryJun 4, 2026, 8:54 PM
  • tesks changed status to Status → BacklogJun 4, 2026, 8:54 PM
  • tesks description: Description updatedJun 4, 2026, 10:02 AM
  • tesks commentedJun 4, 2026, 9:57 AM
  • tesks assigned Assigned to rianJun 4, 2026, 9:37 AM