#!/bin/sh
# [2026-10-27] wait for both ablation halves, then report + backward selection (low priority, 1-CPU server)
cd /var/www/screener/trade/reports/ev3
until grep -q "ABL_DONE" abl_y1.log && grep -q "ABL_DONE" abl_y2.log; do
  if grep -q Traceback abl_y1.log abl_y2.log; then echo "ABLATION FAILED" > star_entry_select.log; exit 1; fi
  sleep 60
done
nice -n 19 python3 star_entry_report.py > star_entry_report.txt 2>&1
nice -n 19 python3 star_entry_select.py > star_entry_select.log 2>&1
