process TODO.md step 9

This commit is contained in:
SepComet
2026-03-28 14:26:40 +08:00
parent 101694a3b0
commit 1b1598dbb7
15 changed files with 396 additions and 13 deletions
@@ -41,4 +41,15 @@ The shared networking core SHALL manage timeout detection, disconnect transition
#### Scenario: Login failure is distinct from transport disconnect
- **WHEN** authentication or login fails while the transport session is still active
- **THEN** the shared lifecycle reports a login-failed state for that managed session
- **THEN** hosts can handle that failure separately from a transport disconnect or heartbeat timeout
- **THEN** hosts can handle that failure separately from a transport disconnect or heartbeat timeout
### Requirement: Sessions retain dual transport wiring
Session lifecycle components SHALL initialize session-scoped networking services with both the primary reliable transport and the optional sync transport supplied by the integration layer.
#### Scenario: Client single-session initialization with dual transports
- **WHEN** the client integration path creates a single session and a sync transport is configured
- **THEN** the session-scoped services SHALL retain both transport references for subsequent message routing
#### Scenario: Server multi-session initialization with fallback transport
- **WHEN** the server integration path creates session-scoped services without a dedicated sync transport
- **THEN** each session SHALL continue to initialize successfully and SHALL use the primary reliable transport as the fallback lane
+12 -1
View File
@@ -59,4 +59,15 @@ The shared networking core SHALL process server-tick or clock-synchronization sa
#### Scenario: Hosts can consume smoothed clock data for prediction
- **WHEN** prediction or reconciliation code needs the current server-time estimate
- **THEN** it reads that estimate from the clock-sync strategy or state object
- **THEN** it does not query `SessionManager` for authoritative clock ownership
- **THEN** it does not query `SessionManager` for authoritative clock ownership
### Requirement: Integration wiring enforces sync lane selection
The networking stack SHALL route sync-designated traffic through the sync transport when the integration layer provides one, and SHALL fall back to the primary reliable transport when it does not.
#### Scenario: Dedicated sync transport available
- **WHEN** sync-designated traffic is sent from a session whose integration wiring includes a sync transport
- **THEN** the traffic SHALL be dispatched on the sync transport instead of the primary reliable transport
#### Scenario: Dedicated sync transport unavailable
- **WHEN** sync-designated traffic is sent from a session whose integration wiring does not include a sync transport
- **THEN** the traffic SHALL be dispatched on the primary reliable transport without failing session operation
@@ -69,4 +69,15 @@ The shared network foundation SHALL include host-agnostic session lifecycle orch
#### Scenario: Server host composes shared foundation with multi-session orchestration
- **WHEN** a non-Unity server host constructs the runtime networking stack for multiple remote peers
- **THEN** it uses the shared transport and message-routing foundation together with shared multi-session lifecycle orchestration
- **THEN** server-specific cleanup, admission, and gameplay reactions stay in the server host adapter rather than forking the shared lifecycle contract
- **THEN** server-specific cleanup, admission, and gameplay reactions stay in the server host adapter rather than forking the shared lifecycle contract
### Requirement: Shared network composition accepts dual transports
The shared networking composition layer SHALL allow construction of network managers and related shared services with a primary reliable transport and an optional sync transport.
#### Scenario: Integration receives both transports
- **WHEN** a host composes the shared networking stack with both a reliable transport and a sync transport
- **THEN** the shared composition path SHALL retain both dependencies for downstream routing and session services
#### Scenario: Integration receives only one transport
- **WHEN** a host composes the shared networking stack with only the reliable transport
- **THEN** the shared composition path SHALL remain valid and SHALL treat the reliable transport as the fallback lane for traffic without a dedicated secondary transport