Repository navigation
Commit 42ce4ff
Require vgi-rpc 0.43.0 for correct nullability under Annotated
vgi-rpc's schema derivation reported "not optional" for every field wrapped in
`Annotated`, because `get_origin(Annotated[X | None, ...])` is `Annotated` and
never a union. 54 protocol fields were therefore described as non-null while
routinely carrying nulls -- ScanSplit's four position/bounds fields, all eight
optional TableInfo columns, six on PlanResponse, FunctionInfo.max_workers,
CatalogInfo.releases[].released_at, and the opaque-data / pushdown / secrets
fields repeated across a dozen request records.
The split is not arbitrary: 139 optional fields WITHOUT an `Annotated` wrapper
were always correct. `Annotated[..., ArrowType(...)]` is required exactly when
the Arrow type cannot be inferred from the Python type -- a pa.Schema or
pa.RecordBatch riding as opaque bytes, a dict serialized to a blob, a narrowed
int -- which is to say every optional payload-carrying field in the protocol.
Nothing here writes different bytes. What changes is that the schema now
describes them, so a peer that compares schemas field by field stops rejecting
correct workers. Both matrix legs pass against the rebuilt C++ client (325/325
subprocess, 325/325 HTTP) and the generated schemas for all five languages are
regenerated in their own repos.
Also fixes java_schemas importing GlobalInitResponse from vgi.protocol, which
re-exports it -- mypy flags the implicit re-export; its home is vgi.invocation.
And stops test_reproducible_vectors_regenerate_identically leaving the working
tree dirty. It regenerates every split-token vector to check the reproducible
ones are stable, but a sealed token draws a fresh random nonce, so its bytes
differ every run. I nearly committed that churn into this commit; the
non-reproducible vectors are now restored afterwards.
NOTE: this cannot be installed until vgi-rpc 0.43.0 is published. The local
co-development path override is left commented in [tool.uv.sources] beside the
existing duckdb one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 23d25ab commit 42ce4ff
3 files changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
200 | 211 | | |
201 | 212 | | |
202 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments