Repository navigation
Refactor #1294: retire dual-contract reentry extras path - #1297
Merged
Merged
Conversation
This was referenced May 4, 2026
2 of 3 tasks
lmeyerov
added a commit
that referenced
this pull request
May 5, 2026
Moves 16 reentry helpers (~470 LOC) out of cypher/lowering.py into a focused cypher/reentry/ subpackage: - naming.py — hidden-column / carry-name conventions (4 helpers) - scope.py — alias-scope traversal for hidden reentry refs (2 helpers) - carry.py — prefix carry-column / order helpers (4 helpers) - rewrite.py — AST/query rewriters for reentry expressions (7 helpers) All names are re-exported from cypher/lowering.py so existing callers keep working unchanged. The moved modules import lowering lazily inside function bodies for the few helpers (_unsupported, _render_expr_node, _rewrite_where_clause_and_resync, _first_pattern_node_alias, etc.) they still need from lowering, avoiding circular imports at module load. lowering.py: 10192 → 9684 LOC (-508). The orchestrator (_compile_bounded_reentry_query) and _map_terminal_reentry_query intentionally stay in lowering.py for this slice — they share heavy edit surface with the sibling #1294 dual-contract retirement (PR #1297). A follow-on slice can move them once #1297 lands. Refs: #1260 S2 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
lmeyerov
added a commit
that referenced
this pull request
May 5, 2026
… (#1299) Moves 16 reentry helpers (~470 LOC) out of cypher/lowering.py into a focused cypher/reentry/ subpackage: - naming.py — hidden-column / carry-name conventions (4 helpers) - scope.py — alias-scope traversal for hidden reentry refs (2 helpers) - carry.py — prefix carry-column / order helpers (4 helpers) - rewrite.py — AST/query rewriters for reentry expressions (7 helpers) All names are re-exported from cypher/lowering.py so existing callers keep working unchanged. The moved modules import lowering lazily inside function bodies for the few helpers (_unsupported, _render_expr_node, _rewrite_where_clause_and_resync, _first_pattern_node_alias, etc.) they still need from lowering, avoiding circular imports at module load. lowering.py: 10192 → 9684 LOC (-508). The orchestrator (_compile_bounded_reentry_query) and _map_terminal_reentry_query intentionally stay in lowering.py for this slice — they share heavy edit surface with the sibling #1294 dual-contract retirement (PR #1297). A follow-on slice can move them once #1297 lands. Refs: #1260 S2 Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced May 5, 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.
Summary
Implements #1294 (execution slice S1 under #1260): retire active-path dependence on legacy dual-contract scalar reentry extras and use
ReentryPlanas the canonical contract.What changed
scalar_reentry_aliasscalar_reentry_columnsCompiledCypherQuerycompatibility accessors._normalize_execution_extras()and_execution_extras_with()signatures/forwarding.gfql_unified.py:compiled_query.reentry_plan.scalar_onlyReentryPlan.scalar_columns_compiled_query_reentry_contract()to prefer plan columns and guard against scalar-only misuse.Validation
python -m pytest -q graphistry/tests/compute/gfql/cypher/test_lowering.py -k "reentry or issue_1026 or issue_1263 or issue_1275 or issue_1285 or issue_1272"95 passed, 15 skipped, 790 deselectedUV_CACHE_DIR=/tmp/uv-cache uv run ruff check graphistry/compute/gfql/cypher/lowering.py graphistry/compute/gfql_unified.py graphistry/compute/gfql/cypher/reentry_plan.py graphistry/tests/compute/gfql/cypher/test_lowering.pyAll checks passedNotes
python -m py_compile ...is not runnable in this environment due permission-denied writes undergraphistry/compute/__pycache__.Closes #1294