-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_vectors.json
More file actions
166 lines (166 loc) · 6.12 KB
/
Copy pathtest_vectors.json
File metadata and controls
166 lines (166 loc) · 6.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{
"version": "1.0.0",
"description": "Official RPP test vectors for implementation validation",
"license": "CC BY 4.0",
"test_vectors": {
"encoding": [
{
"description": "Minimum address (all zeros)",
"input": {"shell": 0, "theta": 0, "phi": 0, "harmonic": 0},
"expected": {"hex": "0x0000000", "decimal": 0}
},
{
"description": "Maximum address (all max values)",
"input": {"shell": 3, "theta": 511, "phi": 511, "harmonic": 255},
"expected": {"hex": "0xFFFFFFF", "decimal": 268435455}
},
{
"description": "Shell only (max shell, others zero)",
"input": {"shell": 3, "theta": 0, "phi": 0, "harmonic": 0},
"expected": {"hex": "0xC000000", "decimal": 201326592}
},
{
"description": "Theta only (max theta, others zero)",
"input": {"shell": 0, "theta": 511, "phi": 0, "harmonic": 0},
"expected": {"hex": "0x3FE0000", "decimal": 66977792}
},
{
"description": "Phi only (max phi, others zero)",
"input": {"shell": 0, "theta": 0, "phi": 511, "harmonic": 0},
"expected": {"hex": "0x001FF00", "decimal": 130816}
},
{
"description": "Harmonic only (max harmonic, others zero)",
"input": {"shell": 0, "theta": 0, "phi": 0, "harmonic": 255},
"expected": {"hex": "0x00000FF", "decimal": 255}
},
{
"description": "Hot cache, identity sector, grounded",
"input": {"shell": 0, "theta": 45, "phi": 64, "harmonic": 128},
"expected": {"hex": "0x05A4080", "decimal": 5914752}
},
{
"description": "Warm memory, transitional",
"input": {"shell": 1, "theta": 100, "phi": 200, "harmonic": 64},
"expected": {"hex": "0x4C8C840", "decimal": 80267328}
},
{
"description": "Cold storage, abstract",
"input": {"shell": 2, "theta": 256, "phi": 300, "harmonic": 192},
"expected": {"hex": "0xA012CC0", "decimal": 167849152}
},
{
"description": "Frozen archive, ethereal",
"input": {"shell": 3, "theta": 480, "phi": 450, "harmonic": 250},
"expected": {"hex": "0xFC1C2FA", "decimal": 264356602}
}
],
"decoding": [
{
"description": "Zero address",
"input": {"hex": "0x0000000", "decimal": 0},
"expected": {"shell": 0, "theta": 0, "phi": 0, "harmonic": 0}
},
{
"description": "Maximum address",
"input": {"hex": "0xFFFFFFF", "decimal": 268435455},
"expected": {"shell": 3, "theta": 511, "phi": 511, "harmonic": 255}
},
{
"description": "Mid-range address",
"input": {"hex": "0x8000000", "decimal": 134217728},
"expected": {"shell": 2, "theta": 0, "phi": 0, "harmonic": 0}
}
],
"roundtrip": [
{"shell": 0, "theta": 0, "phi": 0, "harmonic": 0},
{"shell": 3, "theta": 511, "phi": 511, "harmonic": 255},
{"shell": 1, "theta": 256, "phi": 256, "harmonic": 128},
{"shell": 2, "theta": 100, "phi": 400, "harmonic": 50},
{"shell": 0, "theta": 45, "phi": 120, "harmonic": 200},
{"shell": 1, "theta": 350, "phi": 75, "harmonic": 32},
{"shell": 2, "theta": 500, "phi": 500, "harmonic": 1},
{"shell": 3, "theta": 1, "phi": 1, "harmonic": 254}
],
"invalid": [
{
"description": "Shell out of range",
"input": {"shell": 4, "theta": 0, "phi": 0, "harmonic": 0},
"expected_error": "Shell must be 0-3"
},
{
"description": "Theta out of range",
"input": {"shell": 0, "theta": 512, "phi": 0, "harmonic": 0},
"expected_error": "Theta must be 0-511"
},
{
"description": "Phi out of range",
"input": {"shell": 0, "theta": 0, "phi": 512, "harmonic": 0},
"expected_error": "Phi must be 0-511"
},
{
"description": "Harmonic out of range",
"input": {"shell": 0, "theta": 0, "phi": 0, "harmonic": 256},
"expected_error": "Harmonic must be 0-255"
},
{
"description": "Address exceeds 28 bits",
"input": {"hex": "0x10000000", "decimal": 268435456},
"expected_error": "Address out of range"
},
{
"description": "Negative address",
"input": {"decimal": -1},
"expected_error": "Address out of range"
}
],
"angular_conversions": [
{
"description": "0 degrees to theta",
"input": {"degrees": 0},
"expected_theta": 0
},
{
"description": "180 degrees to theta",
"input": {"degrees": 180},
"expected_theta": 256
},
{
"description": "359 degrees to theta",
"input": {"degrees": 359},
"expected_theta": 511
},
{
"description": "-90 latitude to phi",
"input": {"latitude": -90},
"expected_phi": 0
},
{
"description": "0 latitude to phi",
"input": {"latitude": 0},
"expected_phi": 255
},
{
"description": "+90 latitude to phi",
"input": {"latitude": 90},
"expected_phi": 511
}
]
},
"sector_definitions": {
"Gene": {"theta_range": [0, 63], "description": "Core identity, immutable traits"},
"Memory": {"theta_range": [64, 127], "description": "Experiential storage"},
"Witness": {"theta_range": [128, 191], "description": "Observational records"},
"Dream": {"theta_range": [192, 255], "description": "Speculative/creative"},
"Bridge": {"theta_range": [256, 319], "description": "Integration/translation"},
"Guardian": {"theta_range": [320, 383], "description": "Protection/consent"},
"Emergence": {"theta_range": [384, 447], "description": "Novel pattern detection"},
"Meta": {"theta_range": [448, 511], "description": "Self-reference, reflection"}
},
"grounding_levels": {
"Grounded": {"phi_range": [0, 127], "description": "Physical, verifiable"},
"Transitional": {"phi_range": [128, 255], "description": "Contextual, situational"},
"Abstract": {"phi_range": [256, 383], "description": "Conceptual, inferential"},
"Ethereal": {"phi_range": [384, 511], "description": "Emergent, speculative"}
}
}