Skip to content

M2-PR1: LogicalPlanner skeleton + op_id/IdGen contract #1126

@lmeyerov

Description

@lmeyerov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions