Skip to content

Commit d577aa0

Browse files
sjarmakclaude
andcommitted
fix: use mirror .git in sgonly verifier when workspace has no HEAD
The SG-only verifier wrapper preserved the workspace's empty .git (from git init) when restoring mirror files, causing git diff HEAD to return nothing because HEAD didn't exist. Now replaces the empty .git with the mirror's .git when no HEAD exists, providing a proper diff baseline for diff_similarity verifiers. Also marks 3 new sg-evals mirrors as indexed and regenerates all 187 build-requiring task wrappers + Dockerfiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 37b71f7 commit d577aa0

File tree

614 files changed

+3520
-2022
lines changed

Some content is hidden

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

614 files changed

+3520
-2022
lines changed

benchmarks/ccb_build/bustub-hyperloglog-impl-001/environment/Dockerfile.sg_only

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
FROM ubuntu:22.04
55

6+
ENV SOURCEGRAPH_REPO_NAME=sg-evals/bustub--d5f79431
7+
68
ENV DEBIAN_FRONTEND=noninteractive
79

810
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -24,8 +26,7 @@ RUN mkdir -p /logs/agent /logs/verifier
2426
# Mark sg_only mode so verifiers can skip local-path checks
2527
RUN touch /tmp/.sg_only_mode
2628

27-
# Pre-create claude user and set ownership at build time so Harbor's
28-
# runtime chown is a no-op (avoids 15-30 min delay on large repos).
29+
# Pre-create claude user and set ownership at build time.
2930
RUN (adduser --disabled-password --gecos '' claude 2>/dev/null || true) && \
3031
for d in /workspace /app /testbed /logs; do [ -d "$d" ] && chown -R claude:claude "$d"; done || true
3132

benchmarks/ccb_build/camel-fix-protocol-feat-001/environment/Dockerfile.sg_only

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
FROM eclipse-temurin:17-jdk
66

7+
ENV SOURCEGRAPH_REPO_NAME=sg-evals/camel--1006f047
8+
79
ENV DEBIAN_FRONTEND=noninteractive
810

911
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -29,8 +31,7 @@ RUN echo '{"workdir":"/workspace","repos":[{"mirror":"sg-evals/camel--1006f047",
2931
# Mark sg_only mode
3032
RUN touch /tmp/.sg_only_mode
3133

32-
# Pre-create claude user and set ownership at build time so Harbor's
33-
# runtime chown is a no-op (avoids 15-30 min delay on large repos).
34+
# Pre-create claude user and set ownership at build time.
3435
RUN (adduser --disabled-password --gecos '' claude 2>/dev/null || true) && \
3536
for d in /workspace /app /testbed /logs; do [ -d "$d" ] && chown -R claude:claude "$d"; done || true
3637

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
@@ -113,6 +113,13 @@ if [ -f "$MANIFEST" ]; then
113113
# Copy cloned files (except .git)
114114
cd "$TMPCLONE"
115115
find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec cp -a {} "$CLONE_TARGET/" \;
116+
# If workspace has no HEAD (bare git init), use mirror .git
117+
# so that git diff HEAD works for diff-based verifiers.
118+
if ! git -C "$CLONE_TARGET" rev-parse HEAD >/dev/null 2>&1; then
119+
rm -rf "$CLONE_TARGET/.git"
120+
cp -a "$TMPCLONE/.git" "$CLONE_TARGET/.git"
121+
echo "[sg_only_verifier] Replaced empty .git with mirror .git for diff baseline"
122+
fi
116123
cd /
117124
rm -rf "$TMPCLONE"
118125
echo "[sg_only_verifier] Restored $MIRROR to $CLONE_TARGET"

benchmarks/ccb_build/cgen-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
FROM ubuntu:22.04
66

7+
ENV SOURCEGRAPH_REPO_NAME=sg-evals/cgen--dibench
8+
79
ENV DEBIAN_FRONTEND=noninteractive
810

911
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -28,8 +30,7 @@ RUN echo '{"workdir":"/app/repo","repos":[{"mirror":"sg-evals/cgen--dibench","ta
2830
# Mark sg_only mode
2931
RUN touch /tmp/.sg_only_mode
3032

31-
# Pre-create claude user and set ownership at build time so Harbor's
32-
# runtime chown is a no-op (avoids 15-30 min delay on large repos).
33+
# Pre-create claude user and set ownership at build time.
3334
RUN (adduser --disabled-password --gecos '' claude 2>/dev/null || true) && \
3435
for d in /workspace /app /testbed /logs; do [ -d "$d" ] && chown -R claude:claude "$d"; done || true
3536

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
@@ -113,6 +113,13 @@ if [ -f "$MANIFEST" ]; then
113113
# Copy cloned files (except .git)
114114
cd "$TMPCLONE"
115115
find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec cp -a {} "$CLONE_TARGET/" \;
116+
# If workspace has no HEAD (bare git init), use mirror .git
117+
# so that git diff HEAD works for diff-based verifiers.
118+
if ! git -C "$CLONE_TARGET" rev-parse HEAD >/dev/null 2>&1; then
119+
rm -rf "$CLONE_TARGET/.git"
120+
cp -a "$TMPCLONE/.git" "$CLONE_TARGET/.git"
121+
echo "[sg_only_verifier] Replaced empty .git with mirror .git for diff baseline"
122+
fi
116123
cd /
117124
rm -rf "$TMPCLONE"
118125
echo "[sg_only_verifier] Restored $MIRROR to $CLONE_TARGET"

