Skip to content

[codex] Fix Cypher zero-hop and empty post-aggregate rows#1443

Merged
lmeyerov merged 4 commits into
masterfrom
issue-1369-mixed-wrong-row-tail
May 15, 2026
Merged

[codex] Fix Cypher zero-hop and empty post-aggregate rows#1443
lmeyerov merged 4 commits into
masterfrom
issue-1369-mixed-wrong-row-tail

Conversation

@lmeyerov

@lmeyerov lmeyerov commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix exact zero-hop Cypher variable-length relationships so *0..0 preserves the seed node as the zero-length path while keeping the public hop(..., 0) API behavior unchanged.
  • Fix empty-graph post-aggregate expression projection so MATCH (a) RETURN count(a) > 0 synthesizes the final output column/value.
  • Fix amplification-discovered sibling post-aggregate expression temp-name collisions such as RETURN count(a) = 0, count(a) + 1.
  • Add Tranche: mixed wrong-row tail cleanup under #1353 #1369 changelog, pandas/cuDF-focused regressions, intentional Cypher surface-guard baseline update, and same-named tck-gfql companion contract branch.

Refs #1369. Refs #1353.

Validation

  • /tmp/tck-gfql-ci-venv312/bin/python -m pytest -q graphistry/tests/test_compute_hops.py::TestComputeHopMixin::test_hop_0b -> 1 passed.
  • /tmp/tck-gfql-ci-venv312/bin/python -m pytest -q graphistry/tests/compute/gfql/cypher/test_lowering.py -k "issue_1369" -> 4 passed, 2 local cuDF skips, 1019 deselected, 4 warnings.
  • /tmp/tck-gfql-ci-venv312/bin/python -m pytest -q graphistry/tests/test_compute_hops.py::TestComputeHopMixin::test_hop_0 graphistry/tests/test_compute_hops.py::TestComputeHopMixin::test_hop_0b graphistry/tests/compute/gfql/cypher/test_lowering.py -k "issue_1369 or issue_983 or two_match_reentry_varlen" -> 12 passed, 2 local cuDF skips, 1013 deselected, 4 warnings.
  • ./bin/ruff.sh graphistry/Plottable.py graphistry/compute/ast.py graphistry/compute/hop.py graphistry/compute/gfql/cypher/lowering.py graphistry/tests/compute/gfql/cypher/test_lowering.py -> passed.
  • /bin/bash -lc "source /tmp/tck-gfql-ci-venv312/bin/activate && ./bin/typecheck.sh" -> passed.
  • python3 bin/ci_cypher_surface_guard.py -> passed after intentional lowering.py baseline bump to 9022 lines for the empty post-aggregate projection + amplification fix.
  • DGX RAPIDS 25.02: RAPIDS_VERSION=25.02 PROFILE=gfql WITH_GPU=1 ... TEST_FILES="<two #1369 cuDF tests>" docker/test-rapids-official-local.sh -> cudf 25.02.02 import smoke; 2 passed.
  • DGX RAPIDS 26.02: RAPIDS_VERSION=26.02 PROFILE=gfql WITH_GPU=1 ... TEST_FILES="<two #1369 cuDF tests>" docker/test-rapids-official-local.sh -> cudf 26.02.01 import smoke; 2 passed.
  • PYTHONPATH=/home/lmeyerov/Work/pygraphistry4:/tmp/tck-gfql-issue-1369 /tmp/tck-gfql-ci-venv312/bin/python -m pytest -q tests/cypher_tck/test_direct_cypher_contract_fastfail.py tests/cypher_tck/test_report.py -> 8 passed.
  • PYTHONPATH=/home/lmeyerov/Work/pygraphistry4:/tmp/tck-gfql-issue-1369 PYGRAPHISTRY_PATH=/home/lmeyerov/Work/pygraphistry4 PYGRAPHISTRY_INSTALL=0 ./bin/ci.sh in sibling tck-gfql worktree -> 3935 passed, 766 xfailed.
  • Companion graphistry/tck-gfql@issue-1369-mixed-wrong-row-tail is rebased/pushed at bd9107f.
  • Review skill reconverged after final amplification delta: 6 waves total, 0 blocker / 0 important / 0 suggestions.
  • Rebased onto origin/master @ 79d62aa5 after conflict resolution; pushed head is 90aebc74.
  • Post-rebase local checks: git diff --check, focused Tranche: mixed wrong-row tail cleanup under #1353 #1369 pytest, ruff touched files, Cypher surface guard, and broader hop/Cypher cluster all passed.
  • Post-rebase DGX RAPIDS 25.02/26.02 cuDF reruns passed (2 passed on each).
  • Current PR CI for pushed 90aebc74 is green; merge remains blocked only on required GitHub review.

Residual #1369 notes

  • Fixed/promoted by this lane: match5-8 and return2-10 now return success_matches_expected; expr-aggregation3-1 and expr-mathematical8-1/2 were already supported/matches-expected on the current sibling snapshot.
  • Residual wrong-row keys remain: expr-pattern1-10, match5-25, match5-26, return2-9, and with2-1.
  • with2-1 appears blocked by sibling fixture/port behavior: the graph fixture materializes (:Begin {num: a.id}) as string "a.id", so the expected join value is not available to pygraphistry runtime.
  • return2-9 expects duplicate standalone map rows despite current one-row RETURN semantics; likely needs TCK contract/fixture follow-up.

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