Skip to content

fix(runtime): block weekend IBKR live schedules - #365

Merged
Pigbibi merged 6 commits into
mainfrom
codex/ibkr-weekday-force-run-hardening-20260803
Aug 3, 2026
Merged

fix(runtime): block weekend IBKR live schedules#365
Pigbibi merged 6 commits into
mainfrom
codex/ibkr-weekday-force-run-hardening-20260803

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • sync/remove IBKR_FORCE_RUN and reject true for live Cloud Run targets
  • normalize legacy two-field schedules and reject weekend cron for US live account targets
  • default deploy workflow schedules to Monday-Friday

Supersedes #341 with a fresh branch from current main.

Validation

  • python -m pytest -q tests/test_runtime_config_support.py tests/test_request_handling.py tests/test_cloud_run_entrypoint.py — 136 passed
  • python -m ruff check scripts/build_cloud_run_env_sync_plan.py tests/test_runtime_config_support.py
  • python -m compileall -q scripts/build_cloud_run_env_sync_plan.py
  • actionlint .github/workflows/sync-cloud-run-env.yml
  • changed workflow assertions and git diff --check

Existing test issue

  • bash tests/test_sync_cloud_run_env_workflow.sh reaches a pre-existing stale assertion: the test expects secrets.STRATEGY_PLUGIN_ALERT_TELEGRAM_BOT_TOKEN, while current main uses secrets.TG_TOKEN. The assertions changed by this PR pass.

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

Pigbibi commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

CI failure classification: unrelated dependency drift.

Check QPK pin consistency now resolves QuantPlatformKit main to 776fe71e57e2, while this repository's existing pyproject.toml/uv.lock still pin 92458590a463. This branch changes none of pyproject.toml, uv.lock, or QPK pin inputs; Ruff and the Codex Review Gate passed. No cross-repository dependency-pin change is included in this bounded incident fix.

@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: 85ff885685

ℹ️ 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".

Comment thread scripts/build_cloud_run_env_sync_plan.py Outdated
Comment thread scripts/build_cloud_run_env_sync_plan.py Outdated
Comment thread scripts/build_cloud_run_env_sync_plan.py
Comment thread scripts/build_cloud_run_env_sync_plan.py
Pigbibi and others added 2 commits August 3, 2026 12:09
…rce-run-hardening-20260803

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

@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: 846d3fdb8f

ℹ️ 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".

Comment thread scripts/build_cloud_run_env_sync_plan.py
Comment thread scripts/build_cloud_run_env_sync_plan.py Outdated

@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: 5609124b8f

ℹ️ 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".

Comment thread scripts/build_cloud_run_env_sync_plan.py Outdated
Co-Authored-By: Codex <noreply@openai.com>

@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: bfb49a069f

ℹ️ 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".

Comment thread scripts/build_cloud_run_env_sync_plan.py Outdated
Pigbibi and others added 2 commits August 3, 2026 12:26
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit 0dbca44 into main Aug 3, 2026
4 checks passed
@Pigbibi
Pigbibi deleted the codex/ibkr-weekday-force-run-hardening-20260803 branch August 3, 2026 04:33

@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: 33cd90e0e1

ℹ️ 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".

Comment on lines +573 to +576
if timezone != DEFAULT_MARKET_TIMEZONE:
raise ValueError(
f"US live account scheduler timezone must be {DEFAULT_MARKET_TIMEZONE}: "
f"{timezone!r}"

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 Validate the emitted market timezone as well

When runtime_target.scheduler.timezone is America/New_York but the target explicitly emits IBKR_MARKET_TIMEZONE=Asia/Hong_Kong, this check passes because it examines only the scheduler timezone. The workflow then schedules /run in New York, while runtime_config_support.py:427-430 gives the emitted environment value precedence for the runtime market-open check; consequently, a Friday 15:45 New York invocation is evaluated as Saturday in Hong Kong and skipped, losing the Friday live cycle. The fresh evidence in the final tree is that the canonical-timezone guard still never compares against env_values["IBKR_MARKET_TIMEZONE"]; reject conflicting values or validate both effective timezones.

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