feat(config): add validated durable Leaf state
This commit is contained in:
@@ -20,3 +20,10 @@
|
||||
- Established the Java 17 Gradle project, strict compilation, JUnit test lifecycle, Leaf plugin metadata, Gradle wrapper, and Gitea CI and semantic-release workflows.
|
||||
- Verified the initial pipeline with `./gradlew clean check jar` and produced `build/libs/leaf-0.1.0-SNAPSHOT.jar`.
|
||||
- US-007 remains in progress until the story-by-story implementation commit requirement has been verified.
|
||||
|
||||
### Configuration and persistence checkpoint
|
||||
|
||||
- Added validated settings with Resistance I and seven-day onboarding defaults.
|
||||
- Added defensive UUID-keyed YAML player state with RFC 3339 timestamps, forward-field preservation, and atomic replacement where supported.
|
||||
- Added safe plugin initialization and periodic dirty-state persistence.
|
||||
- US-006 remains in progress pending live runtime setting commands and Leaf effect ownership behavior.
|
||||
|
||||
@@ -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: backlog
|
||||
status: in-progress
|
||||
---
|
||||
|
||||
# US-006: Configure and persist Leaf
|
||||
@@ -11,16 +11,16 @@ As a **server operator**, I want Leaf settings and player state to be validated
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [ ] Configuration supports the global enabled state, Resistance strength, leaf prefix, onboarding duration, and player-facing messages.
|
||||
- [ ] Resistance strength defaults to level I and accepts only Minecraft Resistance levels I through V.
|
||||
- [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.
|
||||
- [ ] UUID-keyed player state persists the latest known name, saved opt-in choice, administrative lock, and first-join timestamp.
|
||||
- [ ] Date-times use RFC 3339 UTC notation with a `Z` suffix.
|
||||
- [ ] State is saved safely so that a failed write does not replace valid persisted state with a partial document.
|
||||
- [ ] Invalid required configuration prevents partial plugin initialization and produces a clear server log message.
|
||||
- [ ] Corrupt or invalid player records are handled defensively and cannot silently grant protection or privileges.
|
||||
- [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.
|
||||
- [ ] Unknown forward-compatible configuration and player-state fields are preserved where practical.
|
||||
- [x] Unknown forward-compatible configuration and player-state fields are preserved where practical.
|
||||
|
||||
## Related
|
||||
|
||||
|
||||
Reference in New Issue
Block a user