
kevin9327andClaude Opus 5
d2931aaadb
fix(backtest): SSE 端点非法 start/end 返回 400 而不是 500
strategy/stream、optimize/stream、walkforward/stream 三个端点直接裸调
date.fromisoformat(start/end),前端传入 "not-a-date"、"2026-13-01"、
"2026/09/04" 之类的值会抛未捕获 ValueError,客户端只拿到 500 和
Internal Server Error,看不到是哪个参数不合法。
仓库内同类入口已有正确写法:signals.py 的 /intraday/replay 把
date.fromisoformat 包在 try 里返回 400「日期格式错误」,mining.py 的
MiningRunRequest 用 field_validator 走 422。本次只把 backtest 这三处
补齐到同一口径,不改其它行为。
补 tests/test_backtest_stream_date_guard.py:三个端点 × 非法 start/end
断言 400;另外用服务端范围保护(backtest_range_guard)让事件流立即收尾,
断言合法日期照旧返回 200,证明不是把入口收窄。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-09 07:35:32 +09:00
..
2026-06-18 17:18:23 +08:00
2026-08-30 19:05:32 +08:00
2026-07-14 18:49:23 +08:00
2026-06-27 23:23:34 +08:00
2026-07-03 14:11:26 +08:00
2026-09-09 07:35:32 +09:00
2026-08-23 19:13:03 +08:00
2026-09-07 22:54:05 +08:00
2026-09-05 15:41:15 +08:00
2026-07-18 23:37:54 +08:00
2026-09-08 18:09:59 +08:00
2026-07-10 16:37:11 +08:00
2026-09-08 18:09:59 +08:00
2026-09-03 12:45:24 +08:00
2026-09-06 16:20:42 +08:00
2026-09-05 15:41:15 +08:00
2026-09-04 16:37:06 +08:00
2026-08-31 16:50:21 +08:00
2026-08-23 14:57:12 +08:00
2026-08-16 23:39:07 +08:00
2026-08-31 16:50:12 +08:00
2026-08-02 19:18:07 +08:00
2026-09-07 15:25:54 +08:00
2026-09-08 18:09:59 +08:00
2026-09-06 18:27:33 +08:00
2026-07-12 22:42:38 +08:00
2026-09-06 16:05:02 +08:00
2026-09-05 21:11:44 +09:00