Repository navigation
Fix copy-engine full scans, retry-inflated paper exit rate, review page timeouts - #54
Merged
Conversation
…ge timeouts Server findings after deploying 8ad1d33 (load 9.5 on 2 vCPU, copies TOO_LATE with a 5-minute median detection, paper exits failed at the 50 % cap, review aggregates past 120 s): - Index ix_evm_trades_chain_at (chain, at), migration 0042, built CONCURRENTLY. The copy engine's per-second poll compared lower(trader), which no index serves, so every tick read all of evm_trades; the 14-day prune and the market-regime windows scanned it too. The poll is now target_trades(); a test checks the plan uses the index. - measured_live_rates counts one result per position and side (its first final attempt): 6 450 retries of one stuck sell had counted as trials. - Review endpoints (ledger review, comparison, EVM ML) are computed in a background task on their own two connections with a 240 s limit, one at a time; requests are answered from the last result (marked stale) while a refresh runs, or 503 REVIEW_COMPUTING before the first one. The pages show when the numbers were computed. - db_health: times the copy poll and lists the review results. - Audit report: server findings and what still needs the operator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vpuZ1UX4MXz7NCF7wrtDv
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.
Follow-up to the server outputs after deploying 8ad1d33 (db_health, parity_report --days 7, pumpswap_window_check).
What the server showed
Changes
ix_evm_trades_chain_at (chain, at): migration 0042, built CONCURRENTLY.lower(trader), which no index serves, so every tick read the whole table on each chain.target_trades(). A test checks that the query plan uses the new index; it fails without it.measured_live_rates: counts one result per position and side (the first final attempt). Retries of a stuck exit no longer count as separate trials. There is a new test with 300 retries.db_health: also times the copy poll and lists the background review results (compute time, last error).Not changed
Tests
Not verified
parity_reportanddb_healthafter deploy.🤖 Generated with Claude Code
https://claude.ai/code/session_015vpuZ1UX4MXz7NCF7wrtDv
Generated by Claude Code