Skip to content

Epic: Tackle dependency closure for C++→Mojo migration #64

Description

@Tokarzewski

Parent epic for the dependency-closure strategy. On real EnergyPlus code the limiter is dependency closure, not translation skill — the 1.5B draft model is strong, but real functions call siblings, touch the EnergyPlusData god-object, and link libs, so they cannot be ported or verified in isolation.

Reframe: closure is two coupled problems

  • Verify-closure — to confirm F is correct its callees must produce real values → seems to need them ported first.
  • Compile-closure — to make F's Mojo build, every symbol/type it references must exist.

Leaf-first ordering attacks both at once, which is why it stalls. The leverage is to decouple them: make correctness independent of porting order (record/replay), and treat compile-closure as a build-ordering chore (shims + fan-in order). Correctness stays guaranteed at every step by the C++ numeric oracle (/home/bart/Github/EnergyPlus/).

Children

Progress note

The directed-graph foundation for #67/#68/#69 is on main:

  • A persisted directed graph (node-link JSON) replaces the flat layer summary.
  • cbm_graph.py queries the codebase-memory-mcp knowledge graph (via its CLI bridge) to build a multi-relational directed graph — calls + writes_field + reads_field — over the indexed EnergyPlus C++ oracle (18,996 nodes / ~37k edges).

Shape of the approach

Top-down to define the seams (runtime path, god-object slice, trait boundaries); bottom-up to fill and verify leaves along that path — with record/replay so verification never waits for the closure. Compile-closure becomes a build-ordering chore; correctness is guaranteed at every step by the oracle.

Relates to north-star #56.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions