feat(quests): add expiration and held item claims
Release / release (push) Successful in 2m22s
CI / build (push) Successful in 1m6s

This commit is contained in:
dmg
2026-09-05 08:15:16 -04:00
parent 5ca939be6c
commit af6d6d0827
25 changed files with 1006 additions and 28 deletions
+8
View File
@@ -61,3 +61,11 @@ description: Chronological record of material decisions affecting Spigot Quest B
- Cancellation atomically moves exact reward escrow into an issuer claim without directly changing inventory.
- Serialized cancellation against completion and retained active state when persistence fails.
- Verified 58 tests and the plugin JAR with `./gradlew clean check jar`.
## 2026-09-05 — Quest expiration and held-item claims
- Added boundary-safe scheduled expiration that moves exact rewards into durable issuer claims.
- Added claim collection at every board and through `/quests claim`, distinguishing delivered blocks from cancelled or expired reward returns.
- Inventory overflow drops at the claimant's feet with ownership protection, and failed claim acknowledgement rolls inventory and drops back before retry.
- Added persisted online and next-login expiry notifications.
- Verified 73 tests and the plugin JAR with `./gradlew clean check jar`.
@@ -2,7 +2,7 @@
type: User Story
title: "US-007: Expire quests and claim held items"
description: Hold delivered blocks and returned rewards until their owner safely claims them.
status: backlog
status: done
---
# US-007: Expire quests and claim held items
@@ -11,18 +11,18 @@ As a **quest issuer**, I want delivered blocks and returned rewards held at the
## Acceptance criteria
- [ ] An uncompleted quest expires seven days after its creation time.
- [ ] Expiration removes the quest from active listings and converts its exact escrowed reward into a claim for the issuer.
- [ ] Completed-quest claims contain the exact block items delivered by the completing player.
- [ ] Claims from completion, cancellation, and expiration can be collected through any registered board.
- [ ] The board clearly distinguishes delivered blocks from returned rewards.
- [ ] Online issuers receive a real-time message when items become claimable.
- [ ] Offline issuers receive a message on their next login.
- [ ] When player commands are enabled, `/quests claim` collects the same pending claims.
- [ ] Items are inserted into the claimant's inventory where space permits; overflow is dropped safely at their feet with a clear message.
- [ ] A claim is removed only after all of its items have been inserted or dropped successfully.
- [ ] Pending claims and notification state survive logout and server restart without duplication or loss.
- [ ] Automated tests verify expiry boundaries, each claim source, notifications, overflow, failure recovery, and persistence.
- [x] An uncompleted quest expires seven days after its creation time.
- [x] Expiration removes the quest from active listings and converts its exact escrowed reward into a claim for the issuer.
- [x] Completed-quest claims contain the exact block items delivered by the completing player.
- [x] Claims from completion, cancellation, and expiration can be collected through any registered board.
- [x] The board clearly distinguishes delivered blocks from returned rewards.
- [x] Online issuers receive a real-time message when items become claimable.
- [x] Offline issuers receive a message on their next login.
- [x] When player commands are enabled, `/quests claim` collects the same pending claims.
- [x] Items are inserted into the claimant's inventory where space permits; overflow is dropped safely at their feet with a clear message.
- [x] A claim is removed only after all of its items have been inserted or dropped successfully.
- [x] Pending claims and notification state survive logout and server restart without duplication or loss.
- [x] Automated tests verify expiry boundaries, each claim source, notifications, overflow, failure recovery, and persistence.
## Related