#!/usr/bin/env bash # The same builder session fixes review findings and redeploys. # builders/run-fix.sh set -euo pipefail slug=$1 phase=$2 findings=$3 repo=$(cd "$(dirname "$0")/.." && pwd) session=$(cat "$repo/builders/logs/$slug.session") prompt="An independent reviewer read your app. Fix the findings below (still unattended: no questions), keep the shared suite passing locally, redeploy with make deploy, re-run scripts/test-app.sh against https://todo-$slug.bfj.oncarlos.com, commit, and update STATUS.md. Fix only what is listed. If you disagree with a finding, leave the code as it is and say why in STATUS.md under '## Review findings not fixed'. $(cat "$findings")" cd "$repo/.worktrees/$slug" timeout 2h "$repo/builders/claude.sh" -p --resume "$session" "$prompt" \ > "$repo/builders/logs/$slug.$phase.jsonl" 2> "$repo/builders/logs/$slug.$phase.stderr" echo "$slug $phase exited $?"