Commit adefb18
committed
feat(e7-3): data.roundtrip_check RPC + original_text column in fixtures
Stage E7-3 of E2E Coverage Matrix v2 epic (cppmega-mlx-bb0.3). Closes
the parquet ⇄ tokenizer roundtrip verification that pa3 E-1 left
unfinished (it shipped byte_roundtrip capability flag but no assertion).
cppmega_v4/jsonrpc/roundtrip_method.py (NEW):
- RoundtripCheckParams / RoundtripRowPayload / RoundtripCheckResult
pydantic models.
- roundtrip_check(): loads parquet, decodes input_ids through the
tokenizer, compares to the new original_text column (when present);
emits per-row matches / byte_diff / decoded_preview, plus pass_rate
and tokenizer_capability across the batch. LRU-cached.
cppmega_v4/jsonrpc/schema.py: data.roundtrip_check added to
METHOD_REGISTRY.
cppmega_v4/jsonrpc/dispatcher.py: routes the new method through the
standard pipeline.
tests/fixtures/build_e2e_matrix.py: every shard now carries an
original_text column with the source sentence, so roundtrip_check has
ground truth to compare to. Fixtures regenerated.
Tests (+8 pytest):
- method registered in METHOD_REGISTRY
- T2 GPT-2 pass rate >= 0.5 on ASCII Python source (high confidence)
- T1 cppmega + T3 minimal tested for sensible shape (no crashes,
byte_diff >= 0, original_bytes > 0)
- dispatch returns full payload with rows + pass_rate +
tokenizer_capability + has_original_text
- missing parquet → error envelope
- decoded_preview <= 80 chars
- matches=True implies byte_diff == 0
Regression: pytest 2298 (was 2290; +8) / 2 skip / 15 xfail / 0 fail
(excl. pre-existing path_d). vbgui vitest 150 / 0 fail.
UI integration into DataInspector left as a follow-up sub-stage —
the RPC + tests are the verification gate; per-row badge wiring will
land alongside E7-7 final cross-product.
Closes cppmega-mlx-bb0.3.1 parent 12779b2 commit adefb18
22 files changed
Lines changed: 313 additions & 9 deletions
File tree
- cppmega_v4/jsonrpc
- tests
- fixtures
- parquet
- v4
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| 706 | + | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| 70 | + | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| |||
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
103 | | - | |
| 111 | + | |
| 112 | + | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
| |||
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
| 123 | + | |
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
| |||
122 | 132 | | |
123 | 133 | | |
124 | 134 | | |
| 135 | + | |
125 | 136 | | |
126 | 137 | | |
127 | 138 | | |
| |||
134 | 145 | | |
135 | 146 | | |
136 | 147 | | |
| 148 | + | |
137 | 149 | | |
138 | 150 | | |
139 | 151 | | |
| |||
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
152 | | - | |
| 164 | + | |
| 165 | + | |
153 | 166 | | |
154 | 167 | | |
155 | 168 | | |
| |||
160 | 173 | | |
161 | 174 | | |
162 | 175 | | |
| 176 | + | |
163 | 177 | | |
164 | 178 | | |
165 | 179 | | |
| |||
171 | 185 | | |
172 | 186 | | |
173 | 187 | | |
| 188 | + | |
174 | 189 | | |
175 | 190 | | |
176 | 191 | | |
| |||
183 | 198 | | |
184 | 199 | | |
185 | 200 | | |
| 201 | + | |
186 | 202 | | |
187 | 203 | | |
188 | 204 | | |
| |||
266 | 282 | | |
267 | 283 | | |
268 | 284 | | |
269 | | - | |
| 285 | + | |
270 | 286 | | |
271 | 287 | | |
272 | 288 | | |
273 | 289 | | |
274 | 290 | | |
275 | 291 | | |
276 | | - | |
| 292 | + | |
277 | 293 | | |
278 | 294 | | |
279 | 295 | | |
280 | 296 | | |
281 | 297 | | |
282 | 298 | | |
283 | | - | |
| 299 | + | |
284 | 300 | | |
285 | 301 | | |
286 | 302 | | |
| |||
292 | 308 | | |
293 | 309 | | |
294 | 310 | | |
295 | | - | |
| 311 | + | |
296 | 312 | | |
297 | 313 | | |
298 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments