From 1da89c720d6f63bced82e52cedec1e15bfb9c331 Mon Sep 17 00:00:00 2001 From: dingo Date: Wed, 9 Sep 2026 23:07:34 -0400 Subject: [PATCH] Clarify key destruction timing and configurable guest permissions --- docs/LIFECYCLE-OWNERSHIP.md | 62 ++++++++++++++++++++++++++++--------- docs/MILESTONE-8A.md | 27 +++++++++++----- planning/PLAYWRIGHT-TODO.md | 6 +++- planning/SYSTEMS-ROADMAP.md | 55 +++++++++++++++++++------------- planning/VISION.md | 14 ++++++--- 5 files changed, 115 insertions(+), 49 deletions(-) diff --git a/docs/LIFECYCLE-OWNERSHIP.md b/docs/LIFECYCLE-OWNERSHIP.md index 1fc7fa2..ded1c49 100644 --- a/docs/LIFECYCLE-OWNERSHIP.md +++ b/docs/LIFECYCLE-OWNERSHIP.md @@ -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. diff --git a/docs/MILESTONE-8A.md b/docs/MILESTONE-8A.md index 9cd5c42..ef6502d 100644 --- a/docs/MILESTONE-8A.md +++ b/docs/MILESTONE-8A.md @@ -76,17 +76,28 @@ Placement currently needs a pointer. Existing keyboard/controller combat targeti includes structures. Full controller placement and a placement preview are follow-up UI work. Browser automation remains deferred for manual testing. -## Housing decisions pending +## Housing clarification after this checkpoint + +Owners and co-owners set guest permissions using a baseline and per-person +overrides. The six permissions are moving furniture, opening furniture, placing +furniture, putting items in furniture, picking up house items, and dropping house +items. Key holders retain owner rights regardless of guest settings. + +**Destroying a key takes three seconds.** The earlier description of a three-second +house-deletion countdown was incorrect. Until the action completes the key remains +valid; death before completion leaves the undestroyed key in corpse loot. Completed +destruction triggers house deletion only when no valid keys remain. Recoverable +house contents are still retained until the creator's recorded death world ends. + +Remaining housing decisions: - Whether a replacement must survive a world before exercising the creator's recovery right. -- Initial rights for invited co-owners and guests. Key holders remain full owners - and cannot revoke other valid keys. -- Whether access ends immediately at last-key destruction or after the three-second - countdown. Qualifying recovery must reuse the same retained contents. +- Co-owner assignment, invitation/key-issuance rights, and occupant handling when + the house is deleted. Guest action permissions are now specified above. +- Movement, damage, disconnect/restart, and manual cancellation of key destruction. - Recovery without an established destructible death world must retain data; no arbitrary purge deadline will be invented. -The confirmed last-key count, three-second deletion, and recovery-until-death-world- -destruction rules remain unchanged. This checkpoint does not activate those rules -or claim to finish milestone 8. +This checkpoint does not implement housing or key destruction, so this correction +requires no gameplay migration. Milestone 8 remains in progress. diff --git a/planning/PLAYWRIGHT-TODO.md b/planning/PLAYWRIGHT-TODO.md index f9132b1..e2b6d2b 100644 --- a/planning/PLAYWRIGHT-TODO.md +++ b/planning/PLAYWRIGHT-TODO.md @@ -30,7 +30,11 @@ automation. These are future tasks, not completion gates for the current milesto - [ ] Structures and house placement, keys/guest permissions, storage, and recovery UI. - [ ] Milestone 8a: structure editor/kit recipe outputs, placement/cancellation, overlap and protected-area rejection, health/destruction, and roof movement. -- [ ] Last-key three-second deletion and recovery before the death-world deadline. +- [ ] Three-second key destruction: key remains valid during the action, death + before completion leaves it lootable, and only completed last-key destruction + triggers house deletion; recover before the death-world deadline. +- [ ] Owner/co-owner guest baseline and per-person overrides for moving/opening/ + placing furniture, depositing items, and picking up/dropping house items. - [ ] Cosmetics: ordinary drops, house placement, push/pull, and entitled/unentitled pickup. - [ ] Character creation, desktop/mobile layouts, and keyboard focus/accessibility. - [ ] Event start/cancel/status, swarms, announcements, and Harbinger scheduling. diff --git a/planning/SYSTEMS-ROADMAP.md b/planning/SYSTEMS-ROADMAP.md index 36d6b16..b383055 100644 --- a/planning/SYSTEMS-ROADMAP.md +++ b/planning/SYSTEMS-ROADMAP.md @@ -410,14 +410,19 @@ switching hubs cannot duplicate a house or sever its valid keys/invitations. - A house belongs to its key(s), not exclusively to its original creator. A player who loots a key from a corpse gains owner rights to that house. -- Players need a valid key or an invitation to enter. Guest, owner, and co-owner - permissions need a separate matrix; every key holder has owner rights. +- Players need a valid key or an invitation to enter. Every key holder has owner + rights. Owners and co-owners set baseline guest permissions and per-person + overrides for six independent actions: move furniture, open furniture, place + furniture, put items in furniture, pick up items in the house, and drop items + in the house. Moving furniture includes push/pull without entering inventory; + the existing cosmetic rules still apply to each kind of item movement. - Additional keys can be created to share ownership. An owner cannot strip the rights of another owner who holds a valid key. Creating a replacement key must not silently rekey the house or invalidate another holder's key. -- Destroying the **last valid key** marks the house and all its contents for - deletion after **3 seconds**. Destroying one key while others exist does not mark the house for - deletion or remove the remaining key holders' owner rights. +- **Destroying a key takes 3 seconds.** Only completed destruction of the last + valid key marks the house and all its contents for deletion. Destroying one key + while others exist does not mark the house for deletion or remove the remaining + key holders' owner rights. There is no separate three-second house timer. - Players can destroy a carried key before death to deny a potential corpse looter that key and its house ownership. This must be usable while in danger; the action does not destroy keys held by other players or retroactively reclaim a looted key. @@ -427,19 +432,24 @@ switching hubs cannot duplicate a house or sever its valid keys/invitations. world. Preserve that world ID and creator identity as recovery provenance. - Recovery does not by itself remove the rights of a player who looted a key. -Confirmed deletion/recovery lifecycle: after the three-second timer, remove the -house and contents from active use, retaining recoverable data until the original -creator's recorded death world is destroyed. The creator can restore that same +Confirmed timing correction: the three seconds belongs to the carried key's +destruction action. Starting that action does not remove the key or its ownership +rights. On completion, check all remaining valid keys before triggering house +deletion. Remove the house and contents from active use while retaining recoverable +data until the original creator's recorded death world is destroyed. The creator can restore that same house and its retained contents through a replacement key during this period. Only destruction of that death world ends this recovery right and permits permanent purging of the archived house data. No extra recovery period is invented. -Recommended states: active -> pending deletion (3 seconds) -> deleted/recoverable --> permanently purged at the death-world deadline; eligible recovery returns the -same house to active use. Persist the deadline so restarts cannot restart the -three-second countdown. Never leave both an active and recoverable copy of contents. -Specify access/occupant handling during the countdown and deletion, and how creating -a valid key during the countdown cancels it before implementation. +Recommended house states: active -> deleted/recoverable -> permanently purged at +the death-world deadline; eligible recovery returns the same house to active use. +Track an in-progress key-destruction action separately, using authoritative server +time and the exact key instance. Completion must revalidate the living holder and +current possession; death before completion leaves the key for corpse loot. +Serialize completion with looting, key issuance, and recovery. A new valid key +issued before completion prevents last-key house deletion. Never leave both an +active and recoverable copy of contents. Occupant handling upon house deletion, +and movement/damage/disconnect interruption rules, remain to be scoped. Still decide how the recovery right is exercised after permanent death (account/ replacement character), how initial-survival eligibility applies to replacement @@ -447,8 +457,8 @@ characters and looters/guests, multiple deaths/houses, and what happens if death occurs in a non-destructible hub or dungeon instance. Also define which recovery deadline applies when the last key is destroyed before the creator has died. -Additional permission decisions: who may issue keys and invitations; what co-owner -means without a key; guest storage/build access; key theft/drop while inside; guest +Additional permission decisions: who may issue keys and invitations; assignment of +co-owner status without a key; key theft/drop while inside; guest revocation; house occupant eviction; storing a key inside its own house; and the last key being lost to world collapse instead of explicitly destroyed. No owner permission should invalidate another holder's valid key as an indirect workaround. @@ -591,9 +601,10 @@ planning update itself does not start milestone implementation. First discussion, because these affect the architecture: -1. Housing: countdown access/cancellation, original-creator recovery identity, - exceptional death-world cases, eligibility, and the permission matrix? Three-second - deletion with recovery until death-world destruction is settled. +1. Housing: key-action interruption, original-creator recovery identity, exceptional + death-world cases, eligibility, and occupant handling after deletion remain open. + Key destruction takes three seconds. Guest permissions have owner/co-owner-managed + baseline settings and per-person overrides; recovery retention remains settled. 2. Resurrection: playtest milestone 7's provisional consent, costs/pools, and instant activation. Extra limits and corpse handling during dungeon closure/reset remain open. 3. Combat: action aiming model, controller targeting, friendly fire, ranged projectiles? @@ -641,8 +652,10 @@ playtest checklists; browser automation versions are deferred to the TODO list: historical first-title claim reservations cannot be reassigned by replacement. - Looting a house key grants ownership; reviving its previous holder does not take the key back. Additional owners cannot revoke each other's valid keys. -- Destroying one of multiple keys leaves the house active and other keys valid; - destroying the last key deletes the active house after three seconds while +- Starting key destruction preserves the key during its three-second action; + dying before completion leaves it lootable on the corpse. Completing destruction + of one of multiple keys leaves the house active and other keys valid; + completing destruction of the last key deletes the active house while retaining recoverable contents until the creator's death world is destroyed. A key destroyed before death does not appear on the corpse or grant a looter access. - Creator recovery targets the same house and respects the recorded death world's diff --git a/planning/VISION.md b/planning/VISION.md index a33080c..0971701 100644 --- a/planning/VISION.md +++ b/planning/VISION.md @@ -141,15 +141,21 @@ Tracked across: permanent hub. Housing does not disappear when a survival world is destroyed. - A house belongs to its key(s). Taking a key from a corpse grants owner rights; additional keys share ownership. Owners cannot strip other valid key holders. -- Entry requires a key or invitation. Guest/co-owner permissions remain to be scoped. +- Entry requires a key or invitation. Owners and co-owners configure baseline + guest permissions and per-person overrides for: moving furniture, opening + furniture, placing furniture, putting items in furniture, picking up items in + the house, and dropping items in the house. These permissions cannot remove a + valid key holder's owner rights. - Destroying only the last valid house key marks the house and all contents for deletion. Destroying one of several keys preserves the other holders' ownership. Players can destroy a carried key before death to prevent a looter taking it - and gaining house ownership. Deletion takes **3 seconds**; house/content data - remains recoverable until the creator's recorded death world is destroyed. + and gaining house ownership. **Destroying the key takes 3 seconds**; this is the + key-destruction action, not a separate house-deletion countdown. The key remains + valid until destruction completes. House/content data remains recoverable until + the creator's recorded death world is destroyed. - After death, the original creator may make a new key connected to their created house until the world they were in at death is destroyed, including restoring - its retained contents after deletion. Recovery identity and countdown details + its retained contents after deletion. Recovery identity and interruption details remain open; recovery does not revoke other keys. - No experience may be gained in the hub or housing, including profession, weapon, spell, and character XP. Hub daily-time rules are still undecided.