Skip to content

DRY GFQL call validation safelist entries#1604

Open
lmeyerov wants to merge 1 commit into
masterfrom
shrink/gfql-call-validation-1058
Open

DRY GFQL call validation safelist entries#1604
lmeyerov wants to merge 1 commit into
masterfrom
shrink/gfql-call-validation-1058

Conversation

@lmeyerov
Copy link
Copy Markdown
Contributor

@lmeyerov lmeyerov commented May 22, 2026

Summary

  • audited the PR feat(gfql): strengthen axis diagnostics #1592 axis/ring extraction and confirmed call/validation.py no longer owns duplicate axis/ring payload validation bodies; it adapts canonical graphistry.validate.validate_axis payload errors into GFQL call validator results
  • DRYed repeated private safelist entry definitions with compact helper ownership in graphistry.compute.gfql.call.support
  • DRYed repeated encoding, metadata, filter-by-dict, degree, and schema-effect entry definitions while preserving runtime metadata shape
  • added a Development changelog entry

Refs #1058.

Axis/ring classification

Validator surface Relationship to validate_axis.py Decision
encode_axis.rows delegates to documented_axis_rows_payload_error() after preserving exact GFQL list/dict message precheck intentionally split adapter, now inlined in safelist
ring_continuous_layout.axis delegates to ring_continuous_axis_payload_error() with None allowed intentionally split adapter, now inlined in safelist
ring_categorical_layout.axis delegates to ring_categorical_axis_payload_error() with None allowed intentionally split adapter, now inlined in safelist

Sample axis migration:

'rows': _validate_payload_error(
    'rows',
    documented_axis_rows_payload_error,
    list_of_dicts_message=True,
)

LOC buckets

  • Production target file: graphistry/compute/gfql/call/validation.py 1243 -> 1109 LOC (-134)
  • Production total: +320/-403 (net -83) across validation.py and support.py
  • Tests: +116/-1 LOC across focused helper-contract and schema-effect pressure tests
  • Docs/changelog: +1 LOC in CHANGELOG.md

Compatibility / compiler-plan surface

  • Compiler-plan surface touched: no
  • No logical/physical plan routes, dispatch semantics, executor behavior, source-span metadata, or public compatibility shims changed
  • Public viz payload compatibility preserved; unknown axis/ring extension subtypes continue to be handled by canonical validate_axis.py behavior

Source-path fidelity

Validation

  • old-vs-new safelist behavioral comparator against origin/master: function keys equal (51), metadata failures 0, sampled validator diffs 0, sampled schema-effect diffs 0
  • python3 -m pytest -q graphistry/tests/compute/test_gfql_call_validation.py graphistry/tests/compute/test_call_schema_validation.py graphistry/tests/compute/test_call_operations.py graphistry/tests/test_gfql_remote_metadata.py graphistry/tests/test_validate_settings.py -> 129 passed, 2 skipped
  • python3 -m pytest -q graphistry/tests/compute/test_astcall_chains.py graphistry/tests/compute/gfql/test_layout_chain_predicate.py graphistry/tests/compute/gfql/layouts/test_call_layout_radial.py graphistry/tests/layout/ring/test_continuous.py graphistry/tests/layout/ring/test_ring_categorical.py graphistry/tests/test_dataset_id_invalidation.py -> 77 passed, 3 skipped
  • broad non-GPU GFQL core CI surface, serial locally because pytest-xdist is unavailable: 3110 passed, 20 skipped, 230 deselected, 15 xfailed
  • full broad GFQL core surface without exclusions in this shell fails on cuDF/UMAP tests with cudaErrorNoDevice because cuDF/cupy are installed but no CUDA device is visible; PR CI remains the authoritative full gate
  • ./bin/ruff.sh graphistry/compute/gfql/call/validation.py graphistry/compute/gfql/call/support.py graphistry/tests/compute/test_gfql_call_validation.py graphistry/tests/compute/test_call_schema_validation.py graphistry/tests/test_gfql_remote_metadata.py graphistry/tests/test_validate_settings.py -> green
  • ./bin/typecheck.sh graphistry/compute/gfql/call/validation.py graphistry/compute/gfql/call/support.py -> green
  • python3 -m py_compile graphistry/compute/gfql/call/validation.py graphistry/compute/gfql/call/support.py graphistry/tests/compute/test_gfql_call_validation.py graphistry/tests/compute/test_call_schema_validation.py -> green
  • ./bin/test-minimal-lite.sh -> local environment failure only: cuDF/cupy are installed in this shell but no CUDA device is visible, causing cudaErrorNoDevice failures in GPU/UMAP/text tests. Non-GPU targeted validation is green; PR CI is the authoritative gate.

Review

  • Review skill wave 1 converged locally. The initial PR was too high-addition; follow-up slim pass reduced production net from -24 to -83 and target-file shrink from -97 to -134. Pressure pass added helper-contract/schema-effect tests for the mechanical deletion surfaces. No unresolved blocker/important findings.

DGX

  • DGX RAPIDS 25.02/26.02 not run for this diff: no DataFrame/cuDF/GPU runtime path changed. The local broad sentinel CUDA failures are environmental and unrelated to the validation-only code path.

@lmeyerov lmeyerov force-pushed the shrink/gfql-call-validation-1058 branch from 963d3db to 0844aab Compare May 22, 2026 06:36
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