nmarshall commited on
Commit
0960409
·
1 Parent(s): 41ceee2

qvm: recover exact-match filter removal

Browse files
docs/FINDINGS.md CHANGED
@@ -1803,3 +1803,5 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
1803
  RE-934: Actual252500 exports comparison bytes and signed metadata while ignoring masks. It skips comparison-1 rows, performs no IO for count zero, but truncates/writes an empty file for a nonempty all-hole table. Supplied zero/negative handles still reach write and close. The INT_MIN metadata case retains the original formatter wrapping-negation punctuation instead of host decimal output. Eighteen fixtures execute actual70386/37914/69338; native memory operations are modeled and file operations captured. Aggregate overflow and actual filesystem acceptance remain open. [Evidence](research/QVM_FILTER_EXPORT.md).
1804
 
1805
  RE-935: Rust matches all18 original export cases, including mask loss, all-hole truncation, invalid handles and original INT_MIN formatter bytes. Empty tables produce no plan; other tables produce ordered print/open/write/close effects. A4096-row table is bounded by28 bytes per row, below the131072-byte source buffer; unit tests check that maximum and reject4097 rows. Native IO remains an adapter boundary. [Evidence](research/RUST_FILTER_EXPORT.md).
 
 
 
1803
  RE-934: Actual252500 exports comparison bytes and signed metadata while ignoring masks. It skips comparison-1 rows, performs no IO for count zero, but truncates/writes an empty file for a nonempty all-hole table. Supplied zero/negative handles still reach write and close. The INT_MIN metadata case retains the original formatter wrapping-negation punctuation instead of host decimal output. Eighteen fixtures execute actual70386/37914/69338; native memory operations are modeled and file operations captured. Aggregate overflow and actual filesystem acceptance remain open. [Evidence](research/QVM_FILTER_EXPORT.md).
1804
 
1805
  RE-935: Rust matches all18 original export cases, including mask loss, all-hole truncation, invalid handles and original INT_MIN formatter bytes. Empty tables produce no plan; other tables produce ordered print/open/write/close effects. A4096-row table is bounded by28 bytes per row, below the131072-byte source buffer; unit tests check that maximum and reject4097 rows. Native IO remains an adapter boundary. [Evidence](research/RUST_FILTER_EXPORT.md).
