Repository navigation
fix: apply quant bridge host rewrite and file mounts to selected environment - #691
Open
pcbeingused333 wants to merge 2 commits into
Open
pcbeingused333 wants to merge 2 commits into
pcbeingused333 wants to merge 2 commits into
Conversation
…ronment lean live deploy stores brokerage settings under lean_config["environments"][<env>], so the top-level-only checks in LeanRunner never saw them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #690
Cause
LeanRunneronly looked at the top level of the Lean config when rewritingquant-bridge-server-host(localhost/127.0.0.1->host.docker.internal) and when mountingtransaction-log/quant-bridge-symbol-map-file.lean live deploywrites brokerage and live data provider settings underlean_config["environments"][<environment>], so neither step ever matched there.Fix
Both the host rewrite (
get_basic_docker_config,get_basic_docker_config_without_algo) and the file mounts (_mount_common_directories) now also apply to the selected environment's entries, through a small_get_config_scopeshelper. If a file key is set both at the top level and in the environment, it is mounted once, using the environment's value. Top-level behavior is unchanged.Tests
Added tests in
tests/components/docker/test_lean_runner.pyfor the host rewrite (bothlocalhostand127.0.0.1) and the symbol map mount with the settings under the selected environment, plus a case with the key set in both places (single mount). They fail before the change and pass after it; the rest oftests/components/dockerandtests/commands/livestill pass.This change was prepared with the assistance of an AI agent (Claude, by Anthropic).