Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions designs/codegen/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ regeneration, Ruff, strict Pyright consumer usage, lazy imports,
plugins/interceptors, retries, response metadata, and transport lifecycle.

The Python AST fixtures omit HTTP request/response test traits. Protocol-vector
coverage uses a separate checked-in client input that keeps those vectors and
their provenance. Tests read only checked-in inputs and never depend on Java
coverage reads them from a separate checked-in file per client projection, with
its provenance hash, and runs each vector against the client snapshot. Tests read
only checked-in inputs and never depend on Java
output.
9 changes: 9 additions & 0 deletions designs/codegen/snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ Python model loading flattens mixins before generation.
the checked-in fixtures. Regeneration reads only checked-in files. It neither
reads a build directory nor installs or invokes a JVM tool.

The models used by client projections also keep their client protocol vectors in
`models/vectors/<projection>.json`, keyed by the operation or error shape that
declares them. Server-only vectors are left out. `models/provenance.json` records
each file's hash. `tests/test_client_protocol_vectors.py` runs every vector
through the sync and async clients of the matching snapshot. A request vector
checks the method, path, headers, and decoded body the client sends. A response
vector checks the output model or error it returns. Vectors that the Java client
also fails are marked as strict expected failures.

To refresh reference inputs when their models change, obtain assembled JSON ASTs
and run:

Expand Down
3 changes: 2 additions & 1 deletion scripts/codegen-output-py/models/provenance.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
},
"rpcv2-cbor": {
"assembled_sha256": "68d4c622bfa0ac01065fb563cbfa6c232668ac8ba09bbbb7dae71c1c4475d529",
"fixture_sha256": "04f97ce5fbed181e811a5210ae18005b5d9e3175bedf7ef53f03356dcbe47a38"
"fixture_sha256": "04f97ce5fbed181e811a5210ae18005b5d9e3175bedf7ef53f03356dcbe47a38",
"vectors_sha256": "ca533bf1ff4a736bd295b23be1c319b98d6e09a6238e60bd1a0be44876e382cb"
},
"rpcv2-json": {
"assembled_sha256": "39446e1f8b195e069632f5e95f6d4b44605f0e99a9df5a2d30b9f94321d3cb1c",
Expand Down
Loading
Loading