Tax exemptions aren't visible under the treasury. Make firm tax-exemption a firm attribute that can be tagged rather than configured directly.
Technical notes — the mechanism already exists. A per-firm balance-tax.exempt flag is stored by FirmPropertyService, set via /business tax exempt <firm> <bool> (TaxCommands, perm business.tax.exempt), and honored by FirmBalanceTaxListener.buildFirmCollections (exempt firm → zero collections). The weekly tax cycle is wired and works end-to-end (Treasury fires TaxCycleEvent(WEEKLY), business registers the listener at Business.java:75, non-exempt firms charged via collectBatch).
Remaining gap vs this ask ("not visible under the treasury"): exemption status isn't surfaced in the explorer/treasury views. Recommend narrowing to "surface firm exemption status in the explorer," or verify/close. (Separate tiny follow-up: the listener never calls taxApi.registerCycleParticipant("Business", WEEKLY), so Business doesn't appear in /tax status — observability only.)
Done — exemption is now surfaced in the explorer (economy-explorer @ ccaa70b, develop).
Findings on the existing mechanism (verified by code read): exemption is already a tagged firm attribute (firm_properties, key balance-tax.exempt), already honored by the weekly cycle (FirmBalanceTaxListener.buildFirmCollections → exempt firm returns no collections), and already shown in-game via /business tax info ("Exempt"/"Not Exempt"). The only gap was web visibility ("not visible under the treasury").
Change (explorer):
findFirmByDisplayName (lib/sql/firm.ts) now reads the flag via a correlated subquery on firm_properties, filtering type='BOOLEAN' and deleted_at IS NULL and parsing 'true' case-insensitively — exactly mirroring FirmPropertyServiceImpl.getBoolean.firm_properties, an actively-exempt firm, and a soft-deleted flag on Acme to prove the deleted_at filter. getFirmStats expectations updated for the added firm.Validated: typecheck + lint + 55 unit tests green. Integration test runs in CI (needs the MariaDB service container; couldn't run locally — no DB creds in this environment).
Deferred follow-up (not done — out of the chosen scope): the listener still never calls taxApi.registerCycleParticipant("Business", WEEKLY), so Business doesn't appear in Treasury's /tax status. Pure observability; worth a small separate ticket if wanted.
State corrected Pending Release → Done: the firm tax-exemption command/attribute (TaxCommands, FirmBalanceTaxListener, BalanceTaxConfiguration) is shipped — fix commit d260686 is on business main (released), not just develop.
Code context — this is largely already implemented. A per-firm
balance-tax.exemptflag exists:FirmPropertyService.setBoolean, settable via/business tax exempt <firm> <bool>(TaxCommands, permbusiness.tax.exempt), andFirmBalanceTaxListener.buildFirmCollectionshonors it (exempt firm → zero collections).I traced the weekly tax cycle end-to-end and it works: Treasury schedules + fires
TaxCycleEvent(WEEKLY)(enabled in config,Treasury.onEnable), business registers the listener (Business.java:75), and non-exempt firms are charged viacollectBatch→ ledger toDCGovernment.Remaining gap vs the title ("not visible under the treasury… tag rather than configure"): exemption status isn't surfaced in the explorer/treasury views. Recommend narrowing this to "surface firm exemption status in the explorer," or verify/close. (Tiny separate follow-up spotted: the listener never calls
taxApi.registerCycleParticipant("Business", WEEKLY), so Business doesn't appear in/tax status— observability only, collection is unaffected.)