Conversation
* feat(cypher/ir): add ReentryPlan.free_form marker for intermediate MATCH (#1263) Adds a `free_form: bool = False` field to `ReentryPlan` so the runtime can distinguish the LDBC SNB IC3 free-form intermediate MATCH shape from the existing whole-row and scalar-only prefix shapes. When the trailing MATCH after a prefix `WITH` introduces aliases none of which is in the carried set, no carried alias anchors the seed pattern. The runtime needs to broadcast carried columns onto the base node table (single-prefix-row) or fall back to per-row union (multi-prefix-row) so the trailing MATCH cross-joins implicitly via the row pipeline. Default value preserves existing whole-row and scalar-only behavior. Compile + runtime branches that consume this marker land in subsequent commits. Refs #1263 #999 #989 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(cypher): admit free-form intermediate MATCH at compile (#1263) Lifts the failfast at the trailing-MATCH-first-alias check in ``_compile_bounded_reentry_query`` for the free-form case (LDBC SNB IC3 endpoint): when the trailing MATCH binds aliases none of which is in the prefix WITH's carried whole-row set, treat every carried alias as non-source and use the trailing MATCH's first alias as the carrier label for downstream rewrites. The existing ``_collect_non_source_alias_property_refs`` / ``_rewrite_reentry_expr_to_hidden_properties`` machinery (slice 4.3a/b from #1248) materializes carried-alias property references as hidden columns; with this change the same machinery covers free-form cases by passing all whole-row aliases as ``non_source_alias_names``. The ``ReentryPlan`` constructed for free-form sets ``free_form=True`` (no ``CarriedAlias`` entry has ``is_reentry_alias=True``) so the runtime can branch into a broadcast path. The runtime change lands in a follow-up commit; until then, free-form queries compile but return wrong rows because the existing ``_compiled_query_reentry_state`` still seeds from the wrong alias's node ids — the regression is gated by the failfast tests (which fail intentionally at this commit and are retargeted alongside the runtime commit). Also tightens the surviving guard from ``first_alias is None or first_alias != reentry_alias`` to ``first_alias is None`` since the admit branch now sets ``reentry_alias = first_alias`` for the previously-rejected case. Refs #1263 #999 #989 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(cypher): runtime broadcast for simple free-form + scoped failfast (#1263) Lands the runtime half of the #1263 conservative admit: * New ``_compiled_query_freeform_reentry_state`` in ``gfql_unified.py`` branches on ``ReentryPlan.free_form``. For a single-row prefix WITH it broadcasts every ``__cypher_reentry_*`` hidden column from the prefix row onto every base node and returns ``start_nodes=None``, so the trailing MATCH runs as a regular MATCH and inherits the carried values via the row pipeline. Multi-row prefix raises a clear failfast pointing at the multi-row free-form follow-up slice. * Compile gate added in ``_compile_bounded_reentry_query``: when ``free_form`` is True AND the trailing scope references any carried alias property (e.g. ``WHERE country.id IN [x.id, y.id]`` in literal IC3), raise a scoped ``#1263`` failfast pointing at the rewrite-order refactor follow-up. The double-rewrite that emerges from composing ``_demote_secondary_whole_row_aliases`` (#1071) with ``_rewrite_reentry_expr_to_hidden_properties`` (#1248) under free-form is deferred to its own focused slice. End-to-end: * Simple free-form (``MATCH (a) WITH a MATCH (c)-[:T]->(d) RETURN ...``) compiles + executes vectorized on pandas. * IC3-shape with carried-property WHERE rejects with a scoped #1263 failfast (clear error pointing at the follow-up). Refs #1263 #999 #989 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(cypher): retarget free-form failfast tests for #1263 conservative admit Two #1263 regression-locks added in #1270 expected the carried-alias gate to fire for free-form intermediate MATCH. The conservative admit landed in the preceding commits flips the simple shape from rejection to positive execution and tightens the rejection scope to the carried-property variant: * ``test_string_cypher_failfast_rejects_intermediate_reentry_match_with_no_carried_source`` → renamed to ``..._with_carried_property_in_trailing_where`` and pinned to the new scoped #1263 failfast (carried-alias property in trailing scope). * ``test_string_cypher_failfast_rejects_simple_freeform_intermediate_reentry_match`` → renamed to ``test_string_cypher_executes_simple_freeform_intermediate_reentry_match`` and converted to positive: asserts the trailing MATCH binds correctly against the broadcast carried row table. * New ``..._on_cudf_when_available`` mirror with ``pytest.importorskip("cudf")`` for engine parity per coordinator def-of-done. Refs #1263 #999 #989 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(cypher): add multi-prefix-row free-form failfast regression (#1263) Wave 1 review (single CONFIRMED IMPORTANT): the runtime failfast at gfql_unified.py for multi-prefix-row free-form admit was untested. Adds a positive regression-lock that builds a 2-row prefix and asserts the scoped ``single-row prefix WITH only`` failfast wording. Refs #1263 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(changelog): #1263 simple free-form intermediate MATCH admit Records the conservative #1263 close: simple free-form admit + scoped failfast for the carried-property-in-trailing-WHERE variant + runtime broadcast helper + retargeted regression tests + three TCK admits. Refs #1263 #999 #989 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(cypher): Wave 2 amplification — multi-carried + empty prefix free-form (#1263) Wave 2 review per agents/skills/review/SKILL.md confirmed convergence (two consecutive non-significant-advance waves) and surfaced two amplification SUGGESTIONs that the reviewers verified produce correct behavior. Locking the contract: * test_string_cypher_executes_freeform_intermediate_reentry_match_with_multi_carried_aliases — covers `WITH a, b MATCH (c)-[:T]->(d)` shape (multi-carried-aliases admit). * test_string_cypher_executes_freeform_intermediate_reentry_match_with_empty_prefix — covers `_compiled_query_freeform_reentry_state`'s empty-prefix early-return path. Refs #1263 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements consolidated Phase 1 work for issues #1240, #1239, and #1251.
What changed
graphistry/validate/validate_settings.pygraphistry/compute/gfql/call/validation.pygraphistry/compute/chain_remote.pygraphistry/io/metadata.py+ types updatessettings(..., validate=..., warn=...)inPlotterBase+ typing surface (Plottable,pygraphistry)Tests
Passed:
./bin/ruff.sh ...on touched filespython -m pytest -q graphistry/tests/test_validate_settings.pypython -m pytest -q graphistry/tests/compute/test_gfql_call_validation.pypython -m pytest -q graphistry/tests/test_gfql_remote_metadata.pypython -m pytest -q graphistry/tests/test_gfql_remote_persistence.pypython -m pytest -q graphistry/tests/test_collections.pyNote on typecheck:
./bin/typecheck.sh graphistrycould not run in this sandbox because mypy installation via uv is blocked by DNS/network restrictions to PyPI, despiteuvbeing present.