Skip to content

Update client libraries to support strict filter field validation and metadata prefixing for PR #1291 #1305

@sscargal

Description

@sscargal

Required Changes for Client Libraries

As a result of PR #1291, client libraries must update their filter construction and parsing to work with the server's new filter validation logic and properties-JSON format:

Summary

  • Field validation is now strict. Filters with unknown/unqualified fields will cause 400 errors (was previously ignored).
  • User metadata fields MUST be prefixed (e.g., m.category) when sending filter dicts or query parameters to the server.
  • Code relying on implicit field mapping or omitting the m./metadata. prefix will break.

Action Items for Client Developers

  1. Update filter construction:
    • Wherever the client builds filter dicts for server queries, ensure user metadata keys are prefixed with m. (e.g., {"m.time": "morning"} not {"time": "morning"}).
    • Audit existing usages (Python dicts, TypeScript types, etc.) to confirm consistency.
  2. Error handling:
    • Raise or propagate user-facing errors when the server returns messages about unknown filter fields.
    • Update test suites to expect explicit errors for unknown fields (previously, missing fields were ignored, possibly allowing data leaks).
  3. Interface documentation:
    • Update or clarify inline/helptext for all filter construction functions and method signatures.
  4. Coordinate with backend:
    • If in doubt about field names or required prefixes, consult the backend API or open a discussion for ambiguous cases.

For further context, see the PR diff and the PR summary.


This change is required to support the new server implementation rolled out in PR #1291.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreRoutine maintenance tasks that don't directly affect the codebase's functionality.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions