Skip to content

GFQL deletion: retire residual unplanned Cypher chain-execution fallback #1468

Closed

Description

@lmeyerov

Summary

Follow-up deletion lane after #1419/#1466/#1467. The generic compat executor wrapper is gone, but graphistry/compute/gfql_unified.py still admits compiled Cypher queries with logical_plan is None by routing them directly through _execute_compiled_query_chain_non_union().

This issue asks for a fresh reachability audit of that residual unplanned-chain path and a deletion/shrink PR where safe.

Current evidence

On current origin/master:

  • graphistry/compute/gfql_unified.py: _execute_compiled_query_non_union() checks compiled_query.logical_plan; when None, it still seeds a dispatch graph and runs _execute_compiled_query_chain_non_union().
  • GFQL compat-executor reachability shrink #1467 intentionally removed _execute_compiled_query_compat_non_union() but left this narrower direct fallback for future logical-planner feature gaps.

Goal

Reduce or eliminate the residual runtime path for logical_plan is None by either:

  1. planning remaining supported shapes through logical/physical routes, or
  2. rejecting unsupported feature-gap shapes at compile/preflight with clear GFQLValidationErrors instead of runtime fallback.

Scope

  • Enumerate current logical_plan is None producers with tests/repros.
  • Classify each as supported-but-unplanned vs unsupported feature gap.
  • Add native logical planning for any small supported shape that is safe to route.
  • Delete/shrink the runtime fallback in gfql_unified.py if no supported path needs it.
  • Update runtime cutover tests so they assert the new boundary.

Out of scope

Acceptance

  • Fresh audit lists all remaining logical_plan is None producers.
  • Any supported producer either gets a logical route or is documented as intentionally deferred.
  • If the fallback remains, it is narrowed with explicit tests and rationale.
  • If removed, all string-Cypher execution tests pass without it.
  • CI, tck-gfql, and relevant GFQL/cuDF validation pass.

Related

