Repository navigation
Commit f3ccd7f
feat(catalog): catalog_contents v2 - typed struct rows, etag revalidation, worker cache
Reshapes the unreleased 2.1.0 catalog_contents per CATALOG_CONTENTS_V2_SPEC:
- Wire: CatalogContentsResponse{catalog_version, etag: utf8?, not_modified,
schemas: list<struct SchemaContents>}; SchemaContents is an inline struct
(path: list<utf8> first, then the SchemaInfo item and the eight list<binary>
kinds), no longer a separately IPC-serialized blob. catalog_contents takes
if_none_match: utf8 nullable. Protocol version stays 2.1.0.
- Catalog API: catalog_contents(*, attach_opaque_data, if_none_match=None)
-> CatalogContentsResult(schemas, etag=None, not_modified=False). Opt-ins:
catalog_contents_etag = "content-hash" (framework SHA-256 etag, a match
becomes not_modified) and catalog_contents_attach_independent (set by
ReadOnlyCatalogInterface).
- Worker: validates paths (unique, parent present), orders parents first,
enforces not_modified semantics (etag == if_none_match, no schemas; no etag
never yields not_modified). Version-frozen, attach-independent catalogs are
built once per (catalog, catalog_version) and served as a pre-serialized
response, so a cache hit skips the Arrow encode entirely (vgi-cloudflare:
~340 ms -> ~1.1 ms per warm call, 17.6 MB response).
- Client: contents(attach_opaque_data, if_none_match=None) -> CatalogContents
(version, etag, not_modified, schemas), checking path against SchemaInfo.
- Fixtures: contents_memory now reports version 0 (exercises the client's
version-0 rule); new contents_reval (generation-counter etag, short-circuits
without building) and contents_hash (content-hash etag).
- Codegen: go/rust/ts/java type emitters map a struct column to its record
(SchemaContents); SchemaContents stays in EXTRA_RESPONSE_TYPES as a
standalone schema for the per-language parity checks. Sibling SDK and C++
generated files are now stale until regenerated.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent bed86d1 commit f3ccd7f
19 files changed
Lines changed: 1095 additions & 89 deletions
File tree
- docs
- tests
- catalog
- vgi
- _test_fixtures
- catalog
- client
- codegen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
633 | 648 | | |
634 | 649 | | |
635 | 650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
246 | 320 | | |
247 | 321 | | |
248 | 322 | | |
| |||
649 | 723 | | |
650 | 724 | | |
651 | 725 | | |
| 726 | + | |
652 | 727 | | |
653 | 728 | | |
654 | 729 | | |
| |||
0 commit comments