fix: harden IBKR runtime against historical failures#354
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review✅ Merge allowed: 1 finding(s) reported but none are blocking ℹ️ Other Findings1. 🟡 [MEDIUM] Logic in
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1870016db
ℹ️ 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".
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Summary
ibkr_gateway_unavailableand return retryable HTTP 503Historical evidence (2026-06-21 through 2026-07-21)
Across the four gateway services, Cloud Logging showed:
The dominant 503 clusters were production startup/import failures, including:
TypeError: non-default argument 'connect_ib_fn' follows default argumentload_strategy_entrypoint,common.health,try_record_platform_execution,notifications.renderer_base)The operational failures were:
/monitor-dispatch429s while the single instance was occupied (the preceding fix: harden IBKR precheck runtime dispatch #353 already removed the self-call/schedule collision)The startup validator imports the same locked production dependency set used by the image and verifies the required Flask route contract without contacting IBKR. It therefore fails CI and
docker buildbefore a broken image can be pushed or deployed.Verification
uv run --no-sync ruff check --exclude external .python scripts/validate_cloud_run_startup.pypassed with 7 registered routes