You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine: a run that stops early reports unsaved rows as results #939
When a VM run stops early (for example a conveyor raises ConveyorTransitTooLong partway through), Vm::into_results() should report only the rows the run actually saved.
It used to report the full allocated row count, so callers read the zeroed tail of the buffer as simulated data, and get_series and into_results disagreed about how many steps there were.
Example
A conveyor model whose run aborts after saving 14 of 25 rows: the wasm backend reports 14 saved rows; vm.into_results().step_count reported 25.
Fix
Both into_results and get_series now count rows from the same cursor (Vm::saved_rows), so an early-stopped run reports the rows it saved.
changed the title [-]engine: Vm::into_results() reports slab capacity as step_count, not rows actually saved[/-][+]engine: a run that stops early reports unsaved rows as results[/+]on Oct 12, 2026
Vm::into_results and Vm::get_series both count rows through Vm::saved_rows (the save cursor) at src/simlin-engine/src/vm.rs:1424-1441 and vm.rs:1882 (PR #1075); a conveyor error returns before the save/advance step (vm.rs:1162-1175), so the failing step is not counted. A partial run's step_count is pinned in vm_step_grid_tests.rs:142-146 and VM-vs-wasm saved-row parity in wasmgen/module_tests.rs run_to_at_save_and_between_save_points.
Activity
[-]engine: Vm::into_results() reports slab capacity as step_count, not rows actually saved[/-][+]engine: a run that stops early reports unsaved rows as results[/+]bpowers commentedon Oct 12, 2026
Closing: already fixed on main.
Vm::into_resultsandVm::get_seriesboth count rows throughVm::saved_rows(the save cursor) at src/simlin-engine/src/vm.rs:1424-1441 and vm.rs:1882 (PR #1075); a conveyor error returns before the save/advance step (vm.rs:1162-1175), so the failing step is not counted. A partial run'sstep_countis pinned in vm_step_grid_tests.rs:142-146 and VM-vs-wasm saved-row parity in wasmgen/module_tests.rsrun_to_at_save_and_between_save_points.