Align profile search filters with the canonical envelope - #33
Merged
Conversation
The API retired the identifier-in-path filter dialect: resource identity now lives in named qualifiers (chain_id, app_id, token_address, tag_id, scope) alongside a stable `field`, and the old spellings are rejected with a 400. parseSearchFilters only validated the field *prefix*, so every retired shape passed client-side and failed server-side. It now mirrors the API schema — canonical fields only, per-field qualifier rules (including app_id required iff scope is "protocol"), numeric values on the .balance fields, and unknown properties rejected with a targeted hint for the retired `appId` spelling. Also updates the --filters help text, the `chains.1.balance` example (which would now 400), the command hint, and the three hand-maintained docs that documented the retired dialect. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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>
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.
Ships alongside the API change in getformo/formono#2129 and the docs in getformo/docs.formo.so#125. Must land with them — the CLI currently builds requests the new API rejects.
Why
The API retired the identifier-in-path filter dialect. Resource identity now lives in named qualifiers (
chain_id,app_id,token_address,tag_id,scope) alongside a stablefield, and the old spellings return a400.The CLI was stale in three ways:
--filters '[{"field":"chains.1.balance",...}]', which now 400s. These examples also feedSKILLS.md, so agents copy the broken form.--filtershelp text documentedchains.{chain_id}.balance,apps.{app_id}.balance,tokens.{address}.balancewithappId, andlabels.{tag_id}— all retired.appIdis rejected outright by the schema's.strict().parseSearchFiltersonly validated the field prefix, so every retired shape passed client-side and failed server-side.What changed
parseSearchFiltersnow mirrors the API schema: canonical fields only (users.{attribute}plus the four resource paths), per-field qualifier rules includingapp_idrequired iffscope: "protocol", numeric values on the.balancefields, and unknown properties rejected with a targeted hint forappId→app_id. Retired paths get a message naming the fix rather than a generic parse error.Also updated: the
--filtersdescribe text, the broken example (plus a newlabels.valueone), the command hint, and the three hand-maintained docs (README.md,SKILLS.md,skills/formo-analytics/SKILL.md) that documented the retired dialect.Verification
pnpm typecheck,pnpm lint, andpnpm test(174 passing) all clean. New tests cover each retired spelling, theappIdrejection, every required-qualifier rule, disallowed qualifiers, and the numeric-value rule.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.