fix: honor config-driven strategy schedules#355
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review✅ Merge allowed: No issues found Review by Codex PR Review bot • PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43de170716
ℹ️ 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".
| env_values: Mapping[str, str], | ||
| ) -> bool: | ||
| """Reserve enough scheduler time for any live target backed by IB Gateway.""" | ||
| backend = str(env_values.get("IBKR_EXECUTION_BACKEND") or "gateway").strip().lower() |
There was a problem hiding this comment.
Derive the deadline backend from the account-group configuration
For targets whose account-group secret sets execution_backend, this check can classify the service differently from the runtime. load_platform_runtime_settings gives group_config.execution_backend precedence over IBKR_EXECUTION_BACKEND (runtime_config_support.py:294-299), and the rollout documentation explicitly says this field is no longer primarily read from Cloud Run env. Thus, for example, a target/env value of quantconnect with a Gateway-backed account group omits the 330-second deadline even though the deployed /run handler uses IB Gateway; conversely a QuantConnect group with no env override is treated as Gateway by the fallback. Carry the resolved per-account-group backend into the sync target/plan rather than inferring capability from this env value.
Useful? React with 👍 / 👎.
Summary
Why
An IBKR account can switch between strategies with different market calendars. The deployment sync must consume
runtime_target.schedulerwithout forcing New York time or a fixed warmup cron.Validation
Known unrelated local test drift
The full
test_runtime_config_support.pyrun has five pre-existing failures because the currently checked-out shared strategy registry no longer exposes two combo profiles expected by this repository. The tests changed by this PR pass.