[#500] Release DB ghosts when close is already recorded #548

Merged
andrei merged 1 commit from fix/500-release-recorded-ghost into master 2026-07-24 15:30:14 +00:00
Owner

Production evidence: SOLUSDT short was absent on Bybit, while both exact close order IDs were already persisted in trades. The sync daemon skipped existing order IDs before validating side, timestamp and quantity, then preserved the missing DB position indefinitely. This change treats an exact existing close row as completion evidence after full validation, avoids duplicate trade writes, and allows normal DB removal. No signal, budget, pause, stop-limit or trade-frequency controls are changed. Verification: 65 targeted tests passed; gitleaks diff scan clean; GitNexus impact LOW.

Production evidence: SOLUSDT short was absent on Bybit, while both exact close order IDs were already persisted in trades. The sync daemon skipped existing order IDs before validating side, timestamp and quantity, then preserved the missing DB position indefinitely. This change treats an exact existing close row as completion evidence after full validation, avoids duplicate trade writes, and allows normal DB removal. No signal, budget, pause, stop-limit or trade-frequency controls are changed. Verification: 65 targeted tests passed; gitleaks diff scan clean; GitNexus impact LOW.
fix(sync): release ghosts with recorded exchange closes
All checks were successful
Arnold Forgejo CI / backend-tests (pull_request) Successful in 12m7s
Arnold Forgejo CI / frontend-audit (pull_request) Successful in 19s
Arnold Forgejo CI / secret-scan (pull_request) Successful in 3s
Forgejo Smoke Test / Smoke (pull_request) Successful in 1s
f9524c7b48
andrei merged commit 65954f8d55 into master 2026-07-24 15:30:14 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
europa-tech-srl/arnold-trader-app!548
No description provided.