CRITICAL FIX (Nov 30, 2025):
- Dashboard showed 'idle' despite 22+ worker processes running
- Root cause: SSH-based worker detection timing out
- Solution: Check database for running chunks FIRST
Changes:
1. app/api/cluster/status/route.ts:
- Query exploration database before SSH detection
- If running chunks exist, mark workers 'active' even if SSH fails
- Override worker status: 'offline' → 'active' when chunks running
- Log: '✅ Cluster status: ACTIVE (database shows running chunks)'
- Database is source of truth, SSH only for supplementary metrics
2. app/cluster/page.tsx:
- Stop button ALREADY EXISTS (conditionally shown)
- Shows Start when status='idle', Stop when status='active'
- No code changes needed - fixed by status detection
Result:
- Dashboard now shows 'ACTIVE' with 2 workers (correct)
- Workers show 'active' status (was 'offline')
- Stop button automatically visible when cluster active
- System resilient to SSH timeouts/network issues
Verified:
- Container restarted: Nov 30 21:18 UTC
- API tested: Returns status='active', activeWorkers=2
- Logs confirm: Database-first logic working
- Workers confirmed running: 22+ processes on worker1, workers on worker2
80 lines
5.1 KiB
Plaintext
80 lines
5.1 KiB
Plaintext
================================================================================
|
|
V9 PARAMETER DIAGNOSTIC SUITE
|
|
================================================================================
|
|
Data: backtester/data/solusdt_5m_aug_nov.csv
|
|
Symbol: SOL-PERP
|
|
Loading data...
|
|
Loaded 34273 bars
|
|
|
|
============================================================
|
|
TEST 1: flip_threshold_percent (0.4, 0.5, 0.6, 0.7)
|
|
Expected: LOWER threshold = MORE signals
|
|
============================================================
|
|
|
|
Testing flip_threshold: 0%| | 0/4 [00:00<?, ?it/s]
|
|
Testing flip_threshold: 25%|██▌ | 1/4 [00:21<01:05, 21.71s/it]
|
|
Testing flip_threshold: 50%|█████ | 2/4 [00:42<00:42, 21.32s/it]
|
|
Testing flip_threshold: 75%|███████▌ | 3/4 [01:05<00:21, 21.82s/it]
|
|
Testing flip_threshold: 100%|██████████| 4/4 [01:25<00:00, 21.32s/it]
|
|
Testing flip_threshold: 100%|██████████| 4/4 [01:25<00:00, 21.43s/it]
|
|
flip_threshold=0.4: 581 trades, $-1852.60 PnL
|
|
flip_threshold=0.5: 581 trades, $-1852.60 PnL
|
|
flip_threshold=0.6: 581 trades, $-1852.60 PnL
|
|
flip_threshold=0.7: 581 trades, $-1852.60 PnL
|
|
|
|
============================================================
|
|
TEST 2: cooldown_bars (1, 2, 3, 4)
|
|
Expected: LOWER cooldown = MORE signals
|
|
============================================================
|
|
|
|
Testing cooldown_bars: 0%| | 0/4 [00:00<?, ?it/s]
|
|
Testing cooldown_bars: 25%|██▌ | 1/4 [00:20<01:01, 20.36s/it]
|
|
Testing cooldown_bars: 50%|█████ | 2/4 [00:40<00:40, 20.18s/it]
|
|
Testing cooldown_bars: 75%|███████▌ | 3/4 [01:01<00:20, 20.54s/it]
|
|
Testing cooldown_bars: 100%|██████████| 4/4 [01:21<00:00, 20.44s/it]
|
|
Testing cooldown_bars: 100%|██████████| 4/4 [01:21<00:00, 20.41s/it]
|
|
cooldown_bars=1: 581 trades, $-1835.05 PnL
|
|
cooldown_bars=2: 581 trades, $-1835.05 PnL
|
|
cooldown_bars=3: 581 trades, $-1852.60 PnL
|
|
cooldown_bars=4: 578 trades, $-2115.42 PnL
|
|
|
|
============================================================
|
|
TEST 3: momentum_min_adx (18, 21, 24, 27)
|
|
Expected: HIGHER ADX = FEWER signals
|
|
============================================================
|
|
|
|
Testing momentum_min_adx: 0%| | 0/4 [00:00<?, ?it/s]
|
|
Testing momentum_min_adx: 25%|██▌ | 1/4 [00:20<01:01, 20.52s/it]
|
|
Testing momentum_min_adx: 50%|█████ | 2/4 [00:41<00:41, 20.90s/it]
|
|
Testing momentum_min_adx: 75%|███████▌ | 3/4 [01:04<00:21, 21.76s/it]
|
|
Testing momentum_min_adx: 100%|██████████| 4/4 [01:26<00:00, 21.73s/it]
|
|
Testing momentum_min_adx: 100%|██████████| 4/4 [01:26<00:00, 21.54s/it]
|
|
momentum_min_adx=18.0: 581 trades, $-1852.60 PnL
|
|
momentum_min_adx=21.0: 581 trades, $-1852.60 PnL
|
|
momentum_min_adx=24.0: 581 trades, $-1852.60 PnL
|
|
momentum_min_adx=27.0: 581 trades, $-1852.60 PnL
|
|
|
|
============================================================
|
|
TEST 4: ma_gap_threshold (0.2, 0.3, 0.4, 0.5)
|
|
Expected: Different signal counts
|
|
============================================================
|
|
|
|
Testing ma_gap_threshold: 0%| | 0/4 [00:00<?, ?it/s]
|
|
Testing ma_gap_threshold: 25%|██▌ | 1/4 [00:20<01:02, 20.79s/it]
|
|
Testing ma_gap_threshold: 50%|█████ | 2/4 [00:43<00:44, 22.20s/it]
|
|
Testing ma_gap_threshold: 75%|███████▌ | 3/4 [01:06<00:22, 22.37s/it]
|
|
Testing ma_gap_threshold: 100%|██████████| 4/4 [01:27<00:00, 21.68s/it]
|
|
Testing ma_gap_threshold: 100%|██████████| 4/4 [01:27<00:00, 21.80s/it]
|
|
ma_gap_threshold=0.2: 581 trades, $-1852.60 PnL
|
|
ma_gap_threshold=0.3: 581 trades, $-1852.60 PnL
|
|
ma_gap_threshold=0.4: 581 trades, $-1852.60 PnL
|
|
ma_gap_threshold=0.5: 581 trades, $-1852.60 PnL
|
|
|
|
================================================================================
|
|
DIAGNOSTIC ANALYSIS
|
|
================================================================================
|
|
|
|
🔴 flip_threshold_percent: NO EFFECT - All configs produce identical results!
|
|
All 581 trades, $-1852.60 PnL
|
|
⚠️ Parameter is NOT being applied or is overridden
|
|
|
|
✅ cooldown_bars: HAS EFFECT
|
|
Signal range: 578-581 (0.5% variation)
|
|
PnL range: $-2115.42 to $-1835.05
|
|
|
|
🔴 momentum_min_adx: NO EFFECT - All configs produce identical results!
|
|
All 581 trades, $-1852.60 PnL
|
|
⚠️ Parameter is NOT being applied or is overridden
|
|
|
|
🔴 ma_gap_threshold: NO EFFECT - All configs produce identical results!
|
|
All 581 trades, $-1852.60 PnL
|
|
⚠️ Parameter is NOT being applied or is overridden
|
|
|
|
================================================================================
|
|
EXTREME CONFIGURATION TEST
|
|
================================================================================
|
|
Traceback (most recent call last):
|
|
File "scripts/diagnostic_sweep.py", line 212, in <module>
|
|
main()
|
|
File "scripts/diagnostic_sweep.py", line 192, in main
|
|
system_works = test_extreme_configs(args.csv, args.symbol)
|
|
File "scripts/diagnostic_sweep.py", line 127, in test_extreme_configs
|
|
df = load_csv(csv_path)
|
|
TypeError: load_csv() missing 2 required positional arguments: 'symbol' and 'timeframe'
|