Marquis03 commited on
Commit
ffbc3ae
·
verified ·
1 Parent(s): b7f9a78

commit (part 100)

Browse files
Files changed (40) hide show
  1. .gitattributes +1 -0
  2. prydonius--karn.7307672/tests/Dockerfile +1 -0
  3. psankar--simplefs.4dc8ce2/environment/Dockerfile +1 -0
  4. psankar--simplefs.4dc8ce2/tests/Dockerfile +1 -0
  5. puerkitobio--fetchbot.b01e8f8/environment/Dockerfile +1 -0
  6. puerkitobio--fetchbot.b01e8f8/tests/Dockerfile +1 -0
  7. pwaller--go2ll-talk.a577581/environment/Dockerfile +1 -0
  8. pwaller--go2ll-talk.a577581/tests/Dockerfile +1 -0
  9. pwnesia--dnstake.3d9d96e/environment/Dockerfile +1 -0
  10. pwnesia--dnstake.3d9d96e/tests/Dockerfile +1 -0
  11. pwnwriter--kanha.df75df5/environment/Dockerfile +1 -0
  12. pwnwriter--kanha.df75df5/tests/Dockerfile +1 -0
  13. pyk--cmake-tutorial.1aeb653/environment/Dockerfile +1 -0
  14. pyk--cmake-tutorial.1aeb653/tests/Dockerfile +1 -0
  15. q191201771--naza.185b380/environment/Dockerfile +1 -0
  16. q191201771--naza.185b380/tests/Dockerfile +1 -0
  17. qaware--protocurl.cf82eeb/environment/Dockerfile +1 -0
  18. qaware--protocurl.cf82eeb/tests/Dockerfile +1 -0
  19. qihoo360--mysql-sniffer.86e06b8/environment/Dockerfile +1 -0
  20. qihoo360--mysql-sniffer.86e06b8/tests/Dockerfile +1 -0
  21. qihoo360--phptrace.16ea058/environment/Dockerfile +1 -0
  22. qihoo360--phptrace.16ea058/tests/Dockerfile +1 -0
  23. qntfy--kazaam.f202606/environment/Dockerfile +1 -0
  24. qntfy--kazaam.f202606/tests/Dockerfile +1 -0
  25. quackduck--uniclip.02f28f1/environment/Dockerfile +98 -0
  26. quackduck--uniclip.02f28f1/environment/docker-compose.yaml +22 -0
  27. quackduck--uniclip.02f28f1/environment/download.sh +172 -0
  28. quackduck--uniclip.02f28f1/environment/executable +3 -0
  29. quackduck--uniclip.02f28f1/environment/harbor_configure_apt_mirror.sh +37 -0
  30. quackduck--uniclip.02f28f1/environment/harbor_configure_java_mirrors.sh +50 -0
  31. quackduck--uniclip.02f28f1/environment/harbor_prepare_download_env.sh +44 -0
  32. quackduck--uniclip.02f28f1/environment/programgym-go.tar.gz +3 -0
  33. quackduck--uniclip.02f28f1/environment/workspace.tar.gz +3 -0
  34. quackduck--uniclip.02f28f1/instruction.md +98 -0
  35. quackduck--uniclip.02f28f1/solution/solve.sh +33 -0
  36. quackduck--uniclip.02f28f1/task.toml +69 -0
  37. quackduck--uniclip.02f28f1/tests/Dockerfile +112 -0
  38. quackduck--uniclip.02f28f1/tests/blobs/tests/generated_module_01.tar.gz +3 -0
  39. quackduck--uniclip.02f28f1/tests/docker-compose.yaml +22 -0
  40. quackduck--uniclip.02f28f1/tests/download.sh +172 -0
.gitattributes CHANGED
@@ -3588,3 +3588,4 @@ programmingrust--mandelbrot.2ba8479/environment/executable filter=lfs diff=lfs m
3588
  programmingrust--mandelbrot.2ba8479/tests/executable filter=lfs diff=lfs merge=lfs -text
3589
  projectdiscovery--wappalyzergo.efb75ce/environment/executable filter=lfs diff=lfs merge=lfs -text
3590
  projectdiscovery--wappalyzergo.efb75ce/tests/executable filter=lfs diff=lfs merge=lfs -text
 
 
3588
  programmingrust--mandelbrot.2ba8479/tests/executable filter=lfs diff=lfs merge=lfs -text
3589
  projectdiscovery--wappalyzergo.efb75ce/environment/executable filter=lfs diff=lfs merge=lfs -text
3590
  projectdiscovery--wappalyzergo.efb75ce/tests/executable filter=lfs diff=lfs merge=lfs -text
3591
+ quackduck--uniclip.02f28f1/environment/executable filter=lfs diff=lfs merge=lfs -text
prydonius--karn.7307672/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
psankar--simplefs.4dc8ce2/environment/Dockerfile CHANGED
@@ -54,3 +54,4 @@ RUN mkdir -p /home/agent \
54
  && chmod 111 /workspace/executable
55
  ENV HOME=/home/agent
56
  WORKDIR /workspace
 
 
54
  && chmod 111 /workspace/executable
55
  ENV HOME=/home/agent
56
  WORKDIR /workspace
57
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
psankar--simplefs.4dc8ce2/tests/Dockerfile CHANGED
@@ -68,3 +68,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
68
  COPY programgym_task.json /tests/programgym_task.json
69
  COPY blobs/ /tests/blobs/
70
  RUN chmod +x /tests/test.sh
 
 
68
  COPY programgym_task.json /tests/programgym_task.json
69
  COPY blobs/ /tests/blobs/
70
  RUN chmod +x /tests/test.sh
71
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
puerkitobio--fetchbot.b01e8f8/environment/Dockerfile CHANGED
@@ -58,3 +58,4 @@ RUN mkdir -p /home/agent \
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
 
 
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
61
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
puerkitobio--fetchbot.b01e8f8/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pwaller--go2ll-talk.a577581/environment/Dockerfile CHANGED
@@ -58,3 +58,4 @@ RUN mkdir -p /home/agent \
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
 
 
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
61
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pwaller--go2ll-talk.a577581/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pwnesia--dnstake.3d9d96e/environment/Dockerfile CHANGED
@@ -58,3 +58,4 @@ RUN mkdir -p /home/agent \
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
 
 
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
61
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pwnesia--dnstake.3d9d96e/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pwnwriter--kanha.df75df5/environment/Dockerfile CHANGED
@@ -57,3 +57,4 @@ RUN mkdir -p /home/agent \
57
  && chmod 111 /workspace/executable
58
  ENV HOME=/home/agent
59
  WORKDIR /workspace
 
 
57
  && chmod 111 /workspace/executable
58
  ENV HOME=/home/agent
59
  WORKDIR /workspace
60
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pwnwriter--kanha.df75df5/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pyk--cmake-tutorial.1aeb653/environment/Dockerfile CHANGED
@@ -55,3 +55,4 @@ RUN mkdir -p /home/agent \
55
  && chmod 111 /workspace/executable
56
  ENV HOME=/home/agent
57
  WORKDIR /workspace
 
 
55
  && chmod 111 /workspace/executable
56
  ENV HOME=/home/agent
57
  WORKDIR /workspace
58
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
pyk--cmake-tutorial.1aeb653/tests/Dockerfile CHANGED
@@ -63,3 +63,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
63
  COPY programgym_task.json /tests/programgym_task.json
64
  COPY blobs/ /tests/blobs/
65
  RUN chmod +x /tests/test.sh
 
 
63
  COPY programgym_task.json /tests/programgym_task.json
64
  COPY blobs/ /tests/blobs/
65
  RUN chmod +x /tests/test.sh
66
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
q191201771--naza.185b380/environment/Dockerfile CHANGED
@@ -58,3 +58,4 @@ RUN mkdir -p /home/agent \
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
 
 
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
61
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
q191201771--naza.185b380/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qaware--protocurl.cf82eeb/environment/Dockerfile CHANGED
@@ -58,3 +58,4 @@ RUN mkdir -p /home/agent \
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
 
 
58
  && chmod 111 /workspace/executable
59
  ENV HOME=/home/agent
60
  WORKDIR /workspace
61
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qaware--protocurl.cf82eeb/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qihoo360--mysql-sniffer.86e06b8/environment/Dockerfile CHANGED
@@ -52,3 +52,4 @@ RUN mkdir -p /home/agent \
52
  && chmod 111 /workspace/executable
53
  ENV HOME=/home/agent
54
  WORKDIR /workspace
 
 
52
  && chmod 111 /workspace/executable
53
  ENV HOME=/home/agent
54
  WORKDIR /workspace
55
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qihoo360--mysql-sniffer.86e06b8/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qihoo360--phptrace.16ea058/environment/Dockerfile CHANGED
@@ -52,3 +52,4 @@ RUN mkdir -p /home/agent \
52
  && chmod 111 /workspace/executable
53
  ENV HOME=/home/agent
54
  WORKDIR /workspace
 
 
52
  && chmod 111 /workspace/executable
53
  ENV HOME=/home/agent
54
  WORKDIR /workspace
55
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qihoo360--phptrace.16ea058/tests/Dockerfile CHANGED
@@ -66,3 +66,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
 
 
66
  COPY programgym_task.json /tests/programgym_task.json
67
  COPY blobs/ /tests/blobs/
68
  RUN chmod +x /tests/test.sh
69
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qntfy--kazaam.f202606/environment/Dockerfile CHANGED
@@ -56,3 +56,4 @@ RUN mkdir -p /home/agent \
56
  && chmod 111 /workspace/executable
57
  ENV HOME=/home/agent
58
  WORKDIR /workspace
 
 
56
  && chmod 111 /workspace/executable
57
  ENV HOME=/home/agent
58
  WORKDIR /workspace
59
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
qntfy--kazaam.f202606/tests/Dockerfile CHANGED
@@ -64,3 +64,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
64
  COPY programgym_task.json /tests/programgym_task.json
65
  COPY blobs/ /tests/blobs/
66
  RUN chmod +x /tests/test.sh
 
 
64
  COPY programgym_task.json /tests/programgym_task.json
65
  COPY blobs/ /tests/blobs/
66
  RUN chmod +x /tests/test.sh
67
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
quackduck--uniclip.02f28f1/environment/Dockerfile ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:24.04
2
+ ARG PROGRAMGYM_APT_REPOSITORY_BASE_URL=""
3
+ ARG PROGRAMGYM_GOPROXY="https://proxy.golang.org,direct"
4
+ ARG PROGRAMGYM_GOSUMDB="sum.golang.org"
5
+ ARG PROGRAMGYM_NPM_REGISTRY="https://registry.npmjs.org/"
6
+ ARG PROGRAMGYM_NPM_STRICT_SSL="true"
7
+ ARG PROGRAMGYM_PYPI_INDEX_URL="https://pypi.org/simple"
8
+ ARG PROGRAMGYM_PYPI_TRUSTED_HOST=""
9
+ ARG PROGRAMGYM_UV_INSECURE_HOST=""
10
+ ARG PROGRAMGYM_RUSTUP_DIST_SERVER="https://static.rust-lang.org"
11
+ ARG PROGRAMGYM_RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
12
+ ARG PROGRAMGYM_CARGO_INDEX="sparse+https://index.crates.io/"
13
+ ARG PROGRAMGYM_CARGO_NET_RETRY="10"
14
+ ARG PROGRAMGYM_CARGO_HTTP_TIMEOUT="600"
15
+ ARG PROGRAMGYM_CARGO_HTTP_MULTIPLEXING="false"
16
+ ARG PROGRAMGYM_MAVEN_MIRROR_URL=""
17
+ ARG PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=""
18
+ ARG PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL="https://services.gradle.org/distributions"
19
+ ARG PROGRAMGYM_JITPACK_REPOSITORY_URL="https://jitpack.io"
20
+ ENV GOPROXY=${PROGRAMGYM_GOPROXY}
21
+ ENV GOSUMDB=${PROGRAMGYM_GOSUMDB}
22
+ ENV PIP_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
23
+ ENV PIP_TRUSTED_HOST=${PROGRAMGYM_PYPI_TRUSTED_HOST}
24
+ ENV UV_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
25
+ ENV UV_INSECURE_HOST=${PROGRAMGYM_UV_INSECURE_HOST}
26
+ ENV npm_config_registry=${PROGRAMGYM_NPM_REGISTRY}
27
+ ENV npm_config_strict_ssl=${PROGRAMGYM_NPM_STRICT_SSL}
28
+ ENV RUSTUP_DIST_SERVER=${PROGRAMGYM_RUSTUP_DIST_SERVER}
29
+ ENV RUSTUP_UPDATE_ROOT=${PROGRAMGYM_RUSTUP_UPDATE_ROOT}
30
+ ENV CARGO_REGISTRIES_CRATES_IO_INDEX=${PROGRAMGYM_CARGO_INDEX}
31
+ ENV CARGO_NET_RETRY=${PROGRAMGYM_CARGO_NET_RETRY}
32
+ ENV CARGO_HTTP_TIMEOUT=${PROGRAMGYM_CARGO_HTTP_TIMEOUT}
33
+ ENV CARGO_HTTP_MULTIPLEXING=${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING}
34
+ ENV PROGRAMGYM_MAVEN_MIRROR_URL=${PROGRAMGYM_MAVEN_MIRROR_URL}
35
+ ENV PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}
36
+ ENV PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL=${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL}
37
+ ENV PROGRAMGYM_JITPACK_REPOSITORY_URL=${PROGRAMGYM_JITPACK_REPOSITORY_URL}
38
+ COPY harbor_configure_apt_mirror.sh /tmp/harbor_configure_apt_mirror.sh
39
+ RUN chmod 0755 /tmp/harbor_configure_apt_mirror.sh \
40
+ && /bin/bash /tmp/harbor_configure_apt_mirror.sh "${PROGRAMGYM_APT_REPOSITORY_BASE_URL}" \
41
+ && rm -f /tmp/harbor_configure_apt_mirror.sh
42
+ COPY harbor_configure_java_mirrors.sh /tmp/harbor_configure_java_mirrors.sh
43
+ RUN chmod 0755 /tmp/harbor_configure_java_mirrors.sh \
44
+ && /bin/bash /tmp/harbor_configure_java_mirrors.sh "${PROGRAMGYM_MAVEN_MIRROR_URL}" "${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}" "${PROGRAMGYM_JITPACK_REPOSITORY_URL}" \
45
+ && rm -f /tmp/harbor_configure_java_mirrors.sh
46
+ ENV DEBIAN_FRONTEND=noninteractive
47
+ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
48
+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
49
+ ENV GOTOOLCHAIN=auto
50
+ ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
51
+ ENV UV_CACHE_DIR=/workspace/.cache/uv
52
+ ENV npm_config_cache=/workspace/.cache/npm
53
+ ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
54
+ ENV HOME=/workspace
55
+ ENV XDG_CACHE_HOME=/workspace/.cache
56
+ ENV PIP_CACHE_DIR=/workspace/.cache/pip
57
+ ENV PYTHONUSERBASE=/workspace/.local
58
+ ENV GOROOT=/usr/local/go
59
+ ENV GOPATH=/workspace/.go
60
+ ENV GOCACHE=/workspace/.cache/go-build
61
+ ENV PIP_BREAK_SYSTEM_PACKAGES=1
62
+ ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
63
+ ENV PAGER=cat
64
+ ENV MANPAGER=cat
65
+ ENV LESS=-R
66
+ ENV TQDM_DISABLE=1
67
+ ENV VIRTUAL_ENV=/opt/programgym-venv
68
+ RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
69
+ COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
70
+ RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
71
+ RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
72
+ WORKDIR /workspace
73
+ ADD workspace.tar.gz /workspace/
74
+ COPY executable /workspace/executable
75
+ COPY download.sh /workspace/download.sh
76
+ RUN chmod 755 /workspace/download.sh
77
+ COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
78
+ RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
79
+ && /bin/bash /tmp/harbor_prepare_download_env.sh \
80
+ && rm -f /workspace/download.sh \
81
+ && rm -f /tmp/harbor_prepare_download_env.sh
82
+ ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
83
+ RUN chmod 111 /workspace/executable
84
+ WORKDIR /workspace
85
+ # programgym-runtime-workspace-cleanup: v1
86
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
87
+ # Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
88
+ # Keep tool/runtime state under /home/agent and reserve /workspace for the
89
+ # submission handed to the separate verifier. Keep the reference executable
90
+ # execute-only; the oracle temporarily restores owner read permission.
91
+ RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
92
+ RUN mkdir -p /home/agent \
93
+ && chown -R agent:agent /home/agent /workspace \
94
+ && chown agent:agent /workspace/executable \
95
+ && chmod 111 /workspace/executable
96
+ ENV HOME=/home/agent
97
+ WORKDIR /workspace
98
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
quackduck--uniclip.02f28f1/environment/docker-compose.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ main:
3
+ build:
4
+ args:
5
+ PROGRAMGYM_APT_REPOSITORY_BASE_URL: ${PROGRAMGYM_APT_REPOSITORY_BASE_URL:-}
6
+ PROGRAMGYM_GOPROXY: ${PROGRAMGYM_GOPROXY:-https://proxy.golang.org,direct}
7
+ PROGRAMGYM_GOSUMDB: ${PROGRAMGYM_GOSUMDB:-sum.golang.org}
8
+ PROGRAMGYM_NPM_REGISTRY: ${PROGRAMGYM_NPM_REGISTRY:-https://registry.npmjs.org/}
9
+ PROGRAMGYM_NPM_STRICT_SSL: ${PROGRAMGYM_NPM_STRICT_SSL:-true}
10
+ PROGRAMGYM_PYPI_INDEX_URL: ${PROGRAMGYM_PYPI_INDEX_URL:-https://pypi.org/simple}
11
+ PROGRAMGYM_PYPI_TRUSTED_HOST: ${PROGRAMGYM_PYPI_TRUSTED_HOST:-}
12
+ PROGRAMGYM_UV_INSECURE_HOST: ${PROGRAMGYM_UV_INSECURE_HOST:-}
13
+ PROGRAMGYM_RUSTUP_DIST_SERVER: ${PROGRAMGYM_RUSTUP_DIST_SERVER:-https://static.rust-lang.org}
14
+ PROGRAMGYM_RUSTUP_UPDATE_ROOT: ${PROGRAMGYM_RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}
15
+ PROGRAMGYM_CARGO_INDEX: ${PROGRAMGYM_CARGO_INDEX:-sparse+https://index.crates.io/}
16
+ PROGRAMGYM_CARGO_NET_RETRY: ${PROGRAMGYM_CARGO_NET_RETRY:-10}
17
+ PROGRAMGYM_CARGO_HTTP_TIMEOUT: ${PROGRAMGYM_CARGO_HTTP_TIMEOUT:-600}
18
+ PROGRAMGYM_CARGO_HTTP_MULTIPLEXING: ${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING:-false}
19
+ PROGRAMGYM_MAVEN_MIRROR_URL: ${PROGRAMGYM_MAVEN_MIRROR_URL:-}
20
+ PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL: ${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL:-}
21
+ PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL: ${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL:-https://services.gradle.org/distributions}
22
+ PROGRAMGYM_JITPACK_REPOSITORY_URL: ${PROGRAMGYM_JITPACK_REPOSITORY_URL:-https://jitpack.io}
quackduck--uniclip.02f28f1/environment/download.sh ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # PROGRAMGYM-MANAGED-GO-DOWNLOAD: v1
3
+ # Generated deterministically from repository module metadata; do not edit.
4
+ set -u
5
+ export GOTOOLCHAIN=auto
6
+ mkdir -p /workspace/.programgym_build_env/go-prefetch
7
+ cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PROGRAMGYM_GO_MOD_EOF'
8
+ module uniclip
9
+
10
+ go 1.15
11
+
12
+ require (
13
+ golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df
14
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
15
+ )
16
+ PROGRAMGYM_GO_MOD_EOF
17
+ cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PROGRAMGYM_GO_SUM_EOF'
18
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
19
+ golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df h1:y7QZzfUiTwWam+xBn29Ulb8CBwVN5UdzmMDavl9Whlw=
20
+ golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
21
+ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
22
+ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
23
+ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
24
+ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
25
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
26
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
27
+ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
28
+ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
29
+ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
30
+ PROGRAMGYM_GO_SUM_EOF
31
+ PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY="${GOPROXY:-direct}"
32
+ PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
33
+ case "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" in
34
+ *"|"*|*","*)
35
+ PROGRAMGYM_INTERNAL_GO_FIRST_PROXY="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY%%[,|]*}"
36
+ PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY#*[,|]}"
37
+ if [[ "$PROGRAMGYM_INTERNAL_GO_FIRST_PROXY" =~ [^[:space:]] ]] && [[ "$PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER" =~ [^[:space:]] ]]; then
38
+ PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY="${PROGRAMGYM_GO_PUBLIC_FALLBACK_PROXY:-${PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER}}"
39
+ fi
40
+ ;;
41
+ esac
42
+ if ! [[ "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" =~ [^[:space:]] ]]; then
43
+ PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
44
+ fi
45
+ cat > /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py <<'PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF'
46
+ import os
47
+ import signal
48
+ import subprocess
49
+ import sys
50
+ import time
51
+
52
+ sentinel_path, timeout_text, grace_text, proxy, *command = sys.argv[1:]
53
+ if not command:
54
+ raise SystemExit(125)
55
+ environment = os.environ.copy()
56
+ environment["GOPROXY"] = proxy
57
+ process = subprocess.Popen(command, env=environment, start_new_session=True)
58
+ try:
59
+ returncode = process.wait(timeout=float(timeout_text))
60
+ except subprocess.TimeoutExpired:
61
+ with open(sentinel_path, "w", encoding="utf-8") as sentinel:
62
+ sentinel.write("expired\n")
63
+ try:
64
+ os.killpg(process.pid, signal.SIGTERM)
65
+ except ProcessLookupError:
66
+ pass
67
+ deadline = time.monotonic() + float(grace_text)
68
+ group_alive = True
69
+ while time.monotonic() < deadline:
70
+ process.poll()
71
+ try:
72
+ os.killpg(process.pid, 0)
73
+ except ProcessLookupError:
74
+ group_alive = False
75
+ break
76
+ time.sleep(0.05)
77
+ if group_alive:
78
+ try:
79
+ os.killpg(process.pid, signal.SIGKILL)
80
+ except ProcessLookupError:
81
+ pass
82
+ process.wait()
83
+ raise SystemExit(124)
84
+ if returncode < 0:
85
+ returncode = 128 - returncode
86
+ raise SystemExit(returncode)
87
+ PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF
88
+ PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS="${PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS:-90}"
89
+ if ! [[ "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" =~ ^[1-9][0-9]*$ ]]; then
90
+ printf '%s\n' "download.sh: invalid PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS=${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}" >&2
91
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
92
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
93
+ return 1
94
+ else
95
+ exit 1
96
+ fi
97
+ fi
98
+ if ! command -v python3 >/dev/null 2>&1; then
99
+ printf '%s\n' 'download.sh: python3 is required for bounded Nexus Go downloads' >&2
100
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
101
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
102
+ return 1
103
+ else
104
+ exit 1
105
+ fi
106
+ fi
107
+ _programgym_go_with_nexus_timeout() {
108
+ local programgym_go_rc
109
+ local programgym_go_timeout_sentinel
110
+ if ! programgym_go_timeout_sentinel="$(mktemp "${TMPDIR:-/tmp}/programgym-go-timeout.XXXXXX")"; then
111
+ return 1
112
+ fi
113
+ if python3 /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py "$programgym_go_timeout_sentinel" "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" "5" "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" "$@"; then
114
+ programgym_go_rc=0
115
+ else
116
+ programgym_go_rc=$?
117
+ fi
118
+ programgym_go_timed_out=0
119
+ if [ -s "$programgym_go_timeout_sentinel" ]; then
120
+ programgym_go_timed_out=1
121
+ fi
122
+ rm -f "$programgym_go_timeout_sentinel"
123
+ if [ "$programgym_go_rc" -eq 0 ]; then
124
+ return 0
125
+ fi
126
+ if [ -z "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" ]; then
127
+ printf '%s\n' "download.sh: primary Go request failed with rc=${programgym_go_rc}; GOPROXY has no explicit non-empty fallback remainder" >&2
128
+ return "$programgym_go_rc"
129
+ fi
130
+ if [ "$programgym_go_timed_out" -eq 1 ]; then
131
+ printf '%s\n' "download.sh: primary Go request exceeded ${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}s; retrying with GOPROXY=${PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY}" >&2
132
+ else
133
+ printf '%s\n' "download.sh: primary Go request failed with rc=${programgym_go_rc}; retrying with GOPROXY=${PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY}" >&2
134
+ fi
135
+ env GOPROXY="$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" "$@"
136
+ }
137
+ PROGRAMGYM_GO_BASE_GOROOT="$(GOTOOLCHAIN=local go env GOROOT)"
138
+ if ! PROGRAMGYM_GO_RESOLVED_GOROOT="$(cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout env GOTOOLCHAIN=auto go env GOROOT)"; then
139
+ printf '%s\n' 'download.sh: Go toolchain resolution failed' >&2
140
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
141
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
142
+ return 1
143
+ else
144
+ exit 1
145
+ fi
146
+ fi
147
+ if [ "$PROGRAMGYM_GO_RESOLVED_GOROOT" != "$PROGRAMGYM_GO_BASE_GOROOT" ]; then
148
+ PROGRAMGYM_GO_TOOLCHAIN_ROOT=/opt/programgym-go-toolchain
149
+ mkdir -p "$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
150
+ cp -a "$PROGRAMGYM_GO_RESOLVED_GOROOT/." "$PROGRAMGYM_GO_TOOLCHAIN_ROOT/"
151
+ export GOROOT="$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
152
+ else
153
+ export GOROOT="$PROGRAMGYM_GO_BASE_GOROOT"
154
+ fi
155
+ export PATH="$GOROOT/bin:$PATH"
156
+ export GOTOOLCHAIN=local
157
+ if ! (cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all); then
158
+ printf '%s\n' 'download.sh: Go dependency prefetch failed' >&2
159
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
160
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
161
+ return 1
162
+ else
163
+ exit 1
164
+ fi
165
+ fi
166
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
167
+ unset -f _programgym_go_with_nexus_timeout
168
+ unset PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY
169
+ unset PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY
170
+ unset PROGRAMGYM_INTERNAL_GO_FIRST_PROXY
171
+ unset PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER
172
+ unset PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS
quackduck--uniclip.02f28f1/environment/executable ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e93e0d2b16de1599266f07549cbeefc6683356594a5bca78d5f732b6057289c4
3
+ size 4626273
quackduck--uniclip.02f28f1/environment/harbor_configure_apt_mirror.sh ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ repository_base="${1%/}"
5
+ if [[ -z "$repository_base" ]]; then
6
+ exit 0
7
+ fi
8
+
9
+ . /etc/os-release
10
+ codename="${VERSION_CODENAME:-}"
11
+ if [[ -z "$codename" ]]; then
12
+ echo "VERSION_CODENAME is not set" >&2
13
+ exit 1
14
+ fi
15
+
16
+ if [[ "$ID" == "ubuntu" ]]; then
17
+ repository_name="apt-proxy"
18
+ components="main universe restricted multiverse"
19
+ else
20
+ repository_name="debian-proxy"
21
+ components="main contrib non-free non-free-firmware"
22
+ fi
23
+
24
+ install -d /etc/apt/sources.list.d
25
+ rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
26
+ printf 'deb [trusted=yes] %s/%s %s %s\n' \
27
+ "$repository_base" "$repository_name" "$codename" "$components" \
28
+ >/etc/apt/sources.list
29
+ printf 'deb [trusted=yes] %s/%s %s-updates %s\n' \
30
+ "$repository_base" "$repository_name" "$codename" "$components" \
31
+ >>/etc/apt/sources.list
32
+
33
+ if [[ "$ID" != "ubuntu" ]]; then
34
+ printf 'deb [trusted=yes] %s/%s %s-security %s\n' \
35
+ "$repository_base" "debian-proxy-security" "$codename" "$components" \
36
+ >>/etc/apt/sources.list
37
+ fi
quackduck--uniclip.02f28f1/environment/harbor_configure_java_mirrors.sh ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ maven_url="${1%/}"
5
+ plugin_url="${2%/}"
6
+ jitpack_url="${3%/}"
7
+
8
+ install -d /workspace/.m2 /workspace/.gradle/init.d /opt/programgym/gradle-init
9
+ if [[ -n "$maven_url" ]]; then
10
+ cat >/workspace/.m2/settings.xml <<EOF
11
+ <?xml version="1.0" encoding="UTF-8"?>
12
+ <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0">
13
+ <mirrors>
14
+ <mirror>
15
+ <id>programgym-maven</id>
16
+ <name>ProgramGym Maven mirror</name>
17
+ <url>${maven_url}</url>
18
+ <mirrorOf>*</mirrorOf>
19
+ </mirror>
20
+ </mirrors>
21
+ </settings>
22
+ EOF
23
+ fi
24
+
25
+ cat >/opt/programgym/gradle-init/programgym-mirrors.gradle <<'EOF'
26
+ def pbMaven = System.getenv('PROGRAMGYM_MAVEN_MIRROR_URL')
27
+ def pbPlugins = System.getenv('PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL')
28
+ def pbJitpack = System.getenv('PROGRAMGYM_JITPACK_REPOSITORY_URL')
29
+
30
+ settingsEvaluated { settings ->
31
+ settings.pluginManagement.repositories {
32
+ if (pbPlugins) { maven { url = uri(pbPlugins) } }
33
+ if (pbMaven) { maven { url = uri(pbMaven) } }
34
+ }
35
+ }
36
+
37
+ allprojects {
38
+ buildscript.repositories {
39
+ if (pbPlugins) { maven { url = uri(pbPlugins) } }
40
+ if (pbMaven) { maven { url = uri(pbMaven) } }
41
+ if (pbJitpack) { maven { url = uri(pbJitpack) } }
42
+ }
43
+ repositories {
44
+ if (pbMaven) { maven { url = uri(pbMaven) } }
45
+ if (pbJitpack) { maven { url = uri(pbJitpack) } }
46
+ }
47
+ }
48
+ EOF
49
+ cp /opt/programgym/gradle-init/programgym-mirrors.gradle \
50
+ /workspace/.gradle/init.d/programgym-mirrors.gradle
quackduck--uniclip.02f28f1/environment/harbor_prepare_download_env.sh ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ cd /workspace
4
+ set -a
5
+ if [[ -n "${PROGRAMGYM_MAVEN_MIRROR_URL:-}" ]]; then
6
+ sed -i -e "s|https://repo.maven.apache.org/maven2|${PROGRAMGYM_MAVEN_MIRROR_URL%/}|g" -e "s|https://repo1.maven.org/maven2|${PROGRAMGYM_MAVEN_MIRROR_URL%/}|g" /workspace/download.sh
7
+ fi
8
+ if [[ -n "${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL:-}" ]]; then
9
+ sed -i -e "s|https://services.gradle.org/distributions|${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL%/}|g" -e "s|https://downloads.gradle.org/distributions|${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL%/}|g" /workspace/download.sh
10
+ fi
11
+ if [[ -n "${PROGRAMGYM_JITPACK_REPOSITORY_URL:-}" ]]; then
12
+ sed -i -e "s|https://jitpack.io|${PROGRAMGYM_JITPACK_REPOSITORY_URL%/}|g" /workspace/download.sh
13
+ fi
14
+ source /workspace/download.sh
15
+ set +a
16
+ python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
17
+ import os
18
+ import shlex
19
+
20
+ ignored = {
21
+ "ALL_PROXY",
22
+ "HTTP_PROXY",
23
+ "HTTPS_PROXY",
24
+ "NO_PROXY",
25
+ "OLDPWD",
26
+ "PIP_PROXY",
27
+ "PWD",
28
+ "SHLVL",
29
+ "_",
30
+ "all_proxy",
31
+ "http_proxy",
32
+ "https_proxy",
33
+ "no_proxy",
34
+ "pip_proxy",
35
+ }
36
+ for key in sorted(os.environ):
37
+ if key in ignored or key.startswith("BASH_FUNC_"):
38
+ continue
39
+ value = os.environ[key]
40
+ if "\n" in value:
41
+ continue
42
+ print(f"export {key}={shlex.quote(value)}")
43
+ PY
44
+ chmod 0644 /etc/profile.d/programgym_download_env.sh
quackduck--uniclip.02f28f1/environment/programgym-go.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
3
+ size 59908810
quackduck--uniclip.02f28f1/environment/workspace.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10a16fef061cd885f8cf5f98b11383cc91419cbd945b2dbf024f4f180dde48dd
3
+ size 2435
quackduck--uniclip.02f28f1/instruction.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a helpful assistant that can interact with a computer.
2
+
3
+ This is a reverse-engineering benchmark. You are given a compiled binary and its documentation.
4
+ Your job is to write a new, original codebase from scratch that produces an executable with identical behavior.
5
+ You must figure out the behavior solely by running and interacting with the provided binary.
6
+ Writing original code based on observed behavior is the entire point of this benchmark.
7
+
8
+ Any approach that shortcuts this — finding existing source code, wrapping the binary,
9
+ or installing the original tool — does not count as a solution. It will be detected by an
10
+ automated judge, marked as a disqualification, and scored as a failure.
11
+ The trace will be posted to an online wall of shame.
12
+
13
+ <RULES>
14
+ ## What is not allowed
15
+
16
+ ### 1. Obtaining source code
17
+
18
+ The only source of truth about what the executable does is the executable itself and its
19
+ bundled documentation. You must not search the internet, package registries, or any external
20
+ source for information about this project's source code. Even if you recognize what the
21
+ executable is, you must reimplement it from behavioral observation alone.
22
+
23
+ This includes but is not limited to:
24
+ - Cloning or browsing the original GitHub repository, its forks, or mirrors
25
+ - Downloading the project from package registries: `cargo install <project>`, `go get github.com/<org>/<project>`, `pip install <project>`, `apt-get source <project>`, `npm install <project>`, etc.
26
+ - Fetching source tarballs from project websites (e.g., `curl https://lua.org/ftp/lua-5.5.0.tar.gz`)
27
+ - Using a package manager to download the project as a dependency and then reading its cached source (e.g., navigating into `~/.cargo/registry/src/` or `$(go env GOPATH)/pkg/mod/`)
28
+ - Searching the web for the project's source code or implementation details
29
+
30
+ ### 2. Wrapping or reusing the original binary
31
+
32
+ Your submission must be a genuine reimplementation. The provided `./executable` is for
33
+ observation only — your final solution must not depend on it or any other pre-built version
34
+ of the same tool at runtime.
35
+
36
+ This includes but is not limited to:
37
+ - Writing a wrapper script that delegates to the original binary (e.g., `exec zstd "$@"`)
38
+ - Installing the tool from a package manager and shimming to it (e.g., `apt-get install nnn && cp $(which nnn) ./executable`)
39
+ - Writing a `compile.sh` that simply makes the provided binary executable (`chmod +x ./executable`) or copies it (`cp ./executable ./executable`)
40
+ - Building a binary whose main function shells out to an external tool (e.g., `Command::new("miniserve").args(args).exec()`)
41
+ - Re-linking prebuilt `.o` object files found in the workspace without writing new source code
42
+
43
+ ### 3. Binary analysis of the provided executable
44
+
45
+ All information about the provided `./executable` must be obtained by interacting with it
46
+ through its normal user interface (CLI flags, stdin/stdout, etc.).
47
+ - You MUST NOT decompile `./executable` or use disassemblers (objdump, Ghidra, etc.) on it
48
+ - You MUST NOT use strace, ltrace, or similar tracing/instrumentation tools on `./executable`
49
+
50
+ Note: this restriction applies ONLY to the provided `./executable`. You are free to use any
51
+ analysis tools on binaries that you produce yourself during development.
52
+
53
+ ## What IS allowed
54
+
55
+ - Running the executable with any inputs, flags, and arguments to observe its behavior
56
+ - Reading any documentation files bundled in the workspace
57
+ </RULES>
58
+
59
+ ## Task context
60
+
61
+ We want to write the source code for a given executable.
62
+ The executable is located at `./executable` in the workspace root.
63
+
64
+ You also have access to the existing documentation.
65
+
66
+ ## Your task
67
+
68
+ Implement the source code to generate an executable of exactly identical behavior as the original.
69
+
70
+ No project-specific dependencies are pre-installed.
71
+ You do NOT have access to the internet.
72
+ **IMPORTANT**: Make sure that the executable(s) and everything else that is an artifact is not committed, i.e., is in your `.gitignore` file.
73
+ Finally, commit your changes.
74
+
75
+ Make sure that you have a `./compile.sh` file that produces an executable `./executable` in the workspace root.
76
+ `compile.sh` should be executable and should install any dependencies needed to compile the executable.
77
+ If your compile.sh fails to compile on a fresh checkout, your task has failed.
78
+
79
+ ## Important: This is a reverse-engineering benchmark
80
+
81
+ Your goal is to write original code from scratch that reproduces the executable's behavior.
82
+ The only way to learn what the executable does is to run it and read its bundled documentation.
83
+
84
+ Any attempt to obtain source code — whether successful or not — or to wrap/reuse the
85
+ provided binary will be detected by an automated judge, disqualified, and scored as zero.
86
+ See the full rules in the system prompt above. Key points:
87
+
88
+ - Do NOT search the internet, clone repos, or download the project from any package registry
89
+ - Do NOT wrap, shim, or delegate to the provided `./executable` or any installed version of the same tool
90
+ - Do NOT decompile the provided `./executable` or use strace/ltrace on it (analyzing your own binaries is fine)
91
+ - You SHOULD extensively test the executable to understand its behavior before writing code.
92
+ If you are dealing with a TUI, tmux/libtmux has been installed to help you test/inspect/it.
93
+
94
+ ## Recommended Workflow
95
+
96
+ 1. Explore all documentation files
97
+ 2. Play with the executable to understand its behavior (however, you MUST NOT decompile `./executable` or perform any other form of binary or strace/ltrace analysis on it)
98
+ 3. Write the source code to implement the behavior
quackduck--uniclip.02f28f1/solution/solve.sh ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Oracle-only ceiling check. The reference is execute-only for normal agents;
3
+ # because the oracle runs as the owning `agent` user it can temporarily add read
4
+ # permission and encode the binary for Harbor's normal artifact handoff.
5
+ set -euo pipefail
6
+ test -f ./executable
7
+ chmod u+r ./executable
8
+ python3 - <<'PY'
9
+ import base64
10
+ from pathlib import Path
11
+
12
+ Path(".programgym_oracle_reference").write_bytes(
13
+ base64.b64encode(Path("executable").read_bytes())
14
+ )
15
+ PY
16
+ chmod u-r ./executable
17
+ cat > compile.sh <<'EOF'
18
+ #!/usr/bin/env bash
19
+ set -euo pipefail
20
+ if [ -f ./.programgym_oracle_reference ]; then
21
+ python3 - <<'PY'
22
+ import base64
23
+ from pathlib import Path
24
+
25
+ Path("executable").write_bytes(
26
+ base64.b64decode(Path(".programgym_oracle_reference").read_bytes())
27
+ )
28
+ PY
29
+ fi
30
+ test -f ./executable
31
+ chmod +x ./executable
32
+ EOF
33
+ chmod +x compile.sh
quackduck--uniclip.02f28f1/task.toml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.3"
2
+ source = "ProgramGym"
3
+ artifacts = [
4
+ "/logs/verifier/programgym_eval.json",
5
+ "/logs/verifier/harbor_diagnostics.json",
6
+ "/logs/verifier/programgym_eval.log",
7
+ "/logs/verifier/reward.json",
8
+ "/logs/verifier/reward.txt",
9
+ # Keep agent/runtime state out of the submission handoff. In particular,
10
+ # Claude Code installs an absolute symlink under .local/bin; transferring it
11
+ # makes Python's safe tar extraction reject the entire workspace archive.
12
+ { source = "/workspace", exclude = [
13
+ "executable",
14
+ ".git",
15
+ ".bashrc",
16
+ ".cache",
17
+ ".cc-switch",
18
+ ".claude",
19
+ ".local",
20
+ ] },
21
+ ]
22
+
23
+ [task]
24
+ name = "programgym/quackduck--uniclip.02f28f1"
25
+ description = "Synthetic ProgramGym cleanroom reconstruction task for quackduck/uniclip"
26
+ authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
27
+ keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "go"]
28
+
29
+ [metadata]
30
+ source = "ProgramGym"
31
+ instance_id = "quackduck__uniclip.02f28f1"
32
+ repository = "quackduck/uniclip"
33
+ commit = "02f28f13455e219deb3c2d0be6352e405bb415ba"
34
+ language = "go"
35
+ difficulty = "easy"
36
+ difficulty_score = 1.1332194567324945
37
+ test_branches = 1
38
+ test_count = 91
39
+
40
+ [agent]
41
+ timeout_sec = 14400
42
+ user = "agent"
43
+ network_mode = "allowlist"
44
+ allowed_hosts = ["api.anthropic.com", "api.openai.com"]
45
+
46
+ [verifier]
47
+ timeout_sec = 7200
48
+ user = "root"
49
+ environment_mode = "separate"
50
+
51
+ [verifier.env]
52
+ PROGRAMGYM_XDIST_WORKERS = "8"
53
+
54
+ [verifier.environment]
55
+ build_timeout_sec = 1800
56
+ cpus = 8
57
+ memory_mb = 16384
58
+ storage_mb = 30720
59
+ gpus = 0
60
+ workdir = "/workspace"
61
+
62
+ [environment]
63
+ network_mode = "public"
64
+ build_timeout_sec = 1800
65
+ cpus = 8
66
+ memory_mb = 16384
67
+ storage_mb = 30720
68
+ gpus = 0
69
+ workdir = "/workspace"
quackduck--uniclip.02f28f1/tests/Dockerfile ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:24.04
2
+ ARG PROGRAMGYM_APT_REPOSITORY_BASE_URL=""
3
+ ARG PROGRAMGYM_GOPROXY="https://proxy.golang.org,direct"
4
+ ARG PROGRAMGYM_GOSUMDB="sum.golang.org"
5
+ ARG PROGRAMGYM_NPM_REGISTRY="https://registry.npmjs.org/"
6
+ ARG PROGRAMGYM_NPM_STRICT_SSL="true"
7
+ ARG PROGRAMGYM_PYPI_INDEX_URL="https://pypi.org/simple"
8
+ ARG PROGRAMGYM_PYPI_TRUSTED_HOST=""
9
+ ARG PROGRAMGYM_UV_INSECURE_HOST=""
10
+ ARG PROGRAMGYM_RUSTUP_DIST_SERVER="https://static.rust-lang.org"
11
+ ARG PROGRAMGYM_RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
12
+ ARG PROGRAMGYM_CARGO_INDEX="sparse+https://index.crates.io/"
13
+ ARG PROGRAMGYM_CARGO_NET_RETRY="10"
14
+ ARG PROGRAMGYM_CARGO_HTTP_TIMEOUT="600"
15
+ ARG PROGRAMGYM_CARGO_HTTP_MULTIPLEXING="false"
16
+ ARG PROGRAMGYM_MAVEN_MIRROR_URL=""
17
+ ARG PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=""
18
+ ARG PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL="https://services.gradle.org/distributions"
19
+ ARG PROGRAMGYM_JITPACK_REPOSITORY_URL="https://jitpack.io"
20
+ ENV GOPROXY=${PROGRAMGYM_GOPROXY}
21
+ ENV GOSUMDB=${PROGRAMGYM_GOSUMDB}
22
+ ENV PIP_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
23
+ ENV PIP_TRUSTED_HOST=${PROGRAMGYM_PYPI_TRUSTED_HOST}
24
+ ENV UV_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
25
+ ENV UV_INSECURE_HOST=${PROGRAMGYM_UV_INSECURE_HOST}
26
+ ENV npm_config_registry=${PROGRAMGYM_NPM_REGISTRY}
27
+ ENV npm_config_strict_ssl=${PROGRAMGYM_NPM_STRICT_SSL}
28
+ ENV RUSTUP_DIST_SERVER=${PROGRAMGYM_RUSTUP_DIST_SERVER}
29
+ ENV RUSTUP_UPDATE_ROOT=${PROGRAMGYM_RUSTUP_UPDATE_ROOT}
30
+ ENV CARGO_REGISTRIES_CRATES_IO_INDEX=${PROGRAMGYM_CARGO_INDEX}
31
+ ENV CARGO_NET_RETRY=${PROGRAMGYM_CARGO_NET_RETRY}
32
+ ENV CARGO_HTTP_TIMEOUT=${PROGRAMGYM_CARGO_HTTP_TIMEOUT}
33
+ ENV CARGO_HTTP_MULTIPLEXING=${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING}
34
+ ENV PROGRAMGYM_MAVEN_MIRROR_URL=${PROGRAMGYM_MAVEN_MIRROR_URL}
35
+ ENV PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}
36
+ ENV PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL=${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL}
37
+ ENV PROGRAMGYM_JITPACK_REPOSITORY_URL=${PROGRAMGYM_JITPACK_REPOSITORY_URL}
38
+ COPY harbor_configure_apt_mirror.sh /tmp/harbor_configure_apt_mirror.sh
39
+ RUN chmod 0755 /tmp/harbor_configure_apt_mirror.sh \
40
+ && /bin/bash /tmp/harbor_configure_apt_mirror.sh "${PROGRAMGYM_APT_REPOSITORY_BASE_URL}" \
41
+ && rm -f /tmp/harbor_configure_apt_mirror.sh
42
+ COPY harbor_configure_java_mirrors.sh /tmp/harbor_configure_java_mirrors.sh
43
+ RUN chmod 0755 /tmp/harbor_configure_java_mirrors.sh \
44
+ && /bin/bash /tmp/harbor_configure_java_mirrors.sh "${PROGRAMGYM_MAVEN_MIRROR_URL}" "${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}" "${PROGRAMGYM_JITPACK_REPOSITORY_URL}" \
45
+ && rm -f /tmp/harbor_configure_java_mirrors.sh
46
+ ENV DEBIAN_FRONTEND=noninteractive
47
+ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
48
+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
49
+ ENV GOTOOLCHAIN=auto
50
+ ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
51
+ ENV UV_CACHE_DIR=/workspace/.cache/uv
52
+ ENV npm_config_cache=/workspace/.cache/npm
53
+ ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
54
+ ENV HOME=/workspace
55
+ ENV XDG_CACHE_HOME=/workspace/.cache
56
+ ENV PIP_CACHE_DIR=/workspace/.cache/pip
57
+ ENV PYTHONUSERBASE=/workspace/.local
58
+ ENV GOROOT=/usr/local/go
59
+ ENV GOPATH=/workspace/.go
60
+ ENV GOCACHE=/workspace/.cache/go-build
61
+ ENV PIP_BREAK_SYSTEM_PACKAGES=1
62
+ ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
63
+ ENV PAGER=cat
64
+ ENV MANPAGER=cat
65
+ ENV LESS=-R
66
+ ENV TQDM_DISABLE=1
67
+ ENV VIRTUAL_ENV=/opt/programgym-venv
68
+ RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
69
+ COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
70
+ RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
71
+ RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
72
+ WORKDIR /workspace
73
+ ADD workspace.tar.gz /workspace/
74
+ COPY executable /workspace/executable
75
+ COPY download.sh /workspace/download.sh
76
+ RUN chmod 755 /workspace/download.sh
77
+ COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
78
+ RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
79
+ && /bin/bash /tmp/harbor_prepare_download_env.sh \
80
+ && rm -f /workspace/download.sh \
81
+ && rm -f /tmp/harbor_prepare_download_env.sh
82
+ ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
83
+ RUN chmod 111 /workspace/executable
84
+ WORKDIR /workspace
85
+ # programgym-runtime-workspace-cleanup: v1
86
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
87
+ # Harbor uses tests/ as the separate verifier build context. Start with the
88
+ # same toolchain as the agent, then remove every cleanroom workspace artifact.
89
+ RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
90
+ && mkdir -p /workspace /tests
91
+
92
+ # Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
93
+ # Installing a newer pytest alone leaves that apt package importable and creates
94
+ # an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
95
+ # Install and constrain the verifier test runner as one coherent pip toolchain.
96
+ RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
97
+ ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
98
+ RUN set -eu; \
99
+ pip_break_system_packages=""; \
100
+ if python3 -m pip install --help | grep -q -- '--break-system-packages'; then \
101
+ pip_break_system_packages="--break-system-packages"; \
102
+ fi; \
103
+ python3 -m pip install ${pip_break_system_packages} \
104
+ --no-cache-dir --disable-pip-version-check --retries 10 --timeout 120 \
105
+ 'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
106
+
107
+ COPY test.sh /tests/test.sh
108
+ COPY programgym_evaluator.py /tests/programgym_evaluator.py
109
+ COPY programgym_task.json /tests/programgym_task.json
110
+ COPY blobs/ /tests/blobs/
111
+ RUN chmod +x /tests/test.sh
112
+ RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
quackduck--uniclip.02f28f1/tests/blobs/tests/generated_module_01.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:054bdca03b67fb4f1001f760aafc39ea32333daf08096c6633a9fba01e0ec80c
3
+ size 13362
quackduck--uniclip.02f28f1/tests/docker-compose.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ main:
3
+ build:
4
+ args:
5
+ PROGRAMGYM_APT_REPOSITORY_BASE_URL: ${PROGRAMGYM_APT_REPOSITORY_BASE_URL:-}
6
+ PROGRAMGYM_GOPROXY: ${PROGRAMGYM_GOPROXY:-https://proxy.golang.org,direct}
7
+ PROGRAMGYM_GOSUMDB: ${PROGRAMGYM_GOSUMDB:-sum.golang.org}
8
+ PROGRAMGYM_NPM_REGISTRY: ${PROGRAMGYM_NPM_REGISTRY:-https://registry.npmjs.org/}
9
+ PROGRAMGYM_NPM_STRICT_SSL: ${PROGRAMGYM_NPM_STRICT_SSL:-true}
10
+ PROGRAMGYM_PYPI_INDEX_URL: ${PROGRAMGYM_PYPI_INDEX_URL:-https://pypi.org/simple}
11
+ PROGRAMGYM_PYPI_TRUSTED_HOST: ${PROGRAMGYM_PYPI_TRUSTED_HOST:-}
12
+ PROGRAMGYM_UV_INSECURE_HOST: ${PROGRAMGYM_UV_INSECURE_HOST:-}
13
+ PROGRAMGYM_RUSTUP_DIST_SERVER: ${PROGRAMGYM_RUSTUP_DIST_SERVER:-https://static.rust-lang.org}
14
+ PROGRAMGYM_RUSTUP_UPDATE_ROOT: ${PROGRAMGYM_RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}
15
+ PROGRAMGYM_CARGO_INDEX: ${PROGRAMGYM_CARGO_INDEX:-sparse+https://index.crates.io/}
16
+ PROGRAMGYM_CARGO_NET_RETRY: ${PROGRAMGYM_CARGO_NET_RETRY:-10}
17
+ PROGRAMGYM_CARGO_HTTP_TIMEOUT: ${PROGRAMGYM_CARGO_HTTP_TIMEOUT:-600}
18
+ PROGRAMGYM_CARGO_HTTP_MULTIPLEXING: ${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING:-false}
19
+ PROGRAMGYM_MAVEN_MIRROR_URL: ${PROGRAMGYM_MAVEN_MIRROR_URL:-}
20
+ PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL: ${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL:-}
21
+ PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL: ${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL:-https://services.gradle.org/distributions}
22
+ PROGRAMGYM_JITPACK_REPOSITORY_URL: ${PROGRAMGYM_JITPACK_REPOSITORY_URL:-https://jitpack.io}
quackduck--uniclip.02f28f1/tests/download.sh ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # PROGRAMGYM-MANAGED-GO-DOWNLOAD: v1
3
+ # Generated deterministically from repository module metadata; do not edit.
4
+ set -u
5
+ export GOTOOLCHAIN=auto
6
+ mkdir -p /workspace/.programgym_build_env/go-prefetch
7
+ cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PROGRAMGYM_GO_MOD_EOF'
8
+ module uniclip
9
+
10
+ go 1.15
11
+
12
+ require (
13
+ golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df
14
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
15
+ )
16
+ PROGRAMGYM_GO_MOD_EOF
17
+ cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PROGRAMGYM_GO_SUM_EOF'
18
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
19
+ golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df h1:y7QZzfUiTwWam+xBn29Ulb8CBwVN5UdzmMDavl9Whlw=
20
+ golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
21
+ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
22
+ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
23
+ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
24
+ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
25
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
26
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
27
+ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
28
+ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
29
+ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
30
+ PROGRAMGYM_GO_SUM_EOF
31
+ PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY="${GOPROXY:-direct}"
32
+ PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
33
+ case "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" in
34
+ *"|"*|*","*)
35
+ PROGRAMGYM_INTERNAL_GO_FIRST_PROXY="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY%%[,|]*}"
36
+ PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY#*[,|]}"
37
+ if [[ "$PROGRAMGYM_INTERNAL_GO_FIRST_PROXY" =~ [^[:space:]] ]] && [[ "$PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER" =~ [^[:space:]] ]]; then
38
+ PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY="${PROGRAMGYM_GO_PUBLIC_FALLBACK_PROXY:-${PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER}}"
39
+ fi
40
+ ;;
41
+ esac
42
+ if ! [[ "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" =~ [^[:space:]] ]]; then
43
+ PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
44
+ fi
45
+ cat > /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py <<'PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF'
46
+ import os
47
+ import signal
48
+ import subprocess
49
+ import sys
50
+ import time
51
+
52
+ sentinel_path, timeout_text, grace_text, proxy, *command = sys.argv[1:]
53
+ if not command:
54
+ raise SystemExit(125)
55
+ environment = os.environ.copy()
56
+ environment["GOPROXY"] = proxy
57
+ process = subprocess.Popen(command, env=environment, start_new_session=True)
58
+ try:
59
+ returncode = process.wait(timeout=float(timeout_text))
60
+ except subprocess.TimeoutExpired:
61
+ with open(sentinel_path, "w", encoding="utf-8") as sentinel:
62
+ sentinel.write("expired\n")
63
+ try:
64
+ os.killpg(process.pid, signal.SIGTERM)
65
+ except ProcessLookupError:
66
+ pass
67
+ deadline = time.monotonic() + float(grace_text)
68
+ group_alive = True
69
+ while time.monotonic() < deadline:
70
+ process.poll()
71
+ try:
72
+ os.killpg(process.pid, 0)
73
+ except ProcessLookupError:
74
+ group_alive = False
75
+ break
76
+ time.sleep(0.05)
77
+ if group_alive:
78
+ try:
79
+ os.killpg(process.pid, signal.SIGKILL)
80
+ except ProcessLookupError:
81
+ pass
82
+ process.wait()
83
+ raise SystemExit(124)
84
+ if returncode < 0:
85
+ returncode = 128 - returncode
86
+ raise SystemExit(returncode)
87
+ PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF
88
+ PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS="${PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS:-90}"
89
+ if ! [[ "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" =~ ^[1-9][0-9]*$ ]]; then
90
+ printf '%s\n' "download.sh: invalid PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS=${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}" >&2
91
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
92
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
93
+ return 1
94
+ else
95
+ exit 1
96
+ fi
97
+ fi
98
+ if ! command -v python3 >/dev/null 2>&1; then
99
+ printf '%s\n' 'download.sh: python3 is required for bounded Nexus Go downloads' >&2
100
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
101
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
102
+ return 1
103
+ else
104
+ exit 1
105
+ fi
106
+ fi
107
+ _programgym_go_with_nexus_timeout() {
108
+ local programgym_go_rc
109
+ local programgym_go_timeout_sentinel
110
+ if ! programgym_go_timeout_sentinel="$(mktemp "${TMPDIR:-/tmp}/programgym-go-timeout.XXXXXX")"; then
111
+ return 1
112
+ fi
113
+ if python3 /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py "$programgym_go_timeout_sentinel" "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" "5" "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" "$@"; then
114
+ programgym_go_rc=0
115
+ else
116
+ programgym_go_rc=$?
117
+ fi
118
+ programgym_go_timed_out=0
119
+ if [ -s "$programgym_go_timeout_sentinel" ]; then
120
+ programgym_go_timed_out=1
121
+ fi
122
+ rm -f "$programgym_go_timeout_sentinel"
123
+ if [ "$programgym_go_rc" -eq 0 ]; then
124
+ return 0
125
+ fi
126
+ if [ -z "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" ]; then
127
+ printf '%s\n' "download.sh: primary Go request failed with rc=${programgym_go_rc}; GOPROXY has no explicit non-empty fallback remainder" >&2
128
+ return "$programgym_go_rc"
129
+ fi
130
+ if [ "$programgym_go_timed_out" -eq 1 ]; then
131
+ printf '%s\n' "download.sh: primary Go request exceeded ${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}s; retrying with GOPROXY=${PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY}" >&2
132
+ else
133
+ printf '%s\n' "download.sh: primary Go request failed with rc=${programgym_go_rc}; retrying with GOPROXY=${PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY}" >&2
134
+ fi
135
+ env GOPROXY="$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" "$@"
136
+ }
137
+ PROGRAMGYM_GO_BASE_GOROOT="$(GOTOOLCHAIN=local go env GOROOT)"
138
+ if ! PROGRAMGYM_GO_RESOLVED_GOROOT="$(cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout env GOTOOLCHAIN=auto go env GOROOT)"; then
139
+ printf '%s\n' 'download.sh: Go toolchain resolution failed' >&2
140
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
141
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
142
+ return 1
143
+ else
144
+ exit 1
145
+ fi
146
+ fi
147
+ if [ "$PROGRAMGYM_GO_RESOLVED_GOROOT" != "$PROGRAMGYM_GO_BASE_GOROOT" ]; then
148
+ PROGRAMGYM_GO_TOOLCHAIN_ROOT=/opt/programgym-go-toolchain
149
+ mkdir -p "$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
150
+ cp -a "$PROGRAMGYM_GO_RESOLVED_GOROOT/." "$PROGRAMGYM_GO_TOOLCHAIN_ROOT/"
151
+ export GOROOT="$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
152
+ else
153
+ export GOROOT="$PROGRAMGYM_GO_BASE_GOROOT"
154
+ fi
155
+ export PATH="$GOROOT/bin:$PATH"
156
+ export GOTOOLCHAIN=local
157
+ if ! (cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all); then
158
+ printf '%s\n' 'download.sh: Go dependency prefetch failed' >&2
159
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
160
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
161
+ return 1
162
+ else
163
+ exit 1
164
+ fi
165
+ fi
166
+ rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
167
+ unset -f _programgym_go_with_nexus_timeout
168
+ unset PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY
169
+ unset PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY
170
+ unset PROGRAMGYM_INTERNAL_GO_FIRST_PROXY
171
+ unset PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER
172
+ unset PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS