Repository navigation
Make the faction leader the default holder of special positions - #136
Conversation
The leader now holds any vacant special position by default, whatever the faction's size. The default follows the leadership, while deliberate appointments stay. Dismissing an appointee returns the office to the leader. Aptitude now falls by a configurable share for every office a character holds beyond their first (espionage.aptitude.extra-position-penalty, default 0.25: 100%, 75%, 50%...). This replaces the solo-leader 25% multiplier, whose stale key is removed from existing special-positions.yml. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughSpymaster offices now fall back to the faction leader when vacant. The aptitude setting now applies a penalty for each additional office held. Configuration migration, menu text and tests reflect these changes. ChangesSpymaster offices
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Faction
participant EspionageService
participant Bukkit
participant Leader
participant Character
participant FactionSave
Faction->>EspionageService: report vacant Spymaster office
EspionageService->>Bukkit: check server availability
EspionageService->>Leader: resolve faction leader
Leader->>Character: provide active character
EspionageService->>Faction: assign leader's character
EspionageService->>FactionSave: save changed office state
Merge Risk: ⚪ Minimal · up to The leader fallback and appointment-removal behavior are consistent with the intended change. No identified issue remains that should prevent merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Default leader protection can disappear after a leadership change until another action reinitializes the office, allowing outsiders to see exact faction information in the meantime. Appointment and removal authority remain restricted to the faction leader. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Hardening Proposals
Comment |
Summary
/faction spymaster removewith nobody appointed now says the office already rests with the leader, instead of emptying it.espionage.aptitude.extra-position-penalty(default0.25) for each office they hold beyond their first: 1 office 100%, 2 offices 75%, 3 offices 50%, and never below 0%. Setting it to 0 disables the penalty. It applies to any holder, the leader included, so a leader with a single office keeps full aptitude (the old rule cut a solo leader to 25%).espionage.aptitude.solo-leader-multiplierkey, and its misleading comment, is removed from existingspecial-positions.ymlfiles on load. The new key is added with its comment.Tests
mvn clean verifylocally: 2692 tests, 0 failures.🤖 Generated with Claude Code