nmarshall commited on
Commit
039998a
·
1 Parent(s): 46fc182

gameplay: port linked entity sector index

Browse files
crates/urt-gameplay/src/bin/urt-spatial-index.rs ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ use urt_gameplay::spatial_index::{Bounds, SpatialIndex};
2
+
3
+ fn bounds(words: &[u32]) -> Bounds {
4
+ let values = <[u32; 6]>::try_from(words).unwrap().map(f32::from_bits);
5
+ Bounds::new(
6
+ values[..3].try_into().unwrap(),
7
+ values[3..].try_into().unwrap(),
8
+ )
9
+ .unwrap()
10
+ }
11
+
12
+ fn main() {
13
+ let mut args = std::env::args().skip(1);
14
+ let mode = args.next().unwrap();
15
+ let words = args.map(|arg| arg.parse().unwrap()).collect::<Vec<u32>>();
16
+ let mut index = SpatialIndex::new(bounds(&words[..6]), 1024).unwrap();
17
+ match mode.as_str() {
18
+ "tree" => {
19
+ print!("[");
20
+ for (id, split) in index.splits().enumerate() {
21
+ if id != 0 {
22
+ print!(",");
23
+ }
24
+ if let Some(split) = split {
25
+ print!(
26
+ "[{},{},{:?}]",
27
+ split.axis,
28
+ split.value.to_bits(),
29
+ split.children
30
+ );
31
+ } else {
32
+ print!("null");
33
+ }
34
+ }
35
+ println!("]");
36
+ }
37
+ "placement" => {
38
+ let owners = words[6..]
39
+ .chunks_exact(6)
40
+ .enumerate()
41
+ .map(|(slot, row)| index.link(slot, bounds(row)).unwrap())
42
+ .collect::<Vec<_>>();
43
+ println!("{owners:?}");
44
+ }
45
+ "query" => {
46
+ let query = bounds(&words[6..12]);
47
+ let capacity = words[12] as usize;
48
+ for operation in words[13..].chunks_exact(7) {
49
+ let slot = operation[0] as usize;
50
+ if slot == u32::MAX as usize {
51
+ index.unlink(operation[1] as usize).unwrap();
52
+ } else {
53
+ index.link(slot, bounds(&operation[1..])).unwrap();
54
+ }
55
+ }
56
+ let result = index.query(query, capacity);
57
+ println!(
58
+ r#"{{"slots":{:?},"warnings":{}}}"#,
59
+ result.slots, result.capacity_warnings
60
+ );
61
+ }
62
+ _ => panic!("unknown spatial fixture"),
63
+ }
64
+ }
crates/urt-gameplay/src/lib.rs CHANGED
@@ -203,3 +203,5 @@ pub mod defuse;
203
  pub mod effect_feedback;
204
 
205
  pub mod location_feedback;
 
 
 
203
  pub mod effect_feedback;
204
 
205
  pub mod location_feedback;
206
+
207
+ pub mod spatial_index;
crates/urt-gameplay/src/spatial_index.rs ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //! Finite broad-phase sector ownership for absolute linked entity bounds.
2
+ use crate::native_policy::Error;
3
+
4
+ const SECTOR_DEPTH: usize = 4;
5
+ const MAX_ENTITY_SLOTS: usize = 1024;
6
+
7
+ #[derive(Clone, Copy, Debug, PartialEq)]
8
+ pub struct Bounds {
9
+ min: [f32; 3],
10
+ max: [f32; 3],
11
+ }
12
+
13
+ impl Bounds {
14
+ pub fn new(min: [f32; 3], max: [f32; 3]) -> Result<Self, Error> {
15
+ if min.iter().chain(&max).any(|v| !v.is_finite()) {
16
+ return Err(Error::NonFinite);
17
+ }
18
+ if (0..3).any(|axis| min[axis] > max[axis]) {
19
+ return Err(Error::InvalidInput);
20
+ }
21
+ Ok(Self { min, max })
22
+ }
23
+
24
+ fn overlaps(self, other: Self) -> bool {
25
+ (0..3).all(|axis| self.min[axis] <= other.max[axis] && self.max[axis] >= other.min[axis])
26
+ }
27
+ }
28
+
29
+ #[derive(Clone, Copy, Debug, PartialEq)]
30
+ pub struct Split {
31
+ pub axis: usize,
32
+ pub value: f32,
33
+ pub children: [usize; 2],
34
+ }
35
+
36
+ #[derive(Debug, Default)]
37
+ struct Sector {
38
+ split: Option<Split>,
39
+ members: Vec<usize>,
40
+ }
41
+
42
+ #[derive(Clone, Copy, Debug)]
43
+ struct Link {
44
+ sector: usize,
45
+ bounds: Bounds,
46
+ }
47
+
48
+ #[derive(Debug)]
49
+ pub struct SpatialIndex {
50
+ sectors: Vec<Sector>,
51
+ links: Vec<Option<Link>>,
52
+ }
53
+
54
+ #[derive(Clone, Debug, Default, PartialEq, Eq)]
55
+ pub struct AreaQuery {
56
+ pub slots: Vec<usize>,
57
+ /// A saturated sector stops its local traversal. Its caller can still
58
+ /// visit a sibling and encounter another accepted candidate at capacity.
59
+ pub capacity_warnings: usize,
60
+ }
61
+
62
+ impl SpatialIndex {
63
+ pub fn new(world: Bounds, slots: usize) -> Result<Self, Error> {
64
+ if slots > MAX_ENTITY_SLOTS {
65
+ return Err(Error::InvalidCount);
66
+ }
67
+ let mut index = Self {
68
+ sectors: Vec::with_capacity(31),
69
+ links: vec![None; slots],
70
+ };
71
+ index.build(world, 0)?;
72
+ Ok(index)
73
+ }
74
+
75
+ fn build(&mut self, world: Bounds, depth: usize) -> Result<usize, Error> {
76
+ let sector = self.sectors.len();
77
+ self.sectors.push(Sector::default());
78
+ if depth == SECTOR_DEPTH {
79
+ return Ok(sector);
80
+ }
81
+
82
+ let x = world.max[0] - world.min[0];
83
+ let y = world.max[1] - world.min[1];
84
+ let axis = usize::from(x <= y);
85
+ let value = (world.max[axis] + world.min[axis]) * 0.5;
86
+ if !x.is_finite() || !y.is_finite() || !value.is_finite() {
87
+ return Err(Error::NonFinite);
88
+ }
89
+
90
+ let mut upper = world;
91
+ upper.min[axis] = value;
92
+ let mut lower = world;
93
+ lower.max[axis] = value;
94
+ let children = [self.build(upper, depth + 1)?, self.build(lower, depth + 1)?];
95
+ self.sectors[sector].split = Some(Split {
96
+ axis,
97
+ value,
98
+ children,
99
+ });
100
+ Ok(sector)
101
+ }
102
+
103
+ pub fn splits(&self) -> impl ExactSizeIterator<Item = Option<Split>> + '_ {
104
+ self.sectors.iter().map(|sector| sector.split)
105
+ }
106
+
107
+ /// Link a game slot. Relinking refreshes the bounds and makes the slot the
108
+ /// newest member of the destination sector without duplicating ownership.
109
+ pub fn link(&mut self, slot: usize, bounds: Bounds) -> Result<usize, Error> {
110
+ self.unlink(slot)?;
111
+ let mut sector = 0;
112
+ while let Some(split) = self.sectors[sector].split {
113
+ if bounds.min[split.axis] > split.value {
114
+ sector = split.children[0];
115
+ } else if bounds.max[split.axis] < split.value {
116
+ sector = split.children[1];
117
+ } else {
118
+ break;
119
+ }
120
+ }
121
+ // Append on insert and traverse in reverse to mirror head insertion.
122
+ self.sectors[sector].members.push(slot);
123
+ self.links[slot] = Some(Link { sector, bounds });
124
+ Ok(sector)
125
+ }
126
+
127
+ pub fn unlink(&mut self, slot: usize) -> Result<bool, Error> {
128
+ let link = self.links.get_mut(slot).ok_or(Error::InvalidIndex)?.take();
129
+ if let Some(link) = link {
130
+ self.sectors[link.sector].members.retain(|id| *id != slot);
131
+ }
132
+ Ok(link.is_some())
133
+ }
134
+
135
+ pub fn query(&self, bounds: Bounds, capacity: usize) -> AreaQuery {
136
+ let mut result = AreaQuery {
137
+ slots: Vec::with_capacity(capacity.min(self.links.len())),
138
+ ..AreaQuery::default()
139
+ };
140
+ self.collect(0, bounds, capacity, &mut result);
141
+ result
142
+ }
143
+
144
+ fn collect(&self, sector: usize, bounds: Bounds, capacity: usize, result: &mut AreaQuery) {
145
+ let node = &self.sectors[sector];
146
+ for &slot in node.members.iter().rev() {
147
+ let link = self.links[slot].expect("sector member has a link");
148
+ if link.bounds.overlaps(bounds) {
149
+ if result.slots.len() == capacity {
150
+ result.capacity_warnings += 1;
151
+ return;
152
+ }
153
+ result.slots.push(slot);
154
+ }
155
+ }
156
+
157
+ if let Some(split) = node.split {
158
+ if bounds.max[split.axis] > split.value {
159
+ self.collect(split.children[0], bounds, capacity, result);
160
+ }
161
+ if bounds.min[split.axis] < split.value {
162
+ self.collect(split.children[1], bounds, capacity, result);
163
+ }
164
+ }
165
+ }
166
+ }
docs/FINDINGS.md CHANGED
@@ -2063,3 +2063,5 @@ RE-1034–1043 batch validation passed:2,018 Python tests,339 Rust tests,146 det
2063
  - Allocated defuse completion ranks the changed score before the objective counter increments. [QVM rank feedback](research/QVM_DEFUSE_RANK_FEEDBACK.md).
