Severity: P1
Command: cross-cutting
Category: Output File Safety — destructive overwrite must be opt-in.
Repro: Run any output-producing command twice with the same -o:
uv run winml export -m microsoft/resnet-50 -o temp\ux\out.onnx
"hello world" | Out-File temp\ux\out.onnx -Force
uv run winml export -m microsoft/resnet-50 -o temp\ux\out.onnx
Get-Item temp\ux\out.onnx | Select-Object Length
Actual: The second invocation silently overwrites the file the user just wrote. No warning, no prompt, no --force requirement. Reproduced for: export, optimize, quantize, compile, perf -o, build -o, config -o, eval -o, analyze --output, hub -o. None of these commands have a --force flag.
Expected: Add a shared --force / -f flag (default False) to every output-producing command. At entry:
if output.exists() and not force:
raise click.ClickException(
f"Output '{output}' already exists. Re-run with --force to overwrite."
)
Why it matters: Users keep multiple variant outputs in one folder (q1.onnx, q1_int8.onnx, etc.) and easily clobber yesterday's good model with today's broken one. There is no recovery — the old file is gone.
Severity: P1
Command:
cross-cuttingCategory: Output File Safety — destructive overwrite must be opt-in.
Repro: Run any output-producing command twice with the same
-o:Actual: The second invocation silently overwrites the file the user just wrote. No warning, no prompt, no
--forcerequirement. Reproduced for:export,optimize,quantize,compile,perf -o,build -o,config -o,eval -o,analyze --output,hub -o. None of these commands have a--forceflag.Expected: Add a shared
--force / -fflag (defaultFalse) to every output-producing command. At entry:Why it matters: Users keep multiple variant outputs in one folder (
q1.onnx,q1_int8.onnx, etc.) and easily clobber yesterday's good model with today's broken one. There is no recovery — the old file is gone.