Skip to content

refactor: align drift query CLI with shared protobuf schemas#217

Merged
jy-tan merged 1 commit intomainfrom
drift-query-schemas
Apr 7, 2026
Merged

refactor: align drift query CLI with shared protobuf schemas#217
jy-tan merged 1 commit intomainfrom
drift-query-schemas

Conversation

@jy-tan
Copy link
Copy Markdown
Contributor

@jy-tan jy-tan commented Apr 6, 2026

Summary

Align tusk drift query with the shared protobuf query contract so the CLI sends the same request shape as the backend and MCP while still accepting ergonomic user input.

Changes

  • Switch the drift query request/types layer to generated protobuf-backed types from tusk-drift-schemas
  • Serialize drift query requests with protojson and enum numbers so CLI payloads match the backend's protobuf JSON contract
  • Update --where parsing and convenience flag builders to the new recursive WhereClause / fields shape, including normalization of ergonomic access enums like castAs: "int" and decode: "base64"
  • Update subcommands to use enum-backed parsing for order-by, aggregate metrics/grouping/time buckets, payload options, and spans-by-ids field selection
  • Remove the old jsonb-filters CLI path in favor of the unified protobuf-driven where structure
  • Bump github.com/Use-Tusk/tusk-drift-schemas to released version v0.1.33 and add coverage for --where enum normalization

@jy-tan jy-tan changed the title fix: align drift query CLI with shared protobuf schemas refactor: align drift query CLI with shared protobuf schemas Apr 6, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

@jy-tan jy-tan merged commit a8669a2 into main Apr 7, 2026
13 checks passed
@jy-tan jy-tan deleted the drift-query-schemas branch April 7, 2026 00:07
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.

2 participants