1806
+
1807
+ RE-936: Thirty actual253296 cases execute parser252304/37159, scan exact mask/comparison pairs and remove only the first duplicate by storing comparison-1. Mask/metadata/count remain unchanged. Parse failure and no match return0; successful removal prints Removed and requests export. A preexisting comparison-1 record can match255.255.255.255 and report successful removal again. Export is captured in this stage. [Evidence](research/QVM_FILTER_REMOVE.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1849,3 +1849,5 @@ RE-924–933 completed bounded bot settings, announcement, connect-child composi
1849
  - [x] RE-934 Original filter export and native file-operation order ([evidence](research/QVM_FILTER_EXPORT.md)).
1850
 
1851
  - [x] RE-935 Rust filter export policy and bounded storage ([evidence](research/RUST_FILTER_EXPORT.md)).
 
 
 
1849
  - [x] RE-934 Original filter export and native file-operation order ([evidence](research/QVM_FILTER_EXPORT.md)).
1850
 
1851
  - [x] RE-935 Rust filter export policy and bounded storage ([evidence](research/RUST_FILTER_EXPORT.md)).
1852
+
1853
+ - [x] RE-936 Original exact-match filter removal ([evidence](research/QVM_FILTER_REMOVE.md)).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2405,3 +2405,7 @@ Actual252500 exports comparison bytes and signed metadata while ignoring masks.
2405
  ## 2026-10-28 — RE-935 Rust filter export policy and bounded storage
2406
 
2407
  Rust matches all18 original export cases, including mask loss, all-hole truncation, invalid handles and original INT_MIN formatter bytes. Empty tables produce no plan; other tables produce ordered print/open/write/close effects. A4096-row table is bounded by28 bytes per row, below the131072-byte source buffer; unit tests check that maximum and reject4097 rows. Native IO remains an adapter boundary. Focused `cargo xtask test-group rust-filter-export` passes with deterministic report regeneration, relevant regressions and storage/documentation/whitespace checks. Full suite deferred to the tenth-commit boundary. Original assets unchanged; native IO effects remain captured.
 
 
 
 
 
2405
  ## 2026-10-28 — RE-935 Rust filter export policy and bounded storage
2406
 
2407
  Rust matches all18 original export cases, including mask loss, all-hole truncation, invalid handles and original INT_MIN formatter bytes. Empty tables produce no plan; other tables produce ordered print/open/write/close effects. A4096-row table is bounded by28 bytes per row, below the131072-byte source buffer; unit tests check that maximum and reject4097 rows. Native IO remains an adapter boundary. Focused `cargo xtask test-group rust-filter-export` passes with deterministic report regeneration, relevant regressions and storage/documentation/whitespace checks. Full suite deferred to the tenth-commit boundary. Original assets unchanged; native IO effects remain captured.
2408
+
2409
+ ## 2026-10-28 — RE-936 Original exact-match filter removal
2410
+
2411
+ Thirty actual253296 cases execute parser252304/37159, scan exact mask/comparison pairs and remove only the first duplicate by storing comparison-1. Mask/metadata/count remain unchanged. Parse failure and no match return0; successful removal prints Removed and requests export. A preexisting comparison-1 record can match255.255.255.255 and report successful removal again. Export is captured in this stage. Focused `cargo xtask test-group qvm-filter-remove` passes with deterministic report regeneration, relevant regressions and storage/documentation/whitespace checks. Full suite deferred to the tenth-commit boundary. Original assets unchanged; native IO effects remain captured.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -1886,3 +1886,5 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1886
  - [x] RE-934 Original filter export and native file-operation order ([evidence](research/QVM_FILTER_EXPORT.md)).
1887
 
1888
  - [x] RE-935 Rust filter export policy and bounded storage ([evidence](research/RUST_FILTER_EXPORT.md)).
 
 
 
1886
  - [x] RE-934 Original filter export and native file-operation order ([evidence](research/QVM_FILTER_EXPORT.md)).
1887
 
1888
  - [x] RE-935 Rust filter export policy and bounded storage ([evidence](research/RUST_FILTER_EXPORT.md)).
1889
+
1890
+ - [x] RE-936 Original exact-match filter removal ([evidence](research/QVM_FILTER_REMOVE.md)).
docs/research/QVM_FILTER_REMOVE.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Original exact-match filter removal
2
+
3
+ RE-936. Focused validation: `cargo xtask test-group qvm-filter-remove`. [Machine report](qvm-filter-remove.json).
4
+
5
+ Thirty actual253296 cases execute parser252304/37159, scan exact mask/comparison pairs and remove only the first duplicate by storing comparison-1. Mask/metadata/count remain unchanged. Parse failure and no match return0; successful removal prints Removed and requests export. A preexisting comparison-1 record can match255.255.255.255 and report successful removal again. Export is captured in this stage.
docs/research/README.md CHANGED
@@ -1421,3 +1421,5 @@ The extension collector adds five focused tests for native tail calls, command-r
1421
  - [RE-934: Original filter export and native file-operation order](QVM_FILTER_EXPORT.md).
1422
 
1423
  - [RE-935: Rust filter export policy and bounded storage](RUST_FILTER_EXPORT.md).
 
 
 
1421
  - [RE-934: Original filter export and native file-operation order](QVM_FILTER_EXPORT.md).
1422
 
1423
  - [RE-935: Rust filter export policy and bounded storage](RUST_FILTER_EXPORT.md).
1424
+
1425
+ - [RE-936: Original exact-match filter removal](QVM_FILTER_REMOVE.md).
docs/research/qvm-filter-remove.json ADDED
@@ -0,0 +1,1296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "limits": "Exact mask/comparison first-match scan; parser and integer children source-executed; native diagnostics and file IO captured. Native table provenance, malformed counts and unsafe parser tokens remain open.",
3
+ "probes": [
4
+ {
5
+ "changes": [],
6
+ "diagnostics": [
7
+ {
8
+ "op": "not-found",
9
+ "text": "312e322e332e34"
10
+ }
11
+ ],
12
+ "execution": {
13
+ "stop": 253380,
14
+ "trace_length": 33,
15
+ "trace_sha256": "5ec8276dcccff21f5d6d00c323d9518cd97a77ce7f2b3f3be8806459107d9440"
16
+ },
17
+ "exported": [],
18
+ "exports": [],
19
+ "input": {
20
+ "handle": 7,
21
+ "metadata": 0,
22
+ "rows": [],
23
+ "save": 0,
24
+ "text": "312e322e332e34"
25
+ },
26
+ "result": 0,
27
+ "rows": []
28
+ },
29
+ {
30
+ "changes": [],
31
+ "diagnostics": [
32
+ {
33
+ "op": "not-found",
34
+ "text": "312e2a"
35
+ }
36
+ ],
37
+ "execution": {
38
+ "stop": 253380,
39
+ "trace_length": 33,
40
+ "trace_sha256": "5ec8276dcccff21f5d6d00c323d9518cd97a77ce7f2b3f3be8806459107d9440"
41
+ },
42
+ "exported": [],
43
+ "exports": [],
44
+ "input": {
45
+ "handle": 7,
46
+ "metadata": 0,
47
+ "rows": [],
48
+ "save": 0,
49
+ "text": "312e2a"
50
+ },
51
+ "result": 0,
52
+ "rows": []
53
+ },
54
+ {
55
+ "changes": [],
56
+ "diagnostics": [
57
+ {
58
+ "op": "not-found",
59
+ "text": "2a"
60
+ }
61
+ ],
62
+ "execution": {
63
+ "stop": 253380,
64
+ "trace_length": 33,
65
+ "trace_sha256": "5ec8276dcccff21f5d6d00c323d9518cd97a77ce7f2b3f3be8806459107d9440"
66
+ },
67
+ "exported": [],
68
+ "exports": [],
69
+ "input": {
70
+ "handle": 7,
71
+ "metadata": 0,
72
+ "rows": [],
73
+ "save": 0,
74
+ "text": "2a"
75
+ },
76
+ "result": 0,
77
+ "rows": []
78
+ },
79
+ {
80
+ "changes": [],
81
+ "diagnostics": [
82
+ {
83
+ "op": "bad-address",
84
+ "text": "626164"
85
+ }
86
+ ],
87
+ "execution": {
88
+ "stop": 253312,
89
+ "trace_length": 15,
90
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
91
+ },
92
+ "exported": [],
93
+ "exports": [],
94
+ "input": {
95
+ "handle": 7,
96
+ "metadata": 0,
97
+ "rows": [],
98
+ "save": 0,
99
+ "text": "626164"
100
+ },
101
+ "result": 0,
102
+ "rows": []
103
+ },
104
+ {
105
+ "changes": [],
106
+ "diagnostics": [
107
+ {
108
+ "op": "not-found",
109
+ "text": "3235352e3235352e3235352e323535"
110
+ }
111
+ ],
112
+ "execution": {
113
+ "stop": 253380,
114
+ "trace_length": 33,
115
+ "trace_sha256": "5ec8276dcccff21f5d6d00c323d9518cd97a77ce7f2b3f3be8806459107d9440"
116
+ },
117
+ "exported": [],
118
+ "exports": [],
119
+ "input": {
120
+ "handle": 7,
121
+ "metadata": 0,
122
+ "rows": [],
123
+ "save": 0,
124
+ "text": "3235352e3235352e3235352e323535"
125
+ },
126
+ "result": 0,
127
+ "rows": []
128
+ },
129
+ {
130
+ "changes": [],
131
+ "diagnostics": [
132
+ {
133
+ "op": "bad-address",
134
+ "text": ""
135
+ }
136
+ ],
137
+ "execution": {
138
+ "stop": 253312,
139
+ "trace_length": 15,
140
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
141
+ },
142
+ "exported": [],
143
+ "exports": [],
144
+ "input": {
145
+ "handle": 7,
146
+ "metadata": 0,
147
+ "rows": [],
148
+ "save": 0,
149
+ "text": "312e"
150
+ },
151
+ "result": 0,
152
+ "rows": []
153
+ },
154
+ {
155
+ "changes": [
156
+ {
157
+ "address": 36275956,
158
+ "after": 4294967295,
159
+ "before": 67305985
160
+ }
161
+ ],
162
+ "diagnostics": [
163
+ {
164
+ "op": "removed"
165
+ }
166
+ ],
167
+ "execution": {
168
+ "stop": 253357,
169
+ "trace_length": 61,
170
+ "trace_sha256": "13bb7eef03b8846c0562a52d8787005ca3203dac9f6f7b3101c3c1793f26cf2a"
171
+ },
172
+ "exported": [],
173
+ "exports": [
174
+ 252500
175
+ ],
176
+ "input": {
177
+ "handle": 7,
178
+ "metadata": 0,
179
+ "rows": [
180
+ [
181
+ 4294967295,
182
+ 67305985,
183
+ 9
184
+ ]
185
+ ],
186
+ "save": 0,
187
+ "text": "312e322e332e34"
188
+ },
189
+ "result": 1,
190
+ "rows": [
191
+ [
192
+ 4294967295,
193
+ 4294967295,
194
+ 9
195
+ ]
196
+ ]
197
+ },
198
+ {
199
+ "changes": [],
200
+ "diagnostics": [
201
+ {
202
+ "op": "not-found",
203
+ "text": "312e2a"
204
+ }
205
+ ],
206
+ "execution": {
207
+ "stop": 253380,
208
+ "trace_length": 54,
209
+ "trace_sha256": "82f219011dc1abe34f7c418409b4244671e550ca81c167d9d980eff5505b6fec"
210
+ },
211
+ "exported": [],
212
+ "exports": [],
213
+ "input": {
214
+ "handle": 7,
215
+ "metadata": 0,
216
+ "rows": [
217
+ [
218
+ 4294967295,
219
+ 67305985,
220
+ 9
221
+ ]
222
+ ],
223
+ "save": 0,
224
+ "text": "312e2a"
225
+ },
226
+ "result": 0,
227
+ "rows": [
228
+ [
229
+ 4294967295,
230
+ 67305985,
231
+ 9
232
+ ]
233
+ ]
234
+ },
235
+ {
236
+ "changes": [],
237
+ "diagnostics": [
238
+ {
239
+ "op": "not-found",
240
+ "text": "2a"
241
+ }
242
+ ],
243
+ "execution": {
244
+ "stop": 253380,
245
+ "trace_length": 54,
246
+ "trace_sha256": "82f219011dc1abe34f7c418409b4244671e550ca81c167d9d980eff5505b6fec"
247
+ },
248
+ "exported": [],
249
+ "exports": [],
250
+ "input": {
251
+ "handle": 7,
252
+ "metadata": 0,
253
+ "rows": [
254
+ [
255
+ 4294967295,
256
+ 67305985,
257
+ 9
258
+ ]
259
+ ],
260
+ "save": 0,
261
+ "text": "2a"
262
+ },
263
+ "result": 0,
264
+ "rows": [
265
+ [
266
+ 4294967295,
267
+ 67305985,
268
+ 9
269
+ ]
270
+ ]
271
+ },
272
+ {
273
+ "changes": [],
274
+ "diagnostics": [
275
+ {
276
+ "op": "bad-address",
277
+ "text": "626164"
278
+ }
279
+ ],
280
+ "execution": {
281
+ "stop": 253312,
282
+ "trace_length": 15,
283
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
284
+ },
285
+ "exported": [],
286
+ "exports": [],
287
+ "input": {
288
+ "handle": 7,
289
+ "metadata": 0,
290
+ "rows": [
291
+ [
292
+ 4294967295,
293
+ 67305985,
294
+ 9
295
+ ]
296
+ ],
297
+ "save": 0,
298
+ "text": "626164"
299
+ },
300
+ "result": 0,
301
+ "rows": [
302
+ [
303
+ 4294967295,
304
+ 67305985,
305
+ 9
306
+ ]
307
+ ]
308
+ },
309
+ {
310
+ "changes": [],
311
+ "diagnostics": [
312
+ {
313
+ "op": "not-found",
314
+ "text": "3235352e3235352e3235352e323535"
315
+ }
316
+ ],
317
+ "execution": {
318
+ "stop": 253380,
319
+ "trace_length": 64,
320
+ "trace_sha256": "88991c252b4388f362068ac8572f716844cf836f4acb6d9340a3759fe548a2cd"
321
+ },
322
+ "exported": [],
323
+ "exports": [],
324
+ "input": {
325
+ "handle": 7,
326
+ "metadata": 0,
327
+ "rows": [
328
+ [
329
+ 4294967295,
330
+ 67305985,
331
+ 9
332
+ ]
333
+ ],
334
+ "save": 0,
335
+ "text": "3235352e3235352e3235352e323535"
336
+ },
337
+ "result": 0,
338
+ "rows": [
339
+ [
340
+ 4294967295,
341
+ 67305985,
342
+ 9
343
+ ]
344
+ ]
345
+ },
346
+ {
347
+ "changes": [],
348
+ "diagnostics": [
349
+ {
350
+ "op": "bad-address",
351
+ "text": ""
352
+ }
353
+ ],
354
+ "execution": {
355
+ "stop": 253312,
356
+ "trace_length": 15,
357
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
358
+ },
359
+ "exported": [],
360
+ "exports": [],
361
+ "input": {
362
+ "handle": 7,
363
+ "metadata": 0,
364
+ "rows": [
365
+ [
366
+ 4294967295,
367
+ 67305985,
368
+ 9
369
+ ]
370
+ ],
371
+ "save": 0,
372
+ "text": "312e"
373
+ },
374
+ "result": 0,
375
+ "rows": [
376
+ [
377
+ 4294967295,
378
+ 67305985,
379
+ 9
380
+ ]
381
+ ]
382
+ },
383
+ {
384
+ "changes": [
385
+ {
386
+ "address": 36275956,
387
+ "after": 4294967295,
388
+ "before": 67305985
389
+ }
390
+ ],
391
+ "diagnostics": [
392
+ {
393
+ "op": "removed"
394
+ }
395
+ ],
396
+ "execution": {
397
+ "stop": 253357,
398
+ "trace_length": 61,
399
+ "trace_sha256": "13bb7eef03b8846c0562a52d8787005ca3203dac9f6f7b3101c3c1793f26cf2a"
400
+ },
401
+ "exported": [],
402
+ "exports": [
403
+ 252500
404
+ ],
405
+ "input": {
406
+ "handle": 7,
407
+ "metadata": 0,
408
+ "rows": [
409
+ [
410
+ 4294967295,
411
+ 67305985,
412
+ 9
413
+ ],
414
+ [
415
+ 4294967295,
416
+ 67305985,
417
+ 10
418
+ ]
419
+ ],
420
+ "save": 0,
421
+ "text": "312e322e332e34"
422
+ },
423
+ "result": 1,
424
+ "rows": [
425
+ [
426
+ 4294967295,
427
+ 4294967295,
428
+ 9
429
+ ],
430
+ [
431
+ 4294967295,
432
+ 67305985,
433
+ 10
434
+ ]
435
+ ]
436
+ },
437
+ {
438
+ "changes": [],
439
+ "diagnostics": [
440
+ {
441
+ "op": "not-found",
442
+ "text": "312e2a"
443
+ }
444
+ ],
445
+ "execution": {
446
+ "stop": 253380,
447
+ "trace_length": 75,
448
+ "trace_sha256": "4e6411971d70aff944003db02e357c7fd06a78d4f72d7034e48ab813bb66f9cd"
449
+ },
450
+ "exported": [],
451
+ "exports": [],
452
+ "input": {
453
+ "handle": 7,
454
+ "metadata": 0,
455
+ "rows": [
456
+ [
457
+ 4294967295,
458
+ 67305985,
459
+ 9
460
+ ],
461
+ [
462
+ 4294967295,
463
+ 67305985,
464
+ 10
465
+ ]
466
+ ],
467
+ "save": 0,
468
+ "text": "312e2a"
469
+ },
470
+ "result": 0,
471
+ "rows": [
472
+ [
473
+ 4294967295,
474
+ 67305985,
475
+ 9
476
+ ],
477
+ [
478
+ 4294967295,
479
+ 67305985,
480
+ 10
481
+ ]
482
+ ]
483
+ },
484
+ {
485
+ "changes": [],
486
+ "diagnostics": [
487
+ {
488
+ "op": "not-found",
489
+ "text": "2a"
490
+ }
491
+ ],
492
+ "execution": {
493
+ "stop": 253380,
494
+ "trace_length": 75,
495
+ "trace_sha256": "4e6411971d70aff944003db02e357c7fd06a78d4f72d7034e48ab813bb66f9cd"
496
+ },
497
+ "exported": [],
498
+ "exports": [],
499
+ "input": {
500
+ "handle": 7,
501
+ "metadata": 0,
502
+ "rows": [
503
+ [
504
+ 4294967295,
505
+ 67305985,
506
+ 9
507
+ ],
508
+ [
509
+ 4294967295,
510
+ 67305985,
511
+ 10
512
+ ]
513
+ ],
514
+ "save": 0,
515
+ "text": "2a"
516
+ },
517
+ "result": 0,
518
+ "rows": [
519
+ [
520
+ 4294967295,
521
+ 67305985,
522
+ 9
523
+ ],
524
+ [
525
+ 4294967295,
526
+ 67305985,
527
+ 10
528
+ ]
529
+ ]
530
+ },
531
+ {
532
+ "changes": [],
533
+ "diagnostics": [
534
+ {
535
+ "op": "bad-address",
536
+ "text": "626164"
537
+ }
538
+ ],
539
+ "execution": {
540
+ "stop": 253312,
541
+ "trace_length": 15,
542
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
543
+ },
544
+ "exported": [],
545
+ "exports": [],
546
+ "input": {
547
+ "handle": 7,
548
+ "metadata": 0,
549
+ "rows": [
550
+ [
551
+ 4294967295,
552
+ 67305985,
553
+ 9
554
+ ],
555
+ [
556
+ 4294967295,
557
+ 67305985,
558
+ 10
559
+ ]
560
+ ],
561
+ "save": 0,
562
+ "text": "626164"
563
+ },
564
+ "result": 0,
565
+ "rows": [
566
+ [
567
+ 4294967295,
568
+ 67305985,
569
+ 9
570
+ ],
571
+ [
572
+ 4294967295,
573
+ 67305985,
574
+ 10
575
+ ]
576
+ ]
577
+ },
578
+ {
579
+ "changes": [],
580
+ "diagnostics": [
581
+ {
582
+ "op": "not-found",
583
+ "text": "3235352e3235352e3235352e323535"
584
+ }
585
+ ],
586
+ "execution": {
587
+ "stop": 253380,
588
+ "trace_length": 95,
589
+ "trace_sha256": "74cc14c3b65f772fa1038a1ed3455229ea70d274bc68d3906d266781caed17fb"
590
+ },
591
+ "exported": [],
592
+ "exports": [],
593
+ "input": {
594
+ "handle": 7,
595
+ "metadata": 0,
596
+ "rows": [
597
+ [
598
+ 4294967295,
599
+ 67305985,
600
+ 9
601
+ ],
602
+ [
603
+ 4294967295,
604
+ 67305985,
605
+ 10
606
+ ]
607
+ ],
608
+ "save": 0,
609
+ "text": "3235352e3235352e3235352e323535"
610
+ },
611
+ "result": 0,
612
+ "rows": [
613
+ [
614
+ 4294967295,
615
+ 67305985,
616
+ 9
617
+ ],
618
+ [
619
+ 4294967295,
620
+ 67305985,
621
+ 10
622
+ ]
623
+ ]
624
+ },
625
+ {
626
+ "changes": [],
627
+ "diagnostics": [
628
+ {
629
+ "op": "bad-address",
630
+ "text": ""
631
+ }
632
+ ],
633
+ "execution": {
634
+ "stop": 253312,
635
+ "trace_length": 15,
636
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
637
+ },
638
+ "exported": [],
639
+ "exports": [],
640
+ "input": {
641
+ "handle": 7,
642
+ "metadata": 0,
643
+ "rows": [
644
+ [
645
+ 4294967295,
646
+ 67305985,
647
+ 9
648
+ ],
649
+ [
650
+ 4294967295,
651
+ 67305985,
652
+ 10
653
+ ]
654
+ ],
655
+ "save": 0,
656
+ "text": "312e"
657
+ },
658
+ "result": 0,
659
+ "rows": [
660
+ [
661
+ 4294967295,
662
+ 67305985,
663
+ 9
664
+ ],
665
+ [
666
+ 4294967295,
667
+ 67305985,
668
+ 10
669
+ ]
670
+ ]
671
+ },
672
+ {
673
+ "changes": [
674
+ {
675
+ "address": 36275968,
676
+ "after": 4294967295,
677
+ "before": 67305985
678
+ }
679
+ ],
680
+ "diagnostics": [
681
+ {
682
+ "op": "removed"
683
+ }
684
+ ],
685
+ "execution": {
686
+ "stop": 253357,
687
+ "trace_length": 82,
688
+ "trace_sha256": "278e0610787c5a587cf4b4a08938b6243b582bae75f6a77575114e74b31ac52e"
689
+ },
690
+ "exported": [],
691
+ "exports": [
692
+ 252500
693
+ ],
694
+ "input": {
695
+ "handle": 7,
696
+ "metadata": 0,
697
+ "rows": [
698
+ [
699
+ 255,
700
+ 1,
701
+ 11
702
+ ],
703
+ [
704
+ 4294967295,
705
+ 67305985,
706
+ 9
707
+ ]
708
+ ],
709
+ "save": 0,
710
+ "text": "312e322e332e34"
711
+ },
712
+ "result": 1,
713
+ "rows": [
714
+ [
715
+ 255,
716
+ 1,
717
+ 11
718
+ ],
719
+ [
720
+ 4294967295,
721
+ 4294967295,
722
+ 9
723
+ ]
724
+ ]
725
+ },
726
+ {
727
+ "changes": [
728
+ {
729
+ "address": 36275956,
730
+ "after": 4294967295,
731
+ "before": 1
732
+ }
733
+ ],
734
+ "diagnostics": [
735
+ {
736
+ "op": "removed"
737
+ }
738
+ ],
739
+ "execution": {
740
+ "stop": 253357,
741
+ "trace_length": 61,
742
+ "trace_sha256": "13bb7eef03b8846c0562a52d8787005ca3203dac9f6f7b3101c3c1793f26cf2a"
743
+ },
744
+ "exported": [],
745
+ "exports": [
746
+ 252500
747
+ ],
748
+ "input": {
749
+ "handle": 7,
750
+ "metadata": 0,
751
+ "rows": [
752
+ [
753
+ 255,
754
+ 1,
755
+ 11
756
+ ],
757
+ [
758
+ 4294967295,
759
+ 67305985,
760
+ 9
761
+ ]
762
+ ],
763
+ "save": 0,
764
+ "text": "312e2a"
765
+ },
766
+ "result": 1,
767
+ "rows": [
768
+ [
769
+ 255,
770
+ 4294967295,
771
+ 11
772
+ ],
773
+ [
774
+ 4294967295,
775
+ 67305985,
776
+ 9
777
+ ]
778
+ ]
779
+ },
780
+ {
781
+ "changes": [],
782
+ "diagnostics": [
783
+ {
784
+ "op": "not-found",
785
+ "text": "2a"
786
+ }
787
+ ],
788
+ "execution": {
789
+ "stop": 253380,
790
+ "trace_length": 75,
791
+ "trace_sha256": "4e6411971d70aff944003db02e357c7fd06a78d4f72d7034e48ab813bb66f9cd"
792
+ },
793
+ "exported": [],
794
+ "exports": [],
795
+ "input": {
796
+ "handle": 7,
797
+ "metadata": 0,
798
+ "rows": [
799
+ [
800
+ 255,
801
+ 1,
802
+ 11
803
+ ],
804
+ [
805
+ 4294967295,
806
+ 67305985,
807
+ 9
808
+ ]
809
+ ],
810
+ "save": 0,
811
+ "text": "2a"
812
+ },
813
+ "result": 0,
814
+ "rows": [
815
+ [
816
+ 255,
817
+ 1,
818
+ 11
819
+ ],
820
+ [
821
+ 4294967295,
822
+ 67305985,
823
+ 9
824
+ ]
825
+ ]
826
+ },
827
+ {
828
+ "changes": [],
829
+ "diagnostics": [
830
+ {
831
+ "op": "bad-address",
832
+ "text": "626164"
833
+ }
834
+ ],
835
+ "execution": {
836
+ "stop": 253312,
837
+ "trace_length": 15,
838
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
839
+ },
840
+ "exported": [],
841
+ "exports": [],
842
+ "input": {
843
+ "handle": 7,
844
+ "metadata": 0,
845
+ "rows": [
846
+ [
847
+ 255,
848
+ 1,
849
+ 11
850
+ ],
851
+ [
852
+ 4294967295,
853
+ 67305985,
854
+ 9
855
+ ]
856
+ ],
857
+ "save": 0,
858
+ "text": "626164"
859
+ },
860
+ "result": 0,
861
+ "rows": [
862
+ [
863
+ 255,
864
+ 1,
865
+ 11
866
+ ],
867
+ [
868
+ 4294967295,
869
+ 67305985,
870
+ 9
871
+ ]
872
+ ]
873
+ },
874
+ {
875
+ "changes": [],
876
+ "diagnostics": [
877
+ {
878
+ "op": "not-found",
879
+ "text": "3235352e3235352e3235352e323535"
880
+ }
881
+ ],
882
+ "execution": {
883
+ "stop": 253380,
884
+ "trace_length": 85,
885
+ "trace_sha256": "c33d637d615d95807baf47d84327e0b5b96018069bdf3367a43bb00400674e8c"
886
+ },
887
+ "exported": [],
888
+ "exports": [],
889
+ "input": {
890
+ "handle": 7,
891
+ "metadata": 0,
892
+ "rows": [
893
+ [
894
+ 255,
895
+ 1,
896
+ 11
897
+ ],
898
+ [
899
+ 4294967295,
900
+ 67305985,
901
+ 9
902
+ ]
903
+ ],
904
+ "save": 0,
905
+ "text": "3235352e3235352e3235352e323535"
906
+ },
907
+ "result": 0,
908
+ "rows": [
909
+ [
910
+ 255,
911
+ 1,
912
+ 11
913
+ ],
914
+ [
915
+ 4294967295,
916
+ 67305985,
917
+ 9
918
+ ]
919
+ ]
920
+ },
921
+ {
922
+ "changes": [],
923
+ "diagnostics": [
924
+ {
925
+ "op": "bad-address",
926
+ "text": ""
927
+ }
928
+ ],
929
+ "execution": {
930
+ "stop": 253312,
931
+ "trace_length": 15,
932
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
933
+ },
934
+ "exported": [],
935
+ "exports": [],
936
+ "input": {
937
+ "handle": 7,
938
+ "metadata": 0,
939
+ "rows": [
940
+ [
941
+ 255,
942
+ 1,
943
+ 11
944
+ ],
945
+ [
946
+ 4294967295,
947
+ 67305985,
948
+ 9
949
+ ]
950
+ ],
951
+ "save": 0,
952
+ "text": "312e"
953
+ },
954
+ "result": 0,
955
+ "rows": [
956
+ [
957
+ 255,
958
+ 1,
959
+ 11
960
+ ],
961
+ [
962
+ 4294967295,
963
+ 67305985,
964
+ 9
965
+ ]
966
+ ]
967
+ },
968
+ {
969
+ "changes": [],
970
+ "diagnostics": [
971
+ {
972
+ "op": "not-found",
973
+ "text": "312e322e332e34"
974
+ }
975
+ ],
976
+ "execution": {
977
+ "stop": 253380,
978
+ "trace_length": 85,
979
+ "trace_sha256": "b948e5ab076a4902eb8a061d6f4d419cd8496d65cbff8c254d8d5306a7cbde12"
980
+ },
981
+ "exported": [],
982
+ "exports": [],
983
+ "input": {
984
+ "handle": 7,
985
+ "metadata": 0,
986
+ "rows": [
987
+ [
988
+ 4294967295,
989
+ 4294967295,
990
+ 12
991
+ ],
992
+ [
993
+ 0,
994
+ 0,
995
+ 13
996
+ ]
997
+ ],
998
+ "save": 0,
999
+ "text": "312e322e332e34"
1000
+ },
1001
+ "result": 0,
1002
+ "rows": [
1003
+ [
1004
+ 4294967295,
1005
+ 4294967295,
1006
+ 12
1007
+ ],
1008
+ [
1009
+ 0,
1010
+ 0,
1011
+ 13
1012
+ ]
1013
+ ]
1014
+ },
1015
+ {
1016
+ "changes": [],
1017
+ "diagnostics": [
1018
+ {
1019
+ "op": "not-found",
1020
+ "text": "312e2a"
1021
+ }
1022
+ ],
1023
+ "execution": {
1024
+ "stop": 253380,
1025
+ "trace_length": 75,
1026
+ "trace_sha256": "4e6411971d70aff944003db02e357c7fd06a78d4f72d7034e48ab813bb66f9cd"
1027
+ },
1028
+ "exported": [],
1029
+ "exports": [],
1030
+ "input": {
1031
+ "handle": 7,
1032
+ "metadata": 0,
1033
+ "rows": [
1034
+ [
1035
+ 4294967295,
1036
+ 4294967295,
1037
+ 12
1038
+ ],
1039
+ [
1040
+ 0,
1041
+ 0,
1042
+ 13
1043
+ ]
1044
+ ],
1045
+ "save": 0,
1046
+ "text": "312e2a"
1047
+ },
1048
+ "result": 0,
1049
+ "rows": [
1050
+ [
1051
+ 4294967295,
1052
+ 4294967295,
1053
+ 12
1054
+ ],
1055
+ [
1056
+ 0,
1057
+ 0,
1058
+ 13
1059
+ ]
1060
+ ]
1061
+ },
1062
+ {
1063
+ "changes": [
1064
+ {
1065
+ "address": 36275968,
1066
+ "after": 4294967295,
1067
+ "before": 0
1068
+ }
1069
+ ],
1070
+ "diagnostics": [
1071
+ {
1072
+ "op": "removed"
1073
+ }
1074
+ ],
1075
+ "execution": {
1076
+ "stop": 253357,
1077
+ "trace_length": 82,
1078
+ "trace_sha256": "278e0610787c5a587cf4b4a08938b6243b582bae75f6a77575114e74b31ac52e"
1079
+ },
1080
+ "exported": [],
1081
+ "exports": [
1082
+ 252500
1083
+ ],
1084
+ "input": {
1085
+ "handle": 7,
1086
+ "metadata": 0,
1087
+ "rows": [
1088
+ [
1089
+ 4294967295,
1090
+ 4294967295,
1091
+ 12
1092
+ ],
1093
+ [
1094
+ 0,
1095
+ 0,
1096
+ 13
1097
+ ]
1098
+ ],
1099
+ "save": 0,
1100
+ "text": "2a"
1101
+ },
1102
+ "result": 1,
1103
+ "rows": [
1104
+ [
1105
+ 4294967295,
1106
+ 4294967295,
1107
+ 12
1108
+ ],
1109
+ [
1110
+ 0,
1111
+ 4294967295,
1112
+ 13
1113
+ ]
1114
+ ]
1115
+ },
1116
+ {
1117
+ "changes": [],
1118
+ "diagnostics": [
1119
+ {
1120
+ "op": "bad-address",
1121
+ "text": "626164"
1122
+ }
1123
+ ],
1124
+ "execution": {
1125
+ "stop": 253312,
1126
+ "trace_length": 15,
1127
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
1128
+ },
1129
+ "exported": [],
1130
+ "exports": [],
1131
+ "input": {
1132
+ "handle": 7,
1133
+ "metadata": 0,
1134
+ "rows": [
1135
+ [
1136
+ 4294967295,
1137
+ 4294967295,
1138
+ 12
1139
+ ],
1140
+ [
1141
+ 0,
1142
+ 0,
1143
+ 13
1144
+ ]
1145
+ ],
1146
+ "save": 0,
1147
+ "text": "626164"
1148
+ },
1149
+ "result": 0,
1150
+ "rows": [
1151
+ [
1152
+ 4294967295,
1153
+ 4294967295,
1154
+ 12
1155
+ ],
1156
+ [
1157
+ 0,
1158
+ 0,
1159
+ 13
1160
+ ]
1161
+ ]
1162
+ },
1163
+ {
1164
+ "changes": [],
1165
+ "diagnostics": [
1166
+ {
1167
+ "op": "removed"
1168
+ }
1169
+ ],
1170
+ "execution": {
1171
+ "stop": 253357,
1172
+ "trace_length": 61,
1173
+ "trace_sha256": "13bb7eef03b8846c0562a52d8787005ca3203dac9f6f7b3101c3c1793f26cf2a"
1174
+ },
1175
+ "exported": [],
1176
+ "exports": [
1177
+ 252500
1178
+ ],
1179
+ "input": {
1180
+ "handle": 7,
1181
+ "metadata": 0,
1182
+ "rows": [
1183
+ [
1184
+ 4294967295,
1185
+ 4294967295,
1186
+ 12
1187
+ ],
1188
+ [
1189
+ 0,
1190
+ 0,
1191
+ 13
1192
+ ]
1193
+ ],
1194
+ "save": 0,
1195
+ "text": "3235352e3235352e3235352e323535"
1196
+ },
1197
+ "result": 1,
1198
+ "rows": [
1199
+ [
1200
+ 4294967295,
1201
+ 4294967295,
1202
+ 12
1203
+ ],
1204
+ [
1205
+ 0,
1206
+ 0,
1207
+ 13
1208
+ ]
1209
+ ]
1210
+ },
1211
+ {
1212
+ "changes": [],
1213
+ "diagnostics": [
1214
+ {
1215
+ "op": "bad-address",
1216
+ "text": ""
1217
+ }
1218
+ ],
1219
+ "execution": {
1220
+ "stop": 253312,
1221
+ "trace_length": 15,
1222
+ "trace_sha256": "4585d0dfd3ae6b60d316cb4ced7466e028bdcb045d0b352ee1ca2df5b244248d"
1223
+ },
1224
+ "exported": [],
1225
+ "exports": [],
1226
+ "input": {
1227
+ "handle": 7,
1228
+ "metadata": 0,
1229
+ "rows": [
1230
+ [
1231
+ 4294967295,
1232
+ 4294967295,
1233
+ 12
1234
+ ],
1235
+ [
1236
+ 0,
1237
+ 0,
1238
+ 13
1239
+ ]
1240
+ ],
1241
+ "save": 0,
1242
+ "text": "312e"
1243
+ },
1244
+ "result": 0,
1245
+ "rows": [
1246
+ [
1247
+ 4294967295,
1248
+ 4294967295,
1249
+ 12
1250
+ ],
1251
+ [
1252
+ 0,
1253
+ 0,
1254
+ 13
1255
+ ]
1256
+ ]
1257
+ }
1258
+ ],
1259
+ "root": 253296,
1260
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1261
+ "source": {
1262
+ "archive": "zUrT43_qvm.pk3",
1263
+ "archive_sha256": "b59bf0c5bedf11d50e0edd220da7eade96de40601e98ae14c54c819047df0796",
1264
+ "member": {
1265
+ "bytes": 983300,
1266
+ "comment_hex": "",
1267
+ "compressed_bytes": 246560,
1268
+ "compression": 8,
1269
+ "crc32": "98ea1768",
1270
+ "create_system": 0,
1271
+ "create_version": 63,
1272
+ "date_time": [
1273
+ 2018,
1274
+ 6,
1275
+ 18,
1276
+ 22,
1277
+ 11,
1278
+ 50
1279
+ ],
1280
+ "directory": false,
1281
+ "entry_index": 2,
1282
+ "external_attr": 32,
1283
+ "extra_hex": "0a0020000000000001001800d1e24e974007d40116dcbf962f1fd20116dcbf962f1fd201",
1284
+ "extract_version": 20,
1285
+ "flags": 0,
1286
+ "header_offset": 221309,
1287
+ "internal_attr": 0,
1288
+ "occurrence": 0,
1289
+ "output": "assets/extracted/zUrT43_qvm.pk3/members/000002/vm/qagame.qvm",
1290
+ "path": "vm/qagame.qvm",
1291
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1292
+ "type": "member",
1293
+ "volume": 0
1294
+ }
1295
+ }
1296
+ }
scripts/analyze_qvm_filter_remove.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Execute recovered filter mutation and its explicit child boundaries."""
2
+ from pathlib import Path
3
+ from analyze_qvm import write_json
4
+ from qvm_research_support import source
5
+ from qvm_filter_persistence_support import environment,mutate,mutation_fixtures
6
+ from qvm_filter_update_support import snapshot
7
+
8
+ def main():
9
+ q,raw,h,ins=source();probes=[]
10
+ for a in mutation_fixtures('remove'):
11
+ m,b=environment(raw,h,a['rows']);m,p,b=mutate(ins,m,b,bytes.fromhex(a['text']),'remove',a['metadata'],a['save'],False,a['handle']);p.update(input=a,rows=snapshot(m,len(a['rows'])));probes.append(p)
12
+ write_json(Path('docs/research/qvm-filter-remove.json'),dict(source=q['source'],sha256=q['sha256'],root=253296,probes=probes,limits='Exact mask/comparison first-match scan; parser and integer children source-executed; native diagnostics and file IO captured. Native table provenance, malformed counts and unsafe parser tokens remain open.'))
13
+ if __name__=='__main__':main()
scripts/qvm_filter_persistence_support.py CHANGED
@@ -49,3 +49,44 @@ def export_oracle(rows,handle):
49
  lines=[('.'.join(str(x) for x in r[1].to_bytes(4,'little'))+':').encode()+decimal(r[2])+b'\n' for r in rows if r[1]!=0xffffffff]
50
  text=b''.join(lines)
51
  return dict(events=[] if not rows else [dict(op='print',text=b'Writing: banlist.txt\n'.hex()),dict(op='open',path=b'banlist.txt'.hex(),mode=1),dict(op='write',handle=handle,text=text.hex()),dict(op='close',handle=handle)],formats=[x.hex() for x in lines],buffer=(text if rows else b'stale').hex())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  lines=[('.'.join(str(x) for x in r[1].to_bytes(4,'little'))+':').encode()+decimal(r[2])+b'\n' for r in rows if r[1]!=0xffffffff]
50
  text=b''.join(lines)
51
  return dict(events=[] if not rows else [dict(op='print',text=b'Writing: banlist.txt\n'.hex()),dict(op='open',path=b'banlist.txt'.hex(),mode=1),dict(op='write',handle=handle,text=text.hex()),dict(op='close',handle=handle)],formats=[x.hex() for x in lines],buffer=(text if rows else b'stale').hex())
52
+
53
+ def mutate(ins,m,b,text,kind,metadata=0,save=0,with_export=False,handle=7):
54
+ from qvm_filter_update_support import LEFT
55
+ from qvm_camera_world_support import string
56
+ string(m,b,LEFT,text);diagnostics=[];exports=[];exported=[]
57
+ def warning(i,m,a,bs):
58
+ diagnostics.append(dict(op='removed') if a[8]==92070 else dict(op='bad-address',text=cstring(m,bs,a[12]).hex()) if a[8]==92320 else dict(op='not-found',text=cstring(m,bs,a[12]).hex()))
59
+ return m,0,{'diagnostic_captured':True}
60
+ def atoi(i,m,a,bs):
61
+ m,v,p,b=run(i,m,37159,37277,36,a,dict(bs),base=EXPORT+0x30000);return m,v,{'actual_source_child':37159}
62
+ def parse(i,m,a,bs):
63
+ m,v,p,b=run(i,m,252304,252498,172,a,dict(bs),{37159:atoi,2294:warning},base=EXPORT+0x40000);return m,v,{'actual_source_child':252304}
64
+ def persist(i,m,a,bs):
65
+ exports.append(252500)
66
+ if with_export:
67
+ m,p,b=export(i,m,dict(bs),handle);exported.append({k:p[k] for k in ['events','formats','buffer']});return m,0,{'actual_source_child':252500}
68
+ return m,0,{'export_captured':True}
69
+ start,stop=(253296,253381) if kind=='remove' else (252127,252212)
70
+ m,v,p,b=run(ins,m,start,stop,40,{8:LEFT,12:metadata,16:save},b,{252304:parse,2294:warning,252500:persist},base=EXPORT+0x50000)
71
+ p.update(result=v,diagnostics=diagnostics,exports=exports,exported=exported);return m,p,b
72
+
73
+ def mutation_fixtures(kind):
74
+ from itertools import product
75
+ tables=[[],[[0xffffffff,0x04030201,9]],[[0xffffffff,0x04030201,9],[0xffffffff,0x04030201,10]],[[0xff,1,11],[0xffffffff,0x04030201,9]],[[0xffffffff,0xffffffff,12],[0,0,13]]]
76
+ texts=[b'1.2.3.4',b'1.*',b'*',b'bad',b'255.255.255.255',b'1.']
77
+ return [dict(rows=rows,text=text.hex(),metadata=meta,save=save,handle=7) for rows,text,meta,save in product(tables,texts,[0,0xffffffff,0x80000000] if kind=='metadata' else [0],[0,1] if kind=='metadata' else [0])]
78
+
79
+ def mutation_oracle(a,kind,with_export=False):
80
+ from qvm_filter_insert_oracle import parse
81
+ rows=[list(r) for r in a['rows']];parsed,remaining=parse(bytes.fromhex(a['text']));diag=[];exports=[];result=0
82
+ if parsed is None:diag=[dict(op='bad-address',text=remaining.hex())]
83
+ else:
84
+ j=next((j for j,r in enumerate(rows) if r[:2]==list(parsed)),None)
85
+ if j is None:diag=[dict(op='not-found',text=a['text'])]
86
+ else:
87
+ result=1
88
+ if kind=='remove':rows[j][1]=0xffffffff;diag=[dict(op='removed')];exports=[252500]
89
+ else:
90
+ rows[j][2]=a['metadata']
91
+ if a['save']:exports=[252500]
92
+ return dict(result=result,diagnostics=diag,exports=exports,exported=[export_oracle(rows,a['handle'])] if exports and with_export else [],rows=rows)
scripts/test_qvm_filter_remove.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from qvm_filter_persistence_support import mutation_oracle
4
+ class MutationTests(unittest.TestCase):
5
+ def test_source_mutation_and_effects(self):
6
+ rows=json.loads(Path('docs/research/qvm-filter-remove.json').read_text())['probes'];self.assertEqual(len(rows),30)
7
+ for p in rows:
8
+ for k,v in mutation_oracle(p['input'],'remove',False).items():self.assertEqual(p[k],v)
9
+ def test_duplicates_and_hole_sentinel(self):
10
+ a=dict(rows=[[0xffffffff,0x04030201,9],[0xffffffff,0x04030201,10]],text=b'1.2.3.4'.hex(),metadata=42,save=1,handle=7)
11
+ p=mutation_oracle(a,'remove',False);self.assertEqual(p['rows'][1],a['rows'][1]);self.assertEqual(p['result'],1)
12
+ a.update(rows=[[0xffffffff,0xffffffff,9]],text=b'255.255.255.255'.hex());self.assertEqual(mutation_oracle(a,'remove',False)['result'],1)
13
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -3124,3 +3124,7 @@ edge docs/research/qvm-filter-export.json scripts/analyze_rust_filter_export.py
3124
  group rust-filter-export scripts/analyze_rust_health_impulse.py
3125
  group gameplay scripts/analyze_rust_filter_export.py
3126
  edge crates/urt-gameplay/src/qvm_format.rs scripts/analyze_rust_filter_export.py
 
 
 
 
 
3124
  group rust-filter-export scripts/analyze_rust_health_impulse.py
3125
  group gameplay scripts/analyze_rust_filter_export.py
3126
  edge crates/urt-gameplay/src/qvm_format.rs scripts/analyze_rust_filter_export.py
3127
+ report scripts/analyze_qvm_filter_remove.py docs/research/qvm-filter-remove.json
3128
+ edge docs/research/qvm-filter-remove.json scripts/test_qvm_filter_remove.py
3129
+ group qvm-filter-remove scripts/analyze_qvm_filter_remove.py
3130
+ edge scripts/analyze_qvm_filter_remove.py scripts/analyze_qvm_resumer_audit.py