Skip to content

feat(gfql): close encoding call parity gaps (encode_edge_icon / encode_axis) + strengthen encode validators #1241

Description

@lmeyerov

Problem

GFQL call validation has parity and depth gaps for encoding operations used in downstream remote flows.

Findings (audit date: 2026-04-29)

1) Missing encoding operations in call safelist

In graphistry/compute/gfql/call/validation.py safelist entries include:

  • encode_point_color
  • encode_edge_color
  • encode_point_size
  • encode_point_icon

But no safelist entries for:

  • encode_edge_icon
  • encode_axis

At the same time, Plottable exposes both methods (encode_edge_icon, encode_axis).

2) Typing contract mirrors the same omission

graphistry/models/gfql/types/call.py CallMethodName also excludes encode_edge_icon and encode_axis, reinforcing runtime/type-level mismatch.

3) Existing encoding validation is shallow

For present encode ops, validators often only check container type (e.g., categorical_mapping: is_dict, palette: list) without key/value semantic checks.

Why this matters

  • Downstream tools using GFQL calls for remote execution get inconsistent capabilities vs direct Plottable APIs.
  • LLM/tooling flows need clear, early, actionable validation errors for encoding payload mistakes.
  • Current mismatch can push users toward ad-hoc settings-level workarounds.

Requested behavior

  1. Decide and document parity policy:
  • either add encode_edge_icon and encode_axis to GFQL call safelist + typed call model, or
  • explicitly document they are intentionally unsupported in call mode.
  1. If supported, add validators + executor support + tests for both ops.

  2. Improve encode validator depth for common payloads:

  • categorical_mapping key/value type checks
  • palette entry type checks
  • clear per-field error messages

Related

Activity

  1. lmeyerov commented on May 20, 2026

    @lmeyerov
    ContributorAuthor

    #1241 closeout receipt:

    • Merged PR: feat(gfql): add encode call parity #1584
    • Merge commit: e7f933fc24487008432e5b7a7d3046fc1f61eff7
    • Head commit: eb2973bda41024178ff51291ec52cf27aa2de7d5
    • Scope: GFQL call() encode parity and validator diagnostics.
      • Added safelist/type/runtime support for encode_edge_icon.
      • Added safelist/type/runtime support for encode_axis.
      • Strengthened common encode validators for palette entries, categorical mapping keys/values, default mappings, and numeric bool rejection.
      • Added anchored exact-message regression tests for the new/strengthened diagnostics.
    • Changelog updated.

    Validation:

    • Local focused validator tests: 21 passed, 31 deselected.
    • Local focused encode execution tests: 2 passed, 12 deselected.
    • Broader local encode selection: 51 passed, 6 skipped, 4982 deselected.
    • Ruff and focused typecheck passed.
    • Local changed-line coverage reproduction passed at 69/69 changed executable lines covered.
    • Review skill converged after the post-CI test amplification patch.
    • Full PR CI green, including changed-line-coverage, TCK, ReadTheDocs, pandas compatibility, and full core matrix.

    Compiler-plan surface touched: no. This was public GFQL call validation/type parity plus generic Plottable dispatch.

    DGX/RAPIDS: not run; change did not touch dataframe/cuDF execution paths.

    Follow-up note:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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