Inventory: implement item/folder models, nodes, store, and cache persistence #61

Closed
opened 2026-08-08 08:20:46 +00:00 by hugo · 1 comment
Owner

Objective

Implement InventoryBase/Item/Folder types, node tree/dictionaries, local store mutation, system folders, sorting, links, and versioned cache persistence.

Deliverables

  • Preserve permissions, asset/inventory types, parent/descendant rules, link resolution, replacement/removal notifications, and library/root semantics.
  • Use atomic bounded persistence with corruption/version handling.
  • Keep local tree operations independent from network transport.

Validation

  • Inventory model/store/cache tests pass using temporary directories.
  • Misclassified-link and hierarchy regression cases pass.
  • No lock is held while invoking observers.

Prerequisite

Networking/client lifecycle and all foundational implementation milestones are complete; mapped APIs and translated tests are fixed.

Project constraints

  • New native Rust behavior only; no bridge or C# fallback.
  • Preserve mapped public APIs and exact translated assertions; use completed transport/data layers rather than duplicating them.
  • Bound resources, avoid locks across await/callbacks, and update docs/coverage with focused and workspace evidence.
## Objective Implement InventoryBase/Item/Folder types, node tree/dictionaries, local store mutation, system folders, sorting, links, and versioned cache persistence. ## Deliverables - Preserve permissions, asset/inventory types, parent/descendant rules, link resolution, replacement/removal notifications, and library/root semantics. - Use atomic bounded persistence with corruption/version handling. - Keep local tree operations independent from network transport. ## Validation - Inventory model/store/cache tests pass using temporary directories. - Misclassified-link and hierarchy regression cases pass. - No lock is held while invoking observers. ## Prerequisite Networking/client lifecycle and all foundational implementation milestones are complete; mapped APIs and translated tests are fixed. ## Project constraints - New native Rust behavior only; no bridge or C# fallback. - Preserve mapped public APIs and exact translated assertions; use completed transport/data layers rather than duplicating them. - Bound resources, avoid locks across await/callbacks, and update docs/coverage with focused and workspace evidence.
hugo added this to the 09 - World vertical slices milestone 2026-08-08 08:20:46 +00:00
hugo added the enhancement label 2026-08-08 08:20:46 +00:00
Author
Owner

Implemented and pushed in eb7be42.

  • Replaced the generated inventory and permissions shims with native Rust models, concrete item subclasses, nodes/dictionaries, transactional hierarchy and link indexes, root/library and system-folder behavior, C# sorting, and lock-free added/updated/removed notifications.
  • Added executor-neutral async cache I/O plus an atomic, versioned, 64 MiB-bounded cache with concrete-type preservation, corruption/version/owner validation, rollback replacement, and all-or-nothing restore.
  • Added C# compatibility handling for permissions, item equality, shadow IDs, misclassified links, hierarchy cycles, UUID-mismatched indexer assignment, and pre-Unix timestamps.
  • Added docs, deterministic native API mappings, and the milestone 09 issue gate.

Verification:

  • cargo clippy -j 1 -p libremetaverse --lib --no-deps -- -D warnings
  • cargo test -j 1 -p libremetaverse inventory::tests -- --nocapture (5 passed)
  • cargo test -j 1 --manifest-path tests/compat/Cargo.toml --test inventory_store_semantics --test misclassified_link_semantics --test wire_shims (25 passed)
  • generate_rust_mapping.py --check, generate_api_shims.py --check, check_api_coverage.py, and check_milestone_09_issue_61.py
  • cargo check -j 1 --manifest-path tests/api-compile/Cargo.toml --locked
  • cargo check --workspace --all-targets --locked -j 1
Implemented and pushed in eb7be42. - Replaced the generated inventory and permissions shims with native Rust models, concrete item subclasses, nodes/dictionaries, transactional hierarchy and link indexes, root/library and system-folder behavior, C# sorting, and lock-free added/updated/removed notifications. - Added executor-neutral async cache I/O plus an atomic, versioned, 64 MiB-bounded cache with concrete-type preservation, corruption/version/owner validation, rollback replacement, and all-or-nothing restore. - Added C# compatibility handling for permissions, item equality, shadow IDs, misclassified links, hierarchy cycles, UUID-mismatched indexer assignment, and pre-Unix timestamps. - Added docs, deterministic native API mappings, and the milestone 09 issue gate. Verification: - cargo clippy -j 1 -p libremetaverse --lib --no-deps -- -D warnings - cargo test -j 1 -p libremetaverse inventory::tests -- --nocapture (5 passed) - cargo test -j 1 --manifest-path tests/compat/Cargo.toml --test inventory_store_semantics --test misclassified_link_semantics --test wire_shims (25 passed) - generate_rust_mapping.py --check, generate_api_shims.py --check, check_api_coverage.py, and check_milestone_09_issue_61.py - cargo check -j 1 --manifest-path tests/api-compile/Cargo.toml --locked - cargo check --workspace --all-targets --locked -j 1
hugo closed this issue 2026-08-10 00:07:14 +00:00
Sign in to join this conversation.