M2-PR1: LogicalPlanner skeleton + op_id/IdGen contract
Parent: #1139
Objective
Introduce the initial M2 LogicalPlanner spine with stable operator IDs and a pure planning contract from BoundIR to LogicalPlan.
Deliverables
- Add
graphistry/compute/gfql/logical_planner.py with:
class LogicalPlanner
plan(bound_ir, ctx) -> LogicalPlan (pure function)
- Wire monotonic
IdGen so every emitted LogicalPlan node receives a unique op_id: int.
- Add minimal covered planning paths sufficient to validate skeleton behavior.
- Preserve backend-neutral logical contracts (no executor selection in planner).
Acceptance Criteria
LogicalPlanner.plan() is importable and returns a LogicalPlan root for covered shapes.
- Every emitted node has
op_id, with uniqueness within plan.
- Determinism/purity tests prove
BoundIR is not mutated and repeated planning is stable.
- Real binder->planner contract tests (not synthetic-only), including UNWIND-carrying fixtures.
- CI green.
Non-goals
- No full
QueryGraph extraction (M2-PR2).
- No lowering cutover (M2-PR4).
- No optimizer passes.
References
plans/compiler-refactor/milestone-M2.md
plans/compiler-refactor/new-architecture.md
M2-PR1: LogicalPlanner skeleton + op_id/IdGen contract
Parent: #1139
Objective
Introduce the initial M2
LogicalPlannerspine with stable operator IDs and a pure planning contract fromBoundIRtoLogicalPlan.Deliverables
graphistry/compute/gfql/logical_planner.pywith:class LogicalPlannerplan(bound_ir, ctx) -> LogicalPlan(pure function)IdGenso every emittedLogicalPlannode receives a uniqueop_id: int.Acceptance Criteria
LogicalPlanner.plan()is importable and returns aLogicalPlanroot for covered shapes.op_id, with uniqueness within plan.BoundIRis not mutated and repeated planning is stable.Non-goals
QueryGraphextraction (M2-PR2).References
plans/compiler-refactor/milestone-M2.mdplans/compiler-refactor/new-architecture.md