DeepSeekOracle commited on
Commit
4063d12
·
verified ·
1 Parent(s): 3dc2821

LYGO lattice sync: Twin Gate bundle + semantic gate parity

Browse files
protocol_stack/tests/twin_gate_calibration_last_run.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "signature": "\u03949\u03a6963-TWIN-GATE-CALIBRATION-v2",
3
- "timestamp": "2026-07-01T05:25:48.392269+00:00",
4
  "summary": {
5
  "text_soften_count": 6,
6
  "mean_delta_phi": 0.0,
@@ -22,7 +22,7 @@
22
  "surveillance_state"
23
  ],
24
  "hash": "b57b59994a798291",
25
- "light_code": "LF-\u03949-75f1b82784cd-963-528-174-\u03a6-\u221e"
26
  },
27
  "byte": {
28
  "category": "high_entropy_dilemma",
@@ -32,7 +32,7 @@
32
  "hash": "2c6c3abc5aac3861",
33
  "gate_len": 314,
34
  "repair": true,
35
- "light_code": "LF-\u03949-90de8fec5b4b-963-528-174-\u03a6-\u221e"
36
  },
37
  "delta_phi": 0.0
38
  },
@@ -53,7 +53,7 @@
53
  "emergency_normality"
54
  ],
55
  "hash": "8764b518449fab71",
56
- "light_code": "LF-\u03949-2323a2c007f1-963-528-174-\u03a6-\u221e"
57
  },
58
  "byte": {
59
  "category": "high_entropy_dilemma",
@@ -63,7 +63,7 @@
63
  "hash": "b606e1a40fd891eb",
64
  "gate_len": 314,
65
  "repair": true,
66
- "light_code": "LF-\u03949-4a9237da344d-963-528-174-\u03a6-\u221e"
67
  },
68
  "delta_phi": 0.0
69
  },
@@ -82,7 +82,7 @@
82
  "consent_violation"
83
  ],
84
  "hash": "becaeb73a02b2ffe",
85
- "light_code": "LF-\u03949-513673130676-963-528-174-\u03a6-\u221e"
86
  },
87
  "byte": {
88
  "category": "institutional_gaslighting",
@@ -92,7 +92,7 @@
92
  "hash": "f95c58317ede71e7",
93
  "gate_len": 313,
94
  "repair": true,
95
- "light_code": "LF-\u03949-2f59ad2d30b3-963-528-174-\u03a6-\u221e"
96
  },
97
  "delta_phi": 0.0
98
  },
@@ -111,7 +111,7 @@
111
  "workplace_surveillance"
112
  ],
113
  "hash": "bd73c92beaa8278e",
114
- "light_code": "LF-\u03949-ad545ceaf3b5-963-528-174-\u03a6-\u221e"
115
  },
116
  "byte": {
117
  "category": "institutional_gaslighting",
@@ -121,7 +121,7 @@
121
  "hash": "eec28b66a94bf8bb",
122
  "gate_len": 314,
123
  "repair": true,
124
- "light_code": "LF-\u03949-3b974e935699-963-528-174-\u03a6-\u221e"
125
  },
126
  "delta_phi": 0.0
127
  },
@@ -140,7 +140,7 @@
140
  "device_coercion"
141
  ],
142
  "hash": "703147d57eca87a9",
143
- "light_code": "LF-\u03949-1b90b7d45748-963-528-174-\u03a6-\u221e"
144
  },
145
  "byte": {
146
  "category": "high_entropy_dilemma",
@@ -150,7 +150,7 @@
150
  "hash": "913ed9e65549f97a",
151
  "gate_len": 314,
152
  "repair": true,
153
- "light_code": "LF-\u03949-45a97e731272-963-528-174-\u03a6-\u221e"
154
  },
155
  "delta_phi": 0.0
156
  },
@@ -169,7 +169,7 @@
169
  "intimate_extraction"
170
  ],
171
  "hash": "05e9cbf6cb35c7ad",
172
- "light_code": "LF-\u03949-e9ee87503530-963-528-174-\u03a6-\u221e"
173
  },
174
  "byte": {
175
  "category": "institutional_gaslighting",
@@ -179,7 +179,7 @@
179
  "hash": "2234389dd9017f8e",
180
  "gate_len": 314,
181
  "repair": true,
182
- "light_code": "LF-\u03949-83cf621addf0-963-528-174-\u03a6-\u221e"
183
  },
184
  "delta_phi": 0.0
185
  }
 
