Rename the algorithm brokerage data to deployment details and add a helper - #9792
Merged
Martin-Molinero merged 3 commits intoSep 14, 2026
Conversation
Renames the members added in QuantConnect#9788: IAlgorithm.BrokerageData -> DeploymentDetails, SetBrokerageData -> SetDeploymentDetails, IResultHandler.AddBrokerageData -> AddDeploymentDetail and AlgorithmConfiguration.BrokerageData -> DeploymentDetails. The old name collided with LiveNodePacket.BrokerageData and IBrokerageFactory.BrokerageData, which hold the brokerage credentials and are a different thing. The new name is also neutral for entries shared by a data queue handler or any other component, not just the brokerage. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAELnEhZMd7X9D6rc9CAmC
Single entry point for brokerages, data queue handlers and any other component to share a deployment detail, resolving the result handler from the Composer so callers don't have to. Never throws and logs once if no result handler is found. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAELnEhZMd7X9D6rc9CAmC
Resetting dropped the parts registered by TestGlobals, like the factor file provider, which nothing puts back, breaking later tests that resolve them from the composer, IndicatorBasedOptionPriceModelTests through DividendYieldProvider. The test now explicitly uses the result handler the composer resolves, adding one only if there is none. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAELnEhZMd7X9D6rc9CAmC
11 tasks
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.
Description
Renames the members added in #9788:
IAlgorithm.BrokerageDataIAlgorithm.DeploymentDetailsIAlgorithm.SetBrokerageDataIAlgorithm.SetDeploymentDetailsIResultHandler.AddBrokerageDataIResultHandler.AddDeploymentDetailIResultHandler.BrokerageDataIResultHandler.DeploymentDetailsAlgorithmConfiguration.BrokerageDataAlgorithmConfiguration.DeploymentDetailsPython:
self.brokerage_data->self.deployment_details.LiveNodePacket.BrokerageDataandIBrokerageFactory.BrokerageData, which hold the brokerage credentials, are untouched.Also adds
DeploymentDetailsHelper.Add(key, value), a single entry point for brokerages, data queue handlers and any other component to share a deployment detail. It resolves the result handler from theComposerso callers don't have to, never throws, and logs an error once if no result handler is found.Related Issue
#9788
Motivation and Context
The name added in #9788 collided with the existing
LiveNodePacket.BrokerageData/IBrokerageFactory.BrokerageData, which hold the brokerage credentials and are a different thing, making it easy to confuse the two.DeploymentDetailsis also neutral for entries shared by a data queue handler or any other component, not only the brokerage, and it sits naturally next toDeployId/DeploymentTarget.The helper keeps the caller side to one line and makes sharing a detail safe to call from anywhere, including when running without a result handler, like in a plugin's unit tests.
Requires Documentation Change
QCAlgorithm.DeploymentDetails/self.deployment_details, renamed fromBrokerageData/brokerage_databefore it was ever documented.How Has This Been Tested?
Existing tests, renamed accordingly, plus new
DeploymentDetailsHelperTestscovering adding through theComposer, no result handler, and a result handler that throws.AlgorithmConfigurationTests,LiveTradingResultHandlerTests,AlgorithmManagerTests,BrokerageSetupHandlerTests,BacktestingResultHandlerTests, report and result deserialization suites all pass.Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>🤖 Generated with Claude Code