Skip to content

fix: name daily citizen tax contributors - #183

Merged
ryanbarlow97 merged 2 commits into
mainfrom
fix/daily-citizen-contributors
Oct 17, 2026
Merged

ryanbarlow97 merged 2 commits into
mainfrom
fix/daily-citizen-contributors

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

The Citizens tooltip shows today's collected tax as “Other citizen taxes” because current earnings no longer populate the legacy contributor map. Read the earning characters recorded with committed DenarEconomy tax transactions, alongside legacy rows, so Today shows character names and settlement carries them into Last day and Lifetime.

Capture contributor amounts with held balances for async previews and settlement. Existing tax amounts, legacy history and saved contributor rows are preserved; money whose contributor was never recorded remains grouped as “Other citizen taxes”.

Uses the published DenarEconomy 0.7.0 release from TF-Minecraft/DenarEconomy#44. Deploy DenarEconomy before this consumer. The committed project version remains main-SNAPSHOT; numeric tags supply release versions.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed on CachyOS: 8,212 tests, zero failures or skips, and the required zero-missed-lines coverage gate. Runtime JAR filename/version validation passed. The new real-tax-posting-to-tooltip regression fails against the original Ledger implementation and passes with this fix; coverage also checks async snapshots, legacy rows and settlement history. Verification was repeated against the published, checksum-verified DenarEconomy 0.7.0 JAR (dbe4fd8ebc028a43cc9015ea008afc100e2a1c346115d64f8a74782ac0086f99). No server deployment is included.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d875e079-0d60-4ba5-9ed5-be04697bbd8b
📥 Commits

Reviewing files that changed from the base of the PR and between b9f68e0 and 6f409a7.

📒 Files selected for processing: 7
  • pom.xml
  • src/main/java/net/tfminecraft/simplefactions/economy/FrozenReads.java
  • src/main/java/net/tfminecraft/simplefactions/guild/income/Ledger.java
  • src/test/java/net/tfminecraft/simplefactions/economy/FrozenReadsTest.java
  • src/test/java/net/tfminecraft/simplefactions/economy/settlement/RealmSettlementCalculationTest.java
  • src/test/java/net/tfminecraft/simplefactions/guild/income/LedgerCitizenTaxPersistenceTest.java
  • src/test/java/net/tfminecraft/simplefactions/managers/inventory/GuildMenusCoverageTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • Citizen-tax breakdowns now include transaction contributor data alongside saved tax entries, with amounts combined by character.
    • Contributor details are retained in settlement history and daily guild income records after held tax is transferred to the guild bank.

Frozen reads now capture tax contributors by guild incarnation. Citizen-tax breakdowns combine contributor amounts with legacy entries. Tests cover frozen reads, settlement history, and menu displays. The project and Denar Economy dependency versions also change.

Changes: Citizen tax attribution

Layer / File(s) Summary
Capture and combine tax contributors
pom.xml, src/main/java/net/tfminecraft/simplefactions/economy/FrozenReads.java, src/main/java/net/tfminecraft/simplefactions/guild/income/Ledger.java, src/test/java/net/tfminecraft/simplefactions/economy/FrozenReadsTest.java, src/test/java/net/tfminecraft/simplefactions/guild/income/LedgerCitizenTaxPersistenceTest.java
The project version changes to main-SNAPSHOT, and the Denar Economy version changes to 0.7.0. FrozenReads captures contributor maps by guild incarnation, and Ledger merges those amounts with legacy citizen-tax entries. Tests check frozen values and confirm that the saved legacy entries remain unchanged.
Settlement history and menu display
src/test/java/net/tfminecraft/simplefactions/economy/settlement/RealmSettlementCalculationTest.java, src/test/java/net/tfminecraft/simplefactions/managers/inventory/GuildMenusCoverageTest.java
Tests cover contributor amounts in settlement history and daily, previous-day, and lifetime menu displays.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Denars
  participant FrozenReads
  participant Ledger
  Denars->>FrozenReads: provide contributors during capture
  Ledger->>FrozenReads: request contributors for an incarnation
  FrozenReads-->>Ledger: return captured or live contributors
  Ledger->>Ledger: merge contributor amounts with legacy entries
Loading

Suggested reviewers: drefvelin

Merge Risk: ⚪ Minimal · up to 6f409

No actionable merge-blocking issue is established. Confirm the planned DenarEconomy release and deployment before merging.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:S 10-29 effective changed lines (tests excluded in mixed PRs). label Oct 17, 2026
@ryanbarlow97
ryanbarlow97 marked this pull request as ready for review October 17, 2026 15:00
@github-actions github-actions Bot added size:M 30-99 effective changed lines (tests excluded in mixed PRs). and removed size:S 10-29 effective changed lines (tests excluded in mixed PRs). labels Oct 17, 2026
@ryanbarlow97
ryanbarlow97 merged commit 9c4b711 into main Oct 17, 2026
3 of 4 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/daily-citizen-contributors branch October 17, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant