Skip to content

Update query billing response expectation - #249

Draft
simonariddell wants to merge 14 commits into
nextfrom
codex/query-billing-v4-response
Draft

Update query billing response expectation#249
simonariddell wants to merge 14 commits into
nextfrom
codex/query-billing-v4-response

Conversation

@simonariddell

@simonariddell simonariddell commented Jul 29, 2026

Copy link
Copy Markdown

Updates the integration test for the server-side query billing response change in turbopuffer/turbopuffer#10448. Small queries will report the current 1.28 GB v4 query floor instead of the legacy 256 MB scalar.

The client CI runs against the currently deployed server (256 MB), while the
server PR's CI runs against the changed server (1.28 GB). During that rolling
transition the test accepts exactly those two values and continues to assert
returned bytes exactly. A TODO removes the 256 MB case after #10448 is
deployed.

This is intentionally stacked ahead of rerunning the turbopuffer Python-client
CI job; no generated client surface changes.

Validation:

  • Ruff lint and formatting pass
  • git diff --check passes
  • live integration suite passes after rerunning an unrelated recall timeout

stainless-app Bot and others added 14 commits July 13, 2026 18:42
…50cc737f03437

Picks up ComputeAttribute support (turbopuffer/turbopuffer-apigen).
…-attributes

scripts: bump turbopuffer-apigen image for ComputeAttribute support
Lands the apigen-generated ComputeAttributes union into custom.py. The auto
regen workflow can't push to next (ruleset requires a PR), so landing via PR.
Depends on the HighlightConfig->HighlightConfigParams rename (now on next).
Verified: ruff format leaves it unchanged (idempotent), syntax valid.
…tes` (#247)

* Rich compute_attributes typing (Path B override)

Hand-type the compute_attributes query param as
Dict[str, ComputeAttributes] using the apigen union in custom.py,
across namespace_query_params, namespace_explain_query_params, and
namespace_multi_query_params.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: regenerate custom.py (ComputeAttributesVectorDist -> Sequence[float])

The committed custom.py carried a stale ComputeAttributesVectorDist using
Vector; current apigen emits Sequence[float] (per the inline VectorDist spec
change). Regenerated via scripts/gen so 'supplemental generated code' is current.

* test: use valid ComputeAttributes union values in namespace tests

compute_attributes is now Dict[str, ComputeAttributes], so the generated
{"foo": "bar"} mocks no longer typecheck. Use the Highlight tuple
("Highlight", "bar"), mirroring how aggregate_by uses ("Sum", "bar").

* test: add ComputeAttributes union serialization test

Exercises every variant of the ComputeAttributes union (VectorDist,
Highlight, HighlightWithConfig, RankBy) through the request-body
serialization path (maybe_transform over NamespaceQueryParams) and
asserts the JSON wire form for each.

Placed in a non-skipped module so it runs in CI (the generated
api_resources tests and test_transform.py are skipped).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants