Return retry status for Firstrade execution blocks#108
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86d59d5b3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
|
|
||
| def _strategy_result_http_status(result: dict[str, Any]) -> int: | ||
| if result.get("execution_blocked") and result.get("execution_block_retryable") and not result.get("funding_blocked"): |
There was a problem hiding this comment.
Respect retryable funding blocks
When a cycle submits at least one order and then hits an insufficient-cash skip on a later buy, run_strategy_cycle can return both funding_blocked=True and execution_block_retryable=True: terminal funding is only funding_blocked and not action_done, while funding_blocked is still copied into the result. This extra not result.get("funding_blocked") therefore makes those partial-submitted retryable blocks return HTTP 200, so the /run Cloud Scheduler job will not retry even though the result explicitly marks the execution block as retryable.
Useful? React with 👍 / 👎.
Summary
Tests