gameplay: own client event clears
Browse files- crates/urt-gameplay/src/bin/urt-server-entities.rs +56 -0
- crates/urt-gameplay/src/lib.rs +2 -0
- crates/urt-gameplay/src/server_client_events.rs +67 -0
- crates/urt-gameplay/src/server_entities.rs +21 -0
- docs/FINDINGS.md +2 -0
- docs/PROVISIONAL_TODO.md +2 -0
- docs/RESEARCH_LEDGER.md +4 -0
- docs/research/README.md +2 -0
- docs/research/RUST_SERVER_CLIENT_EVENTS.md +5 -0
- docs/research/rust-server-client-events.json +71 -0
- scripts/analyze_rust_server_client_events.py +26 -0
- scripts/test_rust_server_client_events.py +13 -0
- xtask/checks.tsv +9 -0
crates/urt-gameplay/src/bin/urt-server-entities.rs
CHANGED
|
@@ -12,6 +12,10 @@ fn main() {
|
|
| 12 |
frame(&bsp);
|
| 13 |
return;
|
| 14 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
let bounds = Bounds::new([-16.; 3], [16.; 3]).unwrap();
|
| 16 |
let mut pool = EntityPool {
|
| 17 |
count: 64,
|
|
@@ -126,3 +130,55 @@ fn frame(bsp: &BspVisibility<'_>) {
|
|
| 126 |
r#"{{"before":{before:?},"invalid":{invalid},"after_error":{after_error:?},"dispatch":{dispatch:?},"effects":[{effects}],"after":{after:?},"live":{live:?}}}"#
|
| 127 |
);
|
| 128 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
frame(&bsp);
|
| 13 |
return;
|
| 14 |
}
|
| 15 |
+
if std::env::args().nth(1).as_deref() == Some("client-frame") {
|
| 16 |
+
client_frame(&bsp);
|
| 17 |
+
return;
|
| 18 |
+
}
|
| 19 |
let bounds = Bounds::new([-16.; 3], [16.; 3]).unwrap();
|
| 20 |
let mut pool = EntityPool {
|
| 21 |
count: 64,
|
|
|
|
| 130 |
r#"{{"before":{before:?},"invalid":{invalid},"after_error":{after_error:?},"dispatch":{dispatch:?},"effects":[{effects}],"after":{after:?},"live":{live:?}}}"#
|
| 131 |
);
|
| 132 |
}
|
| 133 |
+
|
| 134 |
+
fn client_frame(bsp: &BspVisibility<'_>) {
|
| 135 |
+
use urt_gameplay::server_client_events::{ClientEventRecord, ServerClientEvents};
|
| 136 |
+
|
| 137 |
+
let bounds = Bounds::new([-16.; 3], [16.; 3]).unwrap();
|
| 138 |
+
let mut pool = EntityPool {
|
| 139 |
+
count: 68,
|
| 140 |
+
slots: vec![EntitySlot { words: [0; 220] }; 1024],
|
| 141 |
+
};
|
| 142 |
+
for (slot, client, event) in [(2, 100, 1), (64, 100, 1), (65, 200, 1), (66, 300, 0)] {
|
| 143 |
+
let record = &mut pool.slots[slot];
|
| 144 |
+
record.words[180 / 4] = event;
|
| 145 |
+
record.words[520 / 4] = client;
|
| 146 |
+
record.words[532 / 4] = 1;
|
| 147 |
+
record.words[536 / 4] = slot as u32;
|
| 148 |
+
record.words[572 / 4] = u32::from(slot >= 64);
|
| 149 |
+
}
|
| 150 |
+
let mut server = ServerEntities::new(bounds, pool).unwrap();
|
| 151 |
+
for slot in [64, 65, 66] {
|
| 152 |
+
server.link(bsp, server.id_at(slot).unwrap(), true).unwrap();
|
| 153 |
+
}
|
| 154 |
+
let tokens = [100, 200, 300];
|
| 155 |
+
let init = tokens.map(|token| ClientEventRecord {
|
| 156 |
+
token,
|
| 157 |
+
word: token + 7,
|
| 158 |
+
});
|
| 159 |
+
let duplicate = ServerClientEvents::new([init[0], init[0]]).is_err();
|
| 160 |
+
let zero = ServerClientEvents::new([ClientEventRecord { token: 0, word: 1 }]).is_err();
|
| 161 |
+
let mut missing = ServerClientEvents::new([init[0], init[2]]).unwrap();
|
| 162 |
+
let invalid = server
|
| 163 |
+
.expire_frame_with_clients(301, &mut missing, |_| None)
|
| 164 |
+
.is_err();
|
| 165 |
+
let before = server.links().spatial().query(bounds, 8).slots;
|
| 166 |
+
let preserved = missing.word(100).unwrap();
|
| 167 |
+
let mut clients = ServerClientEvents::new(init).unwrap();
|
| 168 |
+
let (dispatch, resources) = server
|
| 169 |
+
.expire_frame_with_clients(301, &mut clients, |_| None)
|
| 170 |
+
.unwrap();
|
| 171 |
+
let after = server.links().spatial().query(bounds, 8).slots;
|
| 172 |
+
let words = tokens.map(|token| clients.word(token).unwrap());
|
| 173 |
+
let dispatch = dispatch.iter().map(|id| id.slot()).collect::<Vec<_>>();
|
| 174 |
+
let releases = resources
|
| 175 |
+
.iter()
|
| 176 |
+
.map(|work| match work.request {
|
| 177 |
+
EntityRelease::ReleaseResource(id) => [work.entity.slot() as u32, id],
|
| 178 |
+
_ => panic!("unexpected request"),
|
| 179 |
+
})
|
| 180 |
+
.collect::<Vec<_>>();
|
| 181 |
+
println!(
|
| 182 |
+
r#"{{"duplicate":{duplicate},"zero":{zero},"invalid":{invalid},"before":{before:?},"preserved":{preserved},"after":{after:?},"words":{words:?},"dispatch":{dispatch:?},"releases":{releases:?}}}"#
|
| 183 |
+
);
|
| 184 |
+
}
|
crates/urt-gameplay/src/lib.rs
CHANGED
|
@@ -213,3 +213,5 @@ pub mod world_visibility;
|
|
| 213 |
pub mod entity_links;
|
| 214 |
|
| 215 |
pub mod server_entities;
|
|
|
|
|
|
|
|
|
| 213 |
pub mod entity_links;
|
| 214 |
|
| 215 |
pub mod server_entities;
|
| 216 |
+
|
| 217 |
+
pub mod server_client_events;
|
crates/urt-gameplay/src/server_client_events.rs
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//! Server-owned client event words referenced by entity records.
|
| 2 |
+
use std::collections::BTreeMap;
|
| 3 |
+
|
| 4 |
+
use crate::location_feedback::EntityRelease;
|
| 5 |
+
use crate::native_policy::Error;
|
| 6 |
+
use crate::server_entities::{EntityFrameEffect, EntityId, ServerEntityFrame};
|
| 7 |
+
|
| 8 |
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
| 9 |
+
pub struct ClientEventRecord {
|
| 10 |
+
pub token: u32,
|
| 11 |
+
pub word: u32,
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
| 15 |
+
pub struct ResourceRequest {
|
| 16 |
+
pub entity: EntityId,
|
| 17 |
+
pub request: EntityRelease,
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
#[derive(Clone, Debug)]
|
| 21 |
+
pub struct ServerClientEvents {
|
| 22 |
+
records: BTreeMap<u32, u32>,
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
impl ServerClientEvents {
|
| 26 |
+
pub fn new(events: impl IntoIterator<Item = ClientEventRecord>) -> Result<Self, Error> {
|
| 27 |
+
let mut records = BTreeMap::new();
|
| 28 |
+
for event in events {
|
| 29 |
+
if event.token == 0 || records.insert(event.token, event.word).is_some() {
|
| 30 |
+
return Err(Error::InvalidInput);
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
Ok(Self { records })
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
pub fn word(&self, token: u32) -> Option<u32> {
|
| 37 |
+
self.records.get(&token).copied()
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/// Consume client clears in frame order and retain the ordered external
|
| 41 |
+
/// resource requests. A missing client token rejects the whole operation.
|
| 42 |
+
pub fn apply(&mut self, frame: &ServerEntityFrame) -> Result<Vec<ResourceRequest>, Error> {
|
| 43 |
+
for effect in &frame.effects {
|
| 44 |
+
if let EntityFrameEffect::ClearClientEvent { client, .. } = effect {
|
| 45 |
+
if !self.records.contains_key(client) {
|
| 46 |
+
return Err(Error::InvalidIndex);
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
let mut requests = Vec::new();
|
| 52 |
+
for effect in &frame.effects {
|
| 53 |
+
match *effect {
|
| 54 |
+
EntityFrameEffect::ClearClientEvent { client, .. } => {
|
| 55 |
+
*self
|
| 56 |
+
.records
|
| 57 |
+
.get_mut(&client)
|
| 58 |
+
.expect("validated client token") = 0;
|
| 59 |
+
}
|
| 60 |
+
EntityFrameEffect::Release { entity, request } => {
|
| 61 |
+
requests.push(ResourceRequest { entity, request });
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
Ok(requests)
|
| 66 |
+
}
|
| 67 |
+
}
|
crates/urt-gameplay/src/server_entities.rs
CHANGED
|
@@ -164,6 +164,27 @@ impl ServerEntities {
|
|
| 164 |
Ok(out)
|
| 165 |
}
|
| 166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
fn age_entities(
|
| 168 |
&mut self,
|
| 169 |
tick: u32,
|
|
|
|
| 164 |
Ok(out)
|
| 165 |
}
|
| 166 |
|
| 167 |
+
/// Advance the owned world and apply client event clears as one operation.
|
| 168 |
+
/// Resource releases remain external and retain their frame order.
|
| 169 |
+
pub fn expire_frame_with_clients(
|
| 170 |
+
&mut self,
|
| 171 |
+
tick: u32,
|
| 172 |
+
clients: &mut crate::server_client_events::ServerClientEvents,
|
| 173 |
+
object_child: impl FnMut(u32) -> Option<u32>,
|
| 174 |
+
) -> Result<
|
| 175 |
+
(
|
| 176 |
+
Vec<EntityId>,
|
| 177 |
+
Vec<crate::server_client_events::ResourceRequest>,
|
| 178 |
+
),
|
| 179 |
+
Error,
|
| 180 |
+
> {
|
| 181 |
+
let mut staged = self.clone();
|
| 182 |
+
let frame = staged.age_entities(tick, object_child)?;
|
| 183 |
+
let requests = clients.apply(&frame)?;
|
| 184 |
+
*self = staged;
|
| 185 |
+
Ok((frame.dispatch, requests))
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
fn age_entities(
|
| 189 |
&mut self,
|
| 190 |
tick: u32,
|
docs/FINDINGS.md
CHANGED
|
@@ -2091,3 +2091,5 @@ RE-1034–1043 batch validation passed:2,018 Python tests,339 Rust tests,146 det
|
|
| 2091 |
- Server radio no longer resolves a stale location handle as the slot's replacement occupant. [Server location identities](research/RUST_SERVER_LOCATION_IDENTITY.md).
|
| 2092 |
|
| 2093 |
- Server-owned expiry and callback scheduling reproduce the two seven-frame defuse traces, including spatial membership after each step. [Registered replay](research/RUST_SERVER_DEFUSE_REPLAY.md).
|
|
|
|
|
|
|
|
|
| 2091 |
- Server radio no longer resolves a stale location handle as the slot's replacement occupant. [Server location identities](research/RUST_SERVER_LOCATION_IDENTITY.md).
|
| 2092 |
|
| 2093 |
- Server-owned expiry and callback scheduling reproduce the two seven-frame defuse traces, including spatial membership after each step. [Registered replay](research/RUST_SERVER_DEFUSE_REPLAY.md).
|
| 2094 |
+
|
| 2095 |
+
- Server expiry now clears the owned client event word and rolls back on an unresolved client token. [Server client event ownership](research/RUST_SERVER_CLIENT_EVENTS.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -2153,3 +2153,5 @@ RE-974–983 completed routing, command rewrite, inactivity, movement-parameter
|
|
| 2153 |
- [x] RE-1072 Bind server location records and caches to entity generations ([evidence](research/RUST_SERVER_LOCATION_IDENTITY.md)).
|
| 2154 |
|
| 2155 |
- [x] RE-1073 Replay the original defuse lifecycle through registered server frames ([evidence](research/RUST_SERVER_DEFUSE_REPLAY.md)).
|
|
|
|
|
|
|
|
|
| 2153 |
- [x] RE-1072 Bind server location records and caches to entity generations ([evidence](research/RUST_SERVER_LOCATION_IDENTITY.md)).
|
| 2154 |
|
| 2155 |
- [x] RE-1073 Replay the original defuse lifecycle through registered server frames ([evidence](research/RUST_SERVER_DEFUSE_REPLAY.md)).
|
| 2156 |
+
|
| 2157 |
+
- [x] RE-1074 Apply server expiry clears to owned client event words ([evidence](research/RUST_SERVER_CLIENT_EVENTS.md)).
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -2967,3 +2967,7 @@ Registered defuse dispatch retains valid cached text and discards stale location
|
|
| 2967 |
## 2026-11-25 — RE-1073 Replay the original defuse lifecycle through registered server frames
|
| 2968 |
|
| 2969 |
The owned frame path matches both original scripts across expiry, allocation, spatial membership and the source effect order. See [registered server replay](research/RUST_SERVER_DEFUSE_REPLAY.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2967 |
## 2026-11-25 — RE-1073 Replay the original defuse lifecycle through registered server frames
|
| 2968 |
|
| 2969 |
The owned frame path matches both original scripts across expiry, allocation, spatial membership and the source effect order. See [registered server replay](research/RUST_SERVER_DEFUSE_REPLAY.md).
|
| 2970 |
+
|
| 2971 |
+
## 2026-11-25 — RE-1074 Apply server expiry clears to owned client event words
|
| 2972 |
+
|
| 2973 |
+
Registered expiry now commits entity changes and client event clears together. Missing client tokens preserve both stores, and repeated clears target one shared event word. See [server client event ownership](research/RUST_SERVER_CLIENT_EVENTS.md).
|
docs/research/README.md
CHANGED
|
@@ -1719,3 +1719,5 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 1719 |
- [Generation-aware server locations](RUST_SERVER_LOCATION_IDENTITY.md)
|
| 1720 |
|
| 1721 |
- [Multi-frame defuse in the registered server world](RUST_SERVER_DEFUSE_REPLAY.md)
|
|
|
|
|
|
|
|
|
| 1719 |
- [Generation-aware server locations](RUST_SERVER_LOCATION_IDENTITY.md)
|
| 1720 |
|
| 1721 |
- [Multi-frame defuse in the registered server world](RUST_SERVER_DEFUSE_REPLAY.md)
|
| 1722 |
+
|
| 1723 |
+
- [Client event ownership during server expiry](RUST_SERVER_CLIENT_EVENTS.md)
|
docs/research/RUST_SERVER_CLIENT_EVENTS.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Client event ownership during server expiry
|
| 2 |
+
|
| 3 |
+
The server can apply frame-generated client clears to an owned client event store. The store validates every referenced token before clearing any word. The entity pool advances in the same transaction, so a missing token leaves client words and spatial membership intact. Multiple entities can clear the same client word. Resource releases remain ordered requests.
|
| 4 |
+
|
| 5 |
+
[The controlled frame](rust-server-client-events.json) checks aliased client references, the zero-event branch, a late missing token and source-order resource requests. Client tokens represent the owning record throughout this API. Client connection management still supplies the association.
|
docs/research/rust-server-client-events.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"expected": {
|
| 3 |
+
"after": [],
|
| 4 |
+
"before": [
|
| 5 |
+
66,
|
| 6 |
+
65,
|
| 7 |
+
64
|
| 8 |
+
],
|
| 9 |
+
"dispatch": [
|
| 10 |
+
2
|
| 11 |
+
],
|
| 12 |
+
"duplicate": true,
|
| 13 |
+
"invalid": true,
|
| 14 |
+
"preserved": 107,
|
| 15 |
+
"releases": [
|
| 16 |
+
[
|
| 17 |
+
64,
|
| 18 |
+
64
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
65,
|
| 22 |
+
65
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
66,
|
| 26 |
+
66
|
| 27 |
+
]
|
| 28 |
+
],
|
| 29 |
+
"words": [
|
| 30 |
+
0,
|
| 31 |
+
0,
|
| 32 |
+
307
|
| 33 |
+
],
|
| 34 |
+
"zero": true
|
| 35 |
+
},
|
| 36 |
+
"limits": "Entity-to-client event store composition with aliased client identity and late failure.",
|
| 37 |
+
"rust": {
|
| 38 |
+
"after": [],
|
| 39 |
+
"before": [
|
| 40 |
+
66,
|
| 41 |
+
65,
|
| 42 |
+
64
|
| 43 |
+
],
|
| 44 |
+
"dispatch": [
|
| 45 |
+
2
|
| 46 |
+
],
|
| 47 |
+
"duplicate": true,
|
| 48 |
+
"invalid": true,
|
| 49 |
+
"preserved": 107,
|
| 50 |
+
"releases": [
|
| 51 |
+
[
|
| 52 |
+
64,
|
| 53 |
+
64
|
| 54 |
+
],
|
| 55 |
+
[
|
| 56 |
+
65,
|
| 57 |
+
65
|
| 58 |
+
],
|
| 59 |
+
[
|
| 60 |
+
66,
|
| 61 |
+
66
|
| 62 |
+
]
|
| 63 |
+
],
|
| 64 |
+
"words": [
|
| 65 |
+
0,
|
| 66 |
+
0,
|
| 67 |
+
307
|
| 68 |
+
],
|
| 69 |
+
"zero": true
|
| 70 |
+
}
|
| 71 |
+
}
|
scripts/analyze_rust_server_client_events.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Exercise client event ownership and rollback in a registered server frame."""
|
| 2 |
+
import json
|
| 3 |
+
import os
|
| 4 |
+
import subprocess
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
from analyze_qvm import write_json
|
| 8 |
+
from analyze_rust_world_visibility import fixture
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def main():
|
| 12 |
+
subprocess.run(['cargo', 'build', '--offline', '-p', 'urt-gameplay', '--bin',
|
| 13 |
+
'urt-server-entities'], check=True)
|
| 14 |
+
binary = Path(os.environ.get('CARGO_TARGET_DIR', 'target')) / 'debug' / 'urt-server-entities'
|
| 15 |
+
rust = json.loads(subprocess.run([str(binary), 'client-frame'], check=True, input=fixture(3),
|
| 16 |
+
capture_output=True).stdout)
|
| 17 |
+
expected = dict(duplicate=True, zero=True, invalid=True, before=[66, 65, 64], preserved=107,
|
| 18 |
+
after=[], words=[0, 0, 307], dispatch=[2], releases=[[64, 64], [65, 65], [66, 66]])
|
| 19 |
+
write_json(Path('docs/research/rust-server-client-events.json'), {
|
| 20 |
+
'expected': expected, 'rust': rust,
|
| 21 |
+
'limits': 'Entity-to-client event store composition with aliased client identity and late failure.',
|
| 22 |
+
})
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
if __name__ == '__main__':
|
| 26 |
+
main()
|
scripts/test_rust_server_client_events.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import unittest
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class ServerClientEventTests(unittest.TestCase):
|
| 7 |
+
def test_client_word_ownership(self):
|
| 8 |
+
report = json.loads(Path('docs/research/rust-server-client-events.json').read_text())
|
| 9 |
+
self.assertEqual(report['expected'], report['rust'])
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
if __name__ == '__main__':
|
| 13 |
+
unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -5028,3 +5028,12 @@ group gameplay scripts/analyze_rust_server_defuse_replay.py
|
|
| 5028 |
edge crates/urt-gameplay/src/server_entities.rs scripts/analyze_rust_server_defuse_replay.py
|
| 5029 |
edge crates/urt-gameplay/src/location_feedback.rs scripts/analyze_rust_server_defuse_replay.py
|
| 5030 |
edge crates/urt-gameplay/src/bin/urt-defuse.rs scripts/analyze_rust_server_defuse_replay.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5028 |
edge crates/urt-gameplay/src/server_entities.rs scripts/analyze_rust_server_defuse_replay.py
|
| 5029 |
edge crates/urt-gameplay/src/location_feedback.rs scripts/analyze_rust_server_defuse_replay.py
|
| 5030 |
edge crates/urt-gameplay/src/bin/urt-defuse.rs scripts/analyze_rust_server_defuse_replay.py
|
| 5031 |
+
report scripts/analyze_rust_server_client_events.py docs/research/rust-server-client-events.json
|
| 5032 |
+
edge docs/research/rust-server-client-events.json scripts/test_rust_server_client_events.py
|
| 5033 |
+
group rust-server-client-events scripts/analyze_rust_server_client_events.py
|
| 5034 |
+
group rust-server-client-events scripts/analyze_rust_server_expiry_frame.py
|
| 5035 |
+
group gameplay scripts/analyze_rust_server_client_events.py
|
| 5036 |
+
edge crates/urt-gameplay/src/server_client_events.rs scripts/analyze_rust_server_client_events.py
|
| 5037 |
+
edge crates/urt-gameplay/src/server_entities.rs scripts/analyze_rust_server_client_events.py
|
| 5038 |
+
edge crates/urt-gameplay/src/bin/urt-server-entities.rs scripts/analyze_rust_server_client_events.py
|
| 5039 |
+
edge crates/urt-gameplay/src/server_client_events.rs scripts/analyze_rust_health_impulse.py
|