2064
 
2065
  - Rust defuse score actions refresh rank words before the objective counter update. [Rust rank feedback parity](research/RUST_DEFUSE_RANK_FEEDBACK.md).
 
 
 
2063
  - Allocated defuse completion ranks the changed score before the objective counter increments. [QVM rank feedback](research/QVM_DEFUSE_RANK_FEEDBACK.md).
2064
 
2065
  - Rust defuse score actions refresh rank words before the objective counter update. [Rust rank feedback parity](research/RUST_DEFUSE_RANK_FEEDBACK.md).
2066
+
2067
+ - The Rust sector index preserves candidate order as a function of link history, node placement and traversal. [Spatial index parity](research/RUST_SPATIAL_INDEX.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -2125,3 +2125,5 @@ RE-974–983 completed routing, command rewrite, inactivity, movement-parameter
2125
  - [x] RE-1058 Trace actual ranking and objective counter feedback after allocated defuse ([evidence](research/QVM_DEFUSE_RANK_FEEDBACK.md)).
2126
 
2127
  - [x] RE-1059 Port ranking and counter feedback after allocated defuse ([evidence](research/RUST_DEFUSE_RANK_FEEDBACK.md)).
 
 
 
2125
  - [x] RE-1058 Trace actual ranking and objective counter feedback after allocated defuse ([evidence](research/QVM_DEFUSE_RANK_FEEDBACK.md)).
2126
 
2127
  - [x] RE-1059 Port ranking and counter feedback after allocated defuse ([evidence](research/RUST_DEFUSE_RANK_FEEDBACK.md)).
2128
+
2129
+ - [x] RE-1060 Port world sector construction, linked slot ownership and ordered area queries ([evidence](research/RUST_SPATIAL_INDEX.md)).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2911,3 +2911,7 @@ The source ranks the new score before updating the objective counter. Paused com
2911
  ## 2026-11-25 — RE-1059 Port ranking and counter feedback after allocated defuse
2912
 
2913
  The shared roster now reflects defuse scoring before ranking and publishes the counter update afterward. The Rust plan matches 36 source fixtures with pause and score wrap cases. See [rank feedback parity](research/RUST_DEFUSE_RANK_FEEDBACK.md).
 
 
 
 
 
2911
  ## 2026-11-25 — RE-1059 Port ranking and counter feedback after allocated defuse
2912
 
2913
  The shared roster now reflects defuse scoring before ranking and publishes the counter update afterward. The Rust plan matches 36 source fixtures with pause and score wrap cases. See [rank feedback parity](research/RUST_DEFUSE_RANK_FEEDBACK.md).
2914
+
2915
+ ## 2026-11-25 — RE-1060 Port world sector construction, linked slot ownership and ordered area queries
2916
+
2917
+ The fixed-depth Rust sector index matches six source trees and 128 placement slices. The composed fixtures also check candidate ordering, relink and unlink, and capacity warnings across sibling branches. See [spatial index parity](research/RUST_SPATIAL_INDEX.md).
docs/research/README.md CHANGED
@@ -1691,3 +1691,5 @@ The extension collector adds five focused tests for native tail calls, command-r
1691
  - [Ranking and counters after allocated defuse completion](QVM_DEFUSE_RANK_FEEDBACK.md)
1692
 
1693
  - [Ranking and counters after allocated defuse in Rust](RUST_DEFUSE_RANK_FEEDBACK.md)
 
 
 
1691
  - [Ranking and counters after allocated defuse completion](QVM_DEFUSE_RANK_FEEDBACK.md)
1692
 
1693
  - [Ranking and counters after allocated defuse in Rust](RUST_DEFUSE_RANK_FEEDBACK.md)
1694
+
1695
+ - [Rust linked-entity sector index](RUST_SPATIAL_INDEX.md)
docs/research/RUST_SPATIAL_INDEX.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Rust linked-entity sector index
2
+
3
+ `SpatialIndex` builds the depth-four tree from finite absolute world bounds. It uses the recovered X/Y extent rule, the binary32 midpoint and upper-child-first allocation. Its link operation assigns a slot to the deepest strict matching sector. A box that touches a split remains at its parent. Relink removes the previous membership before adding the slot in the new sector.
4
+
5
+ Area queries scan each local list in newest-first order before visiting the upper and lower children. Inclusive overlap admits touching bounds, while an exact split-plane query skips both children after scanning their parent. A capacity warning stops the current traversal branch. A later sibling can produce another warning. Input capacity bounds output length.
6
+
7
+ The [parity report](rust-spatial-index.json) compares all six recorded Linux trees and 128 recorded placement slices. Eleven composition fixtures check local and child order, exact touching, relink, unlink and capacity behavior. These fixtures supply absolute bounds. The runtime still needs entity generation ownership, map-derived visibility and the bound producer before this index can serve gameplay calls.
docs/research/rust-spatial-index.json ADDED
@@ -0,0 +1,2156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "limits": "Paired Linux native sector construction and strict placement traces. Query history and capacity cases use explicit Rust composition fixtures.",
3
+ "placements": [
4
+ {
5
+ "engine": "linux--Quake3-UrT-Ded.x86_64",
6
+ "rust": [
7
+ 30,
8
+ 30,
9
+ 16,
10
+ 22,
11
+ 22,
12
+ 22,
13
+ 22,
14
+ 22,
15
+ 30,
16
+ 30,
17
+ 16,
18
+ 22,
19
+ 22,
20
+ 22,
21
+ 22,
22
+ 22,
23
+ 24,
24
+ 24,
25
+ 16,
26
+ 17,
27
+ 17,
28
+ 17,
29
+ 17,
30
+ 17,
31
+ 0,
32
+ 0,
33
+ 0,
34
+ 0,
35
+ 0,
36
+ 0,
37
+ 0,
38
+ 0,
39
+ 0,
40
+ 0,
41
+ 0,
42
+ 0,
43
+ 0,
44
+ 0,
45
+ 0,
46
+ 0,
47
+ 0,
48
+ 0,
49
+ 0,
50
+ 0,
51
+ 0,
52
+ 0,
53
+ 0,
54
+ 0,
55
+ 15,
56
+ 15,
57
+ 1,
58
+ 7,
59
+ 7,
60
+ 7,
61
+ 7,
62
+ 7,
63
+ 12,
64
+ 12,
65
+ 1,
66
+ 4,
67
+ 4,
68
+ 4,
69
+ 4,
70
+ 4
71
+ ],
72
+ "source": [
73
+ 30,
74
+ 30,
75
+ 16,
76
+ 22,
77
+ 22,
78
+ 22,
79
+ 22,
80
+ 22,
81
+ 30,
82
+ 30,
83
+ 16,
84
+ 22,
85
+ 22,
86
+ 22,
87
+ 22,
88
+ 22,
89
+ 24,
90
+ 24,
91
+ 16,
92
+ 17,
93
+ 17,
94
+ 17,
95
+ 17,
96
+ 17,
97
+ 0,
98
+ 0,
99
+ 0,
100
+ 0,
101
+ 0,
102
+ 0,
103
+ 0,
104
+ 0,
105
+ 0,
106
+ 0,
107
+ 0,
108
+ 0,
109
+ 0,
110
+ 0,
111
+ 0,
112
+ 0,
113
+ 0,
114
+ 0,
115
+ 0,
116
+ 0,
117
+ 0,
118
+ 0,
119
+ 0,
120
+ 0,
121
+ 15,
122
+ 15,
123
+ 1,
124
+ 7,
125
+ 7,
126
+ 7,
127
+ 7,
128
+ 7,
129
+ 12,
130
+ 12,
131
+ 1,
132
+ 4,
133
+ 4,
134
+ 4,
135
+ 4,
136
+ 4
137
+ ]
138
+ },
139
+ {
140
+ "engine": "linux--Quake3-UrT.x86_64",
141
+ "rust": [
142
+ 30,
143
+ 30,
144
+ 16,
145
+ 22,
146
+ 22,
147
+ 22,
148
+ 22,
149
+ 22,
150
+ 30,
151
+ 30,
152
+ 16,
153
+ 22,
154
+ 22,
155
+ 22,
156
+ 22,
157
+ 22,
158
+ 24,
159
+ 24,
160
+ 16,
161
+ 17,
162
+ 17,
163
+ 17,
164
+ 17,
165
+ 17,
166
+ 0,
167
+ 0,
168
+ 0,
169
+ 0,
170
+ 0,
171
+ 0,
172
+ 0,
173
+ 0,
174
+ 0,
175
+ 0,
176
+ 0,
177
+ 0,
178
+ 0,
179
+ 0,
180
+ 0,
181
+ 0,
182
+ 0,
183
+ 0,
184
+ 0,
185
+ 0,
186
+ 0,
187
+ 0,
188
+ 0,
189
+ 0,
190
+ 15,
191
+ 15,
192
+ 1,
193
+ 7,
194
+ 7,
195
+ 7,
196
+ 7,
197
+ 7,
198
+ 12,
199
+ 12,
200
+ 1,
201
+ 4,
202
+ 4,
203
+ 4,
204
+ 4,
205
+ 4
206
+ ],
207
+ "source": [
208
+ 30,
209
+ 30,
210
+ 16,
211
+ 22,
212
+ 22,
213
+ 22,
214
+ 22,
215
+ 22,
216
+ 30,
217
+ 30,
218
+ 16,
219
+ 22,
220
+ 22,
221
+ 22,
222
+ 22,
223
+ 22,
224
+ 24,
225
+ 24,
226
+ 16,
227
+ 17,
228
+ 17,
229
+ 17,
230
+ 17,
231
+ 17,
232
+ 0,
233
+ 0,
234
+ 0,
235
+ 0,
236
+ 0,
237
+ 0,
238
+ 0,
239
+ 0,
240
+ 0,
241
+ 0,
242
+ 0,
243
+ 0,
244
+ 0,
245
+ 0,
246
+ 0,
247
+ 0,
248
+ 0,
249
+ 0,
250
+ 0,
251
+ 0,
252
+ 0,
253
+ 0,
254
+ 0,
255
+ 0,
256
+ 15,
257
+ 15,
258
+ 1,
259
+ 7,
260
+ 7,
261
+ 7,
262
+ 7,
263
+ 7,
264
+ 12,
265
+ 12,
266
+ 1,
267
+ 4,
268
+ 4,
269
+ 4,
270
+ 4,
271
+ 4
272
+ ]
273
+ }
274
+ ],
275
+ "queries": [
276
+ {
277
+ "case": "capacity-0",
278
+ "expected": {
279
+ "slots": [],
280
+ "warnings": 1
281
+ },
282
+ "rust": {
283
+ "slots": [],
284
+ "warnings": 1
285
+ }
286
+ },
287
+ {
288
+ "case": "capacity-1",
289
+ "expected": {
290
+ "slots": [
291
+ 3
292
+ ],
293
+ "warnings": 1
294
+ },
295
+ "rust": {
296
+ "slots": [
297
+ 3
298
+ ],
299
+ "warnings": 1
300
+ }
301
+ },
302
+ {
303
+ "case": "capacity-2",
304
+ "expected": {
305
+ "slots": [
306
+ 3,
307
+ 0
308
+ ],
309
+ "warnings": 2
310
+ },
311
+ "rust": {
312
+ "slots": [
313
+ 3,
314
+ 0
315
+ ],
316
+ "warnings": 2
317
+ }
318
+ },
319
+ {
320
+ "case": "capacity-3",
321
+ "expected": {
322
+ "slots": [
323
+ 3,
324
+ 0,
325
+ 4
326
+ ],
327
+ "warnings": 2
328
+ },
329
+ "rust": {
330
+ "slots": [
331
+ 3,
332
+ 0,
333
+ 4
334
+ ],
335
+ "warnings": 2
336
+ }
337
+ },
338
+ {
339
+ "case": "capacity-4",
340
+ "expected": {
341
+ "slots": [
342
+ 3,
343
+ 0,
344
+ 4,
345
+ 1
346
+ ],
347
+ "warnings": 1
348
+ },
349
+ "rust": {
350
+ "slots": [
351
+ 3,
352
+ 0,
353
+ 4,
354
+ 1
355
+ ],
356
+ "warnings": 1
357
+ }
358
+ },
359
+ {
360
+ "case": "capacity-5",
361
+ "expected": {
362
+ "slots": [
363
+ 3,
364
+ 0,
365
+ 4,
366
+ 1,
367
+ 2
368
+ ],
369
+ "warnings": 0
370
+ },
371
+ "rust": {
372
+ "slots": [
373
+ 3,
374
+ 0,
375
+ 4,
376
+ 1,
377
+ 2
378
+ ],
379
+ "warnings": 0
380
+ }
381
+ },
382
+ {
383
+ "case": "touching-plane",
384
+ "expected": {
385
+ "slots": [
386
+ 3,
387
+ 0
388
+ ],
389
+ "warnings": 0
390
+ },
391
+ "rust": {
392
+ "slots": [
393
+ 3,
394
+ 0
395
+ ],
396
+ "warnings": 0
397
+ }
398
+ },
399
+ {
400
+ "case": "same-sector-relink",
401
+ "expected": {
402
+ "slots": [
403
+ 0,
404
+ 3,
405
+ 4,
406
+ 1,
407
+ 2
408
+ ],
409
+ "warnings": 0
410
+ },
411
+ "rust": {
412
+ "slots": [
413
+ 0,
414
+ 3,
415
+ 4,
416
+ 1,
417
+ 2
418
+ ],
419
+ "warnings": 0
420
+ }
421
+ },
422
+ {
423
+ "case": "move-between-sectors",
424
+ "expected": {
425
+ "slots": [
426
+ 3,
427
+ 0,
428
+ 4,
429
+ 1,
430
+ 2
431
+ ],
432
+ "warnings": 0
433
+ },
434
+ "rust": {
435
+ "slots": [
436
+ 3,
437
+ 0,
438
+ 4,
439
+ 1,
440
+ 2
441
+ ],
442
+ "warnings": 0
443
+ }
444
+ },
445
+ {
446
+ "case": "double-unlink",
447
+ "expected": {
448
+ "slots": [
449
+ 0,
450
+ 4,
451
+ 1,
452
+ 2
453
+ ],
454
+ "warnings": 0
455
+ },
456
+ "rust": {
457
+ "slots": [
458
+ 0,
459
+ 4,
460
+ 1,
461
+ 2
462
+ ],
463
+ "warnings": 0
464
+ }
465
+ },
466
+ {
467
+ "case": "no-candidates",
468
+ "expected": {
469
+ "slots": [],
470
+ "warnings": 0
471
+ },
472
+ "rust": {
473
+ "slots": [],
474
+ "warnings": 0
475
+ }
476
+ }
477
+ ],
478
+ "source_report": "docs/research/world-links.json",
479
+ "source_report_sha256": "a477fd9acc4b79c0dfe95bc0f899a8fd86b437a9c05c29367dd9014c6dc5bb1c",
480
+ "trees": [
481
+ {
482
+ "engine": "linux--Quake3-UrT-Ded.x86_64",
483
+ "rust": [
484
+ [
485
+ 0,
486
+ 1090519040,
487
+ [
488
+ 1,
489
+ 16
490
+ ]
491
+ ],
492
+ [
493
+ 1,
494
+ 1082130432,
495
+ [
496
+ 2,
497
+ 9
498
+ ]
499
+ ],
500
+ [
501
+ 0,
502
+ 1094713344,
503
+ [
504
+ 3,
505
+ 6
506
+ ]
507
+ ],
508
+ [
509
+ 1,
510
+ 1086324736,
511
+ [
512
+ 4,
513
+ 5
514
+ ]
515
+ ],
516
+ null,
517
+ null,
518
+ [
519
+ 1,
520
+ 1086324736,
521
+ [
522
+ 7,
523
+ 8
524
+ ]
525
+ ],
526
+ null,
527
+ null,
528
+ [
529
+ 0,
530
+ 1094713344,
531
+ [
532
+ 10,
533
+ 13
534
+ ]
535
+ ],
536
+ [
537
+ 1,
538
+ 1073741824,
539
+ [
540
+ 11,
541
+ 12
542
+ ]
543
+ ],
544
+ null,
545
+ null,
546
+ [
547
+ 1,
548
+ 1073741824,
549
+ [
550
+ 14,
551
+ 15
552
+ ]
553
+ ],
554
+ null,
555
+ null,
556
+ [
557
+ 1,
558
+ 1082130432,
559
+ [
560
+ 17,
561
+ 24
562
+ ]
563
+ ],
564
+ [
565
+ 0,
566
+ 1082130432,
567
+ [
568
+ 18,
569
+ 21
570
+ ]
571
+ ],
572
+ [
573
+ 1,
574
+ 1086324736,
575
+ [
576
+ 19,
577
+ 20
578
+ ]
579
+ ],
580
+ null,
581
+ null,
582
+ [
583
+ 1,
584
+ 1086324736,
585
+ [
586
+ 22,
587
+ 23
588
+ ]
589
+ ],
590
+ null,
591
+ null,
592
+ [
593
+ 0,
594
+ 1082130432,
595
+ [
596
+ 25,
597
+ 28
598
+ ]
599
+ ],
600
+ [
601
+ 1,
602
+ 1073741824,
603
+ [
604
+ 26,
605
+ 27
606
+ ]
607
+ ],
608
+ null,
609
+ null,
610
+ [
611
+ 1,
612
+ 1073741824,
613
+ [
614
+ 29,
615
+ 30
616
+ ]
617
+ ],
618
+ null,
619
+ null
620
+ ],
621
+ "source": [
622
+ [
623
+ 0,
624
+ 1090519040,
625
+ [
626
+ 1,
627
+ 16
628
+ ]
629
+ ],
630
+ [
631
+ 1,
632
+ 1082130432,
633
+ [
634
+ 2,
635
+ 9
636
+ ]
637
+ ],
638
+ [
639
+ 0,
640
+ 1094713344,
641
+ [
642
+ 3,
643
+ 6
644
+ ]
645
+ ],
646
+ [
647
+ 1,
648
+ 1086324736,
649
+ [
650
+ 4,
651
+ 5
652
+ ]
653
+ ],
654
+ null,
655
+ null,
656
+ [
657
+ 1,
658
+ 1086324736,
659
+ [
660
+ 7,
661
+ 8
662
+ ]
663
+ ],
664
+ null,
665
+ null,
666
+ [
667
+ 0,
668
+ 1094713344,
669
+ [
670
+ 10,
671
+ 13
672
+ ]
673
+ ],
674
+ [
675
+ 1,
676
+ 1073741824,
677
+ [
678
+ 11,
679
+ 12
680
+ ]
681
+ ],
682
+ null,
683
+ null,
684
+ [
685
+ 1,
686
+ 1073741824,
687
+ [
688
+ 14,
689
+ 15
690
+ ]
691
+ ],
692
+ null,
693
+ null,
694
+ [
695
+ 1,
696
+ 1082130432,
697
+ [
698
+ 17,
699
+ 24
700
+ ]
701
+ ],
702
+ [
703
+ 0,
704
+ 1082130432,
705
+ [
706
+ 18,
707
+ 21
708
+ ]
709
+ ],
710
+ [
711
+ 1,
712
+ 1086324736,
713
+ [
714
+ 19,
715
+ 20
716
+ ]
717
+ ],
718
+ null,
719
+ null,
720
+ [
721
+ 1,
722
+ 1086324736,
723
+ [
724
+ 22,
725
+ 23
726
+ ]
727
+ ],
728
+ null,
729
+ null,
730
+ [
731
+ 0,
732
+ 1082130432,
733
+ [
734
+ 25,
735
+ 28
736
+ ]
737
+ ],
738
+ [
739
+ 1,
740
+ 1073741824,
741
+ [
742
+ 26,
743
+ 27
744
+ ]
745
+ ],
746
+ null,
747
+ null,
748
+ [
749
+ 1,
750
+ 1073741824,
751
+ [
752
+ 29,
753
+ 30
754
+ ]
755
+ ],
756
+ null,
757
+ null
758
+ ]
759
+ },
760
+ {
761
+ "engine": "linux--Quake3-UrT-Ded.x86_64",
762
+ "rust": [
763
+ [
764
+ 1,
765
+ 0,
766
+ [
767
+ 1,
768
+ 16
769
+ ]
770
+ ],
771
+ [
772
+ 0,
773
+ 0,
774
+ [
775
+ 2,
776
+ 9
777
+ ]
778
+ ],
779
+ [
780
+ 1,
781
+ 1082130432,
782
+ [
783
+ 3,
784
+ 6
785
+ ]
786
+ ],
787
+ [
788
+ 0,
789
+ 1082130432,
790
+ [
791
+ 4,
792
+ 5
793
+ ]
794
+ ],
795
+ null,
796
+ null,
797
+ [
798
+ 0,
799
+ 1082130432,
800
+ [
801
+ 7,
802
+ 8
803
+ ]
804
+ ],
805
+ null,
806
+ null,
807
+ [
808
+ 1,
809
+ 1082130432,
810
+ [
811
+ 10,
812
+ 13
813
+ ]
814
+ ],
815
+ [
816
+ 0,
817
+ 3229614080,
818
+ [
819
+ 11,
820
+ 12
821
+ ]
822
+ ],
823
+ null,
824
+ null,
825
+ [
826
+ 0,
827
+ 3229614080,
828
+ [
829
+ 14,
830
+ 15
831
+ ]
832
+ ],
833
+ null,
834
+ null,
835
+ [
836
+ 0,
837
+ 0,
838
+ [
839
+ 17,
840
+ 24
841
+ ]
842
+ ],
843
+ [
844
+ 1,
845
+ 3229614080,
846
+ [
847
+ 18,
848
+ 21
849
+ ]
850
+ ],
851
+ [
852
+ 0,
853
+ 1082130432,
854
+ [
855
+ 19,
856
+ 20
857
+ ]
858
+ ],
859
+ null,
860
+ null,
861
+ [
862
+ 0,
863
+ 1082130432,
864
+ [
865
+ 22,
866
+ 23
867
+ ]
868
+ ],
869
+ null,
870
+ null,
871
+ [
872
+ 1,
873
+ 3229614080,
874
+ [
875
+ 25,
876
+ 28
877
+ ]
878
+ ],
879
+ [
880
+ 0,
881
+ 3229614080,
882
+ [
883
+ 26,
884
+ 27
885
+ ]
886
+ ],
887
+ null,
888
+ null,
889
+ [
890
+ 0,
891
+ 3229614080,
892
+ [
893
+ 29,
894
+ 30
895
+ ]
896
+ ],
897
+ null,
898
+ null
899
+ ],
900
+ "source": [
901
+ [
902
+ 1,
903
+ 0,
904
+ [
905
+ 1,
906
+ 16
907
+ ]
908
+ ],
909
+ [
910
+ 0,
911
+ 0,
912
+ [
913
+ 2,
914
+ 9
915
+ ]
916
+ ],
917
+ [
918
+ 1,
919
+ 1082130432,
920
+ [
921
+ 3,
922
+ 6
923
+ ]
924
+ ],
925
+ [
926
+ 0,
927
+ 1082130432,
928
+ [
929
+ 4,
930
+ 5
931
+ ]
932
+ ],
933
+ null,
934
+ null,
935
+ [
936
+ 0,
937
+ 1082130432,
938
+ [
939
+ 7,
940
+ 8
941
+ ]
942
+ ],
943
+ null,
944
+ null,
945
+ [
946
+ 1,
947
+ 1082130432,
948
+ [
949
+ 10,
950
+ 13
951
+ ]
952
+ ],
953
+ [
954
+ 0,
955
+ 3229614080,
956
+ [
957
+ 11,
958
+ 12
959
+ ]
960
+ ],
961
+ null,
962
+ null,
963
+ [
964
+ 0,
965
+ 3229614080,
966
+ [
967
+ 14,
968
+ 15
969
+ ]
970
+ ],
971
+ null,
972
+ null,
973
+ [
974
+ 0,
975
+ 0,
976
+ [
977
+ 17,
978
+ 24
979
+ ]
980
+ ],
981
+ [
982
+ 1,
983
+ 3229614080,
984
+ [
985
+ 18,
986
+ 21
987
+ ]
988
+ ],
989
+ [
990
+ 0,
991
+ 1082130432,
992
+ [
993
+ 19,
994
+ 20
995
+ ]
996
+ ],
997
+ null,
998
+ null,
999
+ [
1000
+ 0,
1001
+ 1082130432,
1002
+ [
1003
+ 22,
1004
+ 23
1005
+ ]
1006
+ ],
1007
+ null,
1008
+ null,
1009
+ [
1010
+ 1,
1011
+ 3229614080,
1012
+ [
1013
+ 25,
1014
+ 28
1015
+ ]
1016
+ ],
1017
+ [
1018
+ 0,
1019
+ 3229614080,
1020
+ [
1021
+ 26,
1022
+ 27
1023
+ ]
1024
+ ],
1025
+ null,
1026
+ null,
1027
+ [
1028
+ 0,
1029
+ 3229614080,
1030
+ [
1031
+ 29,
1032
+ 30
1033
+ ]
1034
+ ],
1035
+ null,
1036
+ null
1037
+ ]
1038
+ },
1039
+ {
1040
+ "engine": "linux--Quake3-UrT-Ded.x86_64",
1041
+ "rust": [
1042
+ [
1043
+ 1,
1044
+ 0,
1045
+ [
1046
+ 1,
1047
+ 16
1048
+ ]
1049
+ ],
1050
+ [
1051
+ 1,
1052
+ 0,
1053
+ [
1054
+ 2,
1055
+ 9
1056
+ ]
1057
+ ],
1058
+ [
1059
+ 1,
1060
+ 0,
1061
+ [
1062
+ 3,
1063
+ 6
1064
+ ]
1065
+ ],
1066
+ [
1067
+ 1,
1068
+ 0,
1069
+ [
1070
+ 4,
1071
+ 5
1072
+ ]
1073
+ ],
1074
+ null,
1075
+ null,
1076
+ [
1077
+ 1,
1078
+ 0,
1079
+ [
1080
+ 7,
1081
+ 8
1082
+ ]
1083
+ ],
1084
+ null,
1085
+ null,
1086
+ [
1087
+ 1,
1088
+ 0,
1089
+ [
1090
+ 10,
1091
+ 13
1092
+ ]
1093
+ ],
1094
+ [
1095
+ 1,
1096
+ 0,
1097
+ [
1098
+ 11,
1099
+ 12
1100
+ ]
1101
+ ],
1102
+ null,
1103
+ null,
1104
+ [
1105
+ 1,
1106
+ 0,
1107
+ [
1108
+ 14,
1109
+ 15
1110
+ ]
1111
+ ],
1112
+ null,
1113
+ null,
1114
+ [
1115
+ 1,
1116
+ 0,
1117
+ [
1118
+ 17,
1119
+ 24
1120
+ ]
1121
+ ],
1122
+ [
1123
+ 1,
1124
+ 0,
1125
+ [
1126
+ 18,
1127
+ 21
1128
+ ]
1129
+ ],
1130
+ [
1131
+ 1,
1132
+ 0,
1133
+ [
1134
+ 19,
1135
+ 20
1136
+ ]
1137
+ ],
1138
+ null,
1139
+ null,
1140
+ [
1141
+ 1,
1142
+ 0,
1143
+ [
1144
+ 22,
1145
+ 23
1146
+ ]
1147
+ ],
1148
+ null,
1149
+ null,
1150
+ [
1151
+ 1,
1152
+ 0,
1153
+ [
1154
+ 25,
1155
+ 28
1156
+ ]
1157
+ ],
1158
+ [
1159
+ 1,
1160
+ 0,
1161
+ [
1162
+ 26,
1163
+ 27
1164
+ ]
1165
+ ],
1166
+ null,
1167
+ null,
1168
+ [
1169
+ 1,
1170
+ 0,
1171
+ [
1172
+ 29,
1173
+ 30
1174
+ ]
1175
+ ],
1176
+ null,
1177
+ null
1178
+ ],
1179
+ "source": [
1180
+ [
1181
+ 1,
1182
+ 0,
1183
+ [
1184
+ 1,
1185
+ 16
1186
+ ]
1187
+ ],
1188
+ [
1189
+ 1,
1190
+ 0,
1191
+ [
1192
+ 2,
1193
+ 9
1194
+ ]
1195
+ ],
1196
+ [
1197
+ 1,
1198
+ 0,
1199
+ [
1200
+ 3,
1201
+ 6
1202
+ ]
1203
+ ],
1204
+ [
1205
+ 1,
1206
+ 0,
1207
+ [
1208
+ 4,
1209
+ 5
1210
+ ]
1211
+ ],
1212
+ null,
1213
+ null,
1214
+ [
1215
+ 1,
1216
+ 0,
1217
+ [
1218
+ 7,
1219
+ 8
1220
+ ]
1221
+ ],
1222
+ null,
1223
+ null,
1224
+ [
1225
+ 1,
1226
+ 0,
1227
+ [
1228
+ 10,
1229
+ 13
1230
+ ]
1231
+ ],
1232
+ [
1233
+ 1,
1234
+ 0,
1235
+ [
1236
+ 11,
1237
+ 12
1238
+ ]
1239
+ ],
1240
+ null,
1241
+ null,
1242
+ [
1243
+ 1,
1244
+ 0,
1245
+ [
1246
+ 14,
1247
+ 15
1248
+ ]
1249
+ ],
1250
+ null,
1251
+ null,
1252
+ [
1253
+ 1,
1254
+ 0,
1255
+ [
1256
+ 17,
1257
+ 24
1258
+ ]
1259
+ ],
1260
+ [
1261
+ 1,
1262
+ 0,
1263
+ [
1264
+ 18,
1265
+ 21
1266
+ ]
1267
+ ],
1268
+ [
1269
+ 1,
1270
+ 0,
1271
+ [
1272
+ 19,
1273
+ 20
1274
+ ]
1275
+ ],
1276
+ null,
1277
+ null,
1278
+ [
1279
+ 1,
1280
+ 0,
1281
+ [
1282
+ 22,
1283
+ 23
1284
+ ]
1285
+ ],
1286
+ null,
1287
+ null,
1288
+ [
1289
+ 1,
1290
+ 0,
1291
+ [
1292
+ 25,
1293
+ 28
1294
+ ]
1295
+ ],
1296
+ [
1297
+ 1,
1298
+ 0,
1299
+ [
1300
+ 26,
1301
+ 27
1302
+ ]
1303
+ ],
1304
+ null,
1305
+ null,
1306
+ [
1307
+ 1,
1308
+ 0,
1309
+ [
1310
+ 29,
1311
+ 30
1312
+ ]
1313
+ ],
1314
+ null,
1315
+ null
1316
+ ]
1317
+ },
1318
+ {
1319
+ "engine": "linux--Quake3-UrT.x86_64",
1320
+ "rust": [
1321
+ [
1322
+ 0,
1323
+ 1090519040,
1324
+ [
1325
+ 1,
1326
+ 16
1327
+ ]
1328
+ ],
1329
+ [
1330
+ 1,
1331
+ 1082130432,
1332
+ [
1333
+ 2,
1334
+ 9
1335
+ ]
1336
+ ],
1337
+ [
1338
+ 0,
1339
+ 1094713344,
1340
+ [
1341
+ 3,
1342
+ 6
1343
+ ]
1344
+ ],
1345
+ [
1346
+ 1,
1347
+ 1086324736,
1348
+ [
1349
+ 4,
1350
+ 5
1351
+ ]
1352
+ ],
1353
+ null,
1354
+ null,
1355
+ [
1356
+ 1,
1357
+ 1086324736,
1358
+ [
1359
+ 7,
1360
+ 8
1361
+ ]
1362
+ ],
1363
+ null,
1364
+ null,
1365
+ [
1366
+ 0,
1367
+ 1094713344,
1368
+ [
1369
+ 10,
1370
+ 13
1371
+ ]
1372
+ ],
1373
+ [
1374
+ 1,
1375
+ 1073741824,
1376
+ [
1377
+ 11,
1378
+ 12
1379
+ ]
1380
+ ],
1381
+ null,
1382
+ null,
1383
+ [
1384
+ 1,
1385
+ 1073741824,
1386
+ [
1387
+ 14,
1388
+ 15
1389
+ ]
1390
+ ],
1391
+ null,
1392
+ null,
1393
+ [
1394
+ 1,
1395
+ 1082130432,
1396
+ [
1397
+ 17,
1398
+ 24
1399
+ ]
1400
+ ],
1401
+ [
1402
+ 0,
1403
+ 1082130432,
1404
+ [
1405
+ 18,
1406
+ 21
1407
+ ]
1408
+ ],
1409
+ [
1410
+ 1,
1411
+ 1086324736,
1412
+ [
1413
+ 19,
1414
+ 20
1415
+ ]
1416
+ ],
1417
+ null,
1418
+ null,
1419
+ [
1420
+ 1,
1421
+ 1086324736,
1422
+ [
1423
+ 22,
1424
+ 23
1425
+ ]
1426
+ ],
1427
+ null,
1428
+ null,
1429
+ [
1430
+ 0,
1431
+ 1082130432,
1432
+ [
1433
+ 25,
1434
+ 28
1435
+ ]
1436
+ ],
1437
+ [
1438
+ 1,
1439
+ 1073741824,
1440
+ [
1441
+ 26,
1442
+ 27
1443
+ ]
1444
+ ],
1445
+ null,
1446
+ null,
1447
+ [
1448
+ 1,
1449
+ 1073741824,
1450
+ [
1451
+ 29,
1452
+ 30
1453
+ ]
1454
+ ],
1455
+ null,
1456
+ null
1457
+ ],
1458
+ "source": [
1459
+ [
1460
+ 0,
1461
+ 1090519040,
1462
+ [
1463
+ 1,
1464
+ 16
1465
+ ]
1466
+ ],
1467
+ [
1468
+ 1,
1469
+ 1082130432,
1470
+ [
1471
+ 2,
1472
+ 9
1473
+ ]
1474
+ ],
1475
+ [
1476
+ 0,
1477
+ 1094713344,
1478
+ [
1479
+ 3,
1480
+ 6
1481
+ ]
1482
+ ],
1483
+ [
1484
+ 1,
1485
+ 1086324736,
1486
+ [
1487
+ 4,
1488
+ 5
1489
+ ]
1490
+ ],
1491
+ null,
1492
+ null,
1493
+ [
1494
+ 1,
1495
+ 1086324736,
1496
+ [
1497
+ 7,
1498
+ 8
1499
+ ]
1500
+ ],
1501
+ null,
1502
+ null,
1503
+ [
1504
+ 0,
1505
+ 1094713344,
1506
+ [
1507
+ 10,
1508
+ 13
1509
+ ]
1510
+ ],
1511
+ [
1512
+ 1,
1513
+ 1073741824,
1514
+ [
1515
+ 11,
1516
+ 12
1517
+ ]
1518
+ ],
1519
+ null,
1520
+ null,
1521
+ [
1522
+ 1,
1523
+ 1073741824,
1524
+ [
1525
+ 14,
1526
+ 15
1527
+ ]
1528
+ ],
1529
+ null,
1530
+ null,
1531
+ [
1532
+ 1,
1533
+ 1082130432,
1534
+ [
1535
+ 17,
1536
+ 24
1537
+ ]
1538
+ ],
1539
+ [
1540
+ 0,
1541
+ 1082130432,
1542
+ [
1543
+ 18,
1544
+ 21
1545
+ ]
1546
+ ],
1547
+ [
1548
+ 1,
1549
+ 1086324736,
1550
+ [
1551
+ 19,
1552
+ 20
1553
+ ]
1554
+ ],
1555
+ null,
1556
+ null,
1557
+ [
1558
+ 1,
1559
+ 1086324736,
1560
+ [
1561
+ 22,
1562
+ 23
1563
+ ]
1564
+ ],
1565
+ null,
1566
+ null,
1567
+ [
1568
+ 0,
1569
+ 1082130432,
1570
+ [
1571
+ 25,
1572
+ 28
1573
+ ]
1574
+ ],
1575
+ [
1576
+ 1,
1577
+ 1073741824,
1578
+ [
1579
+ 26,
1580
+ 27
1581
+ ]
1582
+ ],
1583
+ null,
1584
+ null,
1585
+ [
1586
+ 1,
1587
+ 1073741824,
1588
+ [
1589
+ 29,
1590
+ 30
1591
+ ]
1592
+ ],
1593
+ null,
1594
+ null
1595
+ ]
1596
+ },
1597
+ {
1598
+ "engine": "linux--Quake3-UrT.x86_64",
1599
+ "rust": [
1600
+ [
1601
+ 1,
1602
+ 0,
1603
+ [
1604
+ 1,
1605
+ 16
1606
+ ]
1607
+ ],
1608
+ [
1609
+ 0,
1610
+ 0,
1611
+ [
1612
+ 2,
1613
+ 9
1614
+ ]
1615
+ ],
1616
+ [
1617
+ 1,
1618
+ 1082130432,
1619
+ [
1620
+ 3,
1621
+ 6
1622
+ ]
1623
+ ],
1624
+ [
1625
+ 0,
1626
+ 1082130432,
1627
+ [
1628
+ 4,
1629
+ 5
1630
+ ]
1631
+ ],
1632
+ null,
1633
+ null,
1634
+ [
1635
+ 0,
1636
+ 1082130432,
1637
+ [
1638
+ 7,
1639
+ 8
1640
+ ]
1641
+ ],
1642
+ null,
1643
+ null,
1644
+ [
1645
+ 1,
1646
+ 1082130432,
1647
+ [
1648
+ 10,
1649
+ 13
1650
+ ]
1651
+ ],
1652
+ [
1653
+ 0,
1654
+ 3229614080,
1655
+ [
1656
+ 11,
1657
+ 12
1658
+ ]
1659
+ ],
1660
+ null,
1661
+ null,
1662
+ [
1663
+ 0,
1664
+ 3229614080,
1665
+ [
1666
+ 14,
1667
+ 15
1668
+ ]
1669
+ ],
1670
+ null,
1671
+ null,
1672
+ [
1673
+ 0,
1674
+ 0,
1675
+ [
1676
+ 17,
1677
+ 24
1678
+ ]
1679
+ ],
1680
+ [
1681
+ 1,
1682
+ 3229614080,
1683
+ [
1684
+ 18,
1685
+ 21
1686
+ ]
1687
+ ],
1688
+ [
1689
+ 0,
1690
+ 1082130432,
1691
+ [
1692
+ 19,
1693
+ 20
1694
+ ]
1695
+ ],
1696
+ null,
1697
+ null,
1698
+ [
1699
+ 0,
1700
+ 1082130432,
1701
+ [
1702
+ 22,
1703
+ 23
1704
+ ]
1705
+ ],
1706
+ null,
1707
+ null,
1708
+ [
1709
+ 1,
1710
+ 3229614080,
1711
+ [
1712
+ 25,
1713
+ 28
1714
+ ]
1715
+ ],
1716
+ [
1717
+ 0,
1718
+ 3229614080,
1719
+ [
1720
+ 26,
1721
+ 27
1722
+ ]
1723
+ ],
1724
+ null,
1725
+ null,
1726
+ [
1727
+ 0,
1728
+ 3229614080,
1729
+ [
1730
+ 29,
1731
+ 30
1732
+ ]
1733
+ ],
1734
+ null,
1735
+ null
1736
+ ],
1737
+ "source": [
1738
+ [
1739
+ 1,
1740
+ 0,
1741
+ [
1742
+ 1,
1743
+ 16
1744
+ ]
1745
+ ],
1746
+ [
1747
+ 0,
1748
+ 0,
1749
+ [
1750
+ 2,
1751
+ 9
1752
+ ]
1753
+ ],
1754
+ [
1755
+ 1,
1756
+ 1082130432,
1757
+ [
1758
+ 3,
1759
+ 6
1760
+ ]
1761
+ ],
1762
+ [
1763
+ 0,
1764
+ 1082130432,
1765
+ [
1766
+ 4,
1767
+ 5
1768
+ ]
1769
+ ],
1770
+ null,
1771
+ null,
1772
+ [
1773
+ 0,
1774
+ 1082130432,
1775
+ [
1776
+ 7,
1777
+ 8
1778
+ ]
1779
+ ],
1780
+ null,
1781
+ null,
1782
+ [
1783
+ 1,
1784
+ 1082130432,
1785
+ [
1786
+ 10,
1787
+ 13
1788
+ ]
1789
+ ],
1790
+ [
1791
+ 0,
1792
+ 3229614080,
1793
+ [
1794
+ 11,
1795
+ 12
1796
+ ]
1797
+ ],
1798
+ null,
1799
+ null,
1800
+ [
1801
+ 0,
1802
+ 3229614080,
1803
+ [
1804
+ 14,
1805
+ 15
1806
+ ]
1807
+ ],
1808
+ null,
1809
+ null,
1810
+ [
1811
+ 0,
1812
+ 0,
1813
+ [
1814
+ 17,
1815
+ 24
1816
+ ]
1817
+ ],
1818
+ [
1819
+ 1,
1820
+ 3229614080,
1821
+ [
1822
+ 18,
1823
+ 21
1824
+ ]
1825
+ ],
1826
+ [
1827
+ 0,
1828
+ 1082130432,
1829
+ [
1830
+ 19,
1831
+ 20
1832
+ ]
1833
+ ],
1834
+ null,
1835
+ null,
1836
+ [
1837
+ 0,
1838
+ 1082130432,
1839
+ [
1840
+ 22,
1841
+ 23
1842
+ ]
1843
+ ],
1844
+ null,
1845
+ null,
1846
+ [
1847
+ 1,
1848
+ 3229614080,
1849
+ [
1850
+ 25,
1851
+ 28
1852
+ ]
1853
+ ],
1854
+ [
1855
+ 0,
1856
+ 3229614080,
1857
+ [
1858
+ 26,
1859
+ 27
1860
+ ]
1861
+ ],
1862
+ null,
1863
+ null,
1864
+ [
1865
+ 0,
1866
+ 3229614080,
1867
+ [
1868
+ 29,
1869
+ 30
1870
+ ]
1871
+ ],
1872
+ null,
1873
+ null
1874
+ ]
1875
+ },
1876
+ {
1877
+ "engine": "linux--Quake3-UrT.x86_64",
1878
+ "rust": [
1879
+ [
1880
+ 1,
1881
+ 0,
1882
+ [
1883
+ 1,
1884
+ 16
1885
+ ]
1886
+ ],
1887
+ [
1888
+ 1,
1889
+ 0,
1890
+ [
1891
+ 2,
1892
+ 9
1893
+ ]
1894
+ ],
1895
+ [
1896
+ 1,
1897
+ 0,
1898
+ [
1899
+ 3,
1900
+ 6
1901
+ ]
1902
+ ],
1903
+ [
1904
+ 1,
1905
+ 0,
1906
+ [
1907
+ 4,
1908
+ 5
1909
+ ]
1910
+ ],
1911
+ null,
1912
+ null,
1913
+ [
1914
+ 1,
1915
+ 0,
1916
+ [
1917
+ 7,
1918
+ 8
1919
+ ]
1920
+ ],
1921
+ null,
1922
+ null,
1923
+ [
1924
+ 1,
1925
+ 0,
1926
+ [
1927
+ 10,
1928
+ 13
1929
+ ]
1930
+ ],
1931
+ [
1932
+ 1,
1933
+ 0,
1934
+ [
1935
+ 11,
1936
+ 12
1937
+ ]
1938
+ ],
1939
+ null,
1940
+ null,
1941
+ [
1942
+ 1,
1943
+ 0,
1944
+ [
1945
+ 14,
1946
+ 15
1947
+ ]
1948
+ ],
1949
+ null,
1950
+ null,
1951
+ [
1952
+ 1,
1953
+ 0,
1954
+ [
1955
+ 17,
1956
+ 24
1957
+ ]
1958
+ ],
1959
+ [
1960
+ 1,
1961
+ 0,
1962
+ [
1963
+ 18,
1964
+ 21
1965
+ ]
1966
+ ],
1967
+ [
1968
+ 1,
1969
+ 0,
1970
+ [
1971
+ 19,
1972
+ 20
1973
+ ]
1974
+ ],
1975
+ null,
1976
+ null,
1977
+ [
1978
+ 1,
1979
+ 0,
1980
+ [
1981
+ 22,
1982
+ 23
1983
+ ]
1984
+ ],
1985
+ null,
1986
+ null,
1987
+ [
1988
+ 1,
1989
+ 0,
1990
+ [
1991
+ 25,
1992
+ 28
1993
+ ]
1994
+ ],
1995
+ [
1996
+ 1,
1997
+ 0,
1998
+ [
1999
+ 26,
2000
+ 27
2001
+ ]
2002
+ ],
2003
+ null,
2004
+ null,
2005
+ [
2006
+ 1,
2007
+ 0,
2008
+ [
2009
+ 29,
2010
+ 30
2011
+ ]
2012
+ ],
2013
+ null,
2014
+ null
2015
+ ],
2016
+ "source": [
2017
+ [
2018
+ 1,
2019
+ 0,
2020
+ [
2021
+ 1,
2022
+ 16
2023
+ ]
2024
+ ],
2025
+ [
2026
+ 1,
2027
+ 0,
2028
+ [
2029
+ 2,
2030
+ 9
2031
+ ]
2032
+ ],
2033
+ [
2034
+ 1,
2035
+ 0,
2036
+ [
2037
+ 3,
2038
+ 6
2039
+ ]
2040
+ ],
2041
+ [
2042
+ 1,
2043
+ 0,
2044
+ [
2045
+ 4,
2046
+ 5
2047
+ ]
2048
+ ],
2049
+ null,
2050
+ null,
2051
+ [
2052
+ 1,
2053
+ 0,
2054
+ [
2055
+ 7,
2056
+ 8
2057
+ ]
2058
+ ],
2059
+ null,
2060
+ null,
2061
+ [
2062
+ 1,
2063
+ 0,
2064
+ [
2065
+ 10,
2066
+ 13
2067
+ ]
2068
+ ],
2069
+ [
2070
+ 1,
2071
+ 0,
2072
+ [
2073
+ 11,
2074
+ 12
2075
+ ]
2076
+ ],
2077
+ null,
2078
+ null,
2079
+ [
2080
+ 1,
2081
+ 0,
2082
+ [
2083
+ 14,
2084
+ 15
2085
+ ]
2086
+ ],
2087
+ null,
2088
+ null,
2089
+ [
2090
+ 1,
2091
+ 0,
2092
+ [
2093
+ 17,
2094
+ 24
2095
+ ]
2096
+ ],
2097
+ [
2098
+ 1,
2099
+ 0,
2100
+ [
2101
+ 18,
2102
+ 21
2103
+ ]
2104
+ ],
2105
+ [
2106
+ 1,
2107
+ 0,
2108
+ [
2109
+ 19,
2110
+ 20
2111
+ ]
2112
+ ],
2113
+ null,
2114
+ null,
2115
+ [
2116
+ 1,
2117
+ 0,
2118
+ [
2119
+ 22,
2120
+ 23
2121
+ ]
2122
+ ],
2123
+ null,
2124
+ null,
2125
+ [
2126
+ 1,
2127
+ 0,
2128
+ [
2129
+ 25,
2130
+ 28
2131
+ ]
2132
+ ],
2133
+ [
2134
+ 1,
2135
+ 0,
2136
+ [
2137
+ 26,
2138
+ 27
2139
+ ]
2140
+ ],
2141
+ null,
2142
+ null,
2143
+ [
2144
+ 1,
2145
+ 0,
2146
+ [
2147
+ 29,
2148
+ 30
2149
+ ]
2150
+ ],
2151
+ null,
2152
+ null
2153
+ ]
2154
+ }
2155
+ ]
2156
+ }
scripts/analyze_rust_spatial_index.py ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Compare the Rust sector topology and placement with shipped engine traces."""
2
+ import hashlib
3
+ import json
4
+ import os
5
+ import subprocess
6
+ from pathlib import Path
7
+
8
+ from analyze_chat_crosshair import bits
9
+ from analyze_qvm import write_json
10
+ from rust_lifecycle_support import result
11
+
12
+
13
+ def box(lo, hi):
14
+ return [bits(value) for value in [*lo, *hi]]
15
+
16
+
17
+ def query_fixtures():
18
+ def placed(slot, left, right):
19
+ return [slot, *box([left, -4, -1], [right, 4, 1])]
20
+
21
+ wide = box([-8, -4, -1], [8, 4, 1])
22
+ split = box([0, -4, -1], [0, 4, 1])
23
+ history = [placed(0, -1, 1), placed(1, 1, 2), placed(2, -2, -1),
24
+ placed(3, 0, 0), placed(4, 2, 3)]
25
+ for limit, slots, warnings in [(0, [], 1), (1, [3], 1), (2, [3, 0], 2),
26
+ (3, [3, 0, 4], 2), (4, [3, 0, 4, 1], 1),
27
+ (5, [3, 0, 4, 1, 2], 0)]:
28
+ yield f'capacity-{limit}', wide, wide, limit, history, slots, warnings
29
+ yield 'touching-plane', wide, split, 1024, history, [3, 0], 0
30
+ yield 'same-sector-relink', wide, wide, 1024, [*history, placed(0, 0, 0)], [0, 3, 4, 1, 2], 0
31
+ yield 'move-between-sectors', wide, wide, 1024, [*history, placed(1, -2, -1)], [3, 0, 4, 1, 2], 0
32
+ unlink = [0xffffffff, 3, 0, 0, 0, 0, 0]
33
+ yield 'double-unlink', wide, wide, 1024, [*history, unlink, unlink], [0, 4, 1, 2], 0
34
+ yield 'no-candidates', wide, box([0, 0, 8], [0, 0, 8]), 0, history, [], 0
35
+
36
+
37
+ def main():
38
+ subprocess.run(['cargo', 'build', '--offline', '-p', 'urt-gameplay', '--bin',
39
+ 'urt-spatial-index'], check=True)
40
+ binary = Path(os.environ.get('CARGO_TARGET_DIR', 'target')) / 'debug' / 'urt-spatial-index'
41
+ path = Path('docs/research/world-links.json')
42
+ data = path.read_bytes()
43
+ trees = []
44
+ placements = []
45
+ for name, native in json.loads(data)['native'].items():
46
+ for project in native['constructed_compositions']:
47
+ nodes = project['nodes']
48
+ root = project['root']
49
+ words = box(nodes[0]['input_min'], nodes[0]['input_max'])
50
+ expected = [[n['axis_bits'], bits(n['split']) & 0xffffffff, [(c - root) // 32 for c in n['children']]]
51
+ if n['axis_bits'] != 0xffffffff else None for n in nodes]
52
+ trees.append(dict(engine=name, source=expected, rust=result(binary, 'tree', words)))
53
+ root = native['constructor_sites']['root']
54
+ source_placements = native['link_traces']
55
+ first = native['constructed_compositions'][0]['nodes'][0]
56
+ words = box(first['input_min'], first['input_max'])
57
+ for row in source_placements:
58
+ words += box(row['min'], row['max'])
59
+ expected = [(row['owner_node'] - root) // 32 for row in source_placements]
60
+ placements.append(dict(engine=name, source=expected, rust=result(binary, 'placement', words)))
61
+ queries = []
62
+ for label, world, query, capacity, history, slots, warnings in query_fixtures():
63
+ words = world + query + [capacity] + [w for op in history for w in op]
64
+ queries.append(dict(case=label, expected=dict(slots=slots, warnings=warnings),
65
+ rust=result(binary, 'query', words)))
66
+ write_json(Path('docs/research/rust-spatial-index.json'), {
67
+ 'source_report': str(path), 'source_report_sha256': hashlib.sha256(data).hexdigest(),
68
+ 'trees': trees, 'placements': placements, 'queries': queries,
69
+ 'limits': 'Paired Linux native sector construction and strict placement traces. Query history and capacity cases use explicit Rust composition fixtures.',
70
+ })
71
+
72
+
73
+ if __name__ == '__main__':
74
+ main()
scripts/test_rust_spatial_index.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import hashlib
2
+ import json
3
+ import unittest
4
+ from pathlib import Path
5
+
6
+
7
+ class SpatialIndexTests(unittest.TestCase):
8
+ @classmethod
9
+ def setUpClass(cls):
10
+ cls.report = json.loads(Path('docs/research/rust-spatial-index.json').read_text())
11
+
12
+ def test_native_construction_and_placement(self):
13
+ report = self.report
14
+ digest = hashlib.sha256(Path(report['source_report']).read_bytes()).hexdigest()
15
+ self.assertEqual(report['source_report_sha256'], digest)
16
+ self.assertEqual(len(report['trees']), 6)
17
+ self.assertEqual(sum(len(p['source']) for p in report['placements']), 128)
18
+ for row in report['trees'] + report['placements']:
19
+ with self.subTest(engine=row['engine']):
20
+ self.assertEqual(row['rust'], row['source'])
21
+
22
+ def test_composed_queries(self):
23
+ self.assertEqual(len(self.report['queries']), 11)
24
+ for row in self.report['queries']:
25
+ with self.subTest(case=row['case']):
26
+ self.assertEqual(row['rust'], row['expected'])
27
+
28
+
29
+ if __name__ == '__main__':
30
+ unittest.main()
xtask/checks.tsv CHANGED
@@ -4879,3 +4879,13 @@ edge crates/urt-gameplay/src/ranking.rs scripts/analyze_rust_defuse_rank_feedbac
4879
  edge crates/urt-gameplay/src/rank_sort.rs scripts/analyze_rust_defuse_rank_feedback.py
4880
  edge crates/urt-gameplay/src/bin/urt-defuse.rs scripts/analyze_rust_defuse_rank_feedback.py
4881
  edge crates/urt-gameplay/src/bin/support/entity_pool.rs scripts/analyze_rust_defuse_rank_feedback.py
 
 
 
 
 
 
 
 
 
 
 
4879
  edge crates/urt-gameplay/src/rank_sort.rs scripts/analyze_rust_defuse_rank_feedback.py
4880
  edge crates/urt-gameplay/src/bin/urt-defuse.rs scripts/analyze_rust_defuse_rank_feedback.py
4881
  edge crates/urt-gameplay/src/bin/support/entity_pool.rs scripts/analyze_rust_defuse_rank_feedback.py
4882
+ report scripts/analyze_rust_spatial_index.py docs/research/rust-spatial-index.json
4883
+ edge docs/research/rust-spatial-index.json scripts/test_rust_spatial_index.py
4884
+ edge docs/research/world-links.json scripts/analyze_rust_spatial_index.py
4885
+ group rust-spatial-index scripts/analyze_rust_spatial_index.py
4886
+ group rust-spatial-index scripts/test_world_links.py
4887
+ group rust-spatial-index scripts/test_area_queries.py
4888
+ group gameplay scripts/analyze_rust_spatial_index.py
4889
+ edge crates/urt-gameplay/src/spatial_index.rs scripts/analyze_rust_spatial_index.py
4890
+ edge crates/urt-gameplay/src/bin/urt-spatial-index.rs scripts/analyze_rust_spatial_index.py
4891
+ edge crates/urt-gameplay/src/spatial_index.rs scripts/analyze_rust_health_impulse.py