Skip to content

Refactor #1294: retire dual-contract reentry extras path - #1297

Merged
lmeyerov merged 3 commits into
masterfrom
issue-1294-retire-dual-reentry-extras
May 5, 2026
Merged

lmeyerov merged 3 commits into
masterfrom
issue-1294-retire-dual-reentry-extras

Conversation

@lmeyerov

@lmeyerov lmeyerov commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements #1294 (execution slice S1 under #1260): retire active-path dependence on legacy dual-contract scalar reentry extras and use ReentryPlan as the canonical contract.

What changed

  • Removed legacy execution extras fields from lowering contract:
    • scalar_reentry_alias
    • scalar_reentry_columns
  • Removed corresponding CompiledCypherQuery compatibility accessors.
  • Trimmed _normalize_execution_extras() and _execution_extras_with() signatures/forwarding.
  • Migrated runtime reentry dispatch in gfql_unified.py:
    • scalar-only lane now keyed off compiled_query.reentry_plan.scalar_only
    • scalar carry columns now sourced from ReentryPlan.scalar_columns
  • Updated _compiled_query_reentry_contract() to prefer plan columns and guard against scalar-only misuse.
  • Added regression test locking absence of legacy extras fields and adjusted stale docstring wording.
  • Added changelog entry.

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 deselected
  • UV_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.py
    • All checks passed

Notes

  • python -m py_compile ... is not runnable in this environment due permission-denied writes under graphistry/compute/__pycache__.

Closes #1294

@lmeyerov
lmeyerov merged commit 7804563 into master May 5, 2026
133 checks passed
@lmeyerov
lmeyerov deleted the issue-1294-retire-dual-reentry-extras branch May 5, 2026 00:48
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]>
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.

GFQL monolith shrinkdown S1: retire dual-contract reentry extras path

1 participant