benchmarks/ccb_build/codecoverage-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
FROM ubuntu:22.04
66

7+
ENV SOURCEGRAPH_REPO_NAME=sg-evals/CodeCoverageSummary--dibench
8+
79
ENV DEBIAN_FRONTEND=noninteractive
810

911
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -28,8 +30,7 @@ RUN echo '{"workdir":"/app/repo","repos":[{"mirror":"sg-evals/CodeCoverageSummar
2830
# Mark sg_only mode
2931
RUN touch /tmp/.sg_only_mode
3032

31-
# Pre-create claude user and set ownership at build time so Harbor's
32-
# runtime chown is a no-op (avoids 15-30 min delay on large repos).
33+
# Pre-create claude user and set ownership at build time.
3334
RUN (adduser --disabled-password --gecos '' claude 2>/dev/null || true) && \
3435
for d in /workspace /app /testbed /logs; do [ -d "$d" ] && chown -R claude:claude "$d"; done || true
3536

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
@@ -113,6 +113,13 @@ if [ -f "$MANIFEST" ]; then
113113
# Copy cloned files (except .git)
114114
cd "$TMPCLONE"
115115
find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec cp -a {} "$CLONE_TARGET/" \;
116+
# If workspace has no HEAD (bare git init), use mirror .git
117+
# so that git diff HEAD works for diff-based verifiers.
118+
if ! git -C "$CLONE_TARGET" rev-parse HEAD >/dev/null 2>&1; then
119+
rm -rf "$CLONE_TARGET/.git"
120+
cp -a "$TMPCLONE/.git" "$CLONE_TARGET/.git"
121+
echo "[sg_only_verifier] Replaced empty .git with mirror .git for diff baseline"
122+
fi
116123
cd /
117124
rm -rf "$TMPCLONE"
118125
echo "[sg_only_verifier] Restored $MIRROR to $CLONE_TARGET"

benchmarks/ccb_build/dotenv-expand-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
FROM ubuntu:22.04
66

7+
ENV SOURCEGRAPH_REPO_NAME=sg-evals/dotenv-expand--dibench
8+
79
ENV DEBIAN_FRONTEND=noninteractive
810

911
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -34,8 +36,7 @@ RUN echo '{"workdir":"/app/repo","repos":[{"mirror":"sg-evals/dotenv-expand--dib
3436
# Mark sg_only mode
3537
RUN touch /tmp/.sg_only_mode
3638

37-
# Pre-create claude user and set ownership at build time so Harbor's
38-
# runtime chown is a no-op (avoids 15-30 min delay on large repos).
39+
# Pre-create claude user and set ownership at build time.
3940
RUN (adduser --disabled-password --gecos '' claude 2>/dev/null || true) && \
4041
for d in /workspace /app /testbed /logs; do [ -d "$d" ] && chown -R claude:claude "$d"; done || true
4142

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
@@ -113,6 +113,13 @@ if [ -f "$MANIFEST" ]; then
113113
# Copy cloned files (except .git)
114114
cd "$TMPCLONE"
115115
find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec cp -a {} "$CLONE_TARGET/" \;
116+
# If workspace has no HEAD (bare git init), use mirror .git
117+
# so that git diff HEAD works for diff-based verifiers.
118+
if ! git -C "$CLONE_TARGET" rev-parse HEAD >/dev/null 2>&1; then
119+
rm -rf "$CLONE_TARGET/.git"
120+
cp -a "$TMPCLONE/.git" "$CLONE_TARGET/.git"
121+
echo "[sg_only_verifier] Replaced empty .git with mirror .git for diff baseline"
122+
fi
116123
cd /
117124
rm -rf "$TMPCLONE"
118125
echo "[sg_only_verifier] Restored $MIRROR to $CLONE_TARGET"

benchmarks/ccb_build/dotnetkoans-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
FROM ubuntu:22.04
66

7+
ENV SOURCEGRAPH_REPO_NAME=sg-evals/DotNetKoans--dibench
8+
79
ENV DEBIAN_FRONTEND=noninteractive
810

911
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -28,8 +30,7 @@ RUN echo '{"workdir":"/app/repo","repos":[{"mirror":"sg-evals/DotNetKoans--diben
2830
# Mark sg_only mode
2931
RUN touch /tmp/.sg_only_mode
3032

31-
# Pre-create claude user and set ownership at build time so Harbor's
32-
# runtime chown is a no-op (avoids 15-30 min delay on large repos).
33+
# Pre-create claude user and set ownership at build time.
3334
RUN (adduser --disabled-password --gecos '' claude 2>/dev/null || true) && \
3435
for d in /workspace /app /testbed /logs; do [ -d "$d" ] && chown -R claude:claude "$d"; done || true
3536

0 commit comments

Comments
 (0)