问题摘要
reposteward benchmark run --baseline raises an uncaught TypeError when the baseline file contains valid JSON whose top-level value is not an object. The invalid baseline is not handled as a normal CLI input error.
最小复现
- Create a baseline file containing a JSON array:
tmp_dir="$(mktemp -d)"
printf '[]\n' > "$tmp_dir/baseline.json"
- Run:
uv run reposteward benchmark run \
--scenario context.utf8_estimate \
--baseline "$tmp_dir/baseline.json"
- Observe an unhandled traceback ending with:
TypeError: baseline benchmark report must be an object
预期行为
The CLI should report that the baseline must be a JSON object, return exit code 2, and not display a Python traceback.
实际行为
The exception is not handled, and the command displays a traceback ending with:
TypeError: baseline benchmark report must be an object
环境
RepoSteward commit: a6dc8c6
OS: Ubuntu 24.04.4 LTS on WSL2
Kernel: Linux 6.18.33.2-microsoft-standard-WSL2 x86_64
Python: 3.12.3
uv: 0.12.10
Harness: Codex
补充证据
load_benchmark_report() raises TypeError when the decoded JSON value is not a dictionary. The CLI's top-level error handler handles ValueError and several other expected errors, but not TypeError, so this exception escapes the normal CLI error path.
提交前确认
问题摘要
reposteward benchmark run --baseline raises an uncaught TypeError when the baseline file contains valid JSON whose top-level value is not an object. The invalid baseline is not handled as a normal CLI input error.
最小复现
TypeError: baseline benchmark report must be an object预期行为
The CLI should report that the baseline must be a JSON object, return exit code 2, and not display a Python traceback.
实际行为
The exception is not handled, and the command displays a traceback ending with:
TypeError: baseline benchmark report must be an object环境
RepoSteward commit: a6dc8c6
OS: Ubuntu 24.04.4 LTS on WSL2
Kernel: Linux 6.18.33.2-microsoft-standard-WSL2 x86_64
Python: 3.12.3
uv: 0.12.10
Harness: Codex
补充证据
load_benchmark_report() raises TypeError when the decoded JSON value is not a dictionary. The CLI's top-level error handler handles ValueError and several other expected errors, but not TypeError, so this exception escapes the normal CLI error path.
提交前确认