Implement native RLV state and permissions (#79)
Some checks failed
Native code generation / deterministic (push) Failing after 2m1s
Imaging and meshing gate / native (push) Successful in 5m22s
JPEG 2000 feature / linux (push) Successful in 2m45s
Native Rust workspace compile / compile (push) Failing after 6m12s
Skia feature / linux (push) Successful in 30m44s
Some checks failed
Native code generation / deterministic (push) Failing after 2m1s
Imaging and meshing gate / native (push) Successful in 5m22s
JPEG 2000 feature / linux (push) Successful in 2m45s
Native Rust workspace compile / compile (push) Failing after 6m12s
Skia feature / linux (push) Successful in 30m44s
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
# Native RLV protocol layer
|
||||
|
||||
`libremetaverse-rlv` implements the side-effect-free protocol boundary for the
|
||||
`libremetaverse-rlv` implements the protocol and pure state boundary for the
|
||||
Restrained Love Viewer support in the pinned LibreMetaverse snapshot. The
|
||||
parser converts one bounded chat message into typed commands. It does not
|
||||
mutate restrictions, move the camera, touch inventory, send replies, or invoke
|
||||
callbacks; those stateful responsibilities are separate milestone work that
|
||||
consumes this layer.
|
||||
side-effect-free parser converts one bounded chat message into typed commands.
|
||||
Independent, thread-safe managers then store restrictions and evaluate
|
||||
inventory, folder locks, camera limits, blacklists, and permissions without
|
||||
performing network I/O. Command execution, viewer callbacks, replies, and
|
||||
`GridClient` integration remain separate milestone work that consumes this
|
||||
layer.
|
||||
|
||||
## Message contract
|
||||
|
||||
@@ -57,6 +59,33 @@ insertion mutations of actions, restrictions, queries, UUIDs, aliases, and
|
||||
multi-command messages. Every mutation must return a value or a positioned
|
||||
error without panicking. The limits apply before large parser allocations.
|
||||
|
||||
## State, inventory, and permission contract
|
||||
|
||||
`RlvSharedFolder` and `RlvInventoryItem` preserve the reference semantics of
|
||||
their C# counterparts. `InventoryMap` walks a bounded shared-inventory tree and
|
||||
publishes immutable dictionary/list membership snapshots. Path lookup handles
|
||||
hidden/private prefixes, exact names containing forward slashes, and the
|
||||
reference implementation's longest matching segment rule. Lookup by item,
|
||||
attached prim, attachment point, and wearable type does not call a client or
|
||||
inventory service.
|
||||
|
||||
`RlvRestrictionManager` deduplicates exact restrictions, retains deterministic
|
||||
insertion order, removes all state for selected object sources, and rebuilds
|
||||
immutable locked-folder snapshots when either restrictions or inventory
|
||||
changes. Recursive and non-recursive attach/detach locks support sender-item,
|
||||
attachment, wearable, and path targets plus their exception variants. Update
|
||||
handlers run only after manager locks are released, so callbacks can safely
|
||||
query the manager again. Poisoned synchronization primitives recover their
|
||||
owned state instead of making later reads fail.
|
||||
|
||||
`RlvPermissionsService` evaluates simple restrictions, secure and explicit
|
||||
target rules, permissive exception precedence, IM/chat/channel behavior,
|
||||
teleport limits, edit/touch/hover decisions, shared and unshared wear, and
|
||||
folder attachment locks. Camera aggregation applies the reference min/max,
|
||||
clamping, averaging, alias, texture, and lock rules. The case-insensitive
|
||||
blacklist returns a sorted snapshot. These providers are deterministic,
|
||||
thread-safe, and contain no network or callback dependencies.
|
||||
|
||||
## Reproducible verification
|
||||
|
||||
Run the issue-owned checks with one build job:
|
||||
@@ -64,9 +93,11 @@ Run the issue-owned checks with one build job:
|
||||
```sh
|
||||
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-rlv --locked
|
||||
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-compat-tests --test rlv_common_semantics --locked
|
||||
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-compat-tests --test rlv_inventory_map_semantics --locked
|
||||
CARGO_BUILD_JOBS=1 cargo clippy -p libremetaverse-rlv --all-targets --locked -- -D warnings
|
||||
RUSTDOCFLAGS='-D warnings' CARGO_BUILD_JOBS=1 cargo doc -p libremetaverse-rlv --no-deps --locked
|
||||
python3 tools/check_milestone_10_issue_78.py
|
||||
python3 tools/check_milestone_10_issue_79.py
|
||||
```
|
||||
|
||||
These commands are cross-platform. The Gitea workflow runs the audit and
|
||||
|
||||
Reference in New Issue
Block a user