Skip to content

fix(runtime): model strategy restarts with explicit epochs - #367

Merged
brokermr810 merged 42 commits into
mainfrom
test
Nov 11, 2026
Merged

brokermr810 merged 42 commits into
mainfrom
test

Conversation

@brokermr810

Copy link
Copy Markdown
Collaborator

Summary

  • separate requested strategy runtime generations from generic strategy row updates
  • preserve runtime identity during worker handoff, while creating a new run for an explicit restart
  • scope health state to the exact strategy run and safely backfill existing deployments

Root cause

Runtime health treated qd_strategies_trading.updated_at as the strategy start time. A normal restart or handoff could reuse the active strategy run while the row timestamp moved forward, making a healthy runtime appear permanently stale or abnormal.

Verification

  • 125 relevant backend tests passed before syncing main
  • 63 core lifecycle regression tests passed after merging latest main
  • Ruff and git diff checks passed

tianhe added 30 commits November 1, 2026 17:17
Signed-off-by: TIANHE <[email protected]>

# Conflicts:
#	backend_api_python/app/routes/community.py
tianhe and others added 12 commits November 6, 2026 15:07
#362 normalized the Binance protection orders, but Bitget (UTA and
classic) and Bybit still sent percentage-derived prices with str(), e.g.
stopLoss=77951.14749999999 for a 2.5% stop on a 76049.9 short. Those are
off the contract tick, so the venue rejects the protection order.

Run the stop-loss, take-profit and trailing activation prices (and the
Bybit trailingStop distance) through each client's _normalize_price, the
same way #362 does for Binance, and raise when the result falls below the
minimum.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aliassar <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

@brokermr810
brokermr810 merged commit 45d5858 into main Nov 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants