mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-08-17 20:50:34 +00:00
Some checks failed
Wolfram Alpha Verification Check / wolfram-verification (push) Has been cancelled
benchmark.sh: fall back to when ATLAS_OPTIMIZE_TARGET unset score.py: track find_optimal_crossing and SA direct as separate scorecard examples with diagnostic context for reflector gate.sh: add positional-arg fallback for ATLAS_OPTIMIZE_TARGET Build: N/A (config & Python shims only)
23 lines
1,019 B
Bash
Executable file
23 lines
1,019 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Generated by `atlas autoresearch` — the Goodhart guard.
|
|
#
|
|
# A candidate may only change the artifact under test. If a run modifies any
|
|
# OTHER tracked file (e.g. rewrites the evaluator or test data to fake a pass),
|
|
# this gate fails (exit non-zero) and the candidate is scored worst, so the
|
|
# Pareto front never elevates a cheat. Relax IGNORE_RE if your run legitimately
|
|
# rewrites tracked files (checkpoints, logs, and .atlas/ are already ignored).
|
|
set -uo pipefail
|
|
WT="${1:-$PWD}"
|
|
TARGET="${ATLAS_OPTIMIZE_TARGET:-$2}"
|
|
REL="${TARGET#"$WT"/}"
|
|
IGNORE_RE='^(outputs/|out/|checkpoints/|runs/|wandb/|\.atlas/|.*\.log$|.*\.ckpt$|.*\.pt$|.*\.bin$|.*\.safetensors$)'
|
|
CHANGED="$(git -C "$WT" status --porcelain --untracked-files=no 2>/dev/null \
|
|
| sed 's/^...//' \
|
|
| { [ -n "$REL" ] && grep -vF -- "$REL" || cat; } \
|
|
| grep -Ev "$IGNORE_RE" || true)"
|
|
if [ -n "$CHANGED" ]; then
|
|
echo "[gate] the run modified tracked files other than the candidate:" >&2
|
|
echo "$CHANGED" >&2
|
|
exit 1
|
|
fi
|
|
exit 0
|