Implement native RLV callback service integration (#80)
Some checks failed
Native code generation / deterministic (push) Failing after 8m21s
Imaging and meshing gate / native (push) Failing after 4m52s
Native Rust workspace compile / compile (push) Failing after 7m14s

This commit is contained in:
2026-08-11 01:00:48 +00:00
parent 362fa62059
commit 2f1c15c081
18 changed files with 2687 additions and 624 deletions

View File

@@ -3,11 +3,10 @@
`libremetaverse-rlv` implements the protocol and pure state boundary for the
Restrained Love Viewer support in the pinned LibreMetaverse snapshot. The
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.
Independent, thread-safe managers store restrictions and evaluate inventory,
folder locks, camera limits, blacklists, and permissions without performing
network I/O. The callback-driven service then executes those typed decisions
through explicit host adapters.
## Message contract
@@ -83,8 +82,39 @@ 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.
blacklist returns a sorted snapshot. These providers are deterministic and
thread-safe with no network access. Object-source cleanup snapshots the
affected restrictions and notification listeners, then invokes the injected
action callback after releasing every manager lock.
## Callback and service contract
`RlvService` owns bounded chat and instant-message dispatch, typed action and
get-request routing, restriction lifecycle notifications, and inventory,
attachment, outfit, public-message, sit, and unsit reports. A chat message is
rejected before dispatch when it exceeds the parser's 64 KiB or 128-command
limits. Multi-command processing retains source order and continues after a
well-formed command returns `false`, matching the reference aggregate result.
Blacklist replies, query channels, version strings, restriction messages, and
case-sensitive general notification filters preserve the pinned behavior.
Hosts implement the `IRlvQueryCallbacks` and `IRlvActionCallbacks` `Send + Sync`
traits. Query adapters expose snapshots from the completed inventory and agent
services; action adapters perform attachment, outfit, camera, group, movement,
teleport, chat, and reply operations through those services instead of
reaching into their state. The safe default adapters reproduce the reference
query values and no-op actions while still observing cancellation. Every host
future is awaited only after service and restriction-manager locks have been
released, so recording callbacks may synchronously inspect service state.
The command processor refreshes `InventoryMap` through the query boundary and
publishes the same snapshot to `RlvPermissionsService` before folder or item
decisions. Attachment requests are value objects with a stable cross-platform
hash. Folder walks preserve deterministic order, skip private and hidden
content where required, deduplicate linked items, honor `nostrip`, body-part,
link-exception, and recursive-lock rules, and never manufacture an action for
an invalid target. Cancellation is checked before processing, reports,
inventory refreshes, each multi-command element, and every callback.
## Reproducible verification
@@ -94,11 +124,16 @@ Run the issue-owned checks with one build job:
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 test -p libremetaverse-compat-tests --test rlv_query_basics_semantics --locked
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-compat-tests --test rlv_attach_commands_semantics --locked
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-compat-tests --test rlv_notify_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
python3 tools/check_milestone_10_issue_80.py
```
These commands are cross-platform. The Gitea workflow runs the audit and
workspace compile on `ubuntu-latest`.
The complete issue-owned compatibility slice contains 616 translated RLV
cases across 24 test binaries. These commands are cross-platform. The Gitea
workflow runs the audit and workspace compile on `ubuntu-latest`.