Require Schwab runtime target JSON#48
Conversation
…-cash-floor-150 # Conflicts: # tests/test_runtime_config_support.py
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 190e014c88
ℹ️ 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".
|
|
||
|
|
||
| def load_platform_runtime_settings() -> PlatformRuntimeSettings: | ||
| runtime_target = resolve_runtime_target_from_env(env=os.environ, expected_platform_id=SCHWAB_PLATFORM) |
There was a problem hiding this comment.
Honor runtime-target dry_run_only when loading settings
load_platform_runtime_settings now requires RUNTIME_TARGET_JSON, but it still derives dry_run_only exclusively from SCHWAB_DRY_RUN_ONLY. In deployments where the control plane sets RUNTIME_TARGET_JSON.dry_run_only=true but SCHWAB_DRY_RUN_ONLY is unset/false, the runtime will execute in live mode despite the structured runtime target declaring paper mode. This creates a high-risk mode mismatch and can lead to unintended live orders unless both inputs are manually kept in sync.
Useful? React with 👍 / 👎.
Summary
RUNTIME_TARGET_JSONSTRATEGY_PROFILETests
PYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src .venv/bin/python -m unittest discover -s tests -p 'test_runtime_config_support.py' -vPYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src .venv/bin/python -m unittest discover -s tests -p 'test_notifications.py' -vPYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src .venv/bin/python -m unittest discover -s tests -p 'test_request_handling.py' -vbash tests/test_sync_cloud_run_env_workflow.sh