Skip to content

Commit 2a1394e

Browse files
sjarmakclaude
andcommitted
fix: add idempotency guard to sgonly verifier wrapper and hydrate incident-113 oracle
The sgonly_verifier_wrapper.sh was being sourced twice (test.sh then eval.sh), causing double-clone of large repos like grafana and timeouts. Added _SG_ONLY_RESTORED env guard so the second source is a no-op. Propagated to all 224 task copies. Also hydrated CCX-incident-113 oracle with grafana v38 migration files (v38.go, migrations.go) and symbols (processPanelsV38, migrateOverrides). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5a10e90 commit 2a1394e

File tree

227 files changed

+1844
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+1844
-3
lines changed

benchmarks/ccb_build/bustub-hyperloglog-impl-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------
@@ -113,6 +120,13 @@ if [ -f "$MANIFEST" ]; then
113120
# Copy cloned files (except .git)
114121
cd "$TMPCLONE"
115122
find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec cp -a {} "$CLONE_TARGET/" \;
123+
# If workspace has no HEAD (bare git init), use mirror .git
124+
# so that git diff HEAD works for diff-based verifiers.
125+
if ! git -C "$CLONE_TARGET" rev-parse HEAD >/dev/null 2>&1; then
126+
rm -rf "$CLONE_TARGET/.git"
127+
cp -a "$TMPCLONE/.git" "$CLONE_TARGET/.git"
128+
echo "[sg_only_verifier] Replaced empty .git with mirror .git for diff baseline"
129+
fi
116130
cd /
117131
rm -rf "$TMPCLONE"
118132
echo "[sg_only_verifier] Restored $MIRROR to $CLONE_TARGET"

benchmarks/ccb_build/camel-fix-protocol-feat-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/cgen-deps-install-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/codecoverage-deps-install-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/dotenv-expand-deps-install-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/dotnetkoans-deps-install-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/envoy-grpc-server-impl-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/eslint-markdown-deps-install-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/flink-pricing-window-feat-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

benchmarks/ccb_build/flipt-dep-refactor-001/tests/sgonly_verifier_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [ ! -f /tmp/.sg_only_mode ]; then
3030
return 0 2>/dev/null || exit 0
3131
fi
3232

33+
# Idempotency guard: skip if already sourced (avoids double-clone when
34+
# test.sh sources this wrapper and then eval.sh sources it again)
35+
if [ -n "${_SG_ONLY_RESTORED:-}" ]; then
36+
return 0 2>/dev/null || exit 0
37+
fi
38+
export _SG_ONLY_RESTORED=1
39+
3340
echo "[sg_only_verifier] Detected sg_only mode, restoring full repo..."
3441

3542
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)