Clarify key destruction timing and configurable guest permissions

This commit is contained in:
dingo
2026-09-09 23:07:37 -04:00
parent 92c2f3c489
commit 1da89c720d
5 changed files with 115 additions and 49 deletions
+47 -15
View File
@@ -134,19 +134,42 @@ grant a boss kill, survival credit, housing eligibility, or a victory title. Tho
product eligibility decisions remain open. Daily budget follows the character;
neither an escape item nor a hub switch supplies a fresh allowance.
## House keys, three-second deletion, and recovery
## House permissions, three-second key destruction, and recovery
House states: `active -> pending_deletion -> archived_recoverable -> purged`.
Eligible recovery returns pending/archived state to the same active house. `purged`
Proposed house states: `active -> archived_recoverable -> purged`.
Eligible recovery returns archived state to the same active house. `purged`
has no recoverable contents. A record of the purge may remain for audit/history.
Key destruction is a separate three-second action; no house-deletion countdown
starts when that action begins. The key remains valid until completion.
Owners and co-owners configure a baseline for guests and per-person overrides:
| Guest permission | Action controlled |
| --- | --- |
| Move furniture | Reposition furniture, including pushing/pulling without pickup |
| Open furniture | Open furniture such as containers |
| Place furniture | Place furniture in the house |
| Put items in furniture | Deposit items into furniture |
| Pick up items in the house | Pick up house items |
| Drop items in the house | Drop carried items into the house |
Proposed representation: baseline allow/deny values and per-person
inherit/allow/deny overrides for each action. Resolve overrides per permission so
unspecified actions follow the current baseline. Opening furniture does not
implicitly grant deposit or pickup rights. Go must check the applicable permission
on every operation, including after an owner/co-owner changes the settings.
Guest overrides cannot strip owner rights from a holder of a valid key. Invitation
and co-owner assignment policies remain separate from the six guest actions.
| Operation | Required behavior |
| --- | --- |
| Transfer key | Move the unique key item; the holder has owner rights without changing creator provenance |
| Issue extra key | Check issuing permission; create distinct key ID referencing same house; never invalidate other keys |
| Destroy a non-last key | Destroy that item only; remaining holders retain ownership |
| Destroy last valid key | Mark pending and persist `delete_at = committed destruction time + 3 seconds` |
| Timer expires | Remove house/contents from active access; retain the same data for recovery |
| Start destroying a carried key | Record the exact key, actor, and server-authoritative completion time three seconds later; key remains valid |
| Complete destruction | Recheck that the living actor still holds that exact key, then destroy it and count remaining valid keys atomically |
| Completed destruction leaves other keys | Remaining holders retain ownership; house stays active |
| Completed destruction removes last key | Remove house/contents from active access; retain the same data for recovery, with no additional three-second house timer |
| Holder dies before completion | Invalidate that pending action; the undestroyed key remains part of corpse loot |
| Eligible creator recovers | Issue key and reactivate the same retained contents once, before the recorded death world is destroyed |
| Recovery death world destroyed | End recovery right; purge archived data; do not delete an active house held by valid keys |
@@ -156,16 +179,19 @@ rule. Last-key count and destruction serialize with new-key creation and transfe
Destroying one's carried key before death prevents that item appearing in loot;
an already-looted key cannot be remotely destroyed by its previous holder.
The three-second deadline uses persisted authoritative time, not render time or a
restarted timer. Proposed safe recovery transaction: verify creator eligibility,
world lifetime, house revision and state; create the key; clear deletion deadline;
reactivate contents; commit all changes. Concurrent timer/recovery/purge operations
produce one result. Ordinary extra-key issuance versus recovery during the countdown
needs an explicit permission policy; it cannot bypass final purge eligibility.
The three-second action uses authoritative time, never a client-reported elapsed
duration. A changed holder or item location invalidates completion so a pending
action cannot destroy a key after it has been dropped or looted. Movement, incoming
damage, disconnect/restart cancellation, and manual cancellation policies remain
open. A new key issued during the action counts when destruction completes.
Proposed safe recovery transaction: verify creator eligibility, world lifetime,
house revision and state; create the key; reactivate retained contents; commit all
changes. Concurrent completion/recovery/purge operations produce one result and
cannot bypass final purge eligibility.
Archive the final committed contents at deletion, not an earlier backup that would
recreate withdrawn items. During archive no inventory access or placement is allowed.
Count-down occupant handling and eviction destination remain open. Recovery refers
Occupant handling upon house deletion and eviction destination remain open. Recovery refers
to the creator's death world, not the construction world, hub, or thief's world.
If no valid death-world deadline is established, do not invent one or irreversibly
purge data; resolve that product case before enabling the relevant operation.
@@ -298,7 +324,8 @@ PostgreSQL/OIDC; development remains loopback-only. No capacity claim changes.
| Hub daily-time accounting | Hub travel (5) | Preserve usage; zero XP does not mean unlimited daily play |
| Escape cost/activation, housing eligibility after escape, late admission | Hub travel (5) | Item-gated escape; no implicit victory reward |
| Resurrection consent/pools/item use, cap handling, dungeon corpse access | Resurrection (7), dungeons (10) | Corpse required, no replacement, world must exist |
| Guest/co-owner rights and countdown access | Housing (8) | Key holders remain owners; archive blocks access |
| Guest actions | Confirmed | Owners/co-owners manage baseline and per-person permissions for the six listed actions; key holders remain owners |
| Key-action interruption and occupant handling upon deletion | Housing (8) | Three seconds destroys the key; archive blocks house access; no separate house timer |
These gates do not require implementing future menus or making numerical tuning
choices in milestone 1. The foundation review is about identity, state, ownership,
@@ -316,8 +343,13 @@ Manual design checklist:
- Review replacement and revival arriving together: one life wins permanently.
- Review escape -> source destruction -> destination restart: one reserved character,
one item cost, no source-world revival or duplicate import.
- Review last key -> three seconds -> archive -> creator recovery/death-world end:
- Review start key destruction -> three seconds -> completed last-key removal -> archive -> creator recovery/death-world end:
same house/items restored once, or recovery permanently denied after the deadline.
- Review death before key destruction completes: pending action cannot remove the
undestroyed key from corpse loot. Extra-key issuance during the action prevents
house deletion if another valid key remains.
- Review each guest baseline and per-person override, subsequent permission changes,
and the continued owner rights of every valid key holder.
- Review hub crafting and furniture pickup: discovery is separate from XP; appearance
is separate from account cosmetic ownership.