Implement controlled simulator handoff, region crossing, reconnect policy, disconnect propagation, logout, and idempotent cleanup.
Deliverables
Model states explicitly and preserve event/progress/failure ordering.
Cancel dependent capabilities/download/manager tasks in defined order.
Handle partial failures, repeated logout/drop, and current-simulator replacement.
Validation
Region-crossing/reconnect/logout tests pass with fake servers.
Teardown leaves no sockets, tasks, subscriptions, or secret state.
Repeated shutdown is safe and observable errors are retained.
Prerequisite
Wire codegen and the foundational implementation milestones are complete; the fixed API/test gates remain authoritative.
Project constraints
Native Rust networking only; no C# bridge, helper service, subprocess, or fallback.
Keep mapped APIs and translated assertions fixed, use bounded resources, and never log secrets.
Validate offline with deterministic fake servers before live-grid use and update docs/coverage evidence.
## Objective
Implement controlled simulator handoff, region crossing, reconnect policy, disconnect propagation, logout, and idempotent cleanup.
## Deliverables
- Model states explicitly and preserve event/progress/failure ordering.
- Cancel dependent capabilities/download/manager tasks in defined order.
- Handle partial failures, repeated logout/drop, and current-simulator replacement.
## Validation
- Region-crossing/reconnect/logout tests pass with fake servers.
- Teardown leaves no sockets, tasks, subscriptions, or secret state.
- Repeated shutdown is safe and observable errors are retained.
## Prerequisite
Wire codegen and the foundational implementation milestones are complete; the fixed API/test gates remain authoritative.
## Project constraints
- Native Rust networking only; no C# bridge, helper service, subprocess, or fallback.
- Keep mapped APIs and translated assertions fixed, use bounded resources, and never log secrets.
- Validate offline with deterministic fake servers before live-grid use and update docs/coverage evidence.
hugo
added this to the 08 - Networking and client lifecycle milestone 2026-08-08 08:19:17 +00:00
Added an explicit disconnected/connecting/connected/logging-out/shutting-down lifecycle and guarded reconnect policy.
Implemented controlled simulator handoff with real UseCircuitCode and CompleteAgentMovement packets while retaining the previous simulator.
Implemented RequestLogout, Logout, LogoutAsync, BeginLogout, LoggedOut, LogoutRequest encoding, LogoutReply decoding/agent-session validation, inventory result propagation, bounded timeout, and cancellation.
Made teardown ordered and idempotent: login/logout cancellation, non-current then current simulator/CAPS/socket disconnect, worker stop, connection/session/circuit/seed/login-secret cleanup, and single disconnect events.
Retained detached logout errors for diagnostics and ensured repeated shutdown/drop are safe.
Updated generated API delegation/coverage plus README and lifecycle documentation.
Verification completed in isolation:
cargo test -p libremetaverse --test network_manager --locked -j1: 24 passed (run repeatedly with loopback fake simulators)
cargo test -p libremetaverse --lib network_manager --locked -j1: 3 passed
cargo test -p libremetaverse-compat-tests --test core_runtime_shims --locked -j1: 2 passed
libremetaverse and codegen Clippy with -D warnings passed
Rustdoc with -D warnings, rustfmt, git diff check, and release codegen artifact audit passed
Acceptance review confirmed region handoff, post-teardown reconnect, reply/timeout/cancellation event ordering, partial failure cleanup, current-simulator replacement, repeated shutdown, no remaining sockets/tasks, detached error observability, and secret-state clearing. Agent movement/teleport/multi-simulator state owned by milestone 09 was intentionally not absorbed into this issue.
Implemented and pushed in commit 1fd127b.
Production Rust implementation:
- Added an explicit disconnected/connecting/connected/logging-out/shutting-down lifecycle and guarded reconnect policy.
- Implemented controlled simulator handoff with real UseCircuitCode and CompleteAgentMovement packets while retaining the previous simulator.
- Implemented RequestLogout, Logout, LogoutAsync, BeginLogout, LoggedOut, LogoutRequest encoding, LogoutReply decoding/agent-session validation, inventory result propagation, bounded timeout, and cancellation.
- Made teardown ordered and idempotent: login/logout cancellation, non-current then current simulator/CAPS/socket disconnect, worker stop, connection/session/circuit/seed/login-secret cleanup, and single disconnect events.
- Retained detached logout errors for diagnostics and ensured repeated shutdown/drop are safe.
- Updated generated API delegation/coverage plus README and lifecycle documentation.
Verification completed in isolation:
- cargo test -p libremetaverse --test network_manager --locked -j1: 24 passed (run repeatedly with loopback fake simulators)
- cargo test -p libremetaverse --lib network_manager --locked -j1: 3 passed
- cargo test -p libremetaverse-compat-tests --test core_runtime_shims --locked -j1: 2 passed
- generated codec/packet OSD/packet wire/compat wire suites: 65 passed
- API mapping, shim generation, API coverage, and consumer fixture checks passed
- cargo check --workspace --all-targets --locked -j1 passed
- libremetaverse and codegen Clippy with -D warnings passed
- Rustdoc with -D warnings, rustfmt, git diff check, and release codegen artifact audit passed
Acceptance review confirmed region handoff, post-teardown reconnect, reply/timeout/cancellation event ordering, partial failure cleanup, current-simulator replacement, repeated shutdown, no remaining sockets/tasks, detached error observability, and secret-state clearing. Agent movement/teleport/multi-simulator state owned by milestone 09 was intentionally not absorbed into this issue.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Objective
Implement controlled simulator handoff, region crossing, reconnect policy, disconnect propagation, logout, and idempotent cleanup.
Deliverables
Validation
Prerequisite
Wire codegen and the foundational implementation milestones are complete; the fixed API/test gates remain authoritative.
Project constraints
Implemented and pushed in commit
1fd127b.Production Rust implementation:
Verification completed in isolation:
Acceptance review confirmed region handoff, post-teardown reconnect, reply/timeout/cancellation event ordering, partial failure cleanup, current-simulator replacement, repeated shutdown, no remaining sockets/tasks, detached error observability, and secret-state clearing. Agent movement/teleport/multi-simulator state owned by milestone 09 was intentionally not absorbed into this issue.