PIX-14773: guard position_poller stale cleanup against re-entry #540

Merged
andrei merged 2 commits from agent/fullstack/pix-14773-stale-protection into master 2026-07-23 20:42:09 +00:00
Owner

Что сделано\n- Усилен stale cleanup в backend/app/services/position_poller.py: UPDATE по trailing_stops/take_profit_levels теперь guarded snapshot-полями fetched row, а не только id/status.\n- Добавлен регрессионный тест re-entry race: старый poller snapshot не отменяет свежую protection row с тем же id/status после повторного входа.\n\nКак проверено\n- pytest -q backend/tests/test_position_poller_stale_protection_cleanup.py -> 2 passed\n- git diff --check -> без замечаний\n\nPaperclip: PIX-14773\nCommit: 60976c6438

Что сделано\n- Усилен stale cleanup в backend/app/services/position_poller.py: UPDATE по trailing_stops/take_profit_levels теперь guarded snapshot-полями fetched row, а не только id/status.\n- Добавлен регрессионный тест re-entry race: старый poller snapshot не отменяет свежую protection row с тем же id/status после повторного входа.\n\nКак проверено\n- pytest -q backend/tests/test_position_poller_stale_protection_cleanup.py -> 2 passed\n- git diff --check -> без замечаний\n\nPaperclip: PIX-14773\nCommit: 60976c64382c7802d8df56eb86e5a803f7d0126a
Co-Authored-By: Paperclip <noreply@paperclip.ing>
fix(trading): guard stale protection cleanup by snapshot
All checks were successful
Arnold Forgejo CI / backend-tests (pull_request) Successful in 12m8s
Arnold Forgejo CI / frontend-audit (pull_request) Successful in 16s
Arnold Forgejo CI / secret-scan (pull_request) Successful in 3s
Forgejo Smoke Test / Smoke (pull_request) Successful in 1s
60976c6438
andrei merged commit 90c65ac68b into master 2026-07-23 20:42:09 +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!540
No description provided.