Skip to content

Inactive members (four weeks offline) give no prestige and give up their offices - #238

Merged
Drefvelin merged 2 commits into
mainfrom
feature/inactive-members
Nov 11, 2026
Merged

Drefvelin merged 2 commits into
mainfrom
feature/inactive-members

Conversation

@Drefvelin

@Drefvelin Drefvelin commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A member marked inactive stays in their guild but counts for nothing until they log in again. The inactivity threshold also moves from 21 to 28 offline days (four weeks), as requested.

No longer counted

  • Prestige, Members line (headcount and playtime): Faction.updatePrestige
  • County limit for new claims (Title.countyLimitReached). Counties already held are still kept on full membership (canBeHeld, countyCheck unchanged).
  • Levy caps (Military, LevySnapshotCalculator)
  • A guild's member share in its stability effect (Guild.getMemberPercentage)
  • Movement strength: supporters, cause pools, foreign backers and the realm total (Movement.getPower)

Offices given up (enforced by the existing per-second government tick or on the next read)

  • Council seats and council candidacy (Council.canBeMember / canRemainMember). An inactive member keeps a council refusal for when they return.
  • Voting (Faction.canVote) and standing for leader (Election.canBeCandidate)
  • Leader succession (Faction.canBecomeLeader)
  • Movement and cause leadership (Cause.canBeLeader, Movement.tick)
  • Appointed Spymaster (EspionageService.validHolder), which falls back to the leader as for any vacancy

Kept: the realm leader stays leader (and keeps a default Spymaster holding), and guild leaders keep their guilds.

On login, the faction's prestige is recalculated so the returning member counts again. isMemberInactive now reads the day count before the online lookup.

Companion: TF-Minecraft/Dowsing#31 (nodes).

Tests

  • New InactiveMembersTest and InactiveSpymasterTest.
  • Full local suite: 9071 tests, only QuarantineCommandsTest.reportsAnUnreadableOrUnwritableQuarantine fails, which fails on this host (running as root) on main as well. Coverage shows only the known environment-only misses.

🤖 Generated with Claude Code

A member marked inactive (21 days offline) stays in their guild but now
counts for nothing until they log in again:

- Prestige: the Members line counts only active members.
- Counts: new county claims, levy caps, a guild's member share in
  stability, and movement strength use active members only. Counties a
  realm already holds are still kept on its full membership.
- Offices: inactive members lose council seats and candidacies, cannot
  vote, stand for leader, succeed the leader, or lead a movement or cause,
  and an appointed Spymaster gives up the post. The realm leader stays
  leader, and guild leaders keep their guilds.

The inactivity check now reads the day count before the online lookup,
so active members cost a map read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 43ec31b5-1c3f-4c65-843b-0352e7d823dd
Commits

Reviewing files that changed from the base of the PR and between 52d3b8a and 09cbffc.

Files selected for processing: 20

  • src/main/java/net/tfminecraft/simplefactions/army/Military.java
  • src/main/java/net/tfminecraft/simplefactions/espionage/EspionageService.java
  • src/main/java/net/tfminecraft/simplefactions/government/Council.java
  • src/main/java/net/tfminecraft/simplefactions/government/election/Election.java
  • src/main/java/net/tfminecraft/simplefactions/government/movement/Movement.java
  • src/main/java/net/tfminecraft/simplefactions/government/movement/cause/Cause.java
  • src/main/java/net/tfminecraft/simplefactions/guild/Guild.java
  • src/main/java/net/tfminecraft/simplefactions/inactivity/InactivityRules.java
  • src/main/java/net/tfminecraft/simplefactions/inactivity/InactivityService.java
  • src/main/java/net/tfminecraft/simplefactions/managers/inventory/TierTitleCreator.java
  • src/main/java/net/tfminecraft/simplefactions/managers/inventory/TierTitleView.java
  • src/main/java/net/tfminecraft/simplefactions/objects/Faction.java
  • src/main/java/net/tfminecraft/simplefactions/tiers/Title.java
  • src/main/java/net/tfminecraft/simplefactions/war/commitment/LevySnapshotCalculator.java
  • src/test/java/net/tfminecraft/simplefactions/espionage/InactiveSpymasterTest.java
  • src/test/java/net/tfminecraft/simplefactions/inactivity/InactiveMembersTest.java
  • src/test/java/net/tfminecraft/simplefactions/inactivity/InactivityCoverageTest.java
  • src/test/java/net/tfminecraft/simplefactions/inactivity/InactivityRulesTest.java
  • src/test/java/net/tfminecraft/simplefactions/managers/inventory/ArmyMenusCoverageTest.java
  • src/test/java/net/tfminecraft/simplefactions/utils/FactionCleanupCoverageTest.java
  • 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

@github-actions github-actions Bot added the size:M 30-99 effective changed lines (tests excluded in mixed PRs). label Nov 11, 2026
The inactivity threshold moves from 21 to 28 offline days, as requested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Drefvelin Drefvelin changed the title Inactive members give no prestige and give up their offices Inactive members (four weeks offline) give no prestige and give up their offices Nov 11, 2026
@github-actions github-actions Bot added size:L 100-499 effective changed lines (tests excluded in mixed PRs). and removed size:M 30-99 effective changed lines (tests excluded in mixed PRs). labels Nov 11, 2026
@Drefvelin
Drefvelin merged commit d36d394 into main Nov 11, 2026
3 checks passed
@Drefvelin
Drefvelin deleted the feature/inactive-members branch November 11, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant