Skip to content

feat(gfql): deep axis payload validation for ring_*_layout calls #1239

@lmeyerov

Description

@lmeyerov

Problem

GFQL ring_*_layout call validation currently accepts axis as only list|dict without deep structural checks.

In practice, malformed axis payloads can pass early validation and fail later at render/interaction time, making errors harder for downstream agents (LLMs) to correct.

Current behavior

In graphistry/compute/gfql/call/validation.py:

  • ring_categorical_layout.axis: lambda v: v is None or is_list_or_dict(v)
  • ring_continuous_layout.axis: lambda v: v is None or is_list_or_dict(v)

No per-row schema checks.

Additional audit notes (2026-04-29)

  • We confirmed this gap while validating Louie GraphAgent.gfql prevalidation behavior.
  • Structured payloads are prevalidated (ASTCall.from_json(..., validate=True)), so stronger checks here would immediately improve user-facing errors without Louie-specific logic.
  • For radial/ring workflows, this is currently the biggest source of "late" / non-actionable failures.

Requested behavior

Add deep validation for ring axis payloads with explicit field-level errors, e.g.:

  • Accept list of rows where rows validate known keys/types:
    • numeric coords: r / x / y numeric when present
    • label string when present
    • flags internal / external / space booleans
  • For dict axis forms, validate key/value typing and consistency.
  • Reject unknown/ill-typed fields with actionable messages.

Why this matters

  • Better early failures for GFQL call users.
  • Better LLM/tooling correction loops.
  • Less ambiguity between backend and frontend axis rendering behavior.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions