Skip to content

Implement stable entities, ownership, containers, and lifecycle #37

Description

@zoeyrose

Outcome

Provide the authoritative identity and containment model shared by maps, actors, items, multipart objects, persistence, and protocol projection.

Scope and invariants

  • Use non-reused or generational runtime handles plus stable persisted/content identities; define which identity crosses each boundary.
  • Centralize create, attach, move, split, merge, detach, and destroy transactions with ownership and lifecycle events.
  • Represent inventory/container membership without cycles, duplicate ownership, orphaned children, or use-after-destroy.
  • Define multipart identity and teardown so all parts refer to one authority and cannot be independently persisted or rewarded.
  • Bound nesting, fan-out, stack size, transaction size, and cleanup work; make every rejection typed.

Acceptance criteria

  • Property tests generate random lifecycle operations and continuously validate reachability, ownership uniqueness, generation safety, and container acyclicity.
  • Failed multi-object operations roll back completely and publish no success event.
  • Persistence and scene projection consume stable snapshots rather than internal pointers.
  • Fuzzed handles and stale commands cannot affect a new entity that reused storage.
  • Benchmarks cover dense containers, bulk teardown, and multipart entities within explicit budgets.

Dependencies and parallelization

Depends only on architecture #3 and simulation #32. Inventory #49, maps #38, persistence #39, and protocol scene work can build adapters in parallel once identity types freeze.

Independent implementation

New code and tests are MIT-licensed independent work. Preserve public behavior and issue-level design choices, but do not copy or mechanically translate GPL server/Python implementation or tests. Mixed-license content remains external data with its own notices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions