fix(tradingagents): auto_trigger 误读不存在的 AgentConfig.raw_config,改为 config - #102
Open
pscgyLancer wants to merge 1 commit into
Open
fix(tradingagents): auto_trigger 误读不存在的 AgentConfig.raw_config,改为 config#102pscgyLancer wants to merge 1 commit into
pscgyLancer wants to merge 1 commit into
Conversation
AgentConfig 模型的 JSON 配置列名为 config(src/web/models.py), auto_trigger 中的 agent.raw_config 在运行时抛 AttributeError: 'AgentConfig' object has no attribute 'raw_config' 导致盘中急涨/急跌联动 TradingAgents 深度分析永远无法触发 (_read_auto_trigger_config / _budget_allows 均会失败)。 - _read_auto_trigger_config 与 _budget_allows 改读 agent.config - 单测 _make_agent 改用 MagicMock(spec=AgentConfig) + 真实字段 config, 从根上杜绝字段名回归(裸 MagicMock 任意属性都存在,此前测不出该 bug)
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.
AgentConfig 模型的 JSON 配置列名为 config(src/web/models.py), auto_trigger 中的 agent.raw_config 在运行时抛
AttributeError: 'AgentConfig' object has no attribute 'raw_config' 导致盘中急涨/急跌联动 TradingAgents 深度分析永远无法触发
(_read_auto_trigger_config / _budget_allows 均会失败)。