Live bucket query tests and docs (#16 PR B) - #74
Merged
Merged
Conversation
- tests/integration/test_query_buckets_integration.py: a SamplingClock bucket returned verbatim, whole boundary buckets and exact trimming, limit counting buckets across pages, the stream matching the unary pages, an empty result, and ColumnMetadata provenance read back live and excluded. - test_non_scalar_columns_reach_success becomes test_non_scalar_columns_read_back_exactly: values, dims, image descriptor, schemaId, and the serialized payload and encoding. - Cookbook: a "Whole buckets" section in query.md; ingestion.md reads its array, image, and struct columns back (and its imports block gains what that needs); #16 pointers in conventions.md and sample-status.md. - README, NEXT.md, and a CLAUDE.md "Bucket Query API" section recording the server facts and design rules as invariants. The new and changed recipes were run as one script against a live stack. Closes #16 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CajTMkjkkzeoWXLSgMpn5k
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The query cookbook uses dfc without importing it, causing its standalone recipe to fail.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds live verification and documentation for bucket-oriented queries.
Changes:
- Adds integration coverage for bucket querying and non-scalar round trips.
- Documents bucket paging, trimming, metadata, and conversion behavior.
- Updates release notes, feature listings, and snippet-checker context.
| File | Description |
|---|---|
tests/integration/test_query_buckets_integration.py |
Adds live bucket-query tests. |
tests/integration/test_ingestion_client_integration.py |
Verifies non-scalar read-back. |
README.md |
Advertises bucket-query support. |
doc/release-notes/NEXT.md |
Records user-visible changes. |
doc/cookbook/sample-status.md |
Documents bucket filter refusal. |
doc/cookbook/README.md |
Updates recipe index. |
doc/cookbook/query.md |
Adds bucket-query guidance. |
doc/cookbook/ingestion.md |
Adds non-scalar read-back example. |
doc/cookbook/conventions.md |
Clarifies whole-bucket semantics. |
CLAUDE.md |
Records implementation invariants. |
.dev/tools/check-cookbook-snippets.py |
Adds bucket conversion imports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The structural-accessors snippet used dfc, which query.md never imported, so the recipe run on its own failed with a NameError. The snippet checker cannot see this because its shared preamble defines every alias. bc moves into the imports block too, from its inline import mid-recipe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CajTMkjkkzeoWXLSgMpn5k
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PR B of #16 (
plan/tickets/16/plan.md, "PR B"). It follows #72, which added the client andbucket_conversions.Live tests
tests/integration/test_query_buckets_integration.py. It ingests its own data, one request per bucket, and covers:SamplingClockbucket returned verbatim, including axis, provider, and column type;trim_bucket()andquery_buckets_to_dataframes(trim=True)cutting it exactly;limitcounting buckets, with two PVs reassembling across pages;max_buckets;ColumnMetadataprovenance read back live, then absent underexclude_column_metadata(reported asNoneinattrs["buckets"]).test_non_scalar_columns_reach_successis nowtest_non_scalar_columns_read_back_exactly. It reads back values, dims, the image descriptor,schemaId, and the serialized payload and encoding.Docs
query.md: a new "Whole buckets" section covering:limitcounting buckets, and how the stream behaves;ingestion.md:QueryParams,PV, andbc. The snippet checker can't catch this because its preamble defines those names; running the recipe as a script did.conventions.md,sample-status.md,README.md(feature list, TODO, and the recipe table), andNEXT.md: dropped the "not yet read back / not yet wrapped" wording.CLAUDE.md:_build_query_spec()seam note and the "until interface to v2 bucket-oriented query API (queryBuckets / queryBucketsStream) #16" line updated;Verification
mypy src/, the cookbook checker (122 snippets), and the release-notes checker all pass. 968 unit tests pass.query.mdbucket snippet. The output matched the docs: the array/image/struct values shown, and the quarter-second trim cutting 10,000 samples to 2,500.Closes #16
🤖 Generated with Claude Code
https://claude.ai/code/session_01CajTMkjkkzeoWXLSgMpn5k