Skip to content

Support income layer runtime controls - #176

Merged
Pigbibi merged 2 commits into
mainfrom
codex/income-layer-runtime-overrides-20260618
Jun 18, 2026
Merged

Support income layer runtime controls#176
Pigbibi merged 2 commits into
mainfrom
codex/income-layer-runtime-overrides-20260618

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • allow generic income layer enabled/max-ratio overrides to reach strategy runtime
  • add RUNTIME_TARGET_ENABLED so official runs can be paused per account while dry runs and probes still work
  • include the new variables in per-service Cloud Run env sync plans

Tests

  • PYTHONPATH=/tmp/income-check/QuantPlatformKit/src:/tmp/income-check/UsEquityStrategies/src:/tmp/income-check/HkEquityStrategies/src:/tmp/income-check/InteractiveBrokersPlatform /tmp/income-check/.venv/bin/python -m pytest -q tests/test_runtime_config_support.py tests/test_strategy_runtime.py

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

ℹ️ 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 +101 to +103
"INCOME_LAYER_ENABLED",
"INCOME_LAYER_MAX_RATIO",
"RUNTIME_TARGET_ENABLED",

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 Export new runtime-control vars to the sync plan

When this script is run by .github/workflows/sync-cloud-run-env.yml, only variables explicitly exported in the job env are visible before python scripts/build_cloud_run_env_sync_plan.py --json runs; the workflow exports the existing IBKR controls but not these newly-added names. In legacy/shared configurations, setting RUNTIME_TARGET_ENABLED=false or the income-layer vars as GitHub Actions variables is therefore treated as absent and the generated plan removes them, so a target that should be paused can be re-enabled unless the value is embedded in CLOUD_RUN_SERVICE_TARGETS_JSON.

Useful? React with 👍 / 👎.

@Pigbibi
Pigbibi merged commit b8afcf2 into main Jun 18, 2026
1 check passed
@Pigbibi
Pigbibi deleted the codex/income-layer-runtime-overrides-20260618 branch June 18, 2026 14:59

@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: 6d2e5e40e8

ℹ️ 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 main.py
Comment on lines +954 to +955
if dry_run_only_override is None and not getattr(RUNTIME_SETTINGS, "runtime_target_enabled", True):
return "Runtime Target Disabled", 200

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 Let configured dry-run targets keep running

When a service is configured with IBKR_DRY_RUN_ONLY=true, /run is still a dry run because the composer/broker adapters use RUNTIME_SETTINGS.dry_run_only whenever dry_run_only_override is None. This new guard blocks those POSTs solely because they came through /run, so setting RUNTIME_TARGET_ENABLED=false on a dry-run-only target (for example the scheduler path used by verify/paper targets) stops the dry run even though the control is meant to pause official runs while dry runs and probes continue.

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