feat(roles): maintain inactive and pending roles
Release / release (push) Successful in 2m19s
CI / build (push) Successful in 1m0s

This commit is contained in:
dmg
2026-08-14 22:50:43 -04:00
parent ddd256802b
commit a195658be4
6 changed files with 489 additions and 25 deletions
+11
View File
@@ -6,6 +6,17 @@ description: Chronological record of material decisions affecting the Spigot Tyr
# Spigot Tyrant Design Log
## 2026-08-14 — Role maintenance completed
- Completed US-010 with configurable periodic role maintenance, exact 48-hour inactivity handling, and 24-hour recently-active candidate filtering.
- Added online confirmation for pending roles, 24-hour expiry and reroll, former-holder fallback rules, vacant-role retries, opt-out filtering, and Tyrant/Vigilante conflict prevention.
- Tyrant inactivity uses full reign succession cleanup; Vigilante inactivity clears only that role's Followers before replacement.
- Verified confirmation, expiry reroll, Follower cleanup, exact inactivity boundary, full Tyrant succession, and pause-safe scheduler integration with the Gradle suite.
## 2026-08-14 — Role maintenance implementation started
- US-010 begins with test-first inactivity replacement, pending confirmation and expiry, conflict-safe candidate retries, and pause awareness.
## 2026-08-14 — Tyrant succession completed
- Completed US-002 with player-killer transfer, recent-player environmental succession, former-holder avoidance, pending offline confirmation, and distinct replacement Vigilante selection.
@@ -2,7 +2,7 @@
type: User Story
title: "US-010: Handle inactivity and pending selections"
description: Replace absent or unconfirmed role holders using recently active eligible players.
status: backlog
status: done
---
# US-010: Handle inactivity and pending selections
@@ -11,16 +11,16 @@ As a **participant**, I want inactive central roles to be replaced fairly so tha
## Acceptance criteria
- [ ] A Tyrant or Vigilante who has not logged in for 48 unpaused hours loses the position.
- [ ] Random candidates are drawn from eligible opted-in players who logged in during the preceding 24 hours.
- [ ] The Tyrant is always excluded from Vigilante selection.
- [ ] A previous role holder is excluded when another eligible candidate exists and may be reused only as a fallback.
- [ ] Tyrant inactivity ends the reign, clears all assignments, and invokes normal random Tyrant succession followed by Vigilante selection.
- [ ] Vigilante inactivity clears Followers and rerolls only the Vigilante position.
- [ ] An offline randomly selected candidate must log in within 24 unpaused hours to confirm the assignment.
- [ ] An unconfirmed selection expires and rerolls automatically under the same eligibility rules.
- [ ] Selection remains vacant and retries periodically when no valid candidate exists.
- [ ] Candidate selection cannot assign conflicting roles or choose an opted-out player, including during concurrent joins and deaths.
- [x] A Tyrant or Vigilante who has not logged in for 48 unpaused hours loses the position.
- [x] Random candidates are drawn from eligible opted-in players who logged in during the preceding 24 hours.
- [x] The Tyrant is always excluded from Vigilante selection.
- [x] A previous role holder is excluded when another eligible candidate exists and may be reused only as a fallback.
- [x] Tyrant inactivity ends the reign, clears all assignments, and invokes normal random Tyrant succession followed by Vigilante selection.
- [x] Vigilante inactivity clears Followers and rerolls only the Vigilante position.
- [x] An offline randomly selected candidate must log in within 24 unpaused hours to confirm the assignment.
- [x] An unconfirmed selection expires and rerolls automatically under the same eligibility rules.
- [x] Selection remains vacant and retries periodically when no valid candidate exists.
- [x] Candidate selection cannot assign conflicting roles or choose an opted-out player, including during concurrent joins and deaths.
## Related