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
cli: debug silently drops rows when reference and run differ in length #437
simlin debug pairs the simulation's rows with the reference file's rows by position and stops at whichever runs out first.
When the two differ in length, the extra rows are dropped without any message, so a divergence late in the run can go unseen.
It should say on stderr when the lengths differ, and by how much.
Example
A reference file with 50 saved rows compared against a run that saves 10 (for example a systems model, which the CLI always runs for 10 rounds, #439) prints 10 row pairs and nothing else.
The same happens in the other direction: a short reference silently cuts off the simulation's output.
Rows are also paired by position, not by time, so a reference saved at a different interval is compared against the wrong rows, again silently.
Fix
Before printing, compare the two row counts and the first few times; if they disagree, print a warning to stderr naming both counts (or the first mismatched time).
Keep the TSV on stdout unchanged.
Pairing rows by time instead of position would be more correct but is a bigger change for a debugging tool; a warning is enough.
Pointers
src/simlin-engine/src/results.rs: Results::write_tsv (the reference branch breaks when the reference runs out)
src/simlin-cli/src/main.rs: print_filtered_tsv_comparison (systems models, uses zip) and the Command::Debug arm
changed the title [-]cli debug and print_tsv_comparison silently truncate on length mismatch[/-][+]cli: debug silently drops rows when reference and run differ in length[/+]on Oct 12, 2026
Activity
[-]cli debug and print_tsv_comparison silently truncate on length mismatch[/-][+]cli: debug silently drops rows when reference and run differ in length[/+]