Skip to content

fix: stabilize broker exits, group partial fills, and preserve localized asset names - #436

Merged
brokermr810 merged 154 commits into
mainfrom
test
Dec 3, 2026
Merged

brokermr810 merged 154 commits into
mainfrom
test

Conversation

@brokermr810

@brokermr810 brokermr810 commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Broker equity allocations recorded as hkstock/usstock were omitted by spot-only exit checks, causing valid holdings to be capped to zero and repeatedly rejected. Match equivalent equity lanes within the same account and symbol, defer unchanged recoverable exit failures for 60 seconds, and durably deduplicate failure notifications. Retain the Forthright stock PnL and sanitized broker rejection diagnostics already in this PR.

Expose optional order-level trade summaries with expandable original fills. Aggregate quantity, weighted price and fees without modifying execution ledgers or FIFO accounting. Suppress zero-quantity fill logs while retaining fee reconciliation.

Keep Chinese and English catalog names separate from exchange rule synchronization. Search active aliases and simplified/traditional Chinese consistently, and localize catalog/watchlist responses without changing asset identities. Optional HK name enrichment cannot create tradable instruments or invalidate successful rule synchronization.

Validation: current-head Backend CI passed both full test shards, PostgreSQL transactional accounting, release gates, lint, structure, dependency lock, repository consistency and Compose validation. The full test shards passed 7,358 tests; accounting/release gates passed another 159 tests. Focused PostgreSQL catalog migration and concurrent exit-notification tests also passed locally. Companion frontend: 921 unit tests passed, production build passed, ESLint zero errors with existing warnings, and locale completeness passed. OpenAPI generation consistency and SonarCloud return-flow findings were corrected and pushed; OpenAPI CI now passes and SonarCloud reports no new open issues. CodeQL and dependency/source security audit passed; the full-history secret scan remains in progress.

Deployment: install the updated requirements.lock (opencc-python-reimplemented==0.1.7), run the registered 20261203_catalog_names.sql migration, and deploy API/trading workers together with the companion frontend. PostgreSQL migration tests are enabled in CI. No live orders were submitted. US automated strategies remain regular-session-only; extended and overnight execution are not enabled by this PR.

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 21 commits November 28, 2026 19:10
Signed-off-by: TIANHE <[email protected]>

# Conflicts:
#	docs/trading/LIVE_TRADING_SAFETY.md
#	docs/trading/LIVE_TRADING_SAFETY_CN.md
Signed-off-by: TIANHE <[email protected]>

# Conflicts:
#	docs/trading/LIVE_TRADING_SAFETY.md
#	docs/trading/LIVE_TRADING_SAFETY_CN.md
@brokermr810 brokermr810 changed the title fix(forthright): show stock position PnL and retain rejection diagnostics fix: stabilize broker exits, group partial fills, and preserve localized asset names Dec 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Dec 3, 2026

Copy link
Copy Markdown

@brokermr810
brokermr810 merged commit c791a9c into main Dec 3, 2026
16 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.

6 participants