Skip to content

Use canonical filter envelopes in the CLI - #29

Merged
yosriady merged 1 commit into
mainfrom
feat/canonical-filter-contracts
Jul 29, 2026
Merged

Use canonical filter envelopes in the CLI#29
yosriady merged 1 commit into
mainfrom
feat/canonical-filter-contracts

Conversation

@yosriady

@yosriady yosriady commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What changed

  • replace profile search --conditions with --filters and send { filters, logic }
  • replace segment --filter-sets DSL strings with canonical filter objects
  • update alert examples and reject legacy name/operator envelopes
  • keep one CLI-local canonical operator registry shared by profiles, segments, and alerts
  • require values for value-carrying profile and segment operators
  • support string/number membership arrays and value-less existence operators
  • update README and agent skill documentation

Why

The public API is consolidating filter objects on { field, op, value } and segment/profile container names on filters. Leaving the CLI on the legacy flags and payloads would make it incompatible with the new contract.

Validation

  • pnpm test (160 passing; live tests skipped because the repository's configured TEST_TOKEN is rejected by production)
  • pnpm typecheck
  • pnpm lint
  • pnpm build

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@yosriady
yosriady marked this pull request as ready for review July 29, 2026 05:46
@yosriady
yosriady merged commit 3f1485d into main Jul 29, 2026
7 checks passed
@yosriady
yosriady deleted the feat/canonical-filter-contracts branch July 29, 2026 05:46
yosriady added a commit that referenced this pull request Aug 3, 2026
The `contains` operator is no longer social-only: the profiles surface
supports it on routable string attributes (case-sensitive) and, since
P-2387, on `labels.value` (case-insensitive). `startsWith`/`endsWith`
were missing from the CLI's operator list entirely even though the
validator already accepted them. Replace the one-line claim with the
per-field support table the API actually enforces.

Also document `page_scope` (new on kpis/top_*/revenue_*/volume_by_metric)
and note that the retired per-family analytics params are rejected with a
400 if pushed through `--params`.

Version 1.2.0 covers the five unreleased canonical-envelope commits
(#29#33) on top of v1.1.1.

Co-authored-by: Claude Opus 5 (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.

1 participant