1
0

offload-eval-setup.sh 1.3 KB

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. # Clone + index the 4 "not-trained-on" eval repos into $AGENT_EVAL_OUT/repos. These were
  3. # selected via a no-tools memory-probe gate (Sonnet cannot answer their flow questions from
  4. # memory — so the no-codegraph baseline is honest). Env: AGENT_EVAL_OUT=<scratch dir>
  5. set -uo pipefail
  6. HERE="$(cd "$(dirname "$0")" && pwd)"
  7. ENGINE="$(cd "$HERE/../.." && pwd)"
  8. BIN="$ENGINE/dist/bin/codegraph.js"
  9. OUT="${AGENT_EVAL_OUT:-/tmp/cg-offload-eval}"
  10. ROOT="$OUT/repos"; mkdir -p "$ROOT"
  11. export CODEGRAPH_TELEMETRY=0 DO_NOT_TRACK=1
  12. [ -f "$BIN" ] || { echo "engine not built: run 'npm run build' in $ENGINE first"; exit 1; }
  13. clone_index() { # url name
  14. echo "=== $2: clone ==="; rm -rf "$ROOT/$2"
  15. git clone --quiet --depth 1 "$1" "$ROOT/$2" || { echo " clone FAILED"; return 1; }
  16. echo "=== $2: index ==="
  17. node "$BIN" init "$ROOT/$2" 2>&1 | grep -iE 'indexed|nodes|edges|error' | tail -2
  18. }
  19. clone_index https://github.com/MTKruto/MTKruto.git mtkruto # small (~322 TS)
  20. clone_index https://github.com/mvdicarlo/postybirb-plus.git postybirb # medium (~608 TS)
  21. clone_index https://github.com/shapeshift/web.git shapeshift # complex (~3.2k TS, 35-pkg monorepo)
  22. clone_index https://github.com/trezor/trezor-suite.git trezor # large (~8k TS monorepo)
  23. echo "###### SETUP DONE -> $ROOT"