Skip to content

fix: honor config-driven strategy schedules#355

Merged
Pigbibi merged 1 commit into
mainfrom
fix/config-driven-strategy-schedules
Jul 20, 2026
Merged

fix: honor config-driven strategy schedules#355
Pigbibi merged 1 commit into
mainfrom
fix/config-driven-strategy-schedules

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove the four-account service-name allowlist for scheduler deadlines
  • preserve strategy-defined timezone and cron values for any market
  • assign the extended run deadline by live IB Gateway capability
  • cover HK schedule switching, paper targets, and non-gateway backends

Why

An IBKR account can switch between strategies with different market calendars. The deployment sync must consume runtime_target.scheduler without forcing New York time or a fixed warmup cron.

Validation

  • 3 focused env-sync tests passed
  • 2 scheduler deadline contract tests passed
  • Ruff passed on changed files

Known unrelated local test drift

The full test_runtime_config_support.py run 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.

Co-Authored-By: Codex <noreply@openai.com>
@github-actions

Copy link
Copy Markdown

🤖 Codex PR Review

Merge allowed: No issues found


Review by Codex PR Review bot • PR

@Pigbibi
Pigbibi merged commit cd4850e into main Jul 20, 2026
3 checks passed
@Pigbibi
Pigbibi deleted the fix/config-driven-strategy-schedules branch July 20, 2026 23:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant