Skip to content

Commit 2fef9e2

Browse files
sjarmakclaude
andcommitted
fix: multi-stage rebuild for 3 protonmail tasks with corrupted sweap-images
All 76 protonmail sweap-images on Docker Hub have corrupted system binaries (exec /bin/bash: input/output error). The /app directory (repo, node_modules, build artifacts) is intact. Multi-stage build copies /app from the broken image into a fresh node:16.20.2-bullseye (base/artifact) or node:18-bullseye (sg_only, for Claude Code compat). - Dockerfile: multi-stage FROM broken AS source -> FROM node, COPY /app - Dockerfile.artifact_only: same + cp -al /app /repo_full (hardlink backup) - Dockerfile.sg_only: same + node:18 + truncate + recommit Verified: conv-testhooks base image builds, executes (echo hello, node -v, jq --version), artifact_only backup and mode flags work. sg-benchmarks mirrors confirmed for all 3 tasks (protonmail--c6f65d20, --8be4f6cb, --369fd37d). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f90b108 commit 2fef9e2

File tree

9 files changed

+144
-54
lines changed

9 files changed

+144
-54
lines changed
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# SWE-bench Pro Task Environment
22
# Instance: instance_protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b
33
# Repo: protonmail/webclients
4+
#
5+
# Multi-stage rebuild: the sweap-images for protonmail have corrupted system
6+
# binaries (exec format / I/O error). We copy the pre-built /app directory
7+
# (repo + node_modules + build artifacts) into a fresh Node.js base image.
48

5-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b
9+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b AS source
10+
11+
FROM node:16.20.2-bullseye
12+
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
git jq python3 curl ca-certificates \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
COPY --from=source /app /app
618

719
# Install uv for Python package management
820
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -13,6 +25,7 @@ RUN mkdir -p /logs /workspace
1325
# SWE-bench Pro images have the repository at /app, not /testbed
1426
WORKDIR /app
1527

16-
# Override the default entrypoint to work with Harbor's docker-compose
17-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
28+
RUN git config user.email "agent@example.com" && \
29+
git config user.name "Agent"
30+
1831
ENTRYPOINT []

benchmarks/ccb_fix/protonmail-conv-testhooks-fix-001/environment/Dockerfile.artifact_only

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,20 @@
66
# SWE-bench Pro Task Environment
77
# Instance: instance_protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b
88
# Repo: protonmail/webclients
9+
#
10+
# Multi-stage rebuild: the sweap-images for protonmail have corrupted system
11+
# binaries (exec format / I/O error). We copy the pre-built /app directory
12+
# (repo + node_modules + build artifacts) into a fresh Node.js base image.
913

10-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b
14+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b AS source
15+
16+
FROM node:16.20.2-bullseye
17+
18+
RUN apt-get update && apt-get install -y --no-install-recommends \
19+
git jq python3 curl ca-certificates \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
COPY --from=source /app /app
1123

1224
# Install uv for Python package management
1325
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -18,12 +30,14 @@ RUN mkdir -p /logs /workspace
1830
# SWE-bench Pro images have the repository at /app, not /testbed
1931
WORKDIR /app
2032

21-
# Override the default entrypoint to work with Harbor's docker-compose
22-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
33+
RUN git config user.email "agent@example.com" && \
34+
git config user.name "Agent"
35+
2336
# --- artifact_only: backup full repo for verifier scoring ---
2437
# Source stays in /app (readable by baseline agent).
2538
# MCP agent deletes source files at runtime via agent startup script.
26-
RUN cp -a /app /repo_full
39+
# Use hardlinks (cp -al) to avoid copying 9GB of data — nearly instant
40+
RUN cp -al /app /repo_full
2741
RUN touch /tmp/.artifact_only_mode && echo '/app' > /tmp/.artifact_only_workdir
2842

2943
ENTRYPOINT []
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# protonmail-conv-testhooks-fix-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
4+
#
5+
# Multi-stage rebuild: sweap-images for protonmail have corrupted system
6+
# binaries. We copy /app into a fresh Node.js 18 base (Claude Code compat).
47

58
# SWE-bench Pro Task Environment
69
# Instance: instance_protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b
710
# Repo: protonmail/webclients
811

9-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b
12+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-c6f65d205c401350a226bb005f42fac1754b0b5b AS source
1013

11-
# Upgrade Node.js from v16 (base image) to v18 (required by Claude Code >= 2.1.37)
12-
# Remove old Node, then install from Alpine 3.18+ repos (ships Node 18.x)
13-
RUN apk del nodejs nodejs-current npm 2>/dev/null || true; \
14-
rm -f /usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx 2>/dev/null || true; \
15-
apk add --no-cache nodejs npm
14+
FROM node:18-bullseye
15+
16+
RUN apt-get update && apt-get install -y --no-install-recommends \
17+
git jq python3 curl ca-certificates \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
COPY --from=source /app /app
1621

1722
# Install uv for Python package management
1823
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -23,15 +28,13 @@ RUN mkdir -p /logs /workspace
2328
# SWE-bench Pro images have the repository at /app, not /testbed
2429
WORKDIR /app
2530

26-
# Override the default entrypoint to work with Harbor's docker-compose
27-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
31+
RUN git config user.email "agent@example.com" && \
32+
git config user.name "Agent"
2833

2934
# --- sg_only_env: back up full repo, then truncate source ---
30-
RUN cp -a /app /repo_full
35+
RUN cp -al /app /repo_full
3136
RUN find /app -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
3237
# Recommit truncated state so git history cannot recover full files.
33-
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
34-
# would bypass truncation by reading from the pre-truncation commit.
3538
RUN cd /app && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3639
RUN touch /tmp/.sg_only_mode && echo '/app' > /tmp/.sg_only_workdir
3740
ENTRYPOINT []
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# SWE-bench Pro Task Environment
22
# Instance: instance_protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c
33
# Repo: protonmail/webclients
4+
#
5+
# Multi-stage rebuild: the sweap-images for protonmail have corrupted system
6+
# binaries (exec format / I/O error). We copy the pre-built /app directory
7+
# (repo + node_modules + build artifacts) into a fresh Node.js base image.
48

5-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c
9+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c AS source
10+
11+
FROM node:16.20.2-bullseye
12+
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
git jq python3 curl ca-certificates \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
COPY --from=source /app /app
618

719
# Install uv for Python package management
820
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -13,6 +25,7 @@ RUN mkdir -p /logs /workspace
1325
# SWE-bench Pro images have the repository at /app, not /testbed
1426
WORKDIR /app
1527

16-
# Override the default entrypoint to work with Harbor's docker-compose
17-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
28+
RUN git config user.email "agent@example.com" && \
29+
git config user.name "Agent"
30+
1831
ENTRYPOINT []

benchmarks/ccb_fix/protonmail-dropdown-sizing-fix-001/environment/Dockerfile.artifact_only

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,20 @@
66
# SWE-bench Pro Task Environment
77
# Instance: instance_protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c
88
# Repo: protonmail/webclients
9+
#
10+
# Multi-stage rebuild: the sweap-images for protonmail have corrupted system
11+
# binaries (exec format / I/O error). We copy the pre-built /app directory
12+
# (repo + node_modules + build artifacts) into a fresh Node.js base image.
913

10-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c
14+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c AS source
15+
16+
FROM node:16.20.2-bullseye
17+
18+
RUN apt-get update && apt-get install -y --no-install-recommends \
19+
git jq python3 curl ca-certificates \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
COPY --from=source /app /app
1123

1224
# Install uv for Python package management
1325
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -18,12 +30,14 @@ RUN mkdir -p /logs /workspace
1830
# SWE-bench Pro images have the repository at /app, not /testbed
1931
WORKDIR /app
2032

