This note records the current Phase 0 inventory for the Rust core full conversion track. It is the working boundary map for the remaining Python-owned core behavior.
Python still owns these core-adjacent responsibilities:
pymars/runtime.py
validate, inspect, predict, and design_matrix dispatch
for portable specs, with Python fallback only for unsupported or
missing-native casespymars/earth.py
export_model, from_model, and diagnostics helperspymars/_model_spec.py
Earth objects and portable specsRust is already the authoritative owner for:
load_model_spec_json_or_path helper for JSON strings and file paths, with
load_model_spec_str and load_model_spec_path as the lower-level Rust
entry pointsinspect metadata summaries for compatible specs through the
native runtimedesign_matrixpredictfitPython remains an adapter layer for:
pymars.Earth surfacepymars.runtime.load_model_spec routes JSON strings and file paths through
Rust firstpymars/_model_spec.pyThe deliberate fallback points that remain documented in code are:
pymars.runtime.validate falls back to Python validation if Rust cannot
validate the spec or the spec is not Rust-compatiblepymars.inspect uses the Rust-backed metadata slice first and falls back to
Python adapter behavior if the spec is not Rust-compatible or the backend is
unavailablepymars.runtime.predict and design_matrix fall back to Python replay for
unsupported inputs or missing runtime supportpymars.runtime.fit_model returns None when Rust training is unavailable
and otherwise lets supported Rust training failures surfacepymars.Earth.fit uses Python orchestration when the Rust bridge is
unavailablepymars.Earth.predict uses the Rust-backed portable replay path first and
falls back to the reconstructed Python model only when neededThese fallbacks are narrow and explicit. The removal condition for each one is fixture-backed parity from the Rust-owned path.
The current R, Julia, Go, C#, and TypeScript bindings depend on the shared
portable ModelSpec contract and the Rust CLI bridge, not on Python core
execution. Their remaining Python dependency is mostly indirect: the portable
spec schema and docs must stay stable while Rust becomes the authoritative core.
The inventory above is supported by the current repository state in:
pymars/runtime.pypymars/earth.pypymars/_model_spec.pybindings/r/R/runtime.Rbindings/julia/src/MarsEarth.jlbindings/go/runtime.gobindings/csharp/Runtime.csbindings/typescript/src/runtime.jsdocs/training_orchestration_inventory.mddocs/training_core_migration.mddocs/rust_core.mdPhase 1 should migrate remaining behavior only where the Rust boundary above is already proven or can be proved by fixtures. Phase 2 should remove any Python core behavior that is no longer needed once the Rust path is authoritative.