Skip to content

Commit 153ec0f

Browse files
sjarmakclaude
andcommitted
Slot 28 RepoQA large-repo tasks into wave 2 first
Split wave2_both.json (75 tasks) into: - wave2_repoqa.json (28 tasks): 14 ccb_understand + 14 ccb_mcp_onboarding RepoQA search tasks that have never been run with Haiku - wave2_remainder.json (47 tasks): original variance rerun tasks Wave runner now executes RepoQA first in wave 2, then remainder. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 01c5ce8 commit 153ec0f

File tree

3 files changed

+1431
-0
lines changed

3 files changed

+1431
-0
lines changed

configs/run_variance_waves.sh

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#!/bin/bash
2+
# Run all variance rerun waves sequentially (designed for overnight unattended execution).
3+
# Each wave adds 1 run per task toward the target of 3 runs per config.
4+
#
5+
# Usage:
6+
# nohup ./configs/run_variance_waves.sh > logs/variance_waves_$(date +%Y%m%d_%H%M%S).log 2>&1 &
7+
#
8+
# To start from a specific wave (e.g., after wave 1 already ran):
9+
# nohup ./configs/run_variance_waves.sh --start-wave 2 > logs/variance_waves_$(date +%Y%m%d_%H%M%S).log 2>&1 &
10+
11+
set -e
12+
13+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14+
REPO_ROOT="$SCRIPT_DIR/.."
15+
cd "$REPO_ROOT"
16+
17+
START_STEP=1
18+
while [[ $# -gt 0 ]]; do
19+
case $1 in
20+
--start-step) START_STEP="$2"; shift 2 ;;
21+
*) echo "Unknown option: $1"; exit 1 ;;
22+
esac
23+
done
24+
25+
WAVE_DIR="configs/variance_reruns"
26+
RUNNER="./configs/run_selected_tasks.sh"
27+
LOG_DIR="logs"
28+
mkdir -p "$LOG_DIR"
29+
30+
STARTED_AT=$(date '+%Y-%m-%d %H:%M:%S')
31+
echo "=============================================="
32+
echo "Variance Rerun — All Waves"
33+
echo "=============================================="
34+
echo "Started: $STARTED_AT"
35+
echo "Start step: $START_STEP"
36+
echo ""
37+
38+
# Each entry: wave_num selection_file flags
39+
STEPS=(
40+
"1 wave1_both.json "
41+
"1 wave1_baseline_only.json --baseline-only"
42+
"1 wave1_mcp_only.json --full-only"
43+
"2 wave2_repoqa.json "
44+
"2 wave2_remainder.json "
45+
"2 wave2_baseline_only.json --baseline-only"
46+
"2 wave2_mcp_only.json --full-only"
47+
"3 wave3_both.json "
48+
"3 wave3_baseline_only.json --baseline-only"
49+
)
50+
51+
TOTAL=${#STEPS[@]}
52+
STEP_NUM=0
53+
FAILED=0
54+
55+
for entry in "${STEPS[@]}"; do
56+
read -r wave_num selection_file flags <<< "$entry"
57+
STEP_NUM=$((STEP_NUM + 1))
58+
59+
# Skip steps below start
60+
if [ "$STEP_NUM" -lt "$START_STEP" ]; then
61+
echo "[Step $STEP_NUM/$TOTAL] SKIP (step $STEP_NUM < start_step $START_STEP)"
62+
continue
63+
fi
64+
65+
selection_path="${WAVE_DIR}/${selection_file}"
66+
if [ ! -f "$selection_path" ]; then
67+
echo "[Step $STEP_NUM/$TOTAL] SKIP — $selection_path not found"
68+
continue
69+
fi
70+
71+
# Check if selection file has any tasks
72+
task_count=$(python3 -c "import json; print(len(json.load(open('$selection_path')).get('tasks',[])))")
73+
if [ "$task_count" -eq 0 ]; then
74+
echo "[Step $STEP_NUM/$TOTAL] SKIP — $selection_file has 0 tasks"
75+
continue
76+
fi
77+
78+
step_log="${LOG_DIR}/wave${wave_num}_${selection_file%.json}_$(date +%Y%m%d_%H%M%S).log"
79+
80+
echo ""
81+
echo "=============================================="
82+
echo "[Step $STEP_NUM/$TOTAL] Wave $wave_num$selection_file ($task_count tasks) $flags"
83+
echo " Log: $step_log"
84+
echo " Started: $(date '+%Y-%m-%d %H:%M:%S')"
85+
echo "=============================================="
86+
87+
# Pipe newline to auto-confirm the interactive prompt.
88+
# Tee to both step log and stdout so the wrapper log captures everything.
89+
if echo "" | $RUNNER \
90+
--selection-file "$selection_path" \
91+
--category staging \
92+
$flags \
93+
2>&1 | tee "$step_log"; then
94+
echo "[Step $STEP_NUM/$TOTAL] DONE at $(date '+%Y-%m-%d %H:%M:%S')"
95+
else
96+
echo "[Step $STEP_NUM/$TOTAL] FAILED (exit $?) at $(date '+%Y-%m-%d %H:%M:%S')"
97+
FAILED=$((FAILED + 1))
98+
# Continue to next step — don't abort the whole overnight run
99+
fi
100+
done
101+
102+
echo ""
103+
echo "=============================================="
104+
echo "All waves complete"
105+
echo " Started: $STARTED_AT"
106+
echo " Finished: $(date '+%Y-%m-%d %H:%M:%S')"
107+
echo " Failed steps: $FAILED / $TOTAL"
108+
echo "=============================================="

0 commit comments

Comments
 (0)