21-
# Override the default entrypoint to work with Harbor's docker-compose
22-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
33+
RUN git config user.email "agent@example.com" && \
34+
git config user.name "Agent"
35+
2336
# --- artifact_only: backup full repo for verifier scoring ---
2437
# Source stays in /app (readable by baseline agent).
2538
# MCP agent deletes source files at runtime via agent startup script.
26-
RUN cp -a /app /repo_full
39+
# Use hardlinks (cp -al) to avoid copying 9GB of data — nearly instant
40+
RUN cp -al /app /repo_full
2741
RUN touch /tmp/.artifact_only_mode && echo '/app' > /tmp/.artifact_only_workdir
2842

2943
ENTRYPOINT []
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# protonmail-dropdown-sizing-fix-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
4+
#
5+
# Multi-stage rebuild: sweap-images for protonmail have corrupted system
6+
# binaries. We copy /app into a fresh Node.js 18 base (Claude Code compat).
47

58
# SWE-bench Pro Task Environment
69
# Instance: instance_protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c
710
# Repo: protonmail/webclients
811

9-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c
12+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-8be4f6cb9380fcd2e67bcb18cef931ae0d4b869c AS source
1013

11-
# Upgrade Node.js from v16 (base image) to v18 (required by Claude Code >= 2.1.37)
12-
# Remove old Node, then install from Alpine 3.18+ repos (ships Node 18.x)
13-
RUN apk del nodejs nodejs-current npm 2>/dev/null || true; \
14-
rm -f /usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx 2>/dev/null || true; \
15-
apk add --no-cache nodejs npm
14+
FROM node:18-bullseye
15+
16+
RUN apt-get update && apt-get install -y --no-install-recommends \
17+
git jq python3 curl ca-certificates \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
COPY --from=source /app /app
1621

1722
# Install uv for Python package management
1823
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -23,15 +28,13 @@ RUN mkdir -p /logs /workspace
2328
# SWE-bench Pro images have the repository at /app, not /testbed
2429
WORKDIR /app
2530

26-
# Override the default entrypoint to work with Harbor's docker-compose
27-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
31+
RUN git config user.email "agent@example.com" && \
32+
git config user.name "Agent"
2833

2934
# --- sg_only_env: back up full repo, then truncate source ---
30-
RUN cp -a /app /repo_full
35+
RUN cp -al /app /repo_full
3136
RUN find /app -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
3237
# Recommit truncated state so git history cannot recover full files.
33-
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
34-
# would bypass truncation by reading from the pre-truncation commit.
3538
RUN cd /app && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3639
RUN touch /tmp/.sg_only_mode && echo '/app' > /tmp/.sg_only_workdir
3740
ENTRYPOINT []
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# SWE-bench Pro Task Environment
22
# Instance: instance_protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f
33
# Repo: protonmail/webclients
4+
#
5+
# Multi-stage rebuild: the sweap-images for protonmail have corrupted system
6+
# binaries (exec format / I/O error). We copy the pre-built /app directory
7+
# (repo + node_modules + build artifacts) into a fresh Node.js base image.
48

5-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f
9+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f AS source
10+
11+
FROM node:16.20.2-bullseye
12+
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
git jq python3 curl ca-certificates \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
COPY --from=source /app /app
618

719
# Install uv for Python package management
820
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -13,6 +25,7 @@ RUN mkdir -p /logs /workspace
1325
# SWE-bench Pro images have the repository at /app, not /testbed
1426
WORKDIR /app
1527

16-
# Override the default entrypoint to work with Harbor's docker-compose
17-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
28+
RUN git config user.email "agent@example.com" && \
29+
git config user.name "Agent"
30+
1831
ENTRYPOINT []

benchmarks/ccb_fix/protonmail-holiday-calendar-fix-001/environment/Dockerfile.artifact_only

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,20 @@
66
# SWE-bench Pro Task Environment
77
# Instance: instance_protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f
88
# Repo: protonmail/webclients
9+
#
10+
# Multi-stage rebuild: the sweap-images for protonmail have corrupted system
11+
# binaries (exec format / I/O error). We copy the pre-built /app directory
12+
# (repo + node_modules + build artifacts) into a fresh Node.js base image.
913

10-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f
14+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f AS source
15+
16+
FROM node:16.20.2-bullseye
17+
18+
RUN apt-get update && apt-get install -y --no-install-recommends \
19+
git jq python3 curl ca-certificates \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
COPY --from=source /app /app
1123

1224
# Install uv for Python package management
1325
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -18,12 +30,14 @@ RUN mkdir -p /logs /workspace
1830
# SWE-bench Pro images have the repository at /app, not /testbed
1931
WORKDIR /app
2032

21-
# Override the default entrypoint to work with Harbor's docker-compose
22-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
33+
RUN git config user.email "agent@example.com" && \
34+
git config user.name "Agent"
35+
2336
# --- artifact_only: backup full repo for verifier scoring ---
2437
# Source stays in /app (readable by baseline agent).
2538
# MCP agent deletes source files at runtime via agent startup script.
26-
RUN cp -a /app /repo_full
39+
# Use hardlinks (cp -al) to avoid copying 9GB of data — nearly instant
40+
RUN cp -al /app /repo_full
2741
RUN touch /tmp/.artifact_only_mode && echo '/app' > /tmp/.artifact_only_workdir
2842

2943
ENTRYPOINT []
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# protonmail-holiday-calendar-fix-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
4+
#
5+
# Multi-stage rebuild: sweap-images for protonmail have corrupted system
6+
# binaries. We copy /app into a fresh Node.js 18 base (Claude Code compat).
47

58
# SWE-bench Pro Task Environment
69
# Instance: instance_protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f
710
# Repo: protonmail/webclients
811

9-
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f
12+
FROM jefzda/sweap-images:protonmail.webclients-protonmail__webclients-369fd37de29c14c690cb3b1c09a949189734026f AS source
1013

11-
# Upgrade Node.js from v16 (base image) to v18 (required by Claude Code >= 2.1.37)
12-
# Remove old Node, then install from Alpine 3.18+ repos (ships Node 18.x)
13-
RUN apk del nodejs nodejs-current npm 2>/dev/null || true; \
14-
rm -f /usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx 2>/dev/null || true; \
15-
apk add --no-cache nodejs npm
14+
FROM node:18-bullseye
15+
16+
RUN apt-get update && apt-get install -y --no-install-recommends \
17+
git jq python3 curl ca-certificates \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
COPY --from=source /app /app
1621

1722
# Install uv for Python package management
1823
RUN curl -LsSf https://astral.sh/uv/0.7.13/install.sh | sh || true
@@ -23,15 +28,13 @@ RUN mkdir -p /logs /workspace
2328
# SWE-bench Pro images have the repository at /app, not /testbed
2429
WORKDIR /app
2530

26-
# Override the default entrypoint to work with Harbor's docker-compose
27-
# (The base image has ENTRYPOINT ["/bin/bash"] which doesn't work with Harbor's command format)
31+
RUN git config user.email "agent@example.com" && \
32+
git config user.name "Agent"
2833

2934
# --- sg_only_env: back up full repo, then truncate source ---
30-
RUN cp -a /app /repo_full
35+
RUN cp -al /app /repo_full
3136
RUN find /app -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
3237
# Recommit truncated state so git history cannot recover full files.
33-
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
34-
# would bypass truncation by reading from the pre-truncation commit.
3538
RUN cd /app && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3639
RUN touch /tmp/.sg_only_mode && echo '/app' > /tmp/.sg_only_workdir
3740
ENTRYPOINT []

0 commit comments

Comments
 (0)