Repository navigation
Description
Found by branch review of conveyor-engine before merge (the in-flight XMILE conveyor+queue implementation; specs docs/design/conveyors.md + docs/design/queues.md). Filed from a review report that exceeded its 15-finding cap.
Summary
conveyor_compile::build_compiled / build_vm (src/simlin-engine/src/conveyor_compile.rs:2124 / :2159) duplicate the unified queue_compile::build_compiled / build_vm (queue_compile.rs:819 / :1214) minus queues/couplings, and have no production callers: libsimlin's simlin_sim_new routes every conveyor+queue model through queue_compile::build_compiled. So ~21-25 conveyor tests exercise a build path production never runs, and the pair's rustdoc (claiming the split exists for "libsimlin's reset") is false.
Cost
Repo-wide grep 'conveyor_compile::build' returns only doc/string mentions plus #[cfg(test)] callers. The sole production special-stock entry is engine::queue_compile::build_compiled at src/libsimlin/src/simulation.rs:76, whose result is cached into SimState.conveyor_plans/queue_plans (simulation.rs:272-273) and is what reset recreates the VM from. queue_compile::build_compiled (819-918) already runs expand_conveyors + the Euler gate + throwaway-db compile + resolve_plans/NotSimulatable. A future change to that special-stock prelude that lands only in queue_compile's copy leaves the conveyor test suite green against the stale twin, silently forfeiting its regression value.
Evidence
- the only production build call:
Some(engine::queue_compile::build_compiled(&datamodel, &model_ref.model_name))(src/libsimlin/src/simulation.rs:76), cached atsimulation.rs:272-273 - non-test
grep -rn 'conveyor_compile::build'hits are all doc/string:vm.rs:723,db.rs:1067(comment) &:1079(error text),common.rs:439,db/diagnostic.rs:172,db/units.rs:473; the onlycrate::conveyor_compile::build_vm(...)call outside conveyor_compile.rs's own#[cfg(test)]module isdb/ltm_unified_tests.rs:5557(also a#[cfg(test)]file) - byte-identical prelude:
conveyor_compile.rs:2124-2153vsqueue_compile.rs:832-917(which additionally doesexpand_queues/detect_coupling_specs/apply_couplings) - false rustdoc:
conveyor_compile.rs:2120-2122claims the split exists for "libsimlin's reset, which recreates the VM from the cached compiled sim", but reset uses queue_compile's plans (queue_compile.rs:807-809)
Suggested direction
Delete the conveyor_compile build pair and repoint its ~two dozen tests at queue_compile::build_vm/build_compiled.
Activity