#!/usr/bin/env bash
# Attach to the current correction workflow, or resume once outputs are ready.
set -euo pipefail
project_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
cd -- "$project_dir"
arguments=()
if [[ $# -gt 0 ]]; then
  arguments+=(--workflow-pid "$1")
fi
export OPENBLAS_NUM_THREADS=1
export OMP_NUM_THREADS=1
output="${PALLET_STABILITY_OUTPUT:-outputs/human_correction_stability_1716_v2}"
exec .venv/bin/python -u scripts/compare_proposal_stability.py \
  --round manual306=outputs/human_correction_manual_v3 \
  --round manual1330=outputs/human_correction_manual_1330_v1 \
  --round manual1716=outputs/human_correction_manual_1716_v2 \
  --manual-output outputs/human_correction_manual_1716_v2 \
  --output "$output" \
  --wait "${arguments[@]}"
