Repository navigation
fix: correct strategy stop and rebalance notification queries - #398
Merged
Merged
Conversation
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]> # Conflicts: # backend_api_python/app/routes/community.py
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]> # Conflicts: # backend_api_python/tests/test_safe_exec.py # backend_api_python/tests/test_strategy_runtime_process_isolation.py
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]> # Conflicts: # backend_api_python/app/professional_report/features/equity.py # backend_api_python/app/research/workflows.py # backend_api_python/tests/test_professional_report_builder.py
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>
…emails Persist definitive order failure streaks and portfolio batch outcomes, send deduplicated alerts across opted-in channels, and render transactional emails using localized monochrome templates and configured branding. Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]> # Conflicts: # backend_api_python/app/services/strategy_v2/live_execution.py # backend_api_python/app/services/trading_executor.py # backend_api_python/tests/test_strategy_v2_order_gateway.py # docs/trading/LIVE_TRADING_SAFETY.md # docs/trading/LIVE_TRADING_SAFETY_CN.md
Signed-off-by: TIANHE <[email protected]>
Use the canonical strategy_name column for automatic-stop and rebalance notifications, honor explicit stop-and-close requests, and exercise the production schema and notification delivery paths in regression tests. Signed-off-by: TIANHE <[email protected]>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.



Summary
Fix the
column "name" does not existregression introduced in #397. Automatic-stop cleanup and portfolio rebalance notification queries now use the existingqd_strategies_trading.strategy_namecolumn.Also honor an operator's explicit stop-and-close request when it upgrades a pending automatic-stop command. Automatic stops still default to preserving positions.
Regression coverage
Replace the hand-written database fixture with the repository's real
init.sql, apply the batch migration twice, and use the production PostgreSQL cursor adapter. Cover command claiming/completion, strategy names, tenant ownership, notification target/language resolution, all selected delivery channels, deduplication, and stop-and-close behavior.Validation
git diff --checkpassed.Deployment and limits
No database schema change or additional migration is needed for this hotfix. Deploy updated backend/worker code through the normal release process. Previously exhausted stop commands are not automatically replayed; affected deployments need operator review. No live accounts or positions were modified during validation.