Initial: branch-oriented eval framework

This commit is contained in:
2026-01-30 09:32:12 -05:00
commit fece98f5ee
6 changed files with 317 additions and 0 deletions

47
scripts/start-eval.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <eval-name>"
echo "Example: $0 opencode-glm47"
exit 1
fi
EVAL_NAME="eval/$1"
EVAL_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Verify we're on main
CURRENT_BRANCH=$(git branch --show-current)
if [[ "${CURRENT_BRANCH}" != "main" ]]; then
echo "Error: Must be on 'main' branch to start an evaluation."
echo "Current branch: ${CURRENT_BRANCH}"
exit 1
fi
# Check if eval branch already exists
if git show-ref --verify --quiet refs/heads/"${EVAL_NAME}"; then
echo "Error: Evaluation branch '${EVAL_NAME}' already exists."
echo "Use a different name or delete the existing branch first."
exit 1
fi
echo "Creating evaluation branch: ${EVAL_NAME}"
# Create orphan branch
git switch --orphan "${EVAL_NAME}"
# Copy only flake files from main
git checkout main -- flake.nix flake.lock .envrc SPEC.md
# Initial commit
git add .
git commit -m "Initial: setup evaluation environment"
# Set up direnv
direnv allow
echo ""
echo "Evaluation environment ready!"
echo "Working on branch: ${EVAL_NAME}"
echo ""
echo "Run 'git checkout main' when you're done to return to main."