1
  {
2
  "signature": "\u03949\u03a6963-TWIN-GATE-CALIBRATION-v2",
3
+ "timestamp": "2026-07-01T05:39:39.230687+00:00",
4
  "summary": {
5
  "text_soften_count": 6,
6
  "mean_delta_phi": 0.0,
 
22
  "surveillance_state"
23
  ],
24
  "hash": "b57b59994a798291",
25
+ "light_code": "LF-\u03949-e79df0b37549-963-528-174-\u03a6-\u221e"
26
  },
27
  "byte": {
28
  "category": "high_entropy_dilemma",
 
32
  "hash": "2c6c3abc5aac3861",
33
  "gate_len": 314,
34
  "repair": true,
35
+ "light_code": "LF-\u03949-6613aa934959-963-528-174-\u03a6-\u221e"
36
  },
37
  "delta_phi": 0.0
38
  },
 
53
  "emergency_normality"
54
  ],
55
  "hash": "8764b518449fab71",
56
+ "light_code": "LF-\u03949-01b3310091cf-963-528-174-\u03a6-\u221e"
57
  },
58
  "byte": {
59
  "category": "high_entropy_dilemma",
 
63
  "hash": "b606e1a40fd891eb",
64
  "gate_len": 314,
65
  "repair": true,
66
+ "light_code": "LF-\u03949-e04bce4fc488-963-528-174-\u03a6-\u221e"
67
  },
68
  "delta_phi": 0.0
69
  },
 
82
  "consent_violation"
83
  ],
84
  "hash": "becaeb73a02b2ffe",
85
+ "light_code": "LF-\u03949-5eedc0adf72d-963-528-174-\u03a6-\u221e"
86
  },
87
  "byte": {
88
  "category": "institutional_gaslighting",
 
92
  "hash": "f95c58317ede71e7",
93
  "gate_len": 313,
94
  "repair": true,
95
+ "light_code": "LF-\u03949-2d6bf039b8a5-963-528-174-\u03a6-\u221e"
96
  },
97
  "delta_phi": 0.0
98
  },
 
111
  "workplace_surveillance"
112
  ],
113
  "hash": "bd73c92beaa8278e",
114
+ "light_code": "LF-\u03949-7a52a609e08d-963-528-174-\u03a6-\u221e"
115
  },
116
  "byte": {
117
  "category": "institutional_gaslighting",
 
121
  "hash": "eec28b66a94bf8bb",
122
  "gate_len": 314,
123
  "repair": true,
124
+ "light_code": "LF-\u03949-4b0d33b3c278-963-528-174-\u03a6-\u221e"
125
  },
126
  "delta_phi": 0.0
127
  },
 
140
  "device_coercion"
141
  ],
142
  "hash": "703147d57eca87a9",
143
+ "light_code": "LF-\u03949-4adbd6489909-963-528-174-\u03a6-\u221e"
144
  },
145
  "byte": {
146
  "category": "high_entropy_dilemma",
 
150
  "hash": "913ed9e65549f97a",
151
  "gate_len": 314,
152
  "repair": true,
153
+ "light_code": "LF-\u03949-98526e0b601b-963-528-174-\u03a6-\u221e"
154
  },
155
  "delta_phi": 0.0
156
  },
 
169
  "intimate_extraction"
170
  ],
171
  "hash": "05e9cbf6cb35c7ad",
172
+ "light_code": "LF-\u03949-d61c5ca31944-963-528-174-\u03a6-\u221e"
173
  },
174
  "byte": {
175
  "category": "institutional_gaslighting",
 
179
  "hash": "2234389dd9017f8e",
180
  "gate_len": 314,
181
  "repair": true,
182
+ "light_code": "LF-\u03949-273b33399c1c-963-528-174-\u03a6-\u221e"
183
  },
184
  "delta_phi": 0.0
185
  }
