Fix notional order rejection handling - #234
Conversation
Co-Authored-By: Codex <noreply@openai.com>
…notional-rejection-fix Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review✅ Merge allowed: 2 finding(s) reported but none are blocking ℹ️ Other Findings1. 🟡 [MEDIUM] Logic in
|
|
Review findings checked against the current runtime contract; no code change is needed:
Both paths are fail-closed and covered by the current execution-stage semantics. |
Summary
Root cause
The runtime treated every live broker response as submitted and copied
notional_usdintoquantity. A Firstrade 400 response therefore appeared as a submitted order, while the dollar amount was displayed and projected as a share count.Validation
python -m pytest -q— 192 passedpython -m ruff check --exclude external .uv lock --checkgit diff --checkpython3 -m build --no-isolationNo live order endpoint was invoked and no persisted runtime state was changed.