Give hub tax and supply hubs their own law settings - #95
Conversation
Hub tax borrowed the tariff bracket and rule, so Free Trade and Decentralized, which switch tariffs off, forced it to zero. It now has its own bracket, set by each economy law: Free Trade 0-10%, Mercantilism 0-25%, Protectionism 0-40%, Isolationism 0-50%. Decentralized gets two new rules instead: it cannot collect hub taxes, and its guilds cannot build supply hubs. Hubs such a guild already has go dormant. With a laws.yml that predates this, every faction can build hubs and charge up to 10%. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (21)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe changes separate hub-tax and supply-hub rules from tariff rules. They add law-aware tax bracket and rule evaluation, apply supply-hub rules to construction, standing and transport, and add tests for these behaviours. ChangesHub Economy Rules
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete merge-blocking issue was identified. Valid saved hub-tax rates survive restoration, and dormant hubs are excluded before live payments. The change is mergeable subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Normal execution preserves guild-leader and host-permission checks. However, if daily recalculation fails, an older hub-tax assessment can still be paid after a law disables the payer’s hubs. This creates a conditional in-game financial-integrity risk; no attacker-triggered exploit was established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
Comment |
Hub tax borrowed the tariff bracket and the tariff rule. Free Trade and Decentralized switch tariffs off, so they forced hub tax to zero, and a host had no reason to accept foreign hubs. This gives hub tax, and supply hubs, their own settings in the economy laws.
Economy laws
hub_tax false)supply_hubs false)What changes
hub_taxand new rules "Can Collect Hub Taxes" and "Can Build Supply Hubs", shown in law lore like the existing ones./guild hub build. Hubs it already has are dormant (still costing upkeep and holding their slot), through the same active/dormant decision used by the network, the hub list, the menus and the tax assessment.supply-hubs.max-taxstill caps the rate.Old
laws.ymlA server whose
laws.ymlhas none of the new keys treats both rules as allowed and uses a 0-10% bracket, so nothing breaks. The new lines need adding to that file for Decentralized to be restricted and for the higher brackets.Testing
mvn verify: 2498 tests, 0 failures. New tests cover each law's settings from the bundled file, the old-file defaults, the cap, rates pulled down or zeroed on a law change, a Decentralized guild refused and its hubs dormant, the preview, and tariffs unchanged.🤖 Generated with Claude Code