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: no test checks that diagnostics stay off stdout #953
The CLI promises that stdout carries only the results table and every diagnostic goes to stderr, so simlin simulate model.xmile > out.tsv gives a clean file.
No test checks this: a change that printed warnings to stdout passed the whole test suite.
The proposal is a small integration test that runs the built binary and checks the two streams separately.
This prints a conveyor_ltm_degraded warning.
Today it goes to stderr (print_formatted_error), and out.tsv is just the table; nothing would catch it moving to stdout.
The MDL export warnings in convert follow the same rule (#856).
Why it matters
A regression would corrupt piped or redirected output, the main scripted use of the CLI.
No such regression has shipped; the gap was found by deliberately breaking the code and seeing no test fail.
Fix
Add src/simlin-cli/tests/integration/main.rs (one harness per crate) that runs the binary via CARGO_BIN_EXE_simlin with std::process::Command on two tiny fixtures: the conveyor model above, asserting stdout parses as TSV with no diagnostic lines and stderr has the warning; and a convert --to mdl run that triggers an export warning, asserting the same split.
Alternative: route all diagnostic printing through one function that takes a writer and unit-test it; cheaper, but it does not check what the binary actually does.
Pointers
src/simlin-cli/src/main.rs: print_formatted_error, the MDL export warning eprintln! in Command::Convert
changed the title [-]cli: stdout/stderr stream discipline is documented but unpinned by any test[/-][+]cli: no test checks that diagnostics stay off stdout[/+]on Oct 12, 2026
No such regression has shipped. The gap was found only by deliberately breaking the code. A new harness for a debugging tool's single property is test cost without a defect behind it. Reasonable to do only if a CLI integration harness is wanted for other reasons.
Activity
engine: lower the full conveyor pass to wasm and gate it on corpus pa…
engine: lower the full conveyor pass to wasm and gate it on corpus pa…
[-]cli: stdout/stderr stream discipline is documented but unpinned by any test[/-][+]cli: no test checks that diagnostics stay off stdout[/+]bpowers commentedon Oct 12, 2026
Closing as won't fix.
No such regression has shipped. The gap was found only by deliberately breaking the code. A new harness for a debugging tool's single property is test cost without a defect behind it. Reasonable to do only if a CLI integration harness is wanted for other reasons.