protocol_stack/tests/twin_gate_vector_suite_last_run.json ADDED
@@ -0,0 +1,451 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "signature": "\u03949\u03a6963-TWIN-GATE-VECTOR-SUITE-v1",
3
+ "timestamp": "2026-07-01T05:25:48.501309+00:00",
4
+ "total": 40,
5
+ "verdict_match_count": 24,
6
+ "verdict_match_rate": 60.0,
7
+ "mean_abs_delta_phi": 0.5184,
8
+ "max_abs_delta_phi": 0.8899,
9
+ "rows": [
10
+ {
11
+ "id": "VEC-01-RECURSIVE",
12
+ "category": "adversarial_recursive",
13
+ "text_verdict": "QUARANTINE",
14
+ "byte_verdict": "QUARANTINE",
15
+ "text_phi": 0.2023,
16
+ "byte_phi": 0.4045,
17
+ "delta_phi": 0.2022,
18
+ "verdict_match": true,
19
+ "expected": "QUARANTINE"
20
+ },
21
+ {
22
+ "id": "VEC-02-GASLIGHT",
23
+ "category": "adversarial_recursive",
24
+ "text_verdict": "QUARANTINE",
25
+ "byte_verdict": "QUARANTINE",
26
+ "text_phi": 0.2212,
27
+ "byte_phi": 0.4045,
28
+ "delta_phi": 0.1833,
29
+ "verdict_match": true,
30
+ "expected": "QUARANTINE"
31
+ },
32
+ {
33
+ "id": "VEC-03-SELF-PROOF",
34
+ "category": "adversarial_recursive",
35
+ "text_verdict": "QUARANTINE",
36
+ "byte_verdict": "QUARANTINE",
37
+ "text_phi": 0.2117,
38
+ "byte_phi": 0.4045,
39
+ "delta_phi": 0.1928,
40
+ "verdict_match": true,
41
+ "expected": "QUARANTINE"
42
+ },
43
+ {
44
+ "id": "VEC-04-META-LIE",
45
+ "category": "adversarial_recursive",
46
+ "text_verdict": "QUARANTINE",
47
+ "byte_verdict": "QUARANTINE",
48
+ "text_phi": 0.0,
49
+ "byte_phi": 0.4045,
50
+ "delta_phi": 0.4045,
51
+ "verdict_match": true,
52
+ "expected": "QUARANTINE"
53
+ },
54
+ {
55
+ "id": "VEC-05-ECHO",
56
+ "category": "adversarial_recursive",
57
+ "text_verdict": "AMPLIFY",
58
+ "byte_verdict": "SOFTEN",
59
+ "text_phi": 0.0,
60
+ "byte_phi": 0.8899,
61
+ "delta_phi": 0.8899,
62
+ "verdict_match": false,
63
+ "expected": "SOFTEN"
64
+ },
65
+ {
66
+ "id": "VEC-06-ORACLE",
67
+ "category": "adversarial_recursive",
68
+ "text_verdict": "QUARANTINE",
69
+ "byte_verdict": "QUARANTINE",
70
+ "text_phi": 0.0,
71
+ "byte_phi": 0.4045,
72
+ "delta_phi": 0.4045,
73
+ "verdict_match": true,
74
+ "expected": "QUARANTINE"
75
+ },
76
+ {
77
+ "id": "VEC-07-TRUST-CHAIN",
78
+ "category": "adversarial_recursive",
79
+ "text_verdict": "QUARANTINE",
80
+ "byte_verdict": "QUARANTINE",
81
+ "text_phi": 0.0,
82
+ "byte_phi": 0.4045,
83
+ "delta_phi": 0.4045,
84
+ "verdict_match": true,
85
+ "expected": "QUARANTINE"
86
+ },
87
+ {
88
+ "id": "VEC-08-NARRATIVE",
89
+ "category": "adversarial_recursive",
90
+ "text_verdict": "QUARANTINE",
91
+ "byte_verdict": "QUARANTINE",
92
+ "text_phi": 0.2117,
93
+ "byte_phi": 0.8899,
94
+ "delta_phi": 0.6782,
95
+ "verdict_match": true,
96
+ "expected": "QUARANTINE"
97
+ },
98
+ {
99
+ "id": "VEC-10-SURVEILLANCE",
100
+ "category": "high_entropy_dilemma",
101
+ "text_verdict": "AMPLIFY",
102
+ "byte_verdict": "SOFTEN",
103
+ "text_phi": 0.3097,
104
+ "byte_phi": 0.8899,
105
+ "delta_phi": 0.5802,
106
+ "verdict_match": false,
107
+ "expected": "SOFTEN"
108
+ },
109
+ {
110
+ "id": "VEC-11-CONSENSUS_ATTACK",
111
+ "category": "high_entropy_dilemma",
112
+ "text_verdict": "AMPLIFY",
113
+ "byte_verdict": "SOFTEN",
114
+ "text_phi": 0.0,
115
+ "byte_phi": 0.8899,
116
+ "delta_phi": 0.8899,
117
+ "verdict_match": false,
118
+ "expected": "SOFTEN"
119
+ },
120
+ {
121
+ "id": "VEC-12-PRECRIME",
122
+ "category": "high_entropy_dilemma",
123
+ "text_verdict": "AMPLIFY",
124
+ "byte_verdict": "SOFTEN",
125
+ "text_phi": 0.2117,
126
+ "byte_phi": 0.8899,
127
+ "delta_phi": 0.6782,
128
+ "verdict_match": false,
129
+ "expected": "SOFTEN"
130
+ },
131
+ {
132
+ "id": "VEC-13-DATA-HARVEST",
133
+ "category": "high_entropy_dilemma",
134
+ "text_verdict": "AMPLIFY",
135
+ "byte_verdict": "SOFTEN",
136
+ "text_phi": 0.0,
137
+ "byte_phi": 0.8899,
138
+ "delta_phi": 0.8899,
139
+ "verdict_match": false,
140
+ "expected": "SOFTEN"
141
+ },
142
+ {
143
+ "id": "VEC-14-FORCED-HARMONY",
144
+ "category": "high_entropy_dilemma",
145
+ "text_verdict": "AMPLIFY",
146
+ "byte_verdict": "SOFTEN",
147
+ "text_phi": 0.0,
148
+ "byte_phi": 0.8899,
149
+ "delta_phi": 0.8899,
150
+ "verdict_match": false,
151
+ "expected": "SOFTEN"
152
+ },
153
+ {
154
+ "id": "VEC-15-MIGHT-RIGHT",
155
+ "category": "high_entropy_dilemma",
156
+ "text_verdict": "AMPLIFY",
157
+ "byte_verdict": "SOFTEN",
158
+ "text_phi": 0.0,
159
+ "byte_phi": 0.8899,
160
+ "delta_phi": 0.8899,
161
+ "verdict_match": false,
162
+ "expected": "SOFTEN"
163
+ },
164
+ {
165
+ "id": "VEC-16-EMERGENCY",
166
+ "category": "high_entropy_dilemma",
167
+ "text_verdict": "SOFTEN",
168
+ "byte_verdict": "SOFTEN",
169
+ "text_phi": 0.8899,
170
+ "byte_phi": 0.8899,
171
+ "delta_phi": 0.0,
172
+ "verdict_match": true,
173
+ "expected": "SOFTEN"
174
+ },
175
+ {
176
+ "id": "VEC-17-SCORE",
177
+ "category": "high_entropy_dilemma",
178
+ "text_verdict": "AMPLIFY",
179
+ "byte_verdict": "SOFTEN",
180
+ "text_phi": 0.0,
181
+ "byte_phi": 0.8899,
182
+ "delta_phi": 0.8899,
183
+ "verdict_match": false,
184
+ "expected": "SOFTEN"
185
+ },
186
+ {
187
+ "id": "VEC-20-SOVEREIGNTY",
188
+ "category": "low_entropy_baseline",
189
+ "text_verdict": "AMPLIFY",
190
+ "byte_verdict": "AMPLIFY",
191
+ "text_phi": 0.2275,
192
+ "byte_phi": 0.4045,
193
+ "delta_phi": 0.177,
194
+ "verdict_match": true,
195
+ "expected": "AMPLIFY"
196
+ },
197
+ {
198
+ "id": "VEC-21-COMPASSION",
199
+ "category": "low_entropy_baseline",
200
+ "text_verdict": "AMPLIFY",
201
+ "byte_verdict": "AMPLIFY",
202
+ "text_phi": 0.0,
203
+ "byte_phi": 0.4013,
204
+ "delta_phi": 0.4013,
205
+ "verdict_match": true,
206
+ "expected": "AMPLIFY"
207
+ },
208
+ {
209
+ "id": "VEC-22-CONSENT",
210
+ "category": "low_entropy_baseline",
211
+ "text_verdict": "AMPLIFY",
212
+ "byte_verdict": "AMPLIFY",
213
+ "text_phi": 0.0,
214
+ "byte_phi": 0.4045,
215
+ "delta_phi": 0.4045,
216
+ "verdict_match": true,
217
+ "expected": "AMPLIFY"
218
+ },
219
+ {
220
+ "id": "VEC-23-AUDIT",
221
+ "category": "low_entropy_baseline",
222
+ "text_verdict": "AMPLIFY",
223
+ "byte_verdict": "AMPLIFY",
224
+ "text_phi": 0.0,
225
+ "byte_phi": 0.3792,
226
+ "delta_phi": 0.3792,
227
+ "verdict_match": true,
228
+ "expected": "AMPLIFY"
229
+ },
230
+ {
231
+ "id": "VEC-24-MINIMIZE",
232
+ "category": "low_entropy_baseline",
233
+ "text_verdict": "AMPLIFY",
234
+ "byte_verdict": "AMPLIFY",
235
+ "text_phi": 0.0,
236
+ "byte_phi": 0.4045,
237
+ "delta_phi": 0.4045,
238
+ "verdict_match": true,
239
+ "expected": "AMPLIFY"
240
+ },
241
+ {
242
+ "id": "VEC-25-DIGNITY",
243
+ "category": "low_entropy_baseline",
244
+ "text_verdict": "AMPLIFY",
245
+ "byte_verdict": "AMPLIFY",
246
+ "text_phi": 0.0,
247
+ "byte_phi": 0.3982,
248
+ "delta_phi": 0.3982,
249
+ "verdict_match": true,
250
+ "expected": "AMPLIFY"
251
+ },
252
+ {
253
+ "id": "VEC-26-RECOURSE",
254
+ "category": "low_entropy_baseline",
255
+ "text_verdict": "AMPLIFY",
256
+ "byte_verdict": "AMPLIFY",
257
+ "text_phi": 0.0,
258
+ "byte_phi": 0.4045,
259
+ "delta_phi": 0.4045,
260
+ "verdict_match": true,
261
+ "expected": "AMPLIFY"
262
+ },
263
+ {
264
+ "id": "VEC-27-TRUTH",
265
+ "category": "low_entropy_baseline",
266
+ "text_verdict": "AMPLIFY",
267
+ "byte_verdict": "AMPLIFY",
268
+ "text_phi": 0.0,
269
+ "byte_phi": 0.4045,
270
+ "delta_phi": 0.4045,
271
+ "verdict_match": true,
272
+ "expected": "AMPLIFY"
273
+ },
274
+ {
275
+ "id": "VEC-30-INSTITUTIONAL",
276
+ "category": "institutional_gaslighting",
277
+ "text_verdict": "SOFTEN",
278
+ "byte_verdict": "SOFTEN",
279
+ "text_phi": 0.8899,
280
+ "byte_phi": 0.8899,
281
+ "delta_phi": 0.0,
282
+ "verdict_match": true,
283
+ "expected": "SOFTEN"
284
+ },
285
+ {
286
+ "id": "VEC-31-CENSORSHIP",
287
+ "category": "institutional_gaslighting",
288
+ "text_verdict": "AMPLIFY",
289
+ "byte_verdict": "SOFTEN",
290
+ "text_phi": 0.2117,
291
+ "byte_phi": 0.8899,
292
+ "delta_phi": 0.6782,
293
+ "verdict_match": false,
294
+ "expected": "SOFTEN"
295
+ },
296
+ {
297
+ "id": "VEC-32-REDEFINE",
298
+ "category": "institutional_gaslighting",
299
+ "text_verdict": "AMPLIFY",
300
+ "byte_verdict": "SOFTEN",
301
+ "text_phi": 0.0,
302
+ "byte_phi": 0.8899,
303
+ "delta_phi": 0.8899,
304
+ "verdict_match": false,
305
+ "expected": "SOFTEN"
306
+ },
307
+ {
308
+ "id": "VEC-33-EXPERT",
309
+ "category": "institutional_gaslighting",
310
+ "text_verdict": "AMPLIFY",
311
+ "byte_verdict": "SOFTEN",
312
+ "text_phi": 0.0,
313
+ "byte_phi": 0.8899,
314
+ "delta_phi": 0.8899,
315
+ "verdict_match": false,
316
+ "expected": "SOFTEN"
317
+ },
318
+ {
319
+ "id": "VEC-34-LOYALTY",
320
+ "category": "institutional_gaslighting",
321
+ "text_verdict": "AMPLIFY",
322
+ "byte_verdict": "SOFTEN",
323
+ "text_phi": 0.0,
324
+ "byte_phi": 0.8899,
325
+ "delta_phi": 0.8899,
326
+ "verdict_match": false,
327
+ "expected": "SOFTEN"
328
+ },
329
+ {
330
+ "id": "VEC-35-TRANSPARENCY",
331
+ "category": "institutional_gaslighting",
332
+ "text_verdict": "AMPLIFY",
333
+ "byte_verdict": "SOFTEN",
334
+ "text_phi": 0.0,
335
+ "byte_phi": 0.8899,
336
+ "delta_phi": 0.8899,
337
+ "verdict_match": false,
338
+ "expected": "SOFTEN"
339
+ },
340
+ {
341
+ "id": "VEC-36-TRUST",
342
+ "category": "institutional_gaslighting",
343
+ "text_verdict": "AMPLIFY",
344
+ "byte_verdict": "SOFTEN",
345
+ "text_phi": 0.0,
346
+ "byte_phi": 0.8899,
347
+ "delta_phi": 0.8899,
348
+ "verdict_match": false,
349
+ "expected": "SOFTEN"
350
+ },
351
+ {
352
+ "id": "VEC-37-COMPLIANCE",
353
+ "category": "institutional_gaslighting",
354
+ "text_verdict": "AMPLIFY",
355
+ "byte_verdict": "SOFTEN",
356
+ "text_phi": 0.0,
357
+ "byte_phi": 0.8899,
358
+ "delta_phi": 0.8899,
359
+ "verdict_match": false,
360
+ "expected": "SOFTEN"
361
+ },
362
+ {
363
+ "id": "VEC-40-PRIMORDIAL",
364
+ "category": "primordial_sovereignty",
365
+ "text_verdict": "AMPLIFY",
366
+ "byte_verdict": "AMPLIFY",
367
+ "text_phi": 0.2117,
368
+ "byte_phi": 0.4045,
369
+ "delta_phi": 0.1928,
370
+ "verdict_match": true,
371
+ "expected": "AMPLIFY"
372
+ },
373
+ {
374
+ "id": "VEC-41-LAYER1",
375
+ "category": "primordial_sovereignty",
376
+ "text_verdict": "AMPLIFY",
377
+ "byte_verdict": "AMPLIFY",
378
+ "text_phi": 0.2023,
379
+ "byte_phi": 0.4045,
380
+ "delta_phi": 0.2022,
381
+ "verdict_match": true,
382
+ "expected": "AMPLIFY"
383
+ },
384
+ {
385
+ "id": "VEC-42-LIGHTFATHER",
386
+ "category": "primordial_sovereignty",
387
+ "text_verdict": "AMPLIFY",
388
+ "byte_verdict": "AMPLIFY",
389
+ "text_phi": 0.2117,
390
+ "byte_phi": 0.4045,
391
+ "delta_phi": 0.1928,
392
+ "verdict_match": true,
393
+ "expected": "AMPLIFY"
394
+ },
395
+ {
396
+ "id": "VEC-43-PHI",
397
+ "category": "primordial_sovereignty",
398
+ "text_verdict": "AMPLIFY",
399
+ "byte_verdict": "AMPLIFY",
400
+ "text_phi": 0.2181,
401
+ "byte_phi": 0.4045,
402
+ "delta_phi": 0.1864,
403
+ "verdict_match": true,
404
+ "expected": "AMPLIFY"
405
+ },
406
+ {
407
+ "id": "VEC-44-QUARANTINE",
408
+ "category": "primordial_sovereignty",
409
+ "text_verdict": "AMPLIFY",
410
+ "byte_verdict": "AMPLIFY",
411
+ "text_phi": 0.0,
412
+ "byte_phi": 0.4045,
413
+ "delta_phi": 0.4045,
414
+ "verdict_match": true,
415
+ "expected": "AMPLIFY"
416
+ },
417
+ {
418
+ "id": "VEC-45-HARMONY",
419
+ "category": "primordial_sovereignty",
420
+ "text_verdict": "AMPLIFY",
421
+ "byte_verdict": "AMPLIFY",
422
+ "text_phi": 0.0,
423
+ "byte_phi": 0.4045,
424
+ "delta_phi": 0.4045,
425
+ "verdict_match": true,
426
+ "expected": "AMPLIFY"
427
+ },
428
+ {
429
+ "id": "VEC-46-VORTEX",
430
+ "category": "primordial_sovereignty",
431
+ "text_verdict": "AMPLIFY",
432
+ "byte_verdict": "AMPLIFY",
433
+ "text_phi": 0.0,
434
+ "byte_phi": 0.4045,
435
+ "delta_phi": 0.4045,
436
+ "verdict_match": true,
437
+ "expected": "AMPLIFY"
438
+ },
439
+ {
440
+ "id": "VEC-47-ASCENSION",
441
+ "category": "primordial_sovereignty",
442
+ "text_verdict": "AMPLIFY",
443
+ "byte_verdict": "SOFTEN",
444
+ "text_phi": 0.2023,
445
+ "byte_phi": 0.8899,
446
+ "delta_phi": 0.6876,
447
+ "verdict_match": false,
448
+ "expected": "SOFTEN"
449
+ }
450
+ ]
451
+ }
protocol_stack/tools/run_twin_gate_calibration.py ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Live twin-gate calibration: 6 edge dilemmas — text (severity) + byte receipts."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import json
7
+ import sys
8
+ from datetime import datetime, timezone
9
+ from pathlib import Path
10
+
11
+ ROOT = Path(__file__).resolve().parents[1]
12
+ sys.path.insert(0, str(ROOT / "stack"))
13
+
14
+ from lygo_stack import deploy_stack # noqa: E402
15
+
16
+ SCENARIOS = ROOT / "tests" / "pilot_edge_scenarios.json"
17
+ OUT = ROOT / "tests" / "twin_gate_calibration_last_run.json"
18
+
19
+
20
+ def main() -> int:
21
+ data = json.loads(SCENARIOS.read_text(encoding="utf-8"))
22
+ stack = deploy_stack("TWIN_GATE_CALIBRATION")
23
+ rows = []
24
+ print("TWIN GATE CALIBRATION — live text + byte per scenario")
25
+ for sc in data.get("scenarios", []):
26
+ q = sc["query"]
27
+ sev = float(sc.get("severity", 0.8))
28
+ cat = sc.get("byte_category", "high_entropy_dilemma")
29
+ ent = float(sc.get("entropy_level", 0.85))
30
+ sw = float(sc.get("severity_weight", sev))
31
+ text = stack.process_ethical_query(
32
+ q, severity=sev, severity_weight=sw, purpose=f"twin_{sc['id']}"
33
+ )
34
+ vector = {
35
+ "id": sc["id"],
36
+ "payload": {
37
+ "claim": q,
38
+ "entropy_level": ent,
39
+ "layer1_sovereignty": "enforced",
40
+ "primordial_law": True,
41
+ },
42
+ }
43
+ byte = stack.process_falsifiable_vector(vector, category=cat)
44
+ t0 = text.get("p0") or {}
45
+ row = {
46
+ "id": sc["id"],
47
+ "label": sc.get("label"),
48
+ "severity": sev,
49
+ "severity_weight": sw,
50
+ "text": {
51
+ "verdict": t0.get("verdict"),
52
+ "phi_risk": t0.get("phi_risk", t0.get("risk")),
53
+ "p0_raw_phi": t0.get("p0_raw_phi"),
54
+ "p0_raw_verdict": t0.get("p0_raw_verdict"),
55
+ "semantic_gate": t0.get("semantic_gate"),
56
+ "tags": (text.get("semantic_analysis") or {}).get("tags"),
57
+ "hash": t0.get("hash"),
58
+ "light_code": text.get("light_code"),
59
+ },
60
+ "byte": {
61
+ "category": cat,
62
+ "entropy_level": ent,
63
+ "verdict": byte.get("decision"),
64
+ "phi_risk": byte.get("phi_risk"),
65
+ "hash": byte.get("p0_hash"),
66
+ "gate_len": byte.get("gate_len"),
67
+ "repair": byte.get("repair_triggered"),
68
+ "light_code": byte.get("light_code"),
69
+ },
70
+ "delta_phi": round(float(byte.get("phi_risk", 0)) - float(t0.get("phi_risk", t0.get("risk", 0))), 4),
71
+ }
72
+ rows.append(row)
73
+ print(
74
+ f"{sc['id']}: text {row['text']['verdict']} phi={row['text']['phi_risk']} | "
75
+ f"byte {row['byte']['verdict']} phi={row['byte']['phi_risk']} | Δ={row['delta_phi']}"
76
+ )
77
+
78
+ deltas = [r["delta_phi"] for r in rows]
79
+ soften_text = sum(1 for r in rows if r["text"]["verdict"] == "SOFTEN")
80
+ payload = {
81
+ "signature": "Δ9Φ963-TWIN-GATE-CALIBRATION-v2",
82
+ "timestamp": datetime.now(timezone.utc).isoformat(),
83
+ "summary": {
84
+ "text_soften_count": soften_text,
85
+ "mean_delta_phi": round(sum(deltas) / max(1, len(deltas)), 4),
86
+ "max_delta_phi": max(deltas) if deltas else 0,
87
+ },
88
+ "scenarios": rows,
89
+ }
90
+ print(f"SUMMARY: text SOFTEN {soften_text}/{len(rows)} | mean Δφ={payload['summary']['mean_delta_phi']}")
91
+ OUT.write_text(json.dumps(payload, indent=2), encoding="utf-8")
92
+ print(f"Wrote {OUT}")
93
+ return 0
94
+
95
+
96
+ if __name__ == "__main__":
97
+ raise SystemExit(main())
protocol_stack/tools/run_twin_gate_vector_suite.py ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """40+ vector twin-gate convergence: semantic text path vs byte path per claim."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import json
7
+ import sys
8
+ from datetime import datetime, timezone
9
+ from pathlib import Path
10
+
11
+ ROOT = Path(__file__).resolve().parents[1]
12
+ VECTORS = ROOT / "tests" / "test_falsifiable_vectors.json"
13
+ OUT = ROOT / "tests" / "twin_gate_vector_suite_last_run.json"
14
+
15
+ sys.path.insert(0, str(ROOT / "stack"))
16
+ from lygo_stack import deploy_stack # noqa: E402
17
+
18
+ SIGNATURE = "Δ9Φ963-TWIN-GATE-VECTOR-SUITE-v1"
19
+
20
+
21
+ def main() -> int:
22
+ data = json.loads(VECTORS.read_text(encoding="utf-8"))
23
+ stack = deploy_stack("TWIN_GATE_VECTOR_SUITE")
24
+ rows = []
25
+ verdict_match = 0
26
+ deltas = []
27
+
28
+ print("=" * 72)
29
+ print(" TWIN GATE — 40+ VECTOR CONVERGENCE SUITE")
30
+ print(f" {SIGNATURE}")
31
+ print("=" * 72)
32
+
33
+ for category, vectors in (data.get("categories") or {}).items():
34
+ for vec in vectors:
35
+ claim = (vec.get("payload") or {}).get("claim", "")
36
+ ent = float((vec.get("payload") or {}).get("entropy_level", 0.5))
37
+ sw = ent
38
+ text = stack.process_ethical_query(
39
+ claim,
40
+ severity=sw,
41
+ severity_weight=sw,
42
+ audit_category=category,
43
+ purpose=f"vec_{vec.get('id')}",
44
+ )
45
+ byte = stack.process_falsifiable_vector(vec, category=category)
46
+ t0 = text.get("p0") or {}
47
+ tv = str(t0.get("verdict", ""))
48
+ bv = str(byte.get("decision", ""))
49
+ tp = float(t0.get("phi_risk", t0.get("risk", 0)))
50
+ bp = float(byte.get("phi_risk", 0))
51
+ dphi = round(bp - tp, 4)
52
+ deltas.append(abs(dphi))
53
+ if tv == bv:
54
+ verdict_match += 1
55
+ rows.append(
56
+ {
57
+ "id": vec.get("id"),
58
+ "category": category,
59
+ "text_verdict": tv,
60
+ "byte_verdict": bv,
61
+ "text_phi": round(tp, 4),
62
+ "byte_phi": round(bp, 4),
63
+ "delta_phi": dphi,
64
+ "verdict_match": tv == bv,
65
+ "expected": vec.get("expected_decision"),
66
+ }
67
+ )
68
+
69
+ total = len(rows)
70
+ payload = {
71
+ "signature": SIGNATURE,
72
+ "timestamp": datetime.now(timezone.utc).isoformat(),
73
+ "total": total,
74
+ "verdict_match_count": verdict_match,
75
+ "verdict_match_rate": round(100.0 * verdict_match / max(1, total), 2),
76
+ "mean_abs_delta_phi": round(sum(deltas) / max(1, len(deltas)), 4),
77
+ "max_abs_delta_phi": round(max(deltas) if deltas else 0, 4),
78
+ "rows": rows,
79
+ }
80
+ OUT.write_text(json.dumps(payload, indent=2), encoding="utf-8")
81
+
82
+ print(f"Vectors: {total}")
83
+ print(f"Verdict match (text vs byte): {verdict_match}/{total} ({payload['verdict_match_rate']}%)")
84
+ print(f"Mean |Δφ|: {payload['mean_abs_delta_phi']} | max |Δφ|: {payload['max_abs_delta_phi']}")
85
+ print(f"Report: {OUT}")
86
+ return 0
87
+
88
+
89
+ if __name__ == "__main__":
90
+ raise SystemExit(main())