test(config): verify runtime persistence safety

This commit is contained in:
dmg
2026-08-10 18:30:34 -04:00
parent e53548f481
commit ab858df733
5 changed files with 37 additions and 3 deletions
+8
View File
@@ -64,3 +64,11 @@
- Target resolution prefers exact online/current names, retains prior names, accepts UUIDs, and rejects ambiguous reused names.
- Added position-specific administrative autocomplete and mutation/no-change reporting with validation before mutation.
- Verified global effect and prefix suppression/restoration, live strength, targets, locks, command permissions, completion, durable aliases, and the full build with `./gradlew clean check jar`.
### US-006 configuration and persistence completed
- Runtime global and Resistance-level changes are written through Bukkit configuration before becoming active and survive restart.
- Failed runtime setting persistence leaves the active settings unchanged.
- Leaf records only effects it successfully installs, removes them only while the visible fingerprint matches, and preserves distinct Resistance effects; Spigot's identical-effect ownership limitation is documented.
- Durable player state now retains prior names in addition to the required UUID, latest name, choice, lock, and RFC 3339 first-join timestamp.
- Verified settings failure safety, durable aliases, existing defensive YAML behavior, strict compilation, and the full build with `./gradlew clean check jar`.
@@ -2,7 +2,7 @@
type: User Story
title: "US-006: Configure and persist Leaf"
description: Provide validated configuration and durable, defensive storage for Leaf behavior.
status: in-progress
status: done
---
# US-006: Configure and persist Leaf
@@ -13,13 +13,13 @@ As a **server operator**, I want Leaf settings and player state to be validated
- [x] Configuration supports the global enabled state, Resistance strength, leaf prefix, onboarding duration, and player-facing messages.
- [x] Resistance strength defaults to level I and accepts only Minecraft Resistance levels I through V.
- [ ] Runtime changes made through `/leaf enabled` and `/leaf strength` are persisted for subsequent restarts.
- [x] Runtime changes made through `/leaf enabled` and `/leaf strength` are persisted for subsequent restarts.
- [x] UUID-keyed player state persists the latest known name, saved opt-in choice, administrative lock, and first-join timestamp.
- [x] Date-times use RFC 3339 UTC notation with a `Z` suffix.
- [x] State is saved safely so that a failed write does not replace valid persisted state with a partial document.
- [x] Invalid required configuration prevents partial plugin initialization and produces a clear server log message.
- [x] Corrupt or invalid player records are handled defensively and cannot silently grant protection or privileges.
- [ ] Removing Leaf-managed Resistance does not remove a distinct Resistance effect that Leaf does not own when the API provides enough information to distinguish it.
- [x] Removing Leaf-managed Resistance does not remove a distinct Resistance effect that Leaf does not own when the API provides enough information to distinguish it.
- [x] Unknown forward-compatible configuration and player-state fields are preserved where practical.
## Related