Activity

  1. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    Coordinator note from refreshed pyg-bench origin/main research/readiness docs (#26): this lane should treat the remaining SNB direct-Cypher blocker map as audit input before deleting the residual logical_plan is None chain path.

    Relevant official-query blockers recorded in docs/snb-interactive-readiness.md include #973, #981, #982, #983, #994, #996, #997, #998, #999, #1000, and #1031. Most are feature gaps, not deletion targets. Before removing the residual unplanned-chain route, classify whether any of those future direct-Cypher lanes still require the fallback for currently-supported behavior versus should fail fast with a structured compiler/preflight error.

    Priority implication: keep #1468 last among the deletion lanes, and let its first deliverable be an audit/classification table. Do not make it a blind deletion PR.

  2. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    Closeout receipt for #1468:

    What changed:

    • Audited residual compiled_query.logical_plan is None Cypher producers.
    • Found 49 deferred string-Cypher test-corpus instances:
      • multiple_match_stages: 37
      • non_top_level_optional_match: 10
      • anonymous_match: 1
      • scalar_projection_alias_match: 1
    • Narrowed runtime unplanned-chain fallback to explicit structured defer codes only.
    • Added fail-closed guards for missing, None, unknown, and unapproved defer classifications.
    • Added positive coverage for all four approved residual buckets and negative coverage for unclassified/unknown/bogus fallback classifications.

    Validation:

    • Local targeted runtime cutover: 21 passed
    • Local broader GFQL non-cuDF subset: 985 passed, 12 skipped, 112 deselected
    • Ruff/typecheck/surface guard: green
    • DGX RAPIDS 25.02 full GFQL: 2383 passed, 22 skipped, 15 xfailed
    • DGX RAPIDS 26.02 full GFQL: 2383 passed, 22 skipped, 15 xfailed
    • GitHub CI rerun on final head: green, including tck-gfql and Read the Docs
    • Review skill converged; supplemental test-only commit also had two clean/no-advance waves.

    Note: this did not delete the residual chain executor outright. The audit showed supported shapes still rely on it, so the merged change is a fail-closed shrink/guardrail: arbitrary new logical_plan is None paths can no longer silently execute through chain fallback without an explicit reviewed defer code.

  3. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    Update from #1480 / PR #1481: anonymous_match residual bucket is closed.

    Merged commit: 67833b1
    Validation: focused local GFQL tests, ruff, typecheck, PR CI, and DGX RAPIDS/cuDF 25.02 + 26.02 GFQL checks were green.

    Remaining residual lanes remain the non-anonymous buckets already tracked separately, including multiple MATCH, non-top-level OPTIONAL MATCH, and scalar/projection alias fallback.

  4. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    #1479 / PR #1482 follow-up receipt for the residual fallback audit:

    Impact on #1468 residual buckets:

    • The scalar_projection_alias_match bucket is now retired.
    • MATCH (a) RETURN a.id IS NOT NULL AS a, a IS NOT NULL AS b compiles with a logical plan and dispatches through the physical planner instead of the approved unplanned-chain fallback.
    • _APPROVED_UNPLANNED_CHAIN_FALLBACK_CODES no longer includes scalar_projection_alias_match.
    • Named path aliases remain supported; the post-CI fix excludes PathType aliases from MATCH entity validation without weakening node/edge checks.

    Validation receipt:

    • Local focused runtime/planner pytest: 46 passed, 1 deselected
    • Local focused Cypher regression slice: 54 passed, 1013 deselected
    • ruff, typecheck, and git diff --check: green
    • DGX RAPIDS 25.02 + 26.02 focused cuDF reruns: 4 passed on each image
    • Review skill converged after post-CI-fix and post-rebase waves
    • PR CI green after rebase onto latest master, including tck-gfql and ReadTheDocs

    Remaining residual work should exclude both recently retired native-planning buckets:

  5. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    Update from #1489 / PR #1493:

    Validation:

    • Local focused and broad non-cuDF GFQL tests pass.
    • Ruff/typecheck pass.
    • Review skill converged with 0 blocker / 0 important / 0 suggestion findings.
    • DGX RAPIDS 25.02 GFQL: 2399 passed, 22 skipped, 15 xfailed.
    • DGX RAPIDS 26.02 GFQL: 2399 passed, 22 skipped, 15 xfailed.
    • PR CI green, including rerun tck-gfql.

    PR: #1493

  6. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    Merged follow-up for #1489 / PR #1493:

    Residual fallback impact:

    • The shortestPath endpoint-bound multi-MATCH subset no longer requires the residual logical_plan is None fallback.
    • Broad probe for this lane moved canonical multiple_match_stages from 42 -> 1 and literal occurrences from 58 -> 1.
    • Remaining explicit shape is the path-alias carry case: MATCH path = shortestPath((a)-[*]-(b)) MATCH (b)-->(c) RETURN c.

    Validation was green before merge:

    • Local focused + broad non-cuDF GFQL tests, ruff, and typecheck passed.
    • Review skill converged with no findings.
    • DGX RAPIDS 25.02 + 26.02 full GFQL both passed: 2399 passed, 22 skipped, 15 xfailed.
    • PR CI green, including tck-gfql.
  7. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    Merged follow-up for #1478 / PR #1487:

    Residual fallback impact:

    Validation was green before merge:

    • Local focused GFQL tests, ruff/typecheck, diff check.
    • DGX RAPIDS 25.02 + 26.02 focused GFQL: 2 passed each.
    • PR CI green including tck-gfql and ReadTheDocs.
  8. lmeyerov commented on May 17, 2026

    @lmeyerov
    ContributorAuthor

    #1486 prep/audit follow-up receipt

    PR: #1501
    Commit: 4ceb9fe
    CI: green, including ReadTheDocs and tck-gfql.

    This is audit/checklist only, not the final fallback deletion. Current inventory on origin/master @ c7d73c7 found only multiple_match_stages=2, both from the #1495 path-alias carry guard query variants, and found no optional_match_reentry corpus hits. logical_plan_none_without_code=0.

    Meta implication: #1468's guarded fallback shrink remains intact. The final deletion lane is still #1486, blocked on #1495 plus coordinator approval. #1469 is closed and not a current unplanned-chain deletion blocker.

  9. lmeyerov commented on May 18, 2026

    @lmeyerov
    ContributorAuthor

    Final #1486 deletion receipt:

    • PR Remove residual Cypher chain fallback #1508 merged: Remove residual Cypher chain fallback #1508
    • Merge commit: 65016323c0925e46d4a327910865ee2bb3af3697
    • Removed the residual unplanned Cypher chain fallback allowlist/branch.
    • Final inventory: defer_codes=none; only UNION logical_plan=None bookkeeping remains and does not reach non-union chain execution.
    • Runtime fail-fast now uses structured logical_plan_defer_code / logical_plan_defer_reason context keys, with tests avoiding prose-string matching.
    • Validation: local focused/non-cuDF tests, ruff, typecheck, DGX RAPIDS 25.02 + 26.02, and full PR CI all green.

    This completes the final deletion-train target tracked by #1486.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions