Paradaux

PAR-80

0

Expose config details to the database for documentation

PlannedrianTreasuryFeature

Goal

Reconcile selected config tunables (e.g. tax rates) into the DB on startup so the docs/explorer can display live, accurate values in place instead of hard-coded copies that drift.

Grounded

Tax tunables live in Bukkit config, loaded into treasury/.../model/config/BalanceTaxConfiguration.java (tax.balance.brackets.*) and SourceIncomeTaxConfiguration.java (tax.source-income-tax.plugin-rates.* + default-rate). Nothing publishes them to the DB. The old feature_flags table was dropped (economy-schema V4), so there's no current config-in-DB precedent to reuse.

Approach

  • New economy-schema migration for a small snapshot table, e.g. economy_config(config_key, value, type, updated_at).
  • On Treasury startup, idempotently upsert the relevant config (balance-tax brackets, income-tax rates + default) into it.
  • Expose via treasury-rest-api and render in economy-explorer /docs (the docs site already exists) so e.g. the tax page shows current rates.

Acceptance

  • Changing a tax rate in config + restart updates what the docs/explorer display, with no manual doc edit.
  • Clear scope for which config keys are published (start with tax rates).

Relates: PAR-92 (tax breakdown screen consumes these), PAR-145 (attribution).

Comments

No comments yet.

Activity

  • tesks description: Description updated
  • paradaux changed status to Status → Planned
  • tesks changed status to Status → Backlog
  • tesks created the issue