feather-runtime / overlay /scripts /run_phase2.sh
Jackoatmon's picture
Normalize shell line endings in Docker build
6618931 verified
#!/usr/bin/env bash
set -euo pipefail
echo "=== HYDRA Phase 2: Integrated Autoresearch ==="
cd "$(dirname "$0")/.."
TAG="${1:-$(date +%b%d | tr '[:upper:]' '[:lower:]')}"
# Validate tag: only alphanumeric, hyphens, underscores, dots
if [[ ! "${TAG}" =~ ^[a-zA-Z0-9._-]+$ ]]; then
echo "Error: invalid tag '${TAG}'. Use only alphanumeric, hyphens, underscores, dots." >&2
exit 1
fi
BRANCH="autoresearch/${TAG}"
if ! git rev-parse --verify "${BRANCH}" &>/dev/null; then
git checkout -b -- "${BRANCH}"
else
git checkout -- "${BRANCH}"
fi
echo "Branch: ${BRANCH}"
echo "Starting orchestrator..."
uv run -m harness.orchestrator