Repository navigation
fix(review): load live positions using the supported schema - #371
Merged
brokermr810 merged 1 commit intoNov 13, 2026
Merged
Conversation
Signed-off-by: Amazingz <amazingzsys@gmail.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
brokermr810
approved these changes
Nov 13, 2026
brokermr810
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed schema/query correctness and regression coverage. Backend tests, CodeQL, secret scan, SonarCloud, Snyk, DCO, and REUSE passed. The pip-audit failure is the existing soupsieve 2.9 baseline on main; this PR does not modify dependencies.
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
Live strategy reviews select
created_atfromqd_strategy_positions, but the shipped table only hasupdated_at. PostgreSQL rejects the query and the exception handler returns an empty list, so a completed review can omit open positions and unrealized PnL. Remove the unsupported column without changing the database schema.Related issue
Small bug fix reproduced against current main; no existing matching issue found.
Changes
updated_at.migrations/init.sqldefinitions and the production placeholder adapter. It checks strategy filtering, position/PnL evidence reaching the AI input, empty results, and the existing virtual-position timestamp behavior.Test plan
column "created_at" does not existand an open-position count of zero.python -m pytest tests/test_strategy_review_positions.py tests/test_strategy_review_execution_mode.py tests/test_strategy_review_evidence.py tests/test_strategy_review_billing.py -q— 51 passed. SetQD_TEST_POSTGRES_DSNorDATABASE_URLto a test database for the PostgreSQL case; it uses temporary tables and rolls back.ruff check app/services/strategy_review.py tests/test_strategy_review_positions.py— passed.python scripts/backend_quality_check.pyandgit diff --check— passed.API documentation
No route, schema, or public HTTP contract changes; no migration required.