Datasets:
Upload folder using huggingface_hub (part 11)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +45 -0
- ceph--cn.be26489/environment/Dockerfile +58 -0
- ceph--cn.be26489/environment/download.sh +200 -0
- ceph--cn.be26489/environment/executable +3 -0
- ceph--cn.be26489/environment/programgym-go.tar.gz +3 -0
- ceph--cn.be26489/environment/workspace.tar.gz +3 -0
- ceph--cn.be26489/instruction.md +98 -0
- ceph--cn.be26489/solution/solve.sh +33 -0
- ceph--cn.be26489/task.toml +69 -0
- ceph--cn.be26489/tests/Dockerfile +66 -0
- ceph--cn.be26489/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- ceph--cn.be26489/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- ceph--cn.be26489/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- ceph--cn.be26489/tests/blobs/tests/generated_module_04.tar.gz +3 -0
- ceph--cn.be26489/tests/download.sh +200 -0
- ceph--cn.be26489/tests/executable +3 -0
- ceph--cn.be26489/tests/programgym-go.tar.gz +3 -0
- ceph--cn.be26489/tests/programgym_evaluator.py +1201 -0
- ceph--cn.be26489/tests/programgym_task.json +679 -0
- ceph--cn.be26489/tests/test.sh +82 -0
- ceph--cn.be26489/tests/workspace.tar.gz +3 -0
- cesanta--elk.71a86fa/environment/Dockerfile +54 -0
- cesanta--elk.71a86fa/environment/download.sh +45 -0
- cesanta--elk.71a86fa/environment/executable +0 -0
- cesanta--elk.71a86fa/environment/harbor_prepare_download_env.sh +34 -0
- cesanta--elk.71a86fa/environment/workspace.tar.gz +3 -0
- cesanta--elk.71a86fa/instruction.md +98 -0
- cesanta--elk.71a86fa/solution/solve.sh +33 -0
- cesanta--elk.71a86fa/task.toml +69 -0
- cesanta--elk.71a86fa/tests/Dockerfile +68 -0
- cesanta--elk.71a86fa/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- cesanta--elk.71a86fa/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- cesanta--elk.71a86fa/tests/blobs/tests/generated_upstream.tar.gz +3 -0
- cesanta--elk.71a86fa/tests/download.sh +45 -0
- cesanta--elk.71a86fa/tests/executable +0 -0
- cesanta--elk.71a86fa/tests/harbor_prepare_download_env.sh +34 -0
- cesanta--elk.71a86fa/tests/programgym_evaluator.py +1201 -0
- cesanta--elk.71a86fa/tests/programgym_task.json +0 -0
- cesanta--elk.71a86fa/tests/test.sh +82 -0
- cesanta--elk.71a86fa/tests/workspace.tar.gz +3 -0
- cesarferreira--rip.83f0260/environment/Dockerfile +59 -0
- cesarferreira--rip.83f0260/environment/download.sh +1341 -0
- cesarferreira--rip.83f0260/environment/executable +3 -0
- cesarferreira--rip.83f0260/environment/harbor_prepare_download_env.sh +37 -0
- cesarferreira--rip.83f0260/environment/workspace.tar.gz +3 -0
- cesarferreira--rip.83f0260/instruction.md +98 -0
- cesarferreira--rip.83f0260/solution/solve.sh +33 -0
- cesarferreira--rip.83f0260/task.toml +69 -0
- cesarferreira--rip.83f0260/tests/Dockerfile +68 -0
- cesarferreira--rip.83f0260/tests/blobs/tests/generated_module_01.tar.gz +3 -0
.gitattributes
CHANGED
|
@@ -484,3 +484,48 @@ cdemoulins--pamixer.3236df4/environment/executable filter=lfs diff=lfs merge=lfs
|
|
| 484 |
cdemoulins--pamixer.3236df4/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 485 |
cedricguillemet--imguizmo.be8aa4/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 486 |
cedricguillemet--imguizmo.be8aa4/tests/executable filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 484 |
cdemoulins--pamixer.3236df4/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 485 |
cedricguillemet--imguizmo.be8aa4/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 486 |
cedricguillemet--imguizmo.be8aa4/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 487 |
+
ceph--cn.be26489/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 488 |
+
ceph--cn.be26489/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 489 |
+
cesarferreira--rip.83f0260/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 490 |
+
cesarferreira--rip.83f0260/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 491 |
+
cespare--reflex.4ebe83d/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 492 |
+
cespare--reflex.4ebe83d/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 493 |
+
cfdemproject--liggghts-public.3d/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 494 |
+
cfdemproject--liggghts-public.3d/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 495 |
+
cgsdev0--termsand.77cea1c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 496 |
+
cgsdev0--termsand.77cea1c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 497 |
+
chadmed--triforce.a4877aa/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 498 |
+
chadmed--triforce.a4877aa/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 499 |
+
chakaz--reflang.1e00e79/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 500 |
+
chakaz--reflang.1e00e79/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 501 |
+
chameco--solid.11a3c44/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 502 |
+
chameco--solid.11a3c44/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 503 |
+
cheekybits--genny.3e22f1a/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 504 |
+
cheekybits--genny.3e22f1a/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 505 |
+
chollingworth--lampray.29d9296/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 506 |
+
chollingworth--lampray.29d9296/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 507 |
+
chop-dbhi--prometheus-sql.f8b632/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 508 |
+
chop-dbhi--prometheus-sql.f8b632/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 509 |
+
chrisrx--dungeonfs.1c33fca/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 510 |
+
chrisrx--dungeonfs.1c33fca/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 511 |
+
christianpanov--lwlog.707dfbc/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 512 |
+
christianpanov--lwlog.707dfbc/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 513 |
+
chronoxor--cppbenchmark.431f1fc/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 514 |
+
chronoxor--cppbenchmark.431f1fc/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 515 |
+
cirruslabs--echelon.836215f/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 516 |
+
cirruslabs--echelon.836215f/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 517 |
+
ckaznocha--protoc-gen-lint.920e7/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 518 |
+
ckaznocha--protoc-gen-lint.920e7/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 519 |
+
clab--fast_align.cab1e9a/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 520 |
+
clab--fast_align.cab1e9a/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 521 |
+
clipable--clipable.4c85ea5/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 522 |
+
clipable--clipable.4c85ea5/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 523 |
+
clipperhouse--gen.46fafb5/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 524 |
+
clipperhouse--gen.46fafb5/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 525 |
+
clitic--vsd.24cd681/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 526 |
+
clitic--vsd.24cd681/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 527 |
+
clmathlibraries--clblas.cf91139/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 528 |
+
clmathlibraries--clblas.cf91139/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 529 |
+
cloudflare--gokey.a5b5ea4/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 530 |
+
cloudflare--gokey.a5b5ea4/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 531 |
+
cloudflare--golibs.558c041/environment/executable filter=lfs diff=lfs merge=lfs -text
|
ceph--cn.be26489/environment/Dockerfile
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
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
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
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/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
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
|
| 38 |
+
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
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 49 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 50 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 51 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 52 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 53 |
+
RUN mkdir -p /home/agent \
|
| 54 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 55 |
+
&& chown agent:agent /workspace/executable \
|
| 56 |
+
&& chmod 111 /workspace/executable
|
| 57 |
+
ENV HOME=/home/agent
|
| 58 |
+
WORKDIR /workspace
|
ceph--cn.be26489/environment/download.sh
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# ProgramGym download.sh for github.com/ceph/cn (ceph-nano).
|
| 3 |
+
# The repository is a legacy GOPATH/dep project (Gopkg.toml, no go.mod, no
|
| 4 |
+
# vendor/). Its primary product is the `cn` CLI in package main (main.go).
|
| 5 |
+
# We prefetch its Go dependency modules into the module cache using the
|
| 6 |
+
# modern toolchain so that build.sh can compile OFFLINE.
|
| 7 |
+
#
|
| 8 |
+
# Sourced via `source /source_ro/download.sh` in a read-only repo mount with
|
| 9 |
+
# network. This script is fully standalone: it does NOT read any repository
|
| 10 |
+
# file (there is no go.mod/go.sum in the tree; both are generated inline
|
| 11 |
+
# here). It performs no compile, link, test, or packaging steps.
|
| 12 |
+
|
| 13 |
+
# ---- environment used by build.sh ----
|
| 14 |
+
export GO111MODULE=on
|
| 15 |
+
|
| 16 |
+
# Fixed literal location where the inline module manifest is generated.
|
| 17 |
+
# build.sh reconstructs the identical files at this path, so the module cache
|
| 18 |
+
# filled here satisfies the offline build.
|
| 19 |
+
export CN_MOD_DIR="/workspace/cn-mod"
|
| 20 |
+
mkdir -p "$CN_MOD_DIR"
|
| 21 |
+
|
| 22 |
+
# Regenerate the module manifest + checksums. Content is embedded so the
|
| 23 |
+
# script needs no repository file.
|
| 24 |
+
cat > /workspace/cn-mod/go.mod <<'EOF'
|
| 25 |
+
module github.com/ceph/cn
|
| 26 |
+
|
| 27 |
+
go 1.25.0
|
| 28 |
+
|
| 29 |
+
require (
|
| 30 |
+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b
|
| 31 |
+
github.com/apcera/termtables v0.0.0-20170405184538-bcbc5dc54055
|
| 32 |
+
github.com/docker/docker v1.4.2-0.20170426220831-c57fdb2a14cf
|
| 33 |
+
github.com/docker/go-connections v0.4.0
|
| 34 |
+
github.com/elgs/gojq v0.0.0-20230628214826-df5c4045598e
|
| 35 |
+
github.com/jmoiron/jsonq v0.0.0-20150511023944-e874b168d07e
|
| 36 |
+
github.com/mitchellh/go-homedir v1.1.0
|
| 37 |
+
github.com/spf13/cobra v0.0.3
|
| 38 |
+
github.com/spf13/viper v1.1.0
|
| 39 |
+
github.com/stretchr/testify v1.9.0
|
| 40 |
+
golang.org/x/crypto v0.55.0
|
| 41 |
+
golang.org/x/sys v0.47.0
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
require (
|
| 45 |
+
github.com/Microsoft/go-winio v0.6.2 // indirect
|
| 46 |
+
github.com/Sirupsen/logrus v1.0.6 // indirect
|
| 47 |
+
github.com/davecgh/go-spew v1.1.1 // indirect
|
| 48 |
+
github.com/distribution/reference v0.6.0 // indirect
|
| 49 |
+
github.com/docker/distribution v2.7.0-rc.0+incompatible // indirect
|
| 50 |
+
github.com/docker/go-units v0.5.0 // indirect
|
| 51 |
+
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect
|
| 52 |
+
github.com/elgs/gosplitargs v0.0.0-20230310130726-7d16e488436a // indirect
|
| 53 |
+
github.com/fsnotify/fsnotify v1.10.1 // indirect
|
| 54 |
+
github.com/google/go-cmp v0.6.0 // indirect
|
| 55 |
+
github.com/hashicorp/hcl v1.0.0 // indirect
|
| 56 |
+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
| 57 |
+
github.com/magiconair/properties v1.18.11 // indirect
|
| 58 |
+
github.com/mattn/go-runewidth v0.0.16 // indirect
|
| 59 |
+
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
| 60 |
+
github.com/opencontainers/go-digest v1.0.0 // indirect
|
| 61 |
+
github.com/opencontainers/image-spec v1.1.1 // indirect
|
| 62 |
+
github.com/pelletier/go-toml v1.9.5 // indirect
|
| 63 |
+
github.com/pkg/errors v0.9.1 // indirect
|
| 64 |
+
github.com/pmezard/go-difflib v1.0.0 // indirect
|
| 65 |
+
github.com/rivo/uniseg v0.2.0 // indirect
|
| 66 |
+
github.com/spf13/afero v1.15.0 // indirect
|
| 67 |
+
github.com/spf13/cast v1.10.0 // indirect
|
| 68 |
+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
| 69 |
+
github.com/spf13/pflag v1.0.10 // indirect
|
| 70 |
+
golang.org/x/net v0.57.0 // indirect
|
| 71 |
+
golang.org/x/term v0.45.0 // indirect
|
| 72 |
+
golang.org/x/text v0.41.0 // indirect
|
| 73 |
+
gopkg.in/yaml.v2 v2.4.0 // indirect
|
| 74 |
+
gopkg.in/yaml.v3 v3.0.1 // indirect
|
| 75 |
+
)
|
| 76 |
+
|
| 77 |
+
// The old docker/docker client imports the pre-rename capitalised import path
|
| 78 |
+
// github.com/Sirupsen/logrus, which the modern module declares lowercase. This
|
| 79 |
+
// module-to-module replace remaps it so the legacy dependency still builds.
|
| 80 |
+
replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.0.6
|
| 81 |
+
EOF
|
| 82 |
+
|
| 83 |
+
cat > /workspace/cn-mod/go.sum <<'EOF'
|
| 84 |
+
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
| 85 |
+
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
| 86 |
+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0=
|
| 87 |
+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs=
|
| 88 |
+
github.com/apcera/termtables v0.0.0-20170405184538-bcbc5dc54055 h1:IkPAzP+QjchKXXFX6LCcpDKa89b/e/0gPCUbQGWtUUY=
|
| 89 |
+
github.com/apcera/termtables v0.0.0-20170405184538-bcbc5dc54055/go.mod h1:8mHYHlOef9UC51cK1/WRvE/iQVM8O8QlYFa8eh8r5I8=
|
| 90 |
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
| 91 |
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
| 92 |
+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
| 93 |
+
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
| 94 |
+
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
| 95 |
+
github.com/docker/distribution v2.7.0-rc.0+incompatible h1:Nw9tozLpkMnG3IA1zLzsCuwKizII6havt4iIXWWzU2s=
|
| 96 |
+
github.com/docker/distribution v2.7.0-rc.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
| 97 |
+
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
| 98 |
+
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
| 99 |
+
github.com/docker/docker v1.4.2-0.20170426220831-c57fdb2a14cf h1:aOzCsW90SRkfQJF/BOevAW1GBX6sUex1rw+aM2AK7KE=
|
| 100 |
+
github.com/docker/docker v1.4.2-0.20170426220831-c57fdb2a14cf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
| 101 |
+
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
| 102 |
+
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
| 103 |
+
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
| 104 |
+
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
| 105 |
+
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
|
| 106 |
+
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
|
| 107 |
+
github.com/elgs/gojq v0.0.0-20230628214826-df5c4045598e h1:IqtrtHGLZWsJUFOirlGqCcEiUuwKvvqNPTfDBe1Js4I=
|
| 108 |
+
github.com/elgs/gojq v0.0.0-20230628214826-df5c4045598e/go.mod h1:pch6Iql7yrlJzBXUherIz3++afXbgTZZTBWBtr+Znjw=
|
| 109 |
+
github.com/elgs/gosplitargs v0.0.0-20230310130726-7d16e488436a h1:vO9yvZPJqJMJJsFdaD+sLkwjZfxzr/0fm22AnW8R6ms=
|
| 110 |
+
github.com/elgs/gosplitargs v0.0.0-20230310130726-7d16e488436a/go.mod h1:1zHirgOZTAY00iwXKAX0NsVKjwkwjSr1P+yqciHfRH0=
|
| 111 |
+
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
| 112 |
+
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
| 113 |
+
github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho=
|
| 114 |
+
github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo=
|
| 115 |
+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
| 116 |
+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
| 117 |
+
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
| 118 |
+
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
| 119 |
+
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
| 120 |
+
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
| 121 |
+
github.com/jmoiron/jsonq v0.0.0-20150511023944-e874b168d07e h1:ZZCvgaRDZg1gC9/1xrsgaJzQUCQgniKtw0xjWywWAOE=
|
| 122 |
+
github.com/jmoiron/jsonq v0.0.0-20150511023944-e874b168d07e/go.mod h1:+rHyWac2R9oAZwFe1wGY2HBzFJJy++RHBg1cU23NkD8=
|
| 123 |
+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
| 124 |
+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
| 125 |
+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
| 126 |
+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
| 127 |
+
github.com/magiconair/properties v1.18.11 h1:j5ozYZl0zCjG7ahMDH0GWIobOvvUzT0BdAguG0ViKy0=
|
| 128 |
+
github.com/magiconair/properties v1.18.11/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
| 129 |
+
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
|
| 130 |
+
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
| 131 |
+
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
| 132 |
+
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
| 133 |
+
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
| 134 |
+
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
| 135 |
+
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
| 136 |
+
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
| 137 |
+
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
|
| 138 |
+
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
|
| 139 |
+
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
| 140 |
+
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
| 141 |
+
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
| 142 |
+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
| 143 |
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
| 144 |
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
| 145 |
+
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
| 146 |
+
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
| 147 |
+
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
| 148 |
+
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
| 149 |
+
github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s=
|
| 150 |
+
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
| 151 |
+
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
|
| 152 |
+
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
|
| 153 |
+
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
|
| 154 |
+
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
|
| 155 |
+
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
|
| 156 |
+
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
| 157 |
+
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
| 158 |
+
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
| 159 |
+
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
| 160 |
+
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
| 161 |
+
github.com/spf13/viper v1.1.0 h1:V7OZpY8i3C1x/pDmU0zNNlfVoDz112fSYvtWMjjS3f4=
|
| 162 |
+
github.com/spf13/viper v1.1.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
|
| 163 |
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
| 164 |
+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
| 165 |
+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
| 166 |
+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
| 167 |
+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
| 168 |
+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
| 169 |
+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
| 170 |
+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
| 171 |
+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
| 172 |
+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
| 173 |
+
golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
|
| 174 |
+
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
|
| 175 |
+
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
|
| 176 |
+
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
|
| 177 |
+
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
| 178 |
+
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
| 179 |
+
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
| 180 |
+
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
|
| 181 |
+
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
|
| 182 |
+
golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
|
| 183 |
+
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
|
| 184 |
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
| 185 |
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
| 186 |
+
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
| 187 |
+
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
| 188 |
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
| 189 |
+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
| 190 |
+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
| 191 |
+
EOF
|
| 192 |
+
|
| 193 |
+
# cd is required: Go discovers the module root from the working directory.
|
| 194 |
+
# Run in a subshell so sourcing this script does not change the caller's cwd.
|
| 195 |
+
(
|
| 196 |
+
cd /workspace/cn-mod
|
| 197 |
+
go mod download -modfile /workspace/cn-mod/go.mod
|
| 198 |
+
)
|
| 199 |
+
|
| 200 |
+
echo "download.sh: Go dependency modules prefetched into the module cache"
|
ceph--cn.be26489/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b5353eb715f6240275b009d83c7dca431d64efd9890449e16d99c6470d0a4dc
|
| 3 |
+
size 14544310
|
ceph--cn.be26489/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
|
ceph--cn.be26489/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1217ea832dc01af34bc475228c55179bf5b02ecdc83eff1376ba34a0c587a72
|
| 3 |
+
size 11441
|
ceph--cn.be26489/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
|
ceph--cn.be26489/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
|
ceph--cn.be26489/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/ceph--cn.be26489"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for ceph/cn"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "go"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "ceph__cn.be26489"
|
| 32 |
+
repository = "ceph/cn"
|
| 33 |
+
commit = "be26489b35f5bf3107c75fe67faa12469daa0214"
|
| 34 |
+
language = "go"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.5972562829251418
|
| 37 |
+
test_branches = 4
|
| 38 |
+
test_count = 495
|
| 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"
|
ceph--cn.be26489/tests/Dockerfile
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
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
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
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/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
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
|
| 38 |
+
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
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 49 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 50 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 51 |
+
&& mkdir -p /workspace /tests
|
| 52 |
+
|
| 53 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 54 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 55 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 56 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 57 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 58 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 59 |
+
RUN python3 -m pip install --no-cache-dir --disable-pip-version-check \
|
| 60 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 61 |
+
|
| 62 |
+
COPY test.sh /tests/test.sh
|
| 63 |
+
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
|
ceph--cn.be26489/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:fa15a2383169d8a33ff2342a8021291881a9dbfc9cf47e71406680ff9f9903be
|
| 3 |
+
size 11741
|
ceph--cn.be26489/tests/blobs/tests/generated_module_02.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd67319837b110c08a4f7607c0f03f6ba68560a9ef0dea7ac533ee941c734c75
|
| 3 |
+
size 24695
|
ceph--cn.be26489/tests/blobs/tests/generated_module_03.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36168411a92dc2dc0033e849bf721c3471fe8e8f22a6bd2d5aca2580ce4e8b34
|
| 3 |
+
size 19534
|
ceph--cn.be26489/tests/blobs/tests/generated_module_04.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# ProgramGym download.sh for github.com/ceph/cn (ceph-nano).
|
| 3 |
+
# The repository is a legacy GOPATH/dep project (Gopkg.toml, no go.mod, no
|
| 4 |
+
# vendor/). Its primary product is the `cn` CLI in package main (main.go).
|
| 5 |
+
# We prefetch its Go dependency modules into the module cache using the
|
| 6 |
+
# modern toolchain so that build.sh can compile OFFLINE.
|
| 7 |
+
#
|
| 8 |
+
# Sourced via `source /source_ro/download.sh` in a read-only repo mount with
|
| 9 |
+
# network. This script is fully standalone: it does NOT read any repository
|
| 10 |
+
# file (there is no go.mod/go.sum in the tree; both are generated inline
|
| 11 |
+
# here). It performs no compile, link, test, or packaging steps.
|
| 12 |
+
|
| 13 |
+
# ---- environment used by build.sh ----
|
| 14 |
+
export GO111MODULE=on
|
| 15 |
+
|
| 16 |
+
# Fixed literal location where the inline module manifest is generated.
|
| 17 |
+
# build.sh reconstructs the identical files at this path, so the module cache
|
| 18 |
+
# filled here satisfies the offline build.
|
| 19 |
+
export CN_MOD_DIR="/workspace/cn-mod"
|
| 20 |
+
mkdir -p "$CN_MOD_DIR"
|
| 21 |
+
|
| 22 |
+
# Regenerate the module manifest + checksums. Content is embedded so the
|
| 23 |
+
# script needs no repository file.
|
| 24 |
+
cat > /workspace/cn-mod/go.mod <<'EOF'
|
| 25 |
+
module github.com/ceph/cn
|
| 26 |
+
|
| 27 |
+
go 1.25.0
|
| 28 |
+
|
| 29 |
+
require (
|
| 30 |
+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b
|
| 31 |
+
github.com/apcera/termtables v0.0.0-20170405184538-bcbc5dc54055
|
| 32 |
+
github.com/docker/docker v1.4.2-0.20170426220831-c57fdb2a14cf
|
| 33 |
+
github.com/docker/go-connections v0.4.0
|
| 34 |
+
github.com/elgs/gojq v0.0.0-20230628214826-df5c4045598e
|
| 35 |
+
github.com/jmoiron/jsonq v0.0.0-20150511023944-e874b168d07e
|
| 36 |
+
github.com/mitchellh/go-homedir v1.1.0
|
| 37 |
+
github.com/spf13/cobra v0.0.3
|
| 38 |
+
github.com/spf13/viper v1.1.0
|
| 39 |
+
github.com/stretchr/testify v1.9.0
|
| 40 |
+
golang.org/x/crypto v0.55.0
|
| 41 |
+
golang.org/x/sys v0.47.0
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
require (
|
| 45 |
+
github.com/Microsoft/go-winio v0.6.2 // indirect
|
| 46 |
+
github.com/Sirupsen/logrus v1.0.6 // indirect
|
| 47 |
+
github.com/davecgh/go-spew v1.1.1 // indirect
|
| 48 |
+
github.com/distribution/reference v0.6.0 // indirect
|
| 49 |
+
github.com/docker/distribution v2.7.0-rc.0+incompatible // indirect
|
| 50 |
+
github.com/docker/go-units v0.5.0 // indirect
|
| 51 |
+
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect
|
| 52 |
+
github.com/elgs/gosplitargs v0.0.0-20230310130726-7d16e488436a // indirect
|
| 53 |
+
github.com/fsnotify/fsnotify v1.10.1 // indirect
|
| 54 |
+
github.com/google/go-cmp v0.6.0 // indirect
|
| 55 |
+
github.com/hashicorp/hcl v1.0.0 // indirect
|
| 56 |
+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
| 57 |
+
github.com/magiconair/properties v1.18.11 // indirect
|
| 58 |
+
github.com/mattn/go-runewidth v0.0.16 // indirect
|
| 59 |
+
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
| 60 |
+
github.com/opencontainers/go-digest v1.0.0 // indirect
|
| 61 |
+
github.com/opencontainers/image-spec v1.1.1 // indirect
|
| 62 |
+
github.com/pelletier/go-toml v1.9.5 // indirect
|
| 63 |
+
github.com/pkg/errors v0.9.1 // indirect
|
| 64 |
+
github.com/pmezard/go-difflib v1.0.0 // indirect
|
| 65 |
+
github.com/rivo/uniseg v0.2.0 // indirect
|
| 66 |
+
github.com/spf13/afero v1.15.0 // indirect
|
| 67 |
+
github.com/spf13/cast v1.10.0 // indirect
|
| 68 |
+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
| 69 |
+
github.com/spf13/pflag v1.0.10 // indirect
|
| 70 |
+
golang.org/x/net v0.57.0 // indirect
|
| 71 |
+
golang.org/x/term v0.45.0 // indirect
|
| 72 |
+
golang.org/x/text v0.41.0 // indirect
|
| 73 |
+
gopkg.in/yaml.v2 v2.4.0 // indirect
|
| 74 |
+
gopkg.in/yaml.v3 v3.0.1 // indirect
|
| 75 |
+
)
|
| 76 |
+
|
| 77 |
+
// The old docker/docker client imports the pre-rename capitalised import path
|
| 78 |
+
// github.com/Sirupsen/logrus, which the modern module declares lowercase. This
|
| 79 |
+
// module-to-module replace remaps it so the legacy dependency still builds.
|
| 80 |
+
replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.0.6
|
| 81 |
+
EOF
|
| 82 |
+
|
| 83 |
+
cat > /workspace/cn-mod/go.sum <<'EOF'
|
| 84 |
+
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
| 85 |
+
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
| 86 |
+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0=
|
| 87 |
+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs=
|
| 88 |
+
github.com/apcera/termtables v0.0.0-20170405184538-bcbc5dc54055 h1:IkPAzP+QjchKXXFX6LCcpDKa89b/e/0gPCUbQGWtUUY=
|
| 89 |
+
github.com/apcera/termtables v0.0.0-20170405184538-bcbc5dc54055/go.mod h1:8mHYHlOef9UC51cK1/WRvE/iQVM8O8QlYFa8eh8r5I8=
|
| 90 |
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
| 91 |
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
| 92 |
+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
| 93 |
+
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
| 94 |
+
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
| 95 |
+
github.com/docker/distribution v2.7.0-rc.0+incompatible h1:Nw9tozLpkMnG3IA1zLzsCuwKizII6havt4iIXWWzU2s=
|
| 96 |
+
github.com/docker/distribution v2.7.0-rc.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
| 97 |
+
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
| 98 |
+
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
| 99 |
+
github.com/docker/docker v1.4.2-0.20170426220831-c57fdb2a14cf h1:aOzCsW90SRkfQJF/BOevAW1GBX6sUex1rw+aM2AK7KE=
|
| 100 |
+
github.com/docker/docker v1.4.2-0.20170426220831-c57fdb2a14cf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
| 101 |
+
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
| 102 |
+
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
| 103 |
+
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
| 104 |
+
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
| 105 |
+
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
|
| 106 |
+
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
|
| 107 |
+
github.com/elgs/gojq v0.0.0-20230628214826-df5c4045598e h1:IqtrtHGLZWsJUFOirlGqCcEiUuwKvvqNPTfDBe1Js4I=
|
| 108 |
+
github.com/elgs/gojq v0.0.0-20230628214826-df5c4045598e/go.mod h1:pch6Iql7yrlJzBXUherIz3++afXbgTZZTBWBtr+Znjw=
|
| 109 |
+
github.com/elgs/gosplitargs v0.0.0-20230310130726-7d16e488436a h1:vO9yvZPJqJMJJsFdaD+sLkwjZfxzr/0fm22AnW8R6ms=
|
| 110 |
+
github.com/elgs/gosplitargs v0.0.0-20230310130726-7d16e488436a/go.mod h1:1zHirgOZTAY00iwXKAX0NsVKjwkwjSr1P+yqciHfRH0=
|
| 111 |
+
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
| 112 |
+
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
| 113 |
+
github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho=
|
| 114 |
+
github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo=
|
| 115 |
+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
| 116 |
+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
| 117 |
+
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
| 118 |
+
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
| 119 |
+
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
| 120 |
+
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
| 121 |
+
github.com/jmoiron/jsonq v0.0.0-20150511023944-e874b168d07e h1:ZZCvgaRDZg1gC9/1xrsgaJzQUCQgniKtw0xjWywWAOE=
|
| 122 |
+
github.com/jmoiron/jsonq v0.0.0-20150511023944-e874b168d07e/go.mod h1:+rHyWac2R9oAZwFe1wGY2HBzFJJy++RHBg1cU23NkD8=
|
| 123 |
+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
| 124 |
+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
| 125 |
+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
| 126 |
+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
| 127 |
+
github.com/magiconair/properties v1.18.11 h1:j5ozYZl0zCjG7ahMDH0GWIobOvvUzT0BdAguG0ViKy0=
|
| 128 |
+
github.com/magiconair/properties v1.18.11/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
| 129 |
+
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
|
| 130 |
+
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
| 131 |
+
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
| 132 |
+
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
| 133 |
+
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
| 134 |
+
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
| 135 |
+
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
| 136 |
+
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
| 137 |
+
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
|
| 138 |
+
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
|
| 139 |
+
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
| 140 |
+
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
| 141 |
+
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
| 142 |
+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
| 143 |
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
| 144 |
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
| 145 |
+
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
| 146 |
+
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
| 147 |
+
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
| 148 |
+
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
| 149 |
+
github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s=
|
| 150 |
+
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
| 151 |
+
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
|
| 152 |
+
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
|
| 153 |
+
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
|
| 154 |
+
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
|
| 155 |
+
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
|
| 156 |
+
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
| 157 |
+
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
| 158 |
+
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
| 159 |
+
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
| 160 |
+
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
| 161 |
+
github.com/spf13/viper v1.1.0 h1:V7OZpY8i3C1x/pDmU0zNNlfVoDz112fSYvtWMjjS3f4=
|
| 162 |
+
github.com/spf13/viper v1.1.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
|
| 163 |
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
| 164 |
+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
| 165 |
+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
| 166 |
+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
| 167 |
+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
| 168 |
+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
| 169 |
+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
| 170 |
+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
| 171 |
+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
| 172 |
+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
| 173 |
+
golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
|
| 174 |
+
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
|
| 175 |
+
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
|
| 176 |
+
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
|
| 177 |
+
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
| 178 |
+
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
| 179 |
+
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
| 180 |
+
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
|
| 181 |
+
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
|
| 182 |
+
golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
|
| 183 |
+
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
|
| 184 |
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
| 185 |
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
| 186 |
+
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
| 187 |
+
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
| 188 |
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
| 189 |
+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
| 190 |
+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
| 191 |
+
EOF
|
| 192 |
+
|
| 193 |
+
# cd is required: Go discovers the module root from the working directory.
|
| 194 |
+
# Run in a subshell so sourcing this script does not change the caller's cwd.
|
| 195 |
+
(
|
| 196 |
+
cd /workspace/cn-mod
|
| 197 |
+
go mod download -modfile /workspace/cn-mod/go.mod
|
| 198 |
+
)
|
| 199 |
+
|
| 200 |
+
echo "download.sh: Go dependency modules prefetched into the module cache"
|
ceph--cn.be26489/tests/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b5353eb715f6240275b009d83c7dca431d64efd9890449e16d99c6470d0a4dc
|
| 3 |
+
size 14544310
|
ceph--cn.be26489/tests/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
|
ceph--cn.be26489/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""In-place ProgramGym evaluator.
|
| 3 |
+
|
| 4 |
+
Mirrors ProgramGym's ``Evaluator`` pipeline as closely as a single-container,
|
| 5 |
+
no-Docker-in-Docker host allows. Run from ``tests/test.sh`` inside the agent's
|
| 6 |
+
cleanroom container after Harbor flips the verifier-phase network policy.
|
| 7 |
+
|
| 8 |
+
Differences from ``programgym.eval.eval.Evaluator`` that are structural to
|
| 9 |
+
running in one container:
|
| 10 |
+
|
| 11 |
+
* No fresh container per branch. ``snapshot_workspace`` / ``restore_workspace``
|
| 12 |
+
copy a post-compile workspace snapshot to a temp directory and restore it
|
| 13 |
+
before each branch; ``cleanup_lingering_processes`` kills leftover branch
|
| 14 |
+
processes between attempts to approximate the fresh-container boundary.
|
| 15 |
+
* No ``docker commit``. The post-compile workspace snapshot serves the same
|
| 16 |
+
role as the committed image upstream.
|
| 17 |
+
* Hidden test blobs are fetched on demand from HuggingFace via
|
| 18 |
+
``huggingface_hub.snapshot_download`` (matching ``programgym.utils.blob_store``)
|
| 19 |
+
rather than being pre-staged into ``/tests/blobs/``. Override with
|
| 20 |
+
``PROGRAMGYM_BLOB_DIR`` for offline reruns.
|
| 21 |
+
|
| 22 |
+
Everything else (eval_clean_hashes scrub, deterministic synthetic git seed,
|
| 23 |
+
``compile.sh`` then stash + hash the executable, best-effort
|
| 24 |
+
``pytest-rerunfailures``, per-branch test-tar overlay, executable hash
|
| 25 |
+
``--max-worker-restart=4``, xdist worker-crash retry with serial fallback,
|
| 26 |
+
best-of-N attempt selection, active vs ignored test bookkeeping, scoring) is
|
| 27 |
+
preserved.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import re
|
| 36 |
+
import shlex
|
| 37 |
+
import shutil
|
| 38 |
+
import signal
|
| 39 |
+
import subprocess
|
| 40 |
+
import tempfile
|
| 41 |
+
import time
|
| 42 |
+
import traceback
|
| 43 |
+
import xml.etree.ElementTree as ET
|
| 44 |
+
from pathlib import Path
|
| 45 |
+
from typing import Any
|
| 46 |
+
|
| 47 |
+
WORKSPACE = Path(os.environ.get("PROGRAMGYM_WORKSPACE", "/workspace"))
|
| 48 |
+
STASHED_EXECUTABLE = Path("/opt/programgym-stashed-executable-do-not-modify")
|
| 49 |
+
METADATA_PATH = Path(
|
| 50 |
+
os.environ.get("PROGRAMGYM_METADATA", "/tests/programgym_task.json")
|
| 51 |
+
)
|
| 52 |
+
LOG_DIR = Path(os.environ.get("PROGRAMGYM_LOG_DIR", "/logs/verifier"))
|
| 53 |
+
WORKER_CRASH_PHRASE = "worker '"
|
| 54 |
+
XDIST_COLLAPSE_MARKERS = (
|
| 55 |
+
"maximum crashed workers reached",
|
| 56 |
+
"xdist: maximum crashed",
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
DEFAULT_HF_REPO_ID = "programgym/ProgramGym-Tests"
|
| 60 |
+
DEFAULT_HF_REVISION = "main"
|
| 61 |
+
|
| 62 |
+
# Oracle agent handoff files (see solution/solve.sh). Must not appear in the
|
| 63 |
+
# post-compile workspace snapshot or they pollute tree-scanning tests (dutree).
|
| 64 |
+
_ORACLE_HANDOFF_NAMES = (".programgym_oracle_reference",)
|
| 65 |
+
|
| 66 |
+
_TOOLCHAIN_BIN_DIR_CANDIDATES = (
|
| 67 |
+
"/usr/local/go/bin",
|
| 68 |
+
"/go/bin",
|
| 69 |
+
"/usr/local/cargo/bin",
|
| 70 |
+
"/root/.cargo/bin",
|
| 71 |
+
"/root/.ghcup/bin",
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def toolchain_bin_dirs() -> list[str]:
|
| 76 |
+
"""Return toolchain bin directories that exist on this image."""
|
| 77 |
+
candidates = list(_TOOLCHAIN_BIN_DIR_CANDIDATES)
|
| 78 |
+
candidates.extend(
|
| 79 |
+
str(path)
|
| 80 |
+
for path in sorted(Path("/usr/lib").glob("go-*/bin"))
|
| 81 |
+
if _is_accessible_dir(path)
|
| 82 |
+
)
|
| 83 |
+
seen: set[str] = set()
|
| 84 |
+
present: list[str] = []
|
| 85 |
+
for path in candidates:
|
| 86 |
+
if path in seen:
|
| 87 |
+
continue
|
| 88 |
+
seen.add(path)
|
| 89 |
+
if _is_accessible_dir(path):
|
| 90 |
+
present.append(path)
|
| 91 |
+
return present
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _is_accessible_dir(path: str | Path) -> bool:
|
| 95 |
+
"""Return whether path is a directory without failing on protected homes."""
|
| 96 |
+
try:
|
| 97 |
+
return Path(path).is_dir()
|
| 98 |
+
except OSError:
|
| 99 |
+
return False
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def bootstrap_toolchain_path() -> str:
|
| 103 |
+
"""Prepend discovered toolchain dirs to PATH (idempotent)."""
|
| 104 |
+
prepend = toolchain_bin_dirs()
|
| 105 |
+
current_parts = [part for part in os.environ.get("PATH", "").split(":") if part]
|
| 106 |
+
merged: list[str] = []
|
| 107 |
+
for path in prepend + current_parts:
|
| 108 |
+
if path not in merged:
|
| 109 |
+
merged.append(path)
|
| 110 |
+
new_path = ":".join(merged)
|
| 111 |
+
os.environ["PATH"] = new_path
|
| 112 |
+
return new_path
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _bash_login_command(command: str) -> str:
|
| 116 |
+
"""Run ``command`` under bash -lc with an explicit PATH export."""
|
| 117 |
+
path = bootstrap_toolchain_path()
|
| 118 |
+
return f"export PATH={shlex.quote(path)}; {command}"
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def sha256(path: Path) -> str:
|
| 122 |
+
h = hashlib.sha256()
|
| 123 |
+
with path.open("rb") as f:
|
| 124 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 125 |
+
h.update(chunk)
|
| 126 |
+
return h.hexdigest()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def write_json(path: Path, data: dict[str, Any]) -> None:
|
| 130 |
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
| 131 |
+
tmp.write_text(json.dumps(data, indent=2, sort_keys=True))
|
| 132 |
+
tmp.replace(path)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def _read_log_tail(path: Path | None, max_bytes: int = 65536) -> str:
|
| 136 |
+
if path is None or not path.exists():
|
| 137 |
+
return ""
|
| 138 |
+
data = path.read_bytes()
|
| 139 |
+
if len(data) <= max_bytes:
|
| 140 |
+
return data.decode(errors="replace")
|
| 141 |
+
return data[-max_bytes:].decode(errors="replace")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def _close_pipes(proc: subprocess.Popen[Any]) -> None:
|
| 145 |
+
for stream in (proc.stdout, proc.stderr):
|
| 146 |
+
if stream is not None:
|
| 147 |
+
try:
|
| 148 |
+
stream.close()
|
| 149 |
+
except OSError:
|
| 150 |
+
pass
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _terminate_process_tree(proc: subprocess.Popen[Any]) -> None:
|
| 154 |
+
try:
|
| 155 |
+
os.killpg(proc.pid, signal.SIGKILL)
|
| 156 |
+
except ProcessLookupError:
|
| 157 |
+
pass
|
| 158 |
+
try:
|
| 159 |
+
proc.kill()
|
| 160 |
+
except ProcessLookupError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
_PKILL_PATTERNS = (
|
| 165 |
+
f"{WORKSPACE}/eval/",
|
| 166 |
+
f"{WORKSPACE}/tests/",
|
| 167 |
+
"tail -f",
|
| 168 |
+
"development.log",
|
| 169 |
+
" less ",
|
| 170 |
+
" less$",
|
| 171 |
+
"/less ",
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def _pkill_aggressive() -> str:
|
| 176 |
+
"""Best-effort kill of branch pytest/subprocess trees (Modal gVisor fallback)."""
|
| 177 |
+
notes: list[str] = []
|
| 178 |
+
workspace = str(WORKSPACE)
|
| 179 |
+
patterns = list(_PKILL_PATTERNS) + [
|
| 180 |
+
f"pytest.*{workspace}",
|
| 181 |
+
f"xdist.*{workspace}",
|
| 182 |
+
]
|
| 183 |
+
for pattern in patterns:
|
| 184 |
+
result = subprocess.run(
|
| 185 |
+
["pkill", "-9", "-f", pattern],
|
| 186 |
+
capture_output=True,
|
| 187 |
+
text=True,
|
| 188 |
+
)
|
| 189 |
+
notes.append(f"pkill -9 -f {pattern!r}: rc={result.returncode}")
|
| 190 |
+
return "\n".join(notes)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def run_step(
|
| 194 |
+
command: str,
|
| 195 |
+
cwd: Path,
|
| 196 |
+
*,
|
| 197 |
+
timeout: int,
|
| 198 |
+
env: dict[str, str] | None = None,
|
| 199 |
+
step: str,
|
| 200 |
+
accept_failure: bool = False,
|
| 201 |
+
log_output: bool | None = None,
|
| 202 |
+
max_output_bytes: int = 65536,
|
| 203 |
+
) -> dict[str, Any]:
|
| 204 |
+
if log_output is None:
|
| 205 |
+
log_output = step == "run_tests" or timeout >= 60
|
| 206 |
+
|
| 207 |
+
started = time.monotonic()
|
| 208 |
+
stdout_path: Path | None = None
|
| 209 |
+
stderr_path: Path | None = None
|
| 210 |
+
stdout_f = None
|
| 211 |
+
stderr_f = None
|
| 212 |
+
|
| 213 |
+
if log_output:
|
| 214 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 215 |
+
log_id = f"{step}-{int(started * 1000)}"
|
| 216 |
+
stdout_path = LOG_DIR / f"run-step-{log_id}.stdout.log"
|
| 217 |
+
stderr_path = LOG_DIR / f"run-step-{log_id}.stderr.log"
|
| 218 |
+
stdout_f = stdout_path.open("w", encoding="utf-8")
|
| 219 |
+
stderr_f = stderr_path.open("w", encoding="utf-8")
|
| 220 |
+
popen_stdout: Any = stdout_f
|
| 221 |
+
popen_stderr: Any = stderr_f
|
| 222 |
+
else:
|
| 223 |
+
popen_stdout = subprocess.PIPE
|
| 224 |
+
popen_stderr = subprocess.PIPE
|
| 225 |
+
|
| 226 |
+
proc = subprocess.Popen(
|
| 227 |
+
["bash", "-lc", _bash_login_command(command)],
|
| 228 |
+
cwd=cwd,
|
| 229 |
+
env={**os.environ, **(env or {})},
|
| 230 |
+
stdout=popen_stdout,
|
| 231 |
+
stderr=popen_stderr,
|
| 232 |
+
start_new_session=True,
|
| 233 |
+
text=True,
|
| 234 |
+
)
|
| 235 |
+
timed_out = False
|
| 236 |
+
stdout = ""
|
| 237 |
+
stderr = ""
|
| 238 |
+
try:
|
| 239 |
+
if log_output:
|
| 240 |
+
proc.wait(timeout=timeout)
|
| 241 |
+
else:
|
| 242 |
+
stdout, stderr = proc.communicate(timeout=timeout)
|
| 243 |
+
except subprocess.TimeoutExpired:
|
| 244 |
+
timed_out = True
|
| 245 |
+
_terminate_process_tree(proc)
|
| 246 |
+
cleanup_lingering_processes(aggressive=True)
|
| 247 |
+
try:
|
| 248 |
+
proc.wait(timeout=5)
|
| 249 |
+
except subprocess.TimeoutExpired:
|
| 250 |
+
proc.kill()
|
| 251 |
+
if not log_output:
|
| 252 |
+
_close_pipes(proc)
|
| 253 |
+
finally:
|
| 254 |
+
if stdout_f is not None:
|
| 255 |
+
stdout_f.close()
|
| 256 |
+
if stderr_f is not None:
|
| 257 |
+
stderr_f.close()
|
| 258 |
+
|
| 259 |
+
if timed_out:
|
| 260 |
+
if log_output:
|
| 261 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 262 |
+
stderr_path, max_output_bytes
|
| 263 |
+
)
|
| 264 |
+
else:
|
| 265 |
+
output = ""
|
| 266 |
+
entry = {
|
| 267 |
+
"step": step,
|
| 268 |
+
"command": command,
|
| 269 |
+
"wall_time": time.monotonic() - started,
|
| 270 |
+
"output": output,
|
| 271 |
+
"returncode": 124,
|
| 272 |
+
"exception_info": f"timed out after {timeout}s",
|
| 273 |
+
}
|
| 274 |
+
else:
|
| 275 |
+
if log_output:
|
| 276 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 277 |
+
stderr_path, max_output_bytes
|
| 278 |
+
)
|
| 279 |
+
else:
|
| 280 |
+
output = stdout + stderr
|
| 281 |
+
entry = {
|
| 282 |
+
"step": step,
|
| 283 |
+
"command": command,
|
| 284 |
+
"wall_time": time.monotonic() - started,
|
| 285 |
+
"output": output,
|
| 286 |
+
"returncode": proc.returncode,
|
| 287 |
+
"exception_info": "",
|
| 288 |
+
}
|
| 289 |
+
if entry["returncode"] and not accept_failure:
|
| 290 |
+
raise RuntimeError(
|
| 291 |
+
f"{step} failed: {entry['exception_info'] or entry['output']}"
|
| 292 |
+
)
|
| 293 |
+
return entry
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def cleanup_lingering_processes(*, aggressive: bool = False) -> dict[str, Any]:
|
| 297 |
+
started = time.monotonic()
|
| 298 |
+
patterns = [
|
| 299 |
+
str(WORKSPACE / "executable"),
|
| 300 |
+
f"{WORKSPACE}/eval/",
|
| 301 |
+
f"{WORKSPACE}/tests/",
|
| 302 |
+
# lazygit --logs/-l tests spawn `tail -f` outside /workspace/.
|
| 303 |
+
"tail -f",
|
| 304 |
+
"development.log",
|
| 305 |
+
]
|
| 306 |
+
killed: list[int] = []
|
| 307 |
+
proc_root = Path("/proc")
|
| 308 |
+
proc_available = proc_root.exists()
|
| 309 |
+
if proc_available:
|
| 310 |
+
for proc_dir in proc_root.iterdir():
|
| 311 |
+
if not proc_dir.name.isdigit():
|
| 312 |
+
continue
|
| 313 |
+
pid = int(proc_dir.name)
|
| 314 |
+
if pid in {os.getpid(), os.getppid()}:
|
| 315 |
+
continue
|
| 316 |
+
try:
|
| 317 |
+
raw = (proc_dir / "cmdline").read_bytes()
|
| 318 |
+
except (FileNotFoundError, PermissionError, ProcessLookupError):
|
| 319 |
+
continue
|
| 320 |
+
cmdline = raw.replace(b"\0", b" ").decode(errors="replace")
|
| 321 |
+
if not any(pattern in cmdline for pattern in patterns):
|
| 322 |
+
continue
|
| 323 |
+
try:
|
| 324 |
+
os.kill(pid, signal.SIGKILL)
|
| 325 |
+
except (PermissionError, ProcessLookupError):
|
| 326 |
+
continue
|
| 327 |
+
killed.append(pid)
|
| 328 |
+
pkill_output = ""
|
| 329 |
+
if aggressive or not proc_available:
|
| 330 |
+
pkill_output = _pkill_aggressive()
|
| 331 |
+
output_parts = []
|
| 332 |
+
if killed:
|
| 333 |
+
output_parts.append("\n".join(str(pid) for pid in killed))
|
| 334 |
+
if pkill_output:
|
| 335 |
+
output_parts.append(pkill_output)
|
| 336 |
+
return {
|
| 337 |
+
"step": "cleanup_lingering_processes",
|
| 338 |
+
"command": "kill leftover branch processes referencing the workspace",
|
| 339 |
+
"wall_time": time.monotonic() - started,
|
| 340 |
+
"output": "\n".join(output_parts),
|
| 341 |
+
"returncode": 0,
|
| 342 |
+
"exception_info": "",
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
def extract_trusted_blob(tar_path: Path, dest: Path) -> None:
|
| 347 |
+
import tarfile
|
| 348 |
+
|
| 349 |
+
with tarfile.open(tar_path, "r:gz") as tf:
|
| 350 |
+
try:
|
| 351 |
+
tf.extractall(dest, filter="fully_trusted")
|
| 352 |
+
except TypeError:
|
| 353 |
+
tf.extractall(dest)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def find_results_xml() -> Path | None:
|
| 357 |
+
"""Return the junit xml path if pytest wrote one."""
|
| 358 |
+
for candidate in (WORKSPACE / "eval" / "results.xml", WORKSPACE / "results.xml"):
|
| 359 |
+
if candidate.exists():
|
| 360 |
+
return candidate
|
| 361 |
+
return None
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def remove_oracle_handoff_artifacts() -> list[str]:
|
| 365 |
+
"""Drop oracle-agent handoff files from /workspace before snapshot/restore."""
|
| 366 |
+
removed: list[str] = []
|
| 367 |
+
for name in _ORACLE_HANDOFF_NAMES:
|
| 368 |
+
path = WORKSPACE / name
|
| 369 |
+
if path.exists():
|
| 370 |
+
if path.is_dir():
|
| 371 |
+
shutil.rmtree(path)
|
| 372 |
+
else:
|
| 373 |
+
path.unlink()
|
| 374 |
+
removed.append(name)
|
| 375 |
+
return removed
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def _remove_tree(path: Path) -> None:
|
| 379 |
+
"""Remove a file or directory tree, with a shell fallback for overlay races."""
|
| 380 |
+
if path.is_symlink() or path.is_file():
|
| 381 |
+
path.unlink(missing_ok=True)
|
| 382 |
+
return
|
| 383 |
+
if not path.is_dir():
|
| 384 |
+
path.unlink(missing_ok=True)
|
| 385 |
+
return
|
| 386 |
+
for attempt in range(3):
|
| 387 |
+
try:
|
| 388 |
+
shutil.rmtree(path)
|
| 389 |
+
if not path.exists():
|
| 390 |
+
return
|
| 391 |
+
except OSError:
|
| 392 |
+
if attempt == 2:
|
| 393 |
+
run_step(
|
| 394 |
+
f"rm -rf {shlex.quote(str(path))}",
|
| 395 |
+
path.parent,
|
| 396 |
+
timeout=120,
|
| 397 |
+
step="clear_workspace_fallback",
|
| 398 |
+
accept_failure=True,
|
| 399 |
+
)
|
| 400 |
+
if not path.exists():
|
| 401 |
+
return
|
| 402 |
+
raise
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
def ensure_workspace_dir() -> None:
|
| 406 |
+
"""Guarantee WORKSPACE exists as a writable directory (not a symlink/file)."""
|
| 407 |
+
if WORKSPACE.exists() and not WORKSPACE.is_dir():
|
| 408 |
+
if WORKSPACE.is_symlink() or WORKSPACE.is_file():
|
| 409 |
+
WORKSPACE.unlink()
|
| 410 |
+
else:
|
| 411 |
+
shutil.rmtree(WORKSPACE)
|
| 412 |
+
WORKSPACE.mkdir(parents=True, exist_ok=True)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def clear_workspace() -> None:
|
| 416 |
+
ensure_workspace_dir()
|
| 417 |
+
for path in list(WORKSPACE.iterdir()):
|
| 418 |
+
_remove_tree(path)
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
def restore_reference_executable() -> None:
|
| 422 |
+
"""Write the stashed reference binary into /workspace after a branch overlay.
|
| 423 |
+
|
| 424 |
+
Branch blobs may ship ``executable`` as a dangling symlink into
|
| 425 |
+
``target/release/...``; ``shutil.copy2`` would follow it and raise
|
| 426 |
+
``FileNotFoundError``. Drop whatever the blob left and copy the stashed
|
| 427 |
+
reference as a regular file.
|
| 428 |
+
"""
|
| 429 |
+
ensure_workspace_dir()
|
| 430 |
+
if not STASHED_EXECUTABLE.is_file():
|
| 431 |
+
raise FileNotFoundError(
|
| 432 |
+
f"missing stashed reference executable at {STASHED_EXECUTABLE}"
|
| 433 |
+
)
|
| 434 |
+
dest = WORKSPACE / "executable"
|
| 435 |
+
if dest.exists() or dest.is_symlink():
|
| 436 |
+
if dest.is_dir():
|
| 437 |
+
shutil.rmtree(dest)
|
| 438 |
+
else:
|
| 439 |
+
dest.unlink(missing_ok=True)
|
| 440 |
+
shutil.copy2(STASHED_EXECUTABLE, dest)
|
| 441 |
+
dest.chmod(0o755)
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
def snapshot_workspace(dest: Path) -> None:
|
| 445 |
+
if dest.exists():
|
| 446 |
+
shutil.rmtree(dest)
|
| 447 |
+
shutil.copytree(WORKSPACE, dest, symlinks=True)
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def restore_workspace(source: Path) -> None:
|
| 451 |
+
clear_workspace()
|
| 452 |
+
shutil.copytree(source, WORKSPACE, dirs_exist_ok=True, symlinks=True)
|
| 453 |
+
ensure_workspace_dir()
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def remove_hashed_files(root: Path, hashes: set[str]) -> list[str]:
|
| 457 |
+
removed: list[str] = []
|
| 458 |
+
for path in root.rglob("*"):
|
| 459 |
+
if path.is_file() and not path.is_symlink():
|
| 460 |
+
try:
|
| 461 |
+
if sha256(path) in hashes:
|
| 462 |
+
path.unlink()
|
| 463 |
+
removed.append(str(path.relative_to(root)))
|
| 464 |
+
except OSError:
|
| 465 |
+
continue
|
| 466 |
+
return removed
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
def branch_tests(branch_info: dict[str, Any]) -> list[str]:
|
| 470 |
+
ignored = {
|
| 471 |
+
item["name"] for item in branch_info.get("ignored_tests", []) if "name" in item
|
| 472 |
+
}
|
| 473 |
+
return [name for name in branch_info.get("tests", []) if name not in ignored]
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
def ignored_tests(metadata: dict[str, Any]) -> set[str]:
|
| 477 |
+
result: set[str] = set()
|
| 478 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 479 |
+
result.update(
|
| 480 |
+
f"{branch}/{item['name']}"
|
| 481 |
+
for item in info.get("ignored_tests", [])
|
| 482 |
+
if "name" in item
|
| 483 |
+
)
|
| 484 |
+
return result
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def active_tests(metadata: dict[str, Any]) -> set[str]:
|
| 488 |
+
active: set[str] = set()
|
| 489 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 490 |
+
if info.get("ignored"):
|
| 491 |
+
continue
|
| 492 |
+
ignored = {
|
| 493 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 494 |
+
}
|
| 495 |
+
active.update(
|
| 496 |
+
f"{branch}/{name}" for name in info.get("tests", []) if name not in ignored
|
| 497 |
+
)
|
| 498 |
+
return active
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def inject_not_run(
|
| 502 |
+
result: dict[str, Any], branch: str, tests: list[str], error_code: str
|
| 503 |
+
) -> None:
|
| 504 |
+
result["test_results"].extend(
|
| 505 |
+
{
|
| 506 |
+
"name": name,
|
| 507 |
+
"branch": branch,
|
| 508 |
+
"status": "not_run",
|
| 509 |
+
"extra": {"error_code": error_code},
|
| 510 |
+
}
|
| 511 |
+
for name in tests
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def testcase_name(case: ET.Element) -> str:
|
| 516 |
+
classname = case.attrib.get("classname", "")
|
| 517 |
+
name = case.attrib.get("name", "")
|
| 518 |
+
return f"{classname}.{name}" if classname else name
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
# Only these tags under <testcase> represent a result. <system-out> /
|
| 522 |
+
# <system-err> are stdout/stderr captures and must not be treated as results
|
| 523 |
+
# (a leading <system-out> followed by <failure> would otherwise be classified
|
| 524 |
+
# as a stdout-only "passed").
|
| 525 |
+
JUNIT_RESULT_TAGS = {"skipped", "failure", "error"}
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def parse_junit(
|
| 529 |
+
raw_xml: str, branch: str, expected: list[str], ignored: set[str]
|
| 530 |
+
) -> tuple[list[dict[str, Any]], list[str]]:
|
| 531 |
+
root = ET.fromstring(raw_xml)
|
| 532 |
+
got: set[str] = set()
|
| 533 |
+
results: list[dict[str, Any]] = []
|
| 534 |
+
for case in root.iter("testcase"):
|
| 535 |
+
name = testcase_name(case)
|
| 536 |
+
got.add(name)
|
| 537 |
+
extra: dict[str, Any] = {}
|
| 538 |
+
if "time" in case.attrib:
|
| 539 |
+
try:
|
| 540 |
+
extra["time"] = float(case.attrib["time"])
|
| 541 |
+
except ValueError:
|
| 542 |
+
extra["time"] = case.attrib["time"]
|
| 543 |
+
result_children = [c for c in case if c.tag in JUNIT_RESULT_TAGS]
|
| 544 |
+
# Collapse duplicate same-tag result children. Pytest's
|
| 545 |
+
# "pytest.internal" pseudo-test sometimes emits two identical <error>
|
| 546 |
+
# entries; treating that as a system_error would over-flag a real
|
| 547 |
+
# single failure. Mirrors upstream eval.py:816-820.
|
| 548 |
+
if len(result_children) > 1 and len({c.tag for c in result_children}) == 1:
|
| 549 |
+
result_children = [result_children[0]]
|
| 550 |
+
if not result_children:
|
| 551 |
+
status = "passed"
|
| 552 |
+
elif len(result_children) != 1:
|
| 553 |
+
status = "system_error"
|
| 554 |
+
extra["error_details"] = (
|
| 555 |
+
f"Expected 1 result for {name}, got {len(result_children)}: "
|
| 556 |
+
f"{[c.tag for c in result_children]}"
|
| 557 |
+
)
|
| 558 |
+
else:
|
| 559 |
+
first = result_children[0]
|
| 560 |
+
status = first.tag # "skipped" | "failure" | "error"
|
| 561 |
+
extra["message"] = first.attrib.get("message") or ""
|
| 562 |
+
if first.text:
|
| 563 |
+
extra["text"] = first.text
|
| 564 |
+
results.append(
|
| 565 |
+
{"name": name, "branch": branch, "status": status, "extra": extra}
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
active_expected = [name for name in expected if name not in ignored]
|
| 569 |
+
missing = [name for name in active_expected if name not in got]
|
| 570 |
+
results.extend(
|
| 571 |
+
{
|
| 572 |
+
"name": name,
|
| 573 |
+
"branch": branch,
|
| 574 |
+
"status": "not_run",
|
| 575 |
+
"extra": {"error_code": "missing_from_junit_xml"},
|
| 576 |
+
}
|
| 577 |
+
for name in missing
|
| 578 |
+
)
|
| 579 |
+
unexpected = got - set(expected) - ignored
|
| 580 |
+
warnings = (
|
| 581 |
+
[f"Branch {branch}: {len(unexpected)} test(s) in JUnit XML not in tests.json"]
|
| 582 |
+
if unexpected
|
| 583 |
+
else []
|
| 584 |
+
)
|
| 585 |
+
return results, warnings
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
def count_worker_crashes(raw_xml: str) -> int:
|
| 589 |
+
if WORKER_CRASH_PHRASE not in raw_xml:
|
| 590 |
+
return 0
|
| 591 |
+
try:
|
| 592 |
+
root = ET.fromstring(raw_xml)
|
| 593 |
+
except ET.ParseError:
|
| 594 |
+
return 0
|
| 595 |
+
crashes = 0
|
| 596 |
+
for case in root.iter("testcase"):
|
| 597 |
+
for child in case:
|
| 598 |
+
text = (child.get("message") or "") + " " + (child.text or "")
|
| 599 |
+
if (
|
| 600 |
+
child.tag in {"error", "failure"}
|
| 601 |
+
and WORKER_CRASH_PHRASE in text
|
| 602 |
+
and "crashed" in text
|
| 603 |
+
):
|
| 604 |
+
crashes += 1
|
| 605 |
+
break
|
| 606 |
+
return crashes
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def run_output_indicates_xdist_collapse(output: str) -> bool:
|
| 610 |
+
lower = output.lower()
|
| 611 |
+
return any(marker in lower for marker in XDIST_COLLAPSE_MARKERS)
|
| 612 |
+
|
| 613 |
+
|
| 614 |
+
def count_junit_failures(raw_xml: str) -> int:
|
| 615 |
+
try:
|
| 616 |
+
root = ET.fromstring(raw_xml)
|
| 617 |
+
except ET.ParseError:
|
| 618 |
+
return 0
|
| 619 |
+
failures = 0
|
| 620 |
+
for case in root.iter("testcase"):
|
| 621 |
+
for child in case:
|
| 622 |
+
if child.tag in {"failure", "error"}:
|
| 623 |
+
failures += 1
|
| 624 |
+
break
|
| 625 |
+
return failures
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
def count_junit_passed(raw_xml: str) -> int:
|
| 629 |
+
try:
|
| 630 |
+
root = ET.fromstring(raw_xml)
|
| 631 |
+
except ET.ParseError:
|
| 632 |
+
return 0
|
| 633 |
+
passed = 0
|
| 634 |
+
for case in root.iter("testcase"):
|
| 635 |
+
if not any(child.tag in JUNIT_RESULT_TAGS for child in case):
|
| 636 |
+
passed += 1
|
| 637 |
+
return passed
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def branch_attempt_metrics(
|
| 641 |
+
raw_xml: str, *, run_output: str, expected_tests: int
|
| 642 |
+
) -> tuple[int, int, int, int]:
|
| 643 |
+
"""Return (crashes, n_testcases, failures, missing_from_xml)."""
|
| 644 |
+
crashes = count_worker_crashes(raw_xml)
|
| 645 |
+
if run_output_indicates_xdist_collapse(run_output):
|
| 646 |
+
crashes = max(crashes, 1)
|
| 647 |
+
n_tests = count_testcases(raw_xml)
|
| 648 |
+
failures = count_junit_failures(raw_xml)
|
| 649 |
+
missing = max(0, expected_tests - n_tests)
|
| 650 |
+
return crashes, n_tests, failures, missing
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def needs_serial_retry(
|
| 654 |
+
*,
|
| 655 |
+
serial: bool,
|
| 656 |
+
crashes: int,
|
| 657 |
+
missing: int,
|
| 658 |
+
failures: int,
|
| 659 |
+
n_tests: int,
|
| 660 |
+
expected_tests: int,
|
| 661 |
+
run_output: str,
|
| 662 |
+
) -> bool:
|
| 663 |
+
if serial:
|
| 664 |
+
return False
|
| 665 |
+
high_failure_rate = (
|
| 666 |
+
expected_tests > 0 and n_tests >= expected_tests and failures / n_tests >= 0.8
|
| 667 |
+
)
|
| 668 |
+
return (
|
| 669 |
+
crashes > 0
|
| 670 |
+
or missing > 0
|
| 671 |
+
or high_failure_rate
|
| 672 |
+
or run_output_indicates_xdist_collapse(run_output)
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def count_testcases(raw_xml: str) -> int:
|
| 677 |
+
try:
|
| 678 |
+
return sum(1 for _ in ET.fromstring(raw_xml).iter("testcase"))
|
| 679 |
+
except ET.ParseError:
|
| 680 |
+
return 0
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def scored_results(
|
| 684 |
+
result: dict[str, Any], metadata: dict[str, Any]
|
| 685 |
+
) -> list[dict[str, Any]]:
|
| 686 |
+
active = active_tests(metadata)
|
| 687 |
+
by_key = {
|
| 688 |
+
f"{test['branch']}/{test['name']}": test
|
| 689 |
+
for test in result["test_results"]
|
| 690 |
+
if f"{test['branch']}/{test['name']}" in active
|
| 691 |
+
}
|
| 692 |
+
return [
|
| 693 |
+
by_key.get(
|
| 694 |
+
key,
|
| 695 |
+
{
|
| 696 |
+
"branch": key.split("/", 1)[0],
|
| 697 |
+
"name": key.split("/", 1)[1],
|
| 698 |
+
"status": "not_run",
|
| 699 |
+
"extra": {"error_code": "missing_from_results"},
|
| 700 |
+
},
|
| 701 |
+
)
|
| 702 |
+
for key in sorted(active)
|
| 703 |
+
]
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def summarize(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 707 |
+
scored = scored_results(result, metadata)
|
| 708 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 709 |
+
n_tests = len(scored)
|
| 710 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 711 |
+
# Multi-key reward: Harbor's default Mean aggregates each key independently
|
| 712 |
+
# (see harbor.metrics.base.aggregate_reward_dicts), so mean("resolved") is
|
| 713 |
+
# the proportion of tasks scoring a perfect pass-rate and mean of
|
| 714 |
+
# "almost_resolved" is the proportion scoring >= 0.95. "reward" stays the
|
| 715 |
+
# per-task pass-rate whose mean is the overall mean reward.
|
| 716 |
+
return {
|
| 717 |
+
"reward": pass_rate,
|
| 718 |
+
"resolved": 1.0 if pass_rate >= 1.0 else 0.0,
|
| 719 |
+
"almost_resolved": 1.0 if pass_rate >= 0.95 else 0.0,
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
def diagnostics(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 724 |
+
scored = scored_results(result, metadata)
|
| 725 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 726 |
+
n_tests = len(scored)
|
| 727 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 728 |
+
return {
|
| 729 |
+
"pass_rate": pass_rate,
|
| 730 |
+
"resolved": int(
|
| 731 |
+
bool(
|
| 732 |
+
n_tests
|
| 733 |
+
and n_passed == n_tests
|
| 734 |
+
and not result["test_branch_errors"]
|
| 735 |
+
and not result["error_code"]
|
| 736 |
+
)
|
| 737 |
+
),
|
| 738 |
+
"n_passed": n_passed,
|
| 739 |
+
"n_tests": n_tests,
|
| 740 |
+
"n_branch_errors": len(result["test_branch_errors"]),
|
| 741 |
+
"infra_error": int(bool(result["error_code"] or result["test_branch_errors"])),
|
| 742 |
+
"executable_hash_present": int(bool(result.get("executable_hash"))),
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def use_script_pty() -> bool:
|
| 747 |
+
return os.environ.get("PROGRAMGYM_SCRIPT_PTY", "").strip() == "1"
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def script_pty_available() -> bool:
|
| 751 |
+
return shutil.which("script") is not None
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
def branch_env(
|
| 755 |
+
*,
|
| 756 |
+
serial: bool,
|
| 757 |
+
has_rerunfailures: bool,
|
| 758 |
+
extras: dict[str, str] | None = None,
|
| 759 |
+
) -> dict[str, str]:
|
| 760 |
+
addopts = ["--max-worker-restart=4"]
|
| 761 |
+
# A serial fallback is already a complete second execution. Re-running each
|
| 762 |
+
# failing test two more times makes large, failure-heavy suites prohibitively
|
| 763 |
+
# slow and adds little signal.
|
| 764 |
+
if has_rerunfailures and not serial:
|
| 765 |
+
addopts.extend(["--reruns=2", "--reruns-delay=1"])
|
| 766 |
+
env = {
|
| 767 |
+
"PYTEST_ADDOPTS": " ".join(addopts),
|
| 768 |
+
# Match upstream non-TTY regression environments (dirble log format, etc.).
|
| 769 |
+
"NO_COLOR": "1",
|
| 770 |
+
"TERM": "dumb",
|
| 771 |
+
"CLICOLOR": "0",
|
| 772 |
+
"CLICOLOR_FORCE": "0",
|
| 773 |
+
"COLORTERM": "",
|
| 774 |
+
}
|
| 775 |
+
if extras:
|
| 776 |
+
env.update(extras)
|
| 777 |
+
xdist_workers = os.environ.get("PROGRAMGYM_XDIST_WORKERS")
|
| 778 |
+
if serial:
|
| 779 |
+
xdist_workers = "1"
|
| 780 |
+
if xdist_workers:
|
| 781 |
+
env["PYTEST_XDIST_AUTO_NUM_WORKERS"] = xdist_workers
|
| 782 |
+
return env
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
_SERIAL_RUN_SH = ".programgym_run_serial.sh"
|
| 786 |
+
# ``eval/run.sh`` usually passes ``-n auto`` on the command line, which overrides
|
| 787 |
+
# ``PYTEST_ADDOPTS``. Rewrite to ``-n 0`` in a verifier-local copy for retries.
|
| 788 |
+
_RUN_SH_XDIST_RE = re.compile(r"-n\s*(?:auto|\d+)")
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
def prepare_serial_run_sh(run_sh: Path) -> Path:
|
| 792 |
+
"""Write a serial-only copy of ``eval/run.sh`` with xdist disabled."""
|
| 793 |
+
serial_sh = run_sh.with_name(_SERIAL_RUN_SH)
|
| 794 |
+
patched = _RUN_SH_XDIST_RE.sub("-n 0", run_sh.read_text())
|
| 795 |
+
serial_sh.write_text(patched)
|
| 796 |
+
serial_sh.chmod(0o755)
|
| 797 |
+
return serial_sh
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
def run_tests_command(*, serial: bool) -> str:
|
| 801 |
+
if serial:
|
| 802 |
+
inner = f"chmod +x ./eval/{_SERIAL_RUN_SH} && ./eval/{_SERIAL_RUN_SH}"
|
| 803 |
+
else:
|
| 804 |
+
inner = "chmod +x ./eval/run.sh && ./eval/run.sh"
|
| 805 |
+
if use_script_pty() and script_pty_available():
|
| 806 |
+
return f"script -q -c {shlex.quote(inner)} /dev/null"
|
| 807 |
+
return inner
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
BAKED_BLOB_DIR = Path(os.environ.get("PROGRAMGYM_BAKED_BLOB_DIR", "/tests/blobs"))
|
| 811 |
+
|
| 812 |
+
|
| 813 |
+
def resolve_blob_dir(instance_id: str, metadata: dict[str, Any]) -> Path:
|
| 814 |
+
"""Locate the per-instance blob directory.
|
| 815 |
+
|
| 816 |
+
Resolution order:
|
| 817 |
+
|
| 818 |
+
1. ``/tests/blobs/`` if pre-fetched into the task at generation time
|
| 819 |
+
(``programgym-adapter --download-blobs``). Verifier-only mount, so
|
| 820 |
+
agent never sees these.
|
| 821 |
+
2. ``PROGRAMGYM_BLOB_DIR`` env override pointing at an HF-cache-shaped
|
| 822 |
+
tree on disk (``<dir>/<instance_id>/tests/<branch>.tar.gz``). Useful
|
| 823 |
+
for offline reruns sharing a cache across many tasks.
|
| 824 |
+
3. ``huggingface_hub.snapshot_download`` from
|
| 825 |
+
``programgym/ProgramGym-Tests`` (default repo, ``main`` revision).
|
| 826 |
+
|
| 827 |
+
The returned directory contains ``tests/<branch>.tar.gz`` per active
|
| 828 |
+
branch — same shape as ``programgym/ProgramGym-Tests/<instance_id>/``
|
| 829 |
+
on HF.
|
| 830 |
+
"""
|
| 831 |
+
if BAKED_BLOB_DIR.exists() and (BAKED_BLOB_DIR / "tests").exists():
|
| 832 |
+
return BAKED_BLOB_DIR
|
| 833 |
+
|
| 834 |
+
local = os.environ.get("PROGRAMGYM_BLOB_DIR", "").strip()
|
| 835 |
+
if local:
|
| 836 |
+
candidate = Path(local) / instance_id
|
| 837 |
+
if candidate.exists():
|
| 838 |
+
return candidate
|
| 839 |
+
raise FileNotFoundError(
|
| 840 |
+
f"PROGRAMGYM_BLOB_DIR set but {candidate} does not exist"
|
| 841 |
+
)
|
| 842 |
+
|
| 843 |
+
repo_id = os.environ.get("PROGRAMGYM_HF_REPO") or metadata.get(
|
| 844 |
+
"hf_repo_id", DEFAULT_HF_REPO_ID
|
| 845 |
+
)
|
| 846 |
+
revision = os.environ.get("PROGRAMGYM_HF_REVISION") or metadata.get(
|
| 847 |
+
"hf_revision", DEFAULT_HF_REVISION
|
| 848 |
+
)
|
| 849 |
+
|
| 850 |
+
from huggingface_hub import snapshot_download
|
| 851 |
+
|
| 852 |
+
cache_root = Path(
|
| 853 |
+
snapshot_download(
|
| 854 |
+
repo_id,
|
| 855 |
+
repo_type="dataset",
|
| 856 |
+
revision=revision,
|
| 857 |
+
allow_patterns=f"{instance_id}/**",
|
| 858 |
+
)
|
| 859 |
+
)
|
| 860 |
+
blob_dir = cache_root / instance_id
|
| 861 |
+
if not blob_dir.exists():
|
| 862 |
+
raise FileNotFoundError(
|
| 863 |
+
f"HF blob directory missing for {instance_id} at {blob_dir}"
|
| 864 |
+
)
|
| 865 |
+
return blob_dir
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
def evaluate(metadata: dict[str, Any]) -> dict[str, Any]:
|
| 869 |
+
bootstrap_toolchain_path()
|
| 870 |
+
branches = metadata.get("branches", {})
|
| 871 |
+
active_branch_items = [
|
| 872 |
+
(name, info) for name, info in branches.items() if not info.get("ignored")
|
| 873 |
+
]
|
| 874 |
+
result: dict[str, Any] = {
|
| 875 |
+
"test_results": [],
|
| 876 |
+
"error_code": None,
|
| 877 |
+
"error_details": None,
|
| 878 |
+
"log": [],
|
| 879 |
+
"solution_branch": "submission",
|
| 880 |
+
"test_branches": [name for name, _ in active_branch_items],
|
| 881 |
+
"test_branch_errors": {},
|
| 882 |
+
"executable_hash": None,
|
| 883 |
+
"warnings": [],
|
| 884 |
+
}
|
| 885 |
+
|
| 886 |
+
instance_id = metadata["instance_id"]
|
| 887 |
+
|
| 888 |
+
compile_timeout = int(os.environ.get("PROGRAMGYM_COMPILE_TIMEOUT", "900"))
|
| 889 |
+
branch_timeout = int(os.environ.get("PROGRAMGYM_BRANCH_TIMEOUT", "3600"))
|
| 890 |
+
|
| 891 |
+
def fail_all(error_code: str, details: str) -> dict[str, Any]:
|
| 892 |
+
result["error_code"] = error_code
|
| 893 |
+
result["error_details"] = details
|
| 894 |
+
for branch, info in active_branch_items:
|
| 895 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 896 |
+
return result
|
| 897 |
+
|
| 898 |
+
with tempfile.TemporaryDirectory(prefix="programgym-eval-") as tmp:
|
| 899 |
+
compiled_snapshot = Path(tmp) / "compiled"
|
| 900 |
+
|
| 901 |
+
started = time.monotonic()
|
| 902 |
+
removed = remove_hashed_files(
|
| 903 |
+
WORKSPACE, set(metadata.get("eval_clean_hashes", []))
|
| 904 |
+
)
|
| 905 |
+
result["log"].append(
|
| 906 |
+
{
|
| 907 |
+
"step": "remove_hashed_files",
|
| 908 |
+
"command": "remove files matching eval_clean_hashes",
|
| 909 |
+
"wall_time": time.monotonic() - started,
|
| 910 |
+
"output": "".join(f"removed '{path}'\n" for path in removed),
|
| 911 |
+
"returncode": 0,
|
| 912 |
+
"exception_info": "",
|
| 913 |
+
}
|
| 914 |
+
)
|
| 915 |
+
|
| 916 |
+
compile_sh = WORKSPACE / "compile.sh"
|
| 917 |
+
if not compile_sh.exists():
|
| 918 |
+
return fail_all(
|
| 919 |
+
"missing_compile_sh", "submission did not contain compile.sh"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
seed = (
|
| 923 |
+
"if [ ! -d .git ]; then "
|
| 924 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 925 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 926 |
+
"git -c init.defaultBranch=gold init -q && "
|
| 927 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false add -A && "
|
| 928 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 929 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 930 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false commit -q --allow-empty -m gold; "
|
| 931 |
+
"fi"
|
| 932 |
+
)
|
| 933 |
+
try:
|
| 934 |
+
result["log"].append(
|
| 935 |
+
run_step(seed, WORKSPACE, timeout=300, step="seed_git")
|
| 936 |
+
)
|
| 937 |
+
compile_log = run_step(
|
| 938 |
+
"chmod +x ./compile.sh && ./compile.sh",
|
| 939 |
+
WORKSPACE,
|
| 940 |
+
timeout=compile_timeout,
|
| 941 |
+
step="compile",
|
| 942 |
+
accept_failure=True,
|
| 943 |
+
)
|
| 944 |
+
result["log"].append(compile_log)
|
| 945 |
+
if compile_log["returncode"]:
|
| 946 |
+
return fail_all("compile_failed", compile_log["output"])
|
| 947 |
+
executable = WORKSPACE / "executable"
|
| 948 |
+
if not executable.exists():
|
| 949 |
+
return fail_all(
|
| 950 |
+
"missing_executable",
|
| 951 |
+
"compile.sh completed but did not create ./executable",
|
| 952 |
+
)
|
| 953 |
+
STASHED_EXECUTABLE.parent.mkdir(parents=True, exist_ok=True)
|
| 954 |
+
# `move` (not copy) so /workspace doesn't keep a parallel copy of
|
| 955 |
+
# the agent's executable during the stash→restore window. Mirrors
|
| 956 |
+
# upstream `mv ./executable {STASHED}` (eval.py:472).
|
| 957 |
+
shutil.move(str(executable), STASHED_EXECUTABLE)
|
| 958 |
+
result["executable_hash"] = sha256(STASHED_EXECUTABLE)
|
| 959 |
+
result["log"].append(
|
| 960 |
+
run_step(
|
| 961 |
+
"pip3 install -q --disable-pip-version-check pytest-rerunfailures",
|
| 962 |
+
WORKSPACE,
|
| 963 |
+
timeout=120,
|
| 964 |
+
step="install_rerunfailures",
|
| 965 |
+
accept_failure=True,
|
| 966 |
+
)
|
| 967 |
+
)
|
| 968 |
+
has_rerunfailures = result["log"][-1]["returncode"] == 0
|
| 969 |
+
handoff_removed = remove_oracle_handoff_artifacts()
|
| 970 |
+
if handoff_removed:
|
| 971 |
+
result["log"].append(
|
| 972 |
+
{
|
| 973 |
+
"step": "remove_oracle_handoff",
|
| 974 |
+
"command": "remove oracle handoff artifacts from workspace",
|
| 975 |
+
"wall_time": 0.0,
|
| 976 |
+
"output": "".join(
|
| 977 |
+
f"removed '{name}'\n" for name in handoff_removed
|
| 978 |
+
),
|
| 979 |
+
"returncode": 0,
|
| 980 |
+
"exception_info": "",
|
| 981 |
+
}
|
| 982 |
+
)
|
| 983 |
+
snapshot_workspace(compiled_snapshot)
|
| 984 |
+
except Exception as exc:
|
| 985 |
+
return fail_all(type(exc).__name__, str(exc))
|
| 986 |
+
|
| 987 |
+
try:
|
| 988 |
+
blob_dir = resolve_blob_dir(instance_id, metadata)
|
| 989 |
+
except Exception as exc:
|
| 990 |
+
details = f"{type(exc).__name__}: {exc}"
|
| 991 |
+
for branch, info in active_branch_items:
|
| 992 |
+
result["test_branch_errors"][branch] = [
|
| 993 |
+
{
|
| 994 |
+
"error_code": "blob_resolution_failed",
|
| 995 |
+
"error_details": details,
|
| 996 |
+
}
|
| 997 |
+
]
|
| 998 |
+
inject_not_run(
|
| 999 |
+
result, branch, branch_tests(info), "blob_resolution_failed"
|
| 1000 |
+
)
|
| 1001 |
+
return result
|
| 1002 |
+
|
| 1003 |
+
for branch, info in active_branch_items:
|
| 1004 |
+
tests = branch_tests(info)
|
| 1005 |
+
blob = blob_dir / "tests" / f"{branch}.tar.gz"
|
| 1006 |
+
if not blob.exists():
|
| 1007 |
+
result["test_branch_errors"][branch] = [
|
| 1008 |
+
{"error_code": "missing_test_blob", "error_details": blob.name}
|
| 1009 |
+
]
|
| 1010 |
+
inject_not_run(result, branch, tests, "missing_test_blob")
|
| 1011 |
+
continue
|
| 1012 |
+
|
| 1013 |
+
best_xml = ""
|
| 1014 |
+
# Prefer a complete, clean XML result, then the result covering the
|
| 1015 |
+
# most expected tests, and only then the one with the most passes.
|
| 1016 |
+
# Pass-count-only ranking can retain a partial xdist result over a
|
| 1017 |
+
# complete serial result.
|
| 1018 |
+
best_quality = (-1, -1, -1)
|
| 1019 |
+
serial = bool(metadata.get("force_serial_branches"))
|
| 1020 |
+
branch_log: list[dict[str, Any]] = []
|
| 1021 |
+
branch_ignored = {
|
| 1022 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 1023 |
+
}
|
| 1024 |
+
n_expected = len([name for name in tests if name not in branch_ignored])
|
| 1025 |
+
|
| 1026 |
+
def merge_best_xml(raw_xml: str) -> None:
|
| 1027 |
+
try:
|
| 1028 |
+
parsed, warnings = parse_junit(
|
| 1029 |
+
raw_xml, branch, list(info.get("tests", [])), branch_ignored
|
| 1030 |
+
)
|
| 1031 |
+
except Exception as exc:
|
| 1032 |
+
result["test_branch_errors"][branch] = [
|
| 1033 |
+
{"error_code": "xml_parse_error", "error_details": str(exc)}
|
| 1034 |
+
]
|
| 1035 |
+
inject_not_run(result, branch, tests, "xml_parse_error")
|
| 1036 |
+
else:
|
| 1037 |
+
result["test_results"].extend(parsed)
|
| 1038 |
+
result["warnings"].extend(warnings)
|
| 1039 |
+
|
| 1040 |
+
while True:
|
| 1041 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1042 |
+
restore_workspace(compiled_snapshot)
|
| 1043 |
+
extract_trusted_blob(blob, WORKSPACE)
|
| 1044 |
+
restore_reference_executable()
|
| 1045 |
+
actual_hash = sha256(WORKSPACE / "executable")
|
| 1046 |
+
if actual_hash != result["executable_hash"]:
|
| 1047 |
+
result["test_branch_errors"][branch] = [
|
| 1048 |
+
{
|
| 1049 |
+
"error_code": "executable_hash_mismatch",
|
| 1050 |
+
"error_details": (
|
| 1051 |
+
f"expected {result['executable_hash']}, got {actual_hash}"
|
| 1052 |
+
),
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
inject_not_run(result, branch, tests, "executable_hash_mismatch")
|
| 1056 |
+
break
|
| 1057 |
+
run_sh = WORKSPACE / "eval" / "run.sh"
|
| 1058 |
+
if not run_sh.exists():
|
| 1059 |
+
result["test_branch_errors"][branch] = [
|
| 1060 |
+
{
|
| 1061 |
+
"error_code": "missing_run_sh",
|
| 1062 |
+
"error_details": "eval/run.sh missing",
|
| 1063 |
+
}
|
| 1064 |
+
]
|
| 1065 |
+
inject_not_run(result, branch, tests, "missing_run_sh")
|
| 1066 |
+
break
|
| 1067 |
+
# Upstream rewrites thread→signal so xdist workers fail cleanly
|
| 1068 |
+
# instead of os._exit(1) on timeout. That works in fresh
|
| 1069 |
+
# containers per branch; here we reuse one container and
|
| 1070 |
+
# signal timeouts leave TUI/log-watcher subprocesses alive
|
| 1071 |
+
# (e.g. lazygit --logs + tail -f), wedging pytest for up to
|
| 1072 |
+
# branch_timeout. Keep the blob's thread method and rely on
|
| 1073 |
+
# cleanup_lingering_processes + serial fallback after crashes.
|
| 1074 |
+
env = branch_env(
|
| 1075 |
+
serial=serial,
|
| 1076 |
+
has_rerunfailures=has_rerunfailures,
|
| 1077 |
+
extras=metadata.get("branch_env"),
|
| 1078 |
+
)
|
| 1079 |
+
branch_log.append(
|
| 1080 |
+
run_step(
|
| 1081 |
+
"rm -f eval/results.xml results.xml",
|
| 1082 |
+
WORKSPACE,
|
| 1083 |
+
timeout=120,
|
| 1084 |
+
step="clean_stale_results",
|
| 1085 |
+
accept_failure=True,
|
| 1086 |
+
)
|
| 1087 |
+
)
|
| 1088 |
+
if serial:
|
| 1089 |
+
prepare_serial_run_sh(run_sh)
|
| 1090 |
+
run_entry = run_step(
|
| 1091 |
+
run_tests_command(serial=serial),
|
| 1092 |
+
WORKSPACE,
|
| 1093 |
+
timeout=branch_timeout,
|
| 1094 |
+
env=env,
|
| 1095 |
+
step="run_tests",
|
| 1096 |
+
accept_failure=True,
|
| 1097 |
+
)
|
| 1098 |
+
branch_log.append(run_entry)
|
| 1099 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1100 |
+
xml_path = find_results_xml()
|
| 1101 |
+
if xml_path is None:
|
| 1102 |
+
if best_xml:
|
| 1103 |
+
merge_best_xml(best_xml)
|
| 1104 |
+
break
|
| 1105 |
+
if serial:
|
| 1106 |
+
result["test_branch_errors"][branch] = [
|
| 1107 |
+
{
|
| 1108 |
+
"error_code": "missing_results_xml",
|
| 1109 |
+
"error_details": "eval/results.xml was not produced",
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
inject_not_run(result, branch, tests, "missing_results_xml")
|
| 1113 |
+
break
|
| 1114 |
+
serial = True
|
| 1115 |
+
continue
|
| 1116 |
+
raw_xml = xml_path.read_text(errors="replace")
|
| 1117 |
+
crashes, n_tests, failures, missing = branch_attempt_metrics(
|
| 1118 |
+
raw_xml,
|
| 1119 |
+
run_output=run_entry.get("output", ""),
|
| 1120 |
+
expected_tests=n_expected,
|
| 1121 |
+
)
|
| 1122 |
+
useful = count_junit_passed(raw_xml)
|
| 1123 |
+
quality = (
|
| 1124 |
+
int(crashes == 0 and missing == 0),
|
| 1125 |
+
n_tests,
|
| 1126 |
+
useful,
|
| 1127 |
+
)
|
| 1128 |
+
if quality > best_quality:
|
| 1129 |
+
best_xml = raw_xml
|
| 1130 |
+
best_quality = quality
|
| 1131 |
+
retry = needs_serial_retry(
|
| 1132 |
+
serial=serial,
|
| 1133 |
+
crashes=crashes,
|
| 1134 |
+
missing=missing,
|
| 1135 |
+
failures=failures,
|
| 1136 |
+
n_tests=n_tests,
|
| 1137 |
+
expected_tests=n_expected,
|
| 1138 |
+
run_output=run_entry.get("output", ""),
|
| 1139 |
+
)
|
| 1140 |
+
if not retry:
|
| 1141 |
+
merge_best_xml(best_xml)
|
| 1142 |
+
break
|
| 1143 |
+
serial = True
|
| 1144 |
+
for entry in branch_log:
|
| 1145 |
+
entry["branch"] = branch
|
| 1146 |
+
result["log"].extend(branch_log)
|
| 1147 |
+
|
| 1148 |
+
return result
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
def write_outputs(result: dict[str, Any], metadata: dict[str, Any]) -> None:
|
| 1152 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1153 |
+
write_json(LOG_DIR / "programgym_eval.json", result)
|
| 1154 |
+
write_json(LOG_DIR / "harbor_diagnostics.json", diagnostics(result, metadata))
|
| 1155 |
+
rewards = summarize(result, metadata)
|
| 1156 |
+
write_json(LOG_DIR / "reward.json", rewards)
|
| 1157 |
+
(LOG_DIR / "reward.txt").write_text(str(rewards["reward"]))
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
def main() -> None:
|
| 1161 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1162 |
+
log_path = LOG_DIR / "programgym_eval.log"
|
| 1163 |
+
metadata = json.loads(METADATA_PATH.read_text())
|
| 1164 |
+
branches = metadata.get("branches", {})
|
| 1165 |
+
try:
|
| 1166 |
+
result = evaluate(metadata)
|
| 1167 |
+
except Exception as exc:
|
| 1168 |
+
error_code = type(exc).__name__
|
| 1169 |
+
result = {
|
| 1170 |
+
"test_results": [],
|
| 1171 |
+
"error_code": error_code,
|
| 1172 |
+
"error_details": str(exc),
|
| 1173 |
+
"log": [
|
| 1174 |
+
{
|
| 1175 |
+
"step": "evaluator_exception",
|
| 1176 |
+
"exception_info": traceback.format_exc(),
|
| 1177 |
+
"returncode": 1,
|
| 1178 |
+
}
|
| 1179 |
+
],
|
| 1180 |
+
"solution_branch": "submission",
|
| 1181 |
+
"test_branches": [
|
| 1182 |
+
name for name, info in branches.items() if not info.get("ignored")
|
| 1183 |
+
],
|
| 1184 |
+
"test_branch_errors": {
|
| 1185 |
+
"__evaluator__": [{"error_code": error_code, "error_details": str(exc)}]
|
| 1186 |
+
},
|
| 1187 |
+
"executable_hash": None,
|
| 1188 |
+
"warnings": [],
|
| 1189 |
+
}
|
| 1190 |
+
for branch, info in branches.items():
|
| 1191 |
+
if info.get("ignored"):
|
| 1192 |
+
continue
|
| 1193 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 1194 |
+
log_path.write_text(traceback.format_exc())
|
| 1195 |
+
else:
|
| 1196 |
+
log_path.write_text("")
|
| 1197 |
+
write_outputs(result, metadata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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [],
|
| 7 |
+
"tests": [
|
| 8 |
+
"eval.tests.test_completion.test_completion_accepts_extra_positional_args",
|
| 9 |
+
"eval.tests.test_completion.test_completion_debug_helper_present",
|
| 10 |
+
"eval.tests.test_completion.test_completion_emacs_modeline_header",
|
| 11 |
+
"eval.tests.test_completion.test_completion_embeds_each_subcommand_tower",
|
| 12 |
+
"eval.tests.test_completion.test_completion_flag_in_use_line_disabled",
|
| 13 |
+
"eval.tests.test_completion.test_completion_generates_bash_script_header",
|
| 14 |
+
"eval.tests.test_completion.test_completion_help_text",
|
| 15 |
+
"eval.tests.test_completion.test_completion_init_completion_helper_present",
|
| 16 |
+
"eval.tests.test_completion.test_completion_mentions_command_names",
|
| 17 |
+
"eval.tests.test_completion.test_completion_output_stable_across_launches",
|
| 18 |
+
"eval.tests.test_completion.test_completion_root_handler_and_registration",
|
| 19 |
+
"eval.tests.test_completion.test_completion_script_handles_help_flag",
|
| 20 |
+
"eval.tests.test_completion.test_completion_script_has_stdout_reply_handler",
|
| 21 |
+
"eval.tests.test_completion.test_completion_script_is_large_and_well_formed",
|
| 22 |
+
"eval.tests.test_completion.test_completion_script_word_indexing_helper",
|
| 23 |
+
"eval.tests.test_completion.test_completion_short_help_flag",
|
| 24 |
+
"eval.tests.test_completion.test_completion_written_to_stdout_only",
|
| 25 |
+
"eval.tests.test_docker.test_cluster_ls_client_newer_downgrades_api_version[newer]",
|
| 26 |
+
"eval.tests.test_docker.test_cluster_ls_closed_tcp_port_reaches_getdocker_error",
|
| 27 |
+
"eval.tests.test_docker.test_cluster_ls_malformed_host_hits_newenvclient_error",
|
| 28 |
+
"eval.tests.test_docker.test_cluster_ls_mock_success_reaches_getdocker_success[ok]",
|
| 29 |
+
"eval.tests.test_docker.test_cluster_ls_run_never_emits_usage_on_getdocker_fatal",
|
| 30 |
+
"eval.tests.test_docker.test_cluster_ls_too_new_downgrades_api_version[toonew]",
|
| 31 |
+
"eval.tests.test_docker.test_cluster_ls_without_daemon_reaches_getdocker_error",
|
| 32 |
+
"eval.tests.test_root_entry.test_all_registered_subcommands_present",
|
| 33 |
+
"eval.tests.test_root_entry.test_cli_description_banner_is_ascii_art",
|
| 34 |
+
"eval.tests.test_root_entry.test_close_typo_suggests_version",
|
| 35 |
+
"eval.tests.test_root_entry.test_cluster_typo_suggests_cluster",
|
| 36 |
+
"eval.tests.test_root_entry.test_config_disables_startup_update_notification",
|
| 37 |
+
"eval.tests.test_root_entry.test_config_file_notice_emitted_on_stderr",
|
| 38 |
+
"eval.tests.test_root_entry.test_config_read_is_stable_across_processes",
|
| 39 |
+
"eval.tests.test_root_entry.test_double_dash_ends_flags_and_shows_root_help",
|
| 40 |
+
"eval.tests.test_root_entry.test_far_typo_has_no_suggestion",
|
| 41 |
+
"eval.tests.test_root_entry.test_help_command_hidden",
|
| 42 |
+
"eval.tests.test_root_entry.test_help_equivalence_no_args_vs_help",
|
| 43 |
+
"eval.tests.test_root_entry.test_hidden_help_absent_from_available_commands",
|
| 44 |
+
"eval.tests.test_root_entry.test_long_help_flag_prints_root_help",
|
| 45 |
+
"eval.tests.test_root_entry.test_no_args_prints_root_help",
|
| 46 |
+
"eval.tests.test_root_entry.test_root_command_use_is_cn",
|
| 47 |
+
"eval.tests.test_root_entry.test_s3_command_name_not_flagged_as_typo_target_only",
|
| 48 |
+
"eval.tests.test_root_entry.test_short_help_flag_prints_root_help",
|
| 49 |
+
"eval.tests.test_root_entry.test_stdout_stderr_separation_for_help",
|
| 50 |
+
"eval.tests.test_root_entry.test_subcommands_listed_in_registration_order",
|
| 51 |
+
"eval.tests.test_root_entry.test_success_path_stderr_has_no_error",
|
| 52 |
+
"eval.tests.test_root_entry.test_two_independent_config_dirs_report_their_own_path",
|
| 53 |
+
"eval.tests.test_root_entry.test_unknown_command_error_in_stdout",
|
| 54 |
+
"eval.tests.test_root_entry.test_unknown_command_fails_with_message",
|
| 55 |
+
"eval.tests.test_root_entry.test_unknown_shorthand_flag_rejected",
|
| 56 |
+
"eval.tests.test_root_entry.test_version_clean_when_config_present",
|
| 57 |
+
"eval.tests.test_version.test_version_exit_zero_not_affected_by_config",
|
| 58 |
+
"eval.tests.test_version.test_version_help_flag_equivalence",
|
| 59 |
+
"eval.tests.test_version.test_version_help_text",
|
| 60 |
+
"eval.tests.test_version.test_version_rejects_extra_arg",
|
| 61 |
+
"eval.tests.test_version.test_version_rejects_multiple_args",
|
| 62 |
+
"eval.tests.test_version.test_version_rejects_unknown_long_flag",
|
| 63 |
+
"eval.tests.test_version.test_version_reports_identity",
|
| 64 |
+
"eval.tests.test_version.test_version_short_help_flag",
|
| 65 |
+
"eval.tests.test_version.test_version_single_stdout_line"
|
| 66 |
+
]
|
| 67 |
+
},
|
| 68 |
+
"generated_module_02": {
|
| 69 |
+
"ignore_reason": "",
|
| 70 |
+
"ignored": false,
|
| 71 |
+
"ignored_tests": [
|
| 72 |
+
{
|
| 73 |
+
"name": "eval.tests.test_utils_helpers.test_start_flavor_socket_data_hits_socket_branch_via_config",
|
| 74 |
+
"reasons": [
|
| 75 |
+
{
|
| 76 |
+
"id": "try_except_swallow",
|
| 77 |
+
"message": "pytest test swallows exceptions in an except handler",
|
| 78 |
+
"path": "eval/tests/test_utils_helpers.py",
|
| 79 |
+
"repair_hint": "Do not swallow exceptions; let pytest fail or assert the exact expected exception.",
|
| 80 |
+
"severity": "error",
|
| 81 |
+
"stage": "static_lint"
|
| 82 |
+
}
|
| 83 |
+
]
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"name": "eval.tests.test_utils_helpers.test_start_socket_path_reports_socket_file_type",
|
| 87 |
+
"reasons": [
|
| 88 |
+
{
|
| 89 |
+
"id": "try_except_swallow",
|
| 90 |
+
"message": "pytest test swallows exceptions in an except handler",
|
| 91 |
+
"path": "eval/tests/test_utils_helpers.py",
|
| 92 |
+
"repair_hint": "Do not swallow exceptions; let pytest fail or assert the exact expected exception.",
|
| 93 |
+
"severity": "error",
|
| 94 |
+
"stage": "static_lint"
|
| 95 |
+
}
|
| 96 |
+
]
|
| 97 |
+
}
|
| 98 |
+
],
|
| 99 |
+
"tests": [
|
| 100 |
+
"eval.tests.test_arg_validation.test_enter_requires_exactly_one_cluster",
|
| 101 |
+
"eval.tests.test_arg_validation.test_exact_args_rejection_message_content[logs-3]",
|
| 102 |
+
"eval.tests.test_arg_validation.test_exact_args_rejection_message_content[start-0]",
|
| 103 |
+
"eval.tests.test_arg_validation.test_exact_args_rejection_message_content[status-2]",
|
| 104 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[0-enter-1]",
|
| 105 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[0-logs-1]",
|
| 106 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[0-purge-1]",
|
| 107 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[0-restart-1]",
|
| 108 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[0-start-1]",
|
| 109 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[0-status-1]",
|
| 110 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[0-stop-1]",
|
| 111 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[2-enter-1]",
|
| 112 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[2-logs-1]",
|
| 113 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[2-purge-1]",
|
| 114 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[2-restart-1]",
|
| 115 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[2-start-1]",
|
| 116 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[2-status-1]",
|
| 117 |
+
"eval.tests.test_arg_validation.test_exact_args_validation[2-stop-1]",
|
| 118 |
+
"eval.tests.test_arg_validation.test_no_args_commands_reject_positional[args0-unknown command \"extra\" for \"cn cluster ls\"]",
|
| 119 |
+
"eval.tests.test_arg_validation.test_no_args_commands_reject_positional[args1-unknown command \"extra\" for \"cn kube\"]",
|
| 120 |
+
"eval.tests.test_arg_validation.test_no_args_commands_reject_positional[args2-unknown command \"a\" for \"cn cluster ls\"]",
|
| 121 |
+
"eval.tests.test_arg_validation.test_parent_cluster_requires_a_subcommand",
|
| 122 |
+
"eval.tests.test_arg_validation.test_parent_cluster_with_unknown_subcommand_shows_help",
|
| 123 |
+
"eval.tests.test_config_behavior.test_config_directive_preserves_update_offline_default",
|
| 124 |
+
"eval.tests.test_config_behavior.test_cwd_config_affects_flavor_error_before_docker",
|
| 125 |
+
"eval.tests.test_config_behavior.test_cwd_config_custom_image_alias_is_parsed",
|
| 126 |
+
"eval.tests.test_config_behavior.test_cwd_config_defines_a_usable_flavor",
|
| 127 |
+
"eval.tests.test_config_behavior.test_cwd_config_is_reported_as_used",
|
| 128 |
+
"eval.tests.test_config_helpers_matrix.test_flavors_ls_use_default_inherits_memory_and_cpu",
|
| 129 |
+
"eval.tests.test_config_helpers_matrix.test_flavors_show_nested_ceph_conf_map",
|
| 130 |
+
"eval.tests.test_config_helpers_matrix.test_flavors_show_use_default_with_data_and_size",
|
| 131 |
+
"eval.tests.test_config_helpers_matrix.test_image_alias_override_replaces_builtin",
|
| 132 |
+
"eval.tests.test_container_orchestration.test_enter_missing_cluster_reports_not_exists",
|
| 133 |
+
"eval.tests.test_container_orchestration.test_logs_missing_cluster_reports_not_exists",
|
| 134 |
+
"eval.tests.test_container_orchestration.test_logs_running_cluster_passes_through_cat_missing_file",
|
| 135 |
+
"eval.tests.test_container_orchestration.test_logs_running_cluster_prints_sanitised_exec_stdout",
|
| 136 |
+
"eval.tests.test_container_orchestration.test_ls_empty_inventory_renders_empty_table",
|
| 137 |
+
"eval.tests.test_container_orchestration.test_ls_present_inventory_renders_data_row_exact",
|
| 138 |
+
"eval.tests.test_container_orchestration.test_purge_running_cluster_data_dir_is_removed",
|
| 139 |
+
"eval.tests.test_container_orchestration.test_purge_running_cluster_delete_all_removes_image",
|
| 140 |
+
"eval.tests.test_container_orchestration.test_purge_running_cluster_no_data_dir",
|
| 141 |
+
"eval.tests.test_container_orchestration.test_restart_missing_cluster_reports_not_exists",
|
| 142 |
+
"eval.tests.test_container_orchestration.test_start_custom_flavor_reports_config_memory_cpu",
|
| 143 |
+
"eval.tests.test_container_orchestration.test_start_custom_image_flag_overrides_image_in_create",
|
| 144 |
+
"eval.tests.test_container_orchestration.test_start_data_empty_dir_reaches_create",
|
| 145 |
+
"eval.tests.test_container_orchestration.test_start_data_empty_dir_with_invalid_size_fails_tobytes",
|
| 146 |
+
"eval.tests.test_container_orchestration.test_start_data_empty_dir_with_valid_size_reaches_create",
|
| 147 |
+
"eval.tests.test_container_orchestration.test_start_data_nonempty_dir_rejected",
|
| 148 |
+
"eval.tests.test_container_orchestration.test_start_data_nonexistent_path_reports_filetype_error",
|
| 149 |
+
"eval.tests.test_container_orchestration.test_start_data_regular_file_rejected",
|
| 150 |
+
"eval.tests.test_container_orchestration.test_start_default_reaches_runcontainer_assembly",
|
| 151 |
+
"eval.tests.test_container_orchestration.test_start_image_config_alias_resolves_to_configured_name",
|
| 152 |
+
"eval.tests.test_container_orchestration.test_status_missing_cluster_reports_not_exists",
|
| 153 |
+
"eval.tests.test_container_orchestration.test_stop_missing_cluster_reports_not_exists",
|
| 154 |
+
"eval.tests.test_container_orchestration.test_stop_running_cluster_stops_container",
|
| 155 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[enter]",
|
| 156 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[logs]",
|
| 157 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[ls]",
|
| 158 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[restart]",
|
| 159 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[start]",
|
| 160 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[start_data_size]",
|
| 161 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[start_flavor]",
|
| 162 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[start_image]",
|
| 163 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[start_workdir]",
|
| 164 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[status]",
|
| 165 |
+
"eval.tests.test_docker_reach.test_lifecycle_command_reaches_docker[stop]",
|
| 166 |
+
"eval.tests.test_docker_reach.test_status_reports_config_on_stderr",
|
| 167 |
+
"eval.tests.test_flavor_image_listers.test_flavors_ls_includes_custom_and_uses_their_values",
|
| 168 |
+
"eval.tests.test_flavor_image_listers.test_flavors_ls_reports_builtin_memory_and_cpu",
|
| 169 |
+
"eval.tests.test_flavor_image_listers.test_flavors_ls_use_default_flavor_inherits_memory_from_base",
|
| 170 |
+
"eval.tests.test_flavor_image_listers.test_flavors_show_builtin_flavor_exact_json",
|
| 171 |
+
"eval.tests.test_flavor_image_listers.test_flavors_show_custom_flavor_exact_json",
|
| 172 |
+
"eval.tests.test_flavor_image_listers.test_flavors_show_default_prints_default_parameters",
|
| 173 |
+
"eval.tests.test_flavor_image_listers.test_flavors_show_missing_flavor_prints_empty_object",
|
| 174 |
+
"eval.tests.test_flavor_image_listers.test_flavors_show_use_default_flavor_shows_only_stored_keys",
|
| 175 |
+
"eval.tests.test_flavor_image_listers.test_image_show_aliases_includes_custom_config_alias",
|
| 176 |
+
"eval.tests.test_flavor_image_listers.test_image_show_aliases_lists_builtin_aliases",
|
| 177 |
+
"eval.tests.test_flavor_image_listers.test_image_show_aliases_never_lists_default_as_alias",
|
| 178 |
+
"eval.tests.test_flavor_purge.test_purge_confirmed_all_reaches_docker",
|
| 179 |
+
"eval.tests.test_flavor_purge.test_purge_confirmed_reaches_docker",
|
| 180 |
+
"eval.tests.test_flavor_purge.test_purge_prompts_warning_before_flavor_logic",
|
| 181 |
+
"eval.tests.test_flavor_purge.test_purge_refuses_without_confirmation[extra_args0]",
|
| 182 |
+
"eval.tests.test_flavor_purge.test_purge_refuses_without_confirmation[extra_args1]",
|
| 183 |
+
"eval.tests.test_flavor_purge.test_start_reports_config_on_stderr",
|
| 184 |
+
"eval.tests.test_flavor_purge.test_start_with_default_flavor_reaches_docker",
|
| 185 |
+
"eval.tests.test_flavor_purge.test_start_with_flavor_long_form",
|
| 186 |
+
"eval.tests.test_flavor_purge.test_start_with_missing_flavor_fails_before_docker",
|
| 187 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[enter]",
|
| 188 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[logs]",
|
| 189 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[ls]",
|
| 190 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[purge]",
|
| 191 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[restart]",
|
| 192 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[start]",
|
| 193 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[status]",
|
| 194 |
+
"eval.tests.test_help_outputs.test_each_subcommand_is_listed_in_cluster_help[stop]",
|
| 195 |
+
"eval.tests.test_help_outputs.test_help_is_identical_to_golden_even_with_stray_flag_paths[args0-cluster_help.txt]",
|
| 196 |
+
"eval.tests.test_help_outputs.test_help_is_identical_to_golden_even_with_stray_flag_paths[args1-stop_help.txt]",
|
| 197 |
+
"eval.tests.test_help_outputs.test_help_is_identical_to_golden_even_with_stray_flag_paths[args2-kube_help.txt]",
|
| 198 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args0-cluster_help.txt]",
|
| 199 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args1-start_help.txt]",
|
| 200 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args2-stop_help.txt]",
|
| 201 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args3-status_help.txt]",
|
| 202 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args4-restart_help.txt]",
|
| 203 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args5-logs_help.txt]",
|
| 204 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args6-purge_help.txt]",
|
| 205 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args7-enter_help.txt]",
|
| 206 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args8-ls_help.txt]",
|
| 207 |
+
"eval.tests.test_help_outputs.test_help_reports_used_config_on_stderr[args9-kube_help.txt]",
|
| 208 |
+
"eval.tests.test_help_outputs.test_root_help_matches_golden[args0-root_help.txt]",
|
| 209 |
+
"eval.tests.test_help_outputs.test_root_help_matches_golden[args1-root_help.txt]",
|
| 210 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args0-cluster_help.txt]",
|
| 211 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args1-start_help.txt]",
|
| 212 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args2-stop_help.txt]",
|
| 213 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args3-status_help.txt]",
|
| 214 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args4-restart_help.txt]",
|
| 215 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args5-logs_help.txt]",
|
| 216 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args6-purge_help.txt]",
|
| 217 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args7-enter_help.txt]",
|
| 218 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args8-ls_help.txt]",
|
| 219 |
+
"eval.tests.test_help_outputs.test_subcommand_help_matches_golden[args9-kube_help.txt]",
|
| 220 |
+
"eval.tests.test_kube_template.test_kube_help_matches_golden",
|
| 221 |
+
"eval.tests.test_kube_template.test_kube_statefulset_env_pairs",
|
| 222 |
+
"eval.tests.test_kube_template.test_kube_stderr_reports_config",
|
| 223 |
+
"eval.tests.test_kube_template.test_kube_template_claim_names",
|
| 224 |
+
"eval.tests.test_kube_template.test_kube_template_declared_kinds",
|
| 225 |
+
"eval.tests.test_kube_template.test_kube_template_matches_golden",
|
| 226 |
+
"eval.tests.test_kube_template.test_kube_template_service_spec",
|
| 227 |
+
"eval.tests.test_utils_helpers.test_start_bare_number_size_fails_unit_parse",
|
| 228 |
+
"eval.tests.test_utils_helpers.test_start_config_data_regular_file_rejected",
|
| 229 |
+
"eval.tests.test_utils_helpers.test_start_config_declared_size_reaches_create",
|
| 230 |
+
"eval.tests.test_utils_helpers.test_start_created_leftover_runs_remove_then_create",
|
| 231 |
+
"eval.tests.test_utils_helpers.test_start_fifo_path_hits_unknown_file_type_error",
|
| 232 |
+
"eval.tests.test_utils_helpers.test_start_flavor_socket_data_hits_socket_branch_via_config",
|
| 233 |
+
"eval.tests.test_utils_helpers.test_start_multiword_size_fails_unit_parse",
|
| 234 |
+
"eval.tests.test_utils_helpers.test_start_socket_path_reports_socket_file_type",
|
| 235 |
+
"eval.tests.test_utils_helpers.test_start_valid_size_units_reach_create[1KB]",
|
| 236 |
+
"eval.tests.test_utils_helpers.test_start_valid_size_units_reach_create[1KiB]",
|
| 237 |
+
"eval.tests.test_utils_helpers.test_start_valid_size_units_reach_create[1MiB]",
|
| 238 |
+
"eval.tests.test_utils_helpers.test_start_valid_size_units_reach_create[1TB]",
|
| 239 |
+
"eval.tests.test_utils_helpers.test_start_valid_size_units_reach_create[512MB]",
|
| 240 |
+
"eval.tests.test_utils_helpers.test_start_zero_bytesize_hits_wrong_unit_branch",
|
| 241 |
+
"eval.tests.test_utils_helpers.test_status_text_binary_not_running[created]",
|
| 242 |
+
"eval.tests.test_utils_helpers.test_status_text_binary_not_running[exited]",
|
| 243 |
+
"eval.tests.test_version_update_notify.test_update_notification_is_disabled_offline",
|
| 244 |
+
"eval.tests.test_version_update_notify.test_version_banner_exact",
|
| 245 |
+
"eval.tests.test_version_update_notify.test_version_is_deterministic_across_runs",
|
| 246 |
+
"eval.tests.test_version_update_notify.test_version_run_reports_config_on_stderr"
|
| 247 |
+
]
|
| 248 |
+
},
|
| 249 |
+
"generated_module_03": {
|
| 250 |
+
"ignore_reason": "",
|
| 251 |
+
"ignored": false,
|
| 252 |
+
"ignored_tests": [
|
| 253 |
+
{
|
| 254 |
+
"name": "eval.tests.test_config_validation.test_flavors_ls_broken_flavor_absent_is_ok",
|
| 255 |
+
"reasons": [
|
| 256 |
+
{
|
| 257 |
+
"id": "short_substring",
|
| 258 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 259 |
+
"path": "eval/tests/test_config_validation.py",
|
| 260 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 261 |
+
"severity": "error",
|
| 262 |
+
"stage": "static_lint"
|
| 263 |
+
}
|
| 264 |
+
]
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"name": "eval.tests.test_config_validation.test_image_show_aliases_complete_alias_is_ok",
|
| 268 |
+
"reasons": [
|
| 269 |
+
{
|
| 270 |
+
"id": "short_substring",
|
| 271 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 272 |
+
"path": "eval/tests/test_config_validation.py",
|
| 273 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 274 |
+
"severity": "error",
|
| 275 |
+
"stage": "static_lint"
|
| 276 |
+
}
|
| 277 |
+
]
|
| 278 |
+
}
|
| 279 |
+
],
|
| 280 |
+
"tests": [
|
| 281 |
+
"eval.tests.test_config_validation.test_flavors_ls_broken_flavor_absent_is_ok",
|
| 282 |
+
"eval.tests.test_config_validation.test_flavors_ls_missing_both_memory_first",
|
| 283 |
+
"eval.tests.test_config_validation.test_flavors_ls_missing_cpu_count_fatal",
|
| 284 |
+
"eval.tests.test_config_validation.test_flavors_ls_missing_cpu_count_when_data_set",
|
| 285 |
+
"eval.tests.test_config_validation.test_flavors_ls_missing_memory_size_fatal",
|
| 286 |
+
"eval.tests.test_config_validation.test_flavors_ls_missing_memory_size_when_only_cpu_present",
|
| 287 |
+
"eval.tests.test_config_validation.test_image_show_aliases_complete_alias_is_ok",
|
| 288 |
+
"eval.tests.test_config_validation.test_image_show_aliases_missing_image_name_custom_alias_fatal",
|
| 289 |
+
"eval.tests.test_config_validation.test_image_show_aliases_missing_image_name_fatal",
|
| 290 |
+
"eval.tests.test_flavors_config.test_flavors_group_no_subcommand_exit_zero",
|
| 291 |
+
"eval.tests.test_flavors_config.test_flavors_ls_contains_only_expected_builtin_flavors",
|
| 292 |
+
"eval.tests.test_flavors_config.test_flavors_ls_custom_flavor_cpu_only_inherits_default_memory",
|
| 293 |
+
"eval.tests.test_flavors_config.test_flavors_ls_custom_flavor_inherits_default_memory",
|
| 294 |
+
"eval.tests.test_flavors_config.test_flavors_ls_custom_flavor_no_default_inheritance",
|
| 295 |
+
"eval.tests.test_flavors_config.test_flavors_ls_default_builtins",
|
| 296 |
+
"eval.tests.test_flavors_config.test_flavors_ls_default_override_applies_to_inheriting_flavor",
|
| 297 |
+
"eval.tests.test_flavors_config.test_flavors_ls_default_override_value",
|
| 298 |
+
"eval.tests.test_flavors_config.test_flavors_ls_empty_custom_table_dropped",
|
| 299 |
+
"eval.tests.test_flavors_config.test_flavors_ls_exit_zero_with_update_disabled",
|
| 300 |
+
"eval.tests.test_flavors_config.test_flavors_ls_large_builtin",
|
| 301 |
+
"eval.tests.test_flavors_config.test_flavors_ls_medium_builtin",
|
| 302 |
+
"eval.tests.test_flavors_config.test_flavors_ls_unknown_extra_argument_error",
|
| 303 |
+
"eval.tests.test_flavors_config.test_flavors_show_ceph_conf_nested_map",
|
| 304 |
+
"eval.tests.test_flavors_config.test_flavors_show_custom_flavor_values",
|
| 305 |
+
"eval.tests.test_flavors_config.test_flavors_show_custom_no_inherited_defaults_present",
|
| 306 |
+
"eval.tests.test_flavors_config.test_flavors_show_data_size_workdir_privileged",
|
| 307 |
+
"eval.tests.test_flavors_config.test_flavors_show_default_full_document",
|
| 308 |
+
"eval.tests.test_flavors_config.test_flavors_show_default_original_context",
|
| 309 |
+
"eval.tests.test_flavors_config.test_flavors_show_default_reflects_override",
|
| 310 |
+
"eval.tests.test_flavors_config.test_flavors_show_empty_custom_table_empty",
|
| 311 |
+
"eval.tests.test_flavors_config.test_flavors_show_huge_cpu_and_memory",
|
| 312 |
+
"eval.tests.test_flavors_config.test_flavors_show_huge_use_default_flag",
|
| 313 |
+
"eval.tests.test_flavors_config.test_flavors_show_large_builtin_values",
|
| 314 |
+
"eval.tests.test_flavors_config.test_flavors_show_medium_builtin_values",
|
| 315 |
+
"eval.tests.test_flavors_config.test_flavors_show_missing_argument_error",
|
| 316 |
+
"eval.tests.test_flavors_config.test_flavors_show_no_default_flavor_excludes_use_default_inherit",
|
| 317 |
+
"eval.tests.test_flavors_config.test_flavors_show_too_many_arguments_error",
|
| 318 |
+
"eval.tests.test_flavors_config.test_flavors_show_unknown_flavor_prints_empty_object",
|
| 319 |
+
"eval.tests.test_flavors_config.test_flavors_unknown_bare_subcommand_shows_help",
|
| 320 |
+
"eval.tests.test_image_commands.test_config_file_load_message_stderr",
|
| 321 |
+
"eval.tests.test_image_commands.test_config_update_off_suppresses_notification",
|
| 322 |
+
"eval.tests.test_image_commands.test_flavors_help_lists_subcommands",
|
| 323 |
+
"eval.tests.test_image_commands.test_image_group_no_subcommand_exit_zero",
|
| 324 |
+
"eval.tests.test_image_commands.test_image_help_lists_subcommands",
|
| 325 |
+
"eval.tests.test_image_commands.test_image_ls_all_flag_counts_then_lists_tags",
|
| 326 |
+
"eval.tests.test_image_commands.test_image_ls_all_flag_multiple_pages",
|
| 327 |
+
"eval.tests.test_image_commands.test_image_ls_docker_and_redhat_dispatched_by_registry_env",
|
| 328 |
+
"eval.tests.test_image_commands.test_image_ls_docker_lists_controlled_tags",
|
| 329 |
+
"eval.tests.test_image_commands.test_image_ls_docker_order_preserved",
|
| 330 |
+
"eval.tests.test_image_commands.test_image_ls_docker_single_tag",
|
| 331 |
+
"eval.tests.test_image_commands.test_image_ls_extra_argument_error",
|
| 332 |
+
"eval.tests.test_image_commands.test_image_ls_redhat_lists_controlled_tags",
|
| 333 |
+
"eval.tests.test_image_commands.test_image_ls_redhat_single_tag",
|
| 334 |
+
"eval.tests.test_image_commands.test_image_show_aliases_custom_alias_added",
|
| 335 |
+
"eval.tests.test_image_commands.test_image_show_aliases_custom_plus_builtin",
|
| 336 |
+
"eval.tests.test_image_commands.test_image_show_aliases_default_builtins",
|
| 337 |
+
"eval.tests.test_image_commands.test_image_show_aliases_excludes_default_entry",
|
| 338 |
+
"eval.tests.test_image_commands.test_image_show_aliases_extra_argument_error",
|
| 339 |
+
"eval.tests.test_image_commands.test_image_show_aliases_override_builtin_image_name",
|
| 340 |
+
"eval.tests.test_image_commands.test_image_update_accepts_alias_but_still_needs_docker",
|
| 341 |
+
"eval.tests.test_image_commands.test_image_update_help_lists_usage",
|
| 342 |
+
"eval.tests.test_image_commands.test_image_update_missing_argument_error",
|
| 343 |
+
"eval.tests.test_image_commands.test_image_update_requires_running_docker",
|
| 344 |
+
"eval.tests.test_image_commands.test_image_update_too_many_arguments_error",
|
| 345 |
+
"eval.tests.test_image_commands.test_root_help_shows_description",
|
| 346 |
+
"eval.tests.test_image_commands.test_root_help_usage_exact_block",
|
| 347 |
+
"eval.tests.test_image_commands.test_update_check_extra_argument_error",
|
| 348 |
+
"eval.tests.test_image_commands.test_version_command_prints_version",
|
| 349 |
+
"eval.tests.test_image_update_docker.test_image_update_downloaded_newer_image",
|
| 350 |
+
"eval.tests.test_image_update_docker.test_image_update_downloaded_newer_image_custom_name",
|
| 351 |
+
"eval.tests.test_image_update_docker.test_image_update_earlier_marker_does_not_print",
|
| 352 |
+
"eval.tests.test_image_update_docker.test_image_update_empty_pull_body_event_nil",
|
| 353 |
+
"eval.tests.test_image_update_docker.test_image_update_events_with_neither_status_print_nothing",
|
| 354 |
+
"eval.tests.test_image_update_docker.test_image_update_help_lists_usage_and_long",
|
| 355 |
+
"eval.tests.test_image_update_docker.test_image_update_image_absent_skips_updateNano",
|
| 356 |
+
"eval.tests.test_image_update_docker.test_image_update_invalid_json_pull_stream_fatal",
|
| 357 |
+
"eval.tests.test_image_update_docker.test_image_update_only_last_event_marker_is_inspected",
|
| 358 |
+
"eval.tests.test_image_update_docker.test_image_update_pull_http_error_fatal",
|
| 359 |
+
"eval.tests.test_image_update_docker.test_image_update_rejects_two_arguments",
|
| 360 |
+
"eval.tests.test_image_update_docker.test_image_update_requires_exactly_one_argument",
|
| 361 |
+
"eval.tests.test_image_update_docker.test_image_update_up_to_date",
|
| 362 |
+
"eval.tests.test_update_check.test_startup_disabled_runs_no_version_check",
|
| 363 |
+
"eval.tests.test_update_check.test_startup_notification_default_config_runs_check",
|
| 364 |
+
"eval.tests.test_update_check.test_startup_notification_prints_version_check_content",
|
| 365 |
+
"eval.tests.test_update_check.test_startup_reminder_wait_period_configured_still_runs_check",
|
| 366 |
+
"eval.tests.test_update_check.test_startup_reminder_wait_period_zero_runs_check",
|
| 367 |
+
"eval.tests.test_update_check.test_update_check_arm64_asset_url_matches_happy_amd64",
|
| 368 |
+
"eval.tests.test_update_check.test_update_check_empty_array_tag_query_fatal",
|
| 369 |
+
"eval.tests.test_update_check.test_update_check_equal_tag_no_banner",
|
| 370 |
+
"eval.tests.test_update_check.test_update_check_extra_argument_error",
|
| 371 |
+
"eval.tests.test_update_check.test_update_check_html_url_fallback_exact",
|
| 372 |
+
"eval.tests.test_update_check.test_update_check_html_url_query_absent_fatal",
|
| 373 |
+
"eval.tests.test_update_check.test_update_check_invalid_json_fatal",
|
| 374 |
+
"eval.tests.test_update_check.test_update_check_message_early_return",
|
| 375 |
+
"eval.tests.test_update_check.test_update_check_missing_assets_field_fatal",
|
| 376 |
+
"eval.tests.test_update_check.test_update_check_non_string_tag_falls_back_to_html_url",
|
| 377 |
+
"eval.tests.test_update_check.test_update_check_valid_does_not_print_html_fallback",
|
| 378 |
+
"eval.tests.test_update_check.test_update_check_valid_newer_version_banner_exact",
|
| 379 |
+
"eval.tests.test_update_check.test_update_check_valid_reports_current_and_latest_version"
|
| 380 |
+
]
|
| 381 |
+
},
|
| 382 |
+
"generated_module_04": {
|
| 383 |
+
"ignore_reason": "",
|
| 384 |
+
"ignored": false,
|
| 385 |
+
"ignored_tests": [],
|
| 386 |
+
"tests": [
|
| 387 |
+
"eval.tests.test_s3_arg_validation.test_get_range_message",
|
| 388 |
+
"eval.tests.test_s3_arg_validation.test_ls_range_message",
|
| 389 |
+
"eval.tests.test_s3_arg_validation.test_mb_exact_three_message",
|
| 390 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[cp]",
|
| 391 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[del]",
|
| 392 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[du]",
|
| 393 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[get]",
|
| 394 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[info]",
|
| 395 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[la]",
|
| 396 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[ls]",
|
| 397 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[mb]",
|
| 398 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[mv]",
|
| 399 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[put]",
|
| 400 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[rb]",
|
| 401 |
+
"eval.tests.test_s3_arg_validation.test_minimum_valid_arg_count_is_accepted_to_dispatch[sync]",
|
| 402 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[cp]",
|
| 403 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[del]",
|
| 404 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[du]",
|
| 405 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[get]",
|
| 406 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[info]",
|
| 407 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[la]",
|
| 408 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[ls]",
|
| 409 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[mb]",
|
| 410 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[mv]",
|
| 411 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[put]",
|
| 412 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[rb]",
|
| 413 |
+
"eval.tests.test_s3_arg_validation.test_too_few_args_rejected[sync]",
|
| 414 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[cp]",
|
| 415 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[del]",
|
| 416 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[du]",
|
| 417 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[get]",
|
| 418 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[info]",
|
| 419 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[la]",
|
| 420 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[ls]",
|
| 421 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[mb]",
|
| 422 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[mv]",
|
| 423 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[put]",
|
| 424 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[rb]",
|
| 425 |
+
"eval.tests.test_s3_arg_validation.test_too_many_args_rejected[sync]",
|
| 426 |
+
"eval.tests.test_s3_arg_validation.test_usage_page_lists_same_flags_on_validation",
|
| 427 |
+
"eval.tests.test_s3_boolean_flag_forms.test_debug_bound_value_form_across_leaves_reaches_connection[cp_zero]",
|
| 428 |
+
"eval.tests.test_s3_boolean_flag_forms.test_debug_bound_value_form_across_leaves_reaches_connection[del_short_false]",
|
| 429 |
+
"eval.tests.test_s3_boolean_flag_forms.test_debug_bound_value_form_across_leaves_reaches_connection[du_long_false]",
|
| 430 |
+
"eval.tests.test_s3_boolean_flag_forms.test_debug_bound_value_form_across_leaves_reaches_connection[mv_long_true]",
|
| 431 |
+
"eval.tests.test_s3_boolean_flag_forms.test_debug_bound_value_form_across_leaves_reaches_connection[rb_short_true]",
|
| 432 |
+
"eval.tests.test_s3_boolean_flag_forms.test_debug_bound_value_form_across_leaves_reaches_connection[sync_one]",
|
| 433 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_shorthand_value_reaches_connection[continue_sh]",
|
| 434 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_shorthand_value_reaches_connection[debug_sh]",
|
| 435 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_shorthand_value_reaches_connection[force_sh]",
|
| 436 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_shorthand_value_reaches_connection[skip_sh]",
|
| 437 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_value_does_not_count_as_positional",
|
| 438 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_value_form_reaches_connection[continue_false]",
|
| 439 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_value_form_reaches_connection[debug_false]",
|
| 440 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_value_form_reaches_connection[force_true]",
|
| 441 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_bound_value_form_reaches_connection[skip_false]",
|
| 442 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_invalid_debug_value_error",
|
| 443 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_invalid_skip_value_error",
|
| 444 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_parsebool_accepted_values[cap_true]",
|
| 445 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_parsebool_accepted_values[false]",
|
| 446 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_parsebool_accepted_values[one]",
|
| 447 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_parsebool_accepted_values[short_t]",
|
| 448 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_parsebool_accepted_values[true]",
|
| 449 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_parsebool_accepted_values[upper_true]",
|
| 450 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_parsebool_accepted_values[zero]",
|
| 451 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_repeated_force_long_with_bound_reaches_connection",
|
| 452 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_skip_space_separated_token_is_positional",
|
| 453 |
+
"eval.tests.test_s3_boolean_flag_forms.test_get_space_separated_debug_token_is_positional_valid_arity",
|
| 454 |
+
"eval.tests.test_s3_boolean_flag_forms.test_la_rejects_unknown_skip_flag",
|
| 455 |
+
"eval.tests.test_s3_boolean_flag_forms.test_la_space_separated_debug_token_is_positional",
|
| 456 |
+
"eval.tests.test_s3_config.test_config_file_is_discovered_from_cwd",
|
| 457 |
+
"eval.tests.test_s3_config.test_config_suppression_holds_across_transient_network_absence",
|
| 458 |
+
"eval.tests.test_s3_config.test_update_notification_suppressed_by_config",
|
| 459 |
+
"eval.tests.test_s3_docker_error.test_cluster_name_is_prefixed_into_container_name",
|
| 460 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[cp-args0]",
|
| 461 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[del-args1]",
|
| 462 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[du-args2]",
|
| 463 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[get-args3]",
|
| 464 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[info-args4]",
|
| 465 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[la-args5]",
|
| 466 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[ls-args6]",
|
| 467 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[mb-args7]",
|
| 468 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[mv-args8]",
|
| 469 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[put-args9]",
|
| 470 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[rb-args10]",
|
| 471 |
+
"eval.tests.test_s3_docker_error.test_valid_arity_reaches_docker_connection_failure[sync-args11]",
|
| 472 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_bound_help_false_disables_help_then_arity_error",
|
| 473 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_bound_help_false_then_valid_arity_dispatches",
|
| 474 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_bound_help_true_prints_help",
|
| 475 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_bound_value_complement_reaches_connection[continue_true]",
|
| 476 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_bound_value_complement_reaches_connection[debug_true]",
|
| 477 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_bound_value_complement_reaches_connection[force_false]",
|
| 478 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_bound_value_complement_reaches_connection[skip_true]",
|
| 479 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_interspersed_toggle_flags_reach_connection[after_all]",
|
| 480 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_interspersed_toggle_flags_reach_connection[after_bound]",
|
| 481 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_interspersed_toggle_flags_reach_connection[between]",
|
| 482 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_interspersed_toggle_flags_reach_connection[between_bound]",
|
| 483 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_repeated_bound_value_last_wins_reaches_connection[continue]",
|
| 484 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_repeated_bound_value_last_wins_reaches_connection[force]",
|
| 485 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_get_repeated_bound_value_last_wins_reaches_connection[skip]",
|
| 486 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_la_bound_debug_true_reaches_connection",
|
| 487 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_la_bound_help_false_disables_help_then_arity_error",
|
| 488 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_la_bound_help_true_prints_help",
|
| 489 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_la_interspersed_bound_debug_reaches_connection",
|
| 490 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_la_space_separated_debug_long_token_is_sole_positional_dispatch",
|
| 491 |
+
"eval.tests.test_s3_flag_placement_and_help_tristate.test_la_space_separated_debug_short_token_is_sole_positional_dispatch",
|
| 492 |
+
"eval.tests.test_s3_flags.test_debug_flag_does_not_change_arg_validation",
|
| 493 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[cp-args7]",
|
| 494 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[del-args4]",
|
| 495 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[du-args5]",
|
| 496 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[info-args6]",
|
| 497 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[la-args3]",
|
| 498 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[ls-args2]",
|
| 499 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[mb-args0]",
|
| 500 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[mv-args8]",
|
| 501 |
+
"eval.tests.test_s3_flags.test_debug_flag_is_accepted_and_reaches_connection[rb-args1]",
|
| 502 |
+
"eval.tests.test_s3_flags.test_get_continue_flag_reaches_connection",
|
| 503 |
+
"eval.tests.test_s3_flags.test_get_force_flag_reaches_connection",
|
| 504 |
+
"eval.tests.test_s3_flags.test_get_skip_flag_reaches_connection",
|
| 505 |
+
"eval.tests.test_s3_flags.test_get_unknown_flag_not_in_help_set_rejected",
|
| 506 |
+
"eval.tests.test_s3_flags.test_unknown_long_flag_rejected",
|
| 507 |
+
"eval.tests.test_s3_flags.test_unknown_shorthand_flag_rejected",
|
| 508 |
+
"eval.tests.test_s3_parent.test_s3_dash_dash_help_prints_parent_help",
|
| 509 |
+
"eval.tests.test_s3_parent.test_s3_dash_h_help_prints_parent_help",
|
| 510 |
+
"eval.tests.test_s3_parent.test_s3_help_lists_every_subcommand",
|
| 511 |
+
"eval.tests.test_s3_parent.test_s3_no_args_prints_parent_help_and_exits_zero",
|
| 512 |
+
"eval.tests.test_s3_parent.test_s3_parent_rejects_seen_as_flags_only_on_subcommands",
|
| 513 |
+
"eval.tests.test_s3_parent.test_s3_unknown_subcommand_falls_back_to_parent_help",
|
| 514 |
+
"eval.tests.test_s3_parent.test_s3_unknown_subcommand_with_arg_falls_back_to_parent_help",
|
| 515 |
+
"eval.tests.test_s3_reachability_edges.test_double_dash_separator_leaf_dispatch[la]",
|
| 516 |
+
"eval.tests.test_s3_reachability_edges.test_double_dash_separator_leaf_dispatch[mb]",
|
| 517 |
+
"eval.tests.test_s3_reachability_edges.test_empty_string_cluster_name_reaches_connection",
|
| 518 |
+
"eval.tests.test_s3_reachability_edges.test_get_combined_flags_reach_connection[continue_skip_force]",
|
| 519 |
+
"eval.tests.test_s3_reachability_edges.test_get_combined_flags_reach_connection[debug_force]",
|
| 520 |
+
"eval.tests.test_s3_reachability_edges.test_get_combined_flags_reach_connection[force_continue]",
|
| 521 |
+
"eval.tests.test_s3_reachability_edges.test_get_combined_flags_reach_connection[force_skip]",
|
| 522 |
+
"eval.tests.test_s3_reachability_edges.test_get_combined_flags_reach_connection[skip_continue]",
|
| 523 |
+
"eval.tests.test_s3_reachability_edges.test_get_double_dash_help_precedence",
|
| 524 |
+
"eval.tests.test_s3_reachability_edges.test_get_minus_d_debug_too_few_args",
|
| 525 |
+
"eval.tests.test_s3_reachability_edges.test_get_over_arity_with_flags_present",
|
| 526 |
+
"eval.tests.test_s3_reachability_edges.test_help_flag_takes_precedence_over_dispatch",
|
| 527 |
+
"eval.tests.test_s3_reachability_edges.test_la_unknown_shorthand_rejected",
|
| 528 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[cp]",
|
| 529 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[del]",
|
| 530 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[du]",
|
| 531 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[get]",
|
| 532 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[info]",
|
| 533 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[la]",
|
| 534 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[ls]",
|
| 535 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[mb]",
|
| 536 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[mv]",
|
| 537 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[put]",
|
| 538 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[rb]",
|
| 539 |
+
"eval.tests.test_s3_reachability_edges.test_leaf_dash_h_help_page[sync]",
|
| 540 |
+
"eval.tests.test_s3_reachability_edges.test_parent_double_dash_with_args_shows_parent_help",
|
| 541 |
+
"eval.tests.test_s3_reachability_edges.test_repeated_debug_flag_reaches_connection",
|
| 542 |
+
"eval.tests.test_s3_reachability_edges.test_utf8_cluster_name_reaches_connection",
|
| 543 |
+
"eval.tests.test_s3_subcommand_help.test_cp_help_documents_two_objects",
|
| 544 |
+
"eval.tests.test_s3_subcommand_help.test_get_help_flag_order_skips_force_continue_debug",
|
| 545 |
+
"eval.tests.test_s3_subcommand_help.test_get_help_skip_default_true",
|
| 546 |
+
"eval.tests.test_s3_subcommand_help.test_put_help_usage_order",
|
| 547 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[cp]",
|
| 548 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[del]",
|
| 549 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[du]",
|
| 550 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[info]",
|
| 551 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[la]",
|
| 552 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[ls]",
|
| 553 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[mb]",
|
| 554 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[mv]",
|
| 555 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[rb]",
|
| 556 |
+
"eval.tests.test_s3_subcommand_help.test_single_debug_flag_subcommands_help[sync]",
|
| 557 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[cp]",
|
| 558 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[del]",
|
| 559 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[du]",
|
| 560 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[get]",
|
| 561 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[info]",
|
| 562 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[la]",
|
| 563 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[ls]",
|
| 564 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[mb]",
|
| 565 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[mv]",
|
| 566 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[put]",
|
| 567 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[rb]",
|
| 568 |
+
"eval.tests.test_s3_subcommand_help.test_subcommand_help_exact_use_and_short[sync]",
|
| 569 |
+
"eval.tests.test_s3_subcommand_help.test_sync_help_documents_local_dir",
|
| 570 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_short_bound_interspersed_reaches_connection[debug_false_between]",
|
| 571 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_short_bound_interspersed_reaches_connection[force_true_between]",
|
| 572 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_short_bound_interspersed_reaches_connection[skip_false_between]",
|
| 573 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_terminator_with_flags_reaches_connection[get_01_bound_before_term]",
|
| 574 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_terminator_with_flags_reaches_connection[get_all_shorts_before_term]",
|
| 575 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_terminator_with_flags_reaches_connection[get_bare_term_before]",
|
| 576 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_terminator_with_flags_reaches_connection[get_bound_before_term]",
|
| 577 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_terminator_with_flags_reaches_connection[get_toggle_before_term]",
|
| 578 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_get_trailing_terminator_reaches_connection",
|
| 579 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_la_debug_before_terminator_reaches_connection",
|
| 580 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_la_short_bound_debug_reaches_connection[la_short_bound_after]",
|
| 581 |
+
"eval.tests.test_s3_terminator_and_shorthand_bound.test_la_short_bound_debug_reaches_connection[la_short_bound_before]"
|
| 582 |
+
]
|
| 583 |
+
}
|
| 584 |
+
},
|
| 585 |
+
"commit": "be26489b35f5bf3107c75fe67faa12469daa0214",
|
| 586 |
+
"data_source": "synthetic_programgym",
|
| 587 |
+
"difficulty": "easy",
|
| 588 |
+
"difficulty_score": 1.5972562829251418,
|
| 589 |
+
"eval_clean_hashes": [
|
| 590 |
+
"0b5353eb715f6240275b009d83c7dca431d64efd9890449e16d99c6470d0a4dc"
|
| 591 |
+
],
|
| 592 |
+
"input_record": {
|
| 593 |
+
"commit": "be26489b35f5bf3107c75fe67faa12469daa0214",
|
| 594 |
+
"commits": 254,
|
| 595 |
+
"contributors": 7,
|
| 596 |
+
"difficulty": "easy",
|
| 597 |
+
"difficulty_code_lines": 3956,
|
| 598 |
+
"difficulty_has_tests": true,
|
| 599 |
+
"difficulty_product_code_lines": 3956,
|
| 600 |
+
"difficulty_runtime_deps": 0,
|
| 601 |
+
"difficulty_score": 1.5972562829251418,
|
| 602 |
+
"difficulty_test_code_lines": 223,
|
| 603 |
+
"full_name": "ceph/cn",
|
| 604 |
+
"github_stars": 235,
|
| 605 |
+
"input_joern_zip": "go_joern/ceph__cn.zip",
|
| 606 |
+
"joern_status": true,
|
| 607 |
+
"joern_time": 2.692148424917832,
|
| 608 |
+
"language": "go",
|
| 609 |
+
"pb_match": [
|
| 610 |
+
{
|
| 611 |
+
"pb_fullname": "segmentio/chamber",
|
| 612 |
+
"rank": 294,
|
| 613 |
+
"similarity": 0.5377442836761475
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"pb_fullname": "johnkerl/miller",
|
| 617 |
+
"rank": 490,
|
| 618 |
+
"similarity": 0.4818657338619232
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"pb_fullname": "FiloSottile/age",
|
| 622 |
+
"rank": 360,
|
| 623 |
+
"similarity": 0.4873593747615814
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"pb_fullname": "multiprocessio/dsq",
|
| 627 |
+
"rank": 598,
|
| 628 |
+
"similarity": 0.4759815037250519
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"pb_fullname": "noborus/trdsql",
|
| 632 |
+
"rank": 967,
|
| 633 |
+
"similarity": 0.4749738872051239
|
| 634 |
+
}
|
| 635 |
+
],
|
| 636 |
+
"repo_age": 8.69,
|
| 637 |
+
"repo_path": "go/ceph__cn",
|
| 638 |
+
"source": "commit:be26489b35f5bf3107c75fe67faa12469daa0214",
|
| 639 |
+
"status": "done",
|
| 640 |
+
"url": "https://github.com/ceph/cn"
|
| 641 |
+
},
|
| 642 |
+
"instance_id": "ceph__cn.be26489",
|
| 643 |
+
"language": "go",
|
| 644 |
+
"module_iterations": [
|
| 645 |
+
{
|
| 646 |
+
"actual_iterations": 2,
|
| 647 |
+
"branch_name": "generated_module_01",
|
| 648 |
+
"iteration_limit": 5,
|
| 649 |
+
"module_index": 1,
|
| 650 |
+
"module_kind": "source",
|
| 651 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 652 |
+
},
|
| 653 |
+
{
|
| 654 |
+
"actual_iterations": 5,
|
| 655 |
+
"branch_name": "generated_module_02",
|
| 656 |
+
"iteration_limit": 5,
|
| 657 |
+
"module_index": 2,
|
| 658 |
+
"module_kind": "source",
|
| 659 |
+
"termination_reason": "max_iterations"
|
| 660 |
+
},
|
| 661 |
+
{
|
| 662 |
+
"actual_iterations": 5,
|
| 663 |
+
"branch_name": "generated_module_03",
|
| 664 |
+
"iteration_limit": 5,
|
| 665 |
+
"module_index": 3,
|
| 666 |
+
"module_kind": "source",
|
| 667 |
+
"termination_reason": "max_iterations"
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"actual_iterations": 5,
|
| 671 |
+
"branch_name": "generated_module_04",
|
| 672 |
+
"iteration_limit": 5,
|
| 673 |
+
"module_index": 4,
|
| 674 |
+
"module_kind": "source",
|
| 675 |
+
"termination_reason": "early_stopping"
|
| 676 |
+
}
|
| 677 |
+
],
|
| 678 |
+
"repository": "ceph/cn"
|
| 679 |
+
}
|
ceph--cn.be26489/tests/test.sh
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
# Verifier exec may not inherit image ENV (Modal/gVisor, login-shell resets).
|
| 5 |
+
export PATH="/usr/local/go/bin:/go/bin:/usr/local/cargo/bin:/root/.cargo/bin:${PATH}"
|
| 6 |
+
|
| 7 |
+
mkdir -p /logs/verifier /logs/artifacts
|
| 8 |
+
|
| 9 |
+
write_failure() {
|
| 10 |
+
local code="$1"
|
| 11 |
+
local details="$2"
|
| 12 |
+
python3 - "$code" "$details" <<'PY'
|
| 13 |
+
import json
|
| 14 |
+
import sys
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
code, details = sys.argv[1:3]
|
| 18 |
+
try:
|
| 19 |
+
metadata = json.loads(Path("/tests/programgym_task.json").read_text())
|
| 20 |
+
n_tests = sum(
|
| 21 |
+
len([
|
| 22 |
+
name for name in info.get("tests", [])
|
| 23 |
+
if name not in {item.get("name") for item in info.get("ignored_tests", [])}
|
| 24 |
+
])
|
| 25 |
+
for branch, info in metadata.get("branches", {}).items()
|
| 26 |
+
if not info.get("ignored")
|
| 27 |
+
)
|
| 28 |
+
except Exception:
|
| 29 |
+
n_tests = 0
|
| 30 |
+
result = {
|
| 31 |
+
"test_results": [],
|
| 32 |
+
"error_code": code,
|
| 33 |
+
"error_details": details,
|
| 34 |
+
"log": [],
|
| 35 |
+
"solution_branch": "submission",
|
| 36 |
+
"test_branches": [],
|
| 37 |
+
"test_branch_errors": {
|
| 38 |
+
"__infra__": [{"error_code": code, "error_details": details}]
|
| 39 |
+
},
|
| 40 |
+
"executable_hash": None,
|
| 41 |
+
"warnings": [],
|
| 42 |
+
}
|
| 43 |
+
diagnostics = {
|
| 44 |
+
"pass_rate": 0.0,
|
| 45 |
+
"resolved": 0,
|
| 46 |
+
"n_passed": 0,
|
| 47 |
+
"n_tests": n_tests,
|
| 48 |
+
"n_branch_errors": 1,
|
| 49 |
+
"infra_error": 1,
|
| 50 |
+
"executable_hash_present": 0,
|
| 51 |
+
}
|
| 52 |
+
Path("/logs/verifier/programgym_eval.json").write_text(
|
| 53 |
+
json.dumps(result, indent=2, sort_keys=True)
|
| 54 |
+
)
|
| 55 |
+
Path("/logs/verifier/harbor_diagnostics.json").write_text(
|
| 56 |
+
json.dumps(diagnostics, indent=2, sort_keys=True)
|
| 57 |
+
)
|
| 58 |
+
Path("/logs/verifier/reward.json").write_text(
|
| 59 |
+
json.dumps(
|
| 60 |
+
{"reward": 0.0, "resolved": 0.0, "almost_resolved": 0.0},
|
| 61 |
+
indent=2,
|
| 62 |
+
sort_keys=True,
|
| 63 |
+
)
|
| 64 |
+
)
|
| 65 |
+
Path("/logs/verifier/reward.txt").write_text("0.0")
|
| 66 |
+
Path("/logs/verifier/programgym_eval.log").write_text(details)
|
| 67 |
+
PY
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
if ! command -v python3 >/dev/null 2>&1; then
|
| 71 |
+
write_failure "missing_python3" "python3 is required in the cleanroom image"
|
| 72 |
+
exit 0
|
| 73 |
+
fi
|
| 74 |
+
|
| 75 |
+
if ! python3 /tests/programgym_evaluator.py; then
|
| 76 |
+
if [ ! -s /logs/verifier/reward.txt ]; then
|
| 77 |
+
write_failure "evaluator_crashed" \
|
| 78 |
+
"programgym_evaluator.py exited non-zero with no reward written"
|
| 79 |
+
fi
|
| 80 |
+
fi
|
| 81 |
+
|
| 82 |
+
exit 0
|
ceph--cn.be26489/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1217ea832dc01af34bc475228c55179bf5b02ecdc83eff1376ba34a0c587a72
|
| 3 |
+
size 11441
|
cesanta--elk.71a86fa/environment/Dockerfile
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV PAGER=cat
|
| 24 |
+
ENV MANPAGER=cat
|
| 25 |
+
ENV LESS=-R
|
| 26 |
+
ENV TQDM_DISABLE=1
|
| 27 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip python3-dev autoconf automake gettext file binutils libtool libncurses-dev meson ninja-build python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 28 |
+
ARG CMAKE_VERSION=3.31.10
|
| 29 |
+
ARG CMAKE_PYPI_INDEX_URL=https://pypi.org/simple
|
| 30 |
+
RUN set -eux; python3 -m pip install --no-cache-dir --index-url "${CMAKE_PYPI_INDEX_URL}" --trusted-host "mirror.example.invalid" "cmake==${CMAKE_VERSION}"; cmake --version; ctest --version; cpack --version
|
| 31 |
+
WORKDIR /workspace
|
| 32 |
+
ADD workspace.tar.gz /workspace/
|
| 33 |
+
COPY executable /workspace/executable
|
| 34 |
+
COPY download.sh /workspace/download.sh
|
| 35 |
+
RUN chmod 755 /workspace/download.sh
|
| 36 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 37 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 38 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 39 |
+
&& rm -f /workspace/download.sh \
|
| 40 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 41 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 42 |
+
RUN chmod 111 /workspace/executable
|
| 43 |
+
WORKDIR /workspace
|
| 44 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 45 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 46 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 47 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 48 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 49 |
+
RUN mkdir -p /home/agent \
|
| 50 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 51 |
+
&& chown agent:agent /workspace/executable \
|
| 52 |
+
&& chmod 111 /workspace/executable
|
| 53 |
+
ENV HOME=/home/agent
|
| 54 |
+
WORKDIR /workspace
|
cesanta--elk.71a86fa/environment/download.sh
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# ProgramGym download stage for cesanta/elk.
|
| 3 |
+
#
|
| 4 |
+
# Elk is a zero-dependency C library (elk.c/elk.h) plus a command-line
|
| 5 |
+
# example (examples/cmdline/main.c) that the repository builds into the
|
| 6 |
+
# standalone 'elk' CLI with the base-image gcc and standard C library only.
|
| 7 |
+
# There is nothing to fetch, unpack, or pre-cache: the base image already
|
| 8 |
+
# provides gcc, binutils, and libc, and build.sh compiles the single ELF with
|
| 9 |
+
# no external headers or libraries.
|
| 10 |
+
#
|
| 11 |
+
# This file is sourced (not executed) from a read-only repository mount
|
| 12 |
+
# during the download validation stage, so it:
|
| 13 |
+
# - never reads any repository file,
|
| 14 |
+
# - never uses `exit` in normal control flow,
|
| 15 |
+
# - never compiles, links, tests, packages, or sets up built artifacts,
|
| 16 |
+
# - only exports the environment variables build.sh relies on.
|
| 17 |
+
#
|
| 18 |
+
# It is idempotent: re-sourcing it produces the same exported state.
|
| 19 |
+
|
| 20 |
+
# The compiler that build.sh will use. Default gcc in the base image is GCC 13.
|
| 21 |
+
export CC="${CC:-gcc}"
|
| 22 |
+
|
| 23 |
+
# Flags used to build the elk command-line tool, mirroring the repository's
|
| 24 |
+
# own test/Makefile 'elk' target:
|
| 25 |
+
# $(CC) elk.c examples/cmdline/main.c -I. $(CFLAGS) -DJS_DUMP -o elk
|
| 26 |
+
# -DJS_DUMP enables js_dump() which prints JS memory internals; it is used by
|
| 27 |
+
# examples/cmdline/main.c when the user passes -d.
|
| 28 |
+
export ELK_CFLAGS="-I. -DJS_DUMP -W -Wall -Wextra"
|
| 29 |
+
|
| 30 |
+
# Verify that the required toolchain is present in the image. This is a
|
| 31 |
+
# capability probe only; it performs no build, so it is allowed in download.sh.
|
| 32 |
+
CC_PATH="$(command -v "${CC}")"
|
| 33 |
+
if [ -n "${CC_PATH}" ]; then
|
| 34 |
+
:
|
| 35 |
+
else
|
| 36 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 37 |
+
echo "download.sh: required compiler '${CC}' not found in base image" >&2
|
| 38 |
+
return 1
|
| 39 |
+
else
|
| 40 |
+
echo "download.sh: required compiler '${CC}' not found in base image" >&2
|
| 41 |
+
exit 1
|
| 42 |
+
fi
|
| 43 |
+
fi
|
| 44 |
+
|
| 45 |
+
# Everything the build needs is already present; nothing else to prepare.
|
cesanta--elk.71a86fa/environment/executable
ADDED
|
Binary file (61.9 kB). View file
|
|
|
cesanta--elk.71a86fa/environment/harbor_prepare_download_env.sh
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
cd /workspace
|
| 4 |
+
set -a
|
| 5 |
+
source /workspace/download.sh
|
| 6 |
+
set +a
|
| 7 |
+
python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
|
| 8 |
+
import os
|
| 9 |
+
import shlex
|
| 10 |
+
|
| 11 |
+
ignored = {
|
| 12 |
+
"ALL_PROXY",
|
| 13 |
+
"HTTP_PROXY",
|
| 14 |
+
"HTTPS_PROXY",
|
| 15 |
+
"NO_PROXY",
|
| 16 |
+
"OLDPWD",
|
| 17 |
+
"PIP_PROXY",
|
| 18 |
+
"PWD",
|
| 19 |
+
"SHLVL",
|
| 20 |
+
"_",
|
| 21 |
+
"all_proxy",
|
| 22 |
+
"http_proxy",
|
| 23 |
+
"https_proxy",
|
| 24 |
+
"no_proxy",
|
| 25 |
+
"pip_proxy",
|
| 26 |
+
}
|
| 27 |
+
for key in sorted(os.environ):
|
| 28 |
+
if key in ignored or key.startswith("BASH_FUNC_"):
|
| 29 |
+
continue
|
| 30 |
+
value = os.environ[key]
|
| 31 |
+
if "\n" in value:
|
| 32 |
+
continue
|
| 33 |
+
print(f"export {key}={shlex.quote(value)}")
|
| 34 |
+
PY
|
cesanta--elk.71a86fa/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c3776c39c515d6cbda0bce7aec3a7046d6b91e4cc122ab08d007aa00e69a941
|
| 3 |
+
size 25736
|
cesanta--elk.71a86fa/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
|
cesanta--elk.71a86fa/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
|
cesanta--elk.71a86fa/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/cesanta--elk.71a86fa"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for cesanta/elk"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "c"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "cesanta__elk.71a86fa"
|
| 32 |
+
repository = "cesanta/elk"
|
| 33 |
+
commit = "71a86fa2fef146696be9ae66715bf3f91d0a5f2c"
|
| 34 |
+
language = "c"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.1760912590556813
|
| 37 |
+
test_branches = 3
|
| 38 |
+
test_count = 1940
|
| 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"
|
cesanta--elk.71a86fa/tests/Dockerfile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV PAGER=cat
|
| 24 |
+
ENV MANPAGER=cat
|
| 25 |
+
ENV LESS=-R
|
| 26 |
+
ENV TQDM_DISABLE=1
|
| 27 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip python3-dev autoconf automake gettext file binutils libtool libncurses-dev meson ninja-build python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 28 |
+
ARG CMAKE_VERSION=3.31.10
|
| 29 |
+
ARG CMAKE_PYPI_INDEX_URL=https://pypi.org/simple
|
| 30 |
+
RUN set -eux; python3 -m pip install --no-cache-dir --index-url "${CMAKE_PYPI_INDEX_URL}" --trusted-host "mirror.example.invalid" "cmake==${CMAKE_VERSION}"; cmake --version; ctest --version; cpack --version
|
| 31 |
+
WORKDIR /workspace
|
| 32 |
+
ADD workspace.tar.gz /workspace/
|
| 33 |
+
COPY executable /workspace/executable
|
| 34 |
+
COPY download.sh /workspace/download.sh
|
| 35 |
+
RUN chmod 755 /workspace/download.sh
|
| 36 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 37 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 38 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 39 |
+
&& rm -f /workspace/download.sh \
|
| 40 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 41 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 42 |
+
RUN chmod 111 /workspace/executable
|
| 43 |
+
WORKDIR /workspace
|
| 44 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 45 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 46 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 47 |
+
&& mkdir -p /workspace /tests
|
| 48 |
+
|
| 49 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 50 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 51 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 52 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 53 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 54 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 55 |
+
RUN set -eu; \
|
| 56 |
+
pip_break_system_packages=""; \
|
| 57 |
+
if python3 -m pip install --help | grep -q -- '--break-system-packages'; then \
|
| 58 |
+
pip_break_system_packages="--break-system-packages"; \
|
| 59 |
+
fi; \
|
| 60 |
+
python3 -m pip install ${pip_break_system_packages} \
|
| 61 |
+
--no-cache-dir --disable-pip-version-check \
|
| 62 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 63 |
+
|
| 64 |
+
COPY test.sh /tests/test.sh
|
| 65 |
+
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
|
cesanta--elk.71a86fa/tests/blobs/tests/generated_module_02.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61e7a2a2c9aed71f949442d40c8a40259d4441835e54a298bcc0ad28f0b7b46d
|
| 3 |
+
size 31188
|
cesanta--elk.71a86fa/tests/blobs/tests/generated_module_03.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:221e73a3cfbf969b2b505130efaf30a885b07c6d2d319ad1f7324790cff9c9fd
|
| 3 |
+
size 21723
|
cesanta--elk.71a86fa/tests/blobs/tests/generated_upstream.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c5ecac4c2b95010a64d389416239baca6686bfc81dc9ae3faffebe77c547e8a
|
| 3 |
+
size 7490
|
cesanta--elk.71a86fa/tests/download.sh
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# ProgramGym download stage for cesanta/elk.
|
| 3 |
+
#
|
| 4 |
+
# Elk is a zero-dependency C library (elk.c/elk.h) plus a command-line
|
| 5 |
+
# example (examples/cmdline/main.c) that the repository builds into the
|
| 6 |
+
# standalone 'elk' CLI with the base-image gcc and standard C library only.
|
| 7 |
+
# There is nothing to fetch, unpack, or pre-cache: the base image already
|
| 8 |
+
# provides gcc, binutils, and libc, and build.sh compiles the single ELF with
|
| 9 |
+
# no external headers or libraries.
|
| 10 |
+
#
|
| 11 |
+
# This file is sourced (not executed) from a read-only repository mount
|
| 12 |
+
# during the download validation stage, so it:
|
| 13 |
+
# - never reads any repository file,
|
| 14 |
+
# - never uses `exit` in normal control flow,
|
| 15 |
+
# - never compiles, links, tests, packages, or sets up built artifacts,
|
| 16 |
+
# - only exports the environment variables build.sh relies on.
|
| 17 |
+
#
|
| 18 |
+
# It is idempotent: re-sourcing it produces the same exported state.
|
| 19 |
+
|
| 20 |
+
# The compiler that build.sh will use. Default gcc in the base image is GCC 13.
|
| 21 |
+
export CC="${CC:-gcc}"
|
| 22 |
+
|
| 23 |
+
# Flags used to build the elk command-line tool, mirroring the repository's
|
| 24 |
+
# own test/Makefile 'elk' target:
|
| 25 |
+
# $(CC) elk.c examples/cmdline/main.c -I. $(CFLAGS) -DJS_DUMP -o elk
|
| 26 |
+
# -DJS_DUMP enables js_dump() which prints JS memory internals; it is used by
|
| 27 |
+
# examples/cmdline/main.c when the user passes -d.
|
| 28 |
+
export ELK_CFLAGS="-I. -DJS_DUMP -W -Wall -Wextra"
|
| 29 |
+
|
| 30 |
+
# Verify that the required toolchain is present in the image. This is a
|
| 31 |
+
# capability probe only; it performs no build, so it is allowed in download.sh.
|
| 32 |
+
CC_PATH="$(command -v "${CC}")"
|
| 33 |
+
if [ -n "${CC_PATH}" ]; then
|
| 34 |
+
:
|
| 35 |
+
else
|
| 36 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 37 |
+
echo "download.sh: required compiler '${CC}' not found in base image" >&2
|
| 38 |
+
return 1
|
| 39 |
+
else
|
| 40 |
+
echo "download.sh: required compiler '${CC}' not found in base image" >&2
|
| 41 |
+
exit 1
|
| 42 |
+
fi
|
| 43 |
+
fi
|
| 44 |
+
|
| 45 |
+
# Everything the build needs is already present; nothing else to prepare.
|
cesanta--elk.71a86fa/tests/executable
ADDED
|
Binary file (61.9 kB). View file
|
|
|
cesanta--elk.71a86fa/tests/harbor_prepare_download_env.sh
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
cd /workspace
|
| 4 |
+
set -a
|
| 5 |
+
source /workspace/download.sh
|
| 6 |
+
set +a
|
| 7 |
+
python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
|
| 8 |
+
import os
|
| 9 |
+
import shlex
|
| 10 |
+
|
| 11 |
+
ignored = {
|
| 12 |
+
"ALL_PROXY",
|
| 13 |
+
"HTTP_PROXY",
|
| 14 |
+
"HTTPS_PROXY",
|
| 15 |
+
"NO_PROXY",
|
| 16 |
+
"OLDPWD",
|
| 17 |
+
"PIP_PROXY",
|
| 18 |
+
"PWD",
|
| 19 |
+
"SHLVL",
|
| 20 |
+
"_",
|
| 21 |
+
"all_proxy",
|
| 22 |
+
"http_proxy",
|
| 23 |
+
"https_proxy",
|
| 24 |
+
"no_proxy",
|
| 25 |
+
"pip_proxy",
|
| 26 |
+
}
|
| 27 |
+
for key in sorted(os.environ):
|
| 28 |
+
if key in ignored or key.startswith("BASH_FUNC_"):
|
| 29 |
+
continue
|
| 30 |
+
value = os.environ[key]
|
| 31 |
+
if "\n" in value:
|
| 32 |
+
continue
|
| 33 |
+
print(f"export {key}={shlex.quote(value)}")
|
| 34 |
+
PY
|
cesanta--elk.71a86fa/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""In-place ProgramGym evaluator.
|
| 3 |
+
|
| 4 |
+
Mirrors ProgramGym's ``Evaluator`` pipeline as closely as a single-container,
|
| 5 |
+
no-Docker-in-Docker host allows. Run from ``tests/test.sh`` inside the agent's
|
| 6 |
+
cleanroom container after Harbor flips the verifier-phase network policy.
|
| 7 |
+
|
| 8 |
+
Differences from ``programgym.eval.eval.Evaluator`` that are structural to
|
| 9 |
+
running in one container:
|
| 10 |
+
|
| 11 |
+
* No fresh container per branch. ``snapshot_workspace`` / ``restore_workspace``
|
| 12 |
+
copy a post-compile workspace snapshot to a temp directory and restore it
|
| 13 |
+
before each branch; ``cleanup_lingering_processes`` kills leftover branch
|
| 14 |
+
processes between attempts to approximate the fresh-container boundary.
|
| 15 |
+
* No ``docker commit``. The post-compile workspace snapshot serves the same
|
| 16 |
+
role as the committed image upstream.
|
| 17 |
+
* Hidden test blobs are fetched on demand from HuggingFace via
|
| 18 |
+
``huggingface_hub.snapshot_download`` (matching ``programgym.utils.blob_store``)
|
| 19 |
+
rather than being pre-staged into ``/tests/blobs/``. Override with
|
| 20 |
+
``PROGRAMGYM_BLOB_DIR`` for offline reruns.
|
| 21 |
+
|
| 22 |
+
Everything else (eval_clean_hashes scrub, deterministic synthetic git seed,
|
| 23 |
+
``compile.sh`` then stash + hash the executable, best-effort
|
| 24 |
+
``pytest-rerunfailures``, per-branch test-tar overlay, executable hash
|
| 25 |
+
``--max-worker-restart=4``, xdist worker-crash retry with serial fallback,
|
| 26 |
+
best-of-N attempt selection, active vs ignored test bookkeeping, scoring) is
|
| 27 |
+
preserved.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import re
|
| 36 |
+
import shlex
|
| 37 |
+
import shutil
|
| 38 |
+
import signal
|
| 39 |
+
import subprocess
|
| 40 |
+
import tempfile
|
| 41 |
+
import time
|
| 42 |
+
import traceback
|
| 43 |
+
import xml.etree.ElementTree as ET
|
| 44 |
+
from pathlib import Path
|
| 45 |
+
from typing import Any
|
| 46 |
+
|
| 47 |
+
WORKSPACE = Path(os.environ.get("PROGRAMGYM_WORKSPACE", "/workspace"))
|
| 48 |
+
STASHED_EXECUTABLE = Path("/opt/programgym-stashed-executable-do-not-modify")
|
| 49 |
+
METADATA_PATH = Path(
|
| 50 |
+
os.environ.get("PROGRAMGYM_METADATA", "/tests/programgym_task.json")
|
| 51 |
+
)
|
| 52 |
+
LOG_DIR = Path(os.environ.get("PROGRAMGYM_LOG_DIR", "/logs/verifier"))
|
| 53 |
+
WORKER_CRASH_PHRASE = "worker '"
|
| 54 |
+
XDIST_COLLAPSE_MARKERS = (
|
| 55 |
+
"maximum crashed workers reached",
|
| 56 |
+
"xdist: maximum crashed",
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
DEFAULT_HF_REPO_ID = "programgym/ProgramGym-Tests"
|
| 60 |
+
DEFAULT_HF_REVISION = "main"
|
| 61 |
+
|
| 62 |
+
# Oracle agent handoff files (see solution/solve.sh). Must not appear in the
|
| 63 |
+
# post-compile workspace snapshot or they pollute tree-scanning tests (dutree).
|
| 64 |
+
_ORACLE_HANDOFF_NAMES = (".programgym_oracle_reference",)
|
| 65 |
+
|
| 66 |
+
_TOOLCHAIN_BIN_DIR_CANDIDATES = (
|
| 67 |
+
"/usr/local/go/bin",
|
| 68 |
+
"/go/bin",
|
| 69 |
+
"/usr/local/cargo/bin",
|
| 70 |
+
"/root/.cargo/bin",
|
| 71 |
+
"/root/.ghcup/bin",
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def toolchain_bin_dirs() -> list[str]:
|
| 76 |
+
"""Return toolchain bin directories that exist on this image."""
|
| 77 |
+
candidates = list(_TOOLCHAIN_BIN_DIR_CANDIDATES)
|
| 78 |
+
candidates.extend(
|
| 79 |
+
str(path)
|
| 80 |
+
for path in sorted(Path("/usr/lib").glob("go-*/bin"))
|
| 81 |
+
if _is_accessible_dir(path)
|
| 82 |
+
)
|
| 83 |
+
seen: set[str] = set()
|
| 84 |
+
present: list[str] = []
|
| 85 |
+
for path in candidates:
|
| 86 |
+
if path in seen:
|
| 87 |
+
continue
|
| 88 |
+
seen.add(path)
|
| 89 |
+
if _is_accessible_dir(path):
|
| 90 |
+
present.append(path)
|
| 91 |
+
return present
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _is_accessible_dir(path: str | Path) -> bool:
|
| 95 |
+
"""Return whether path is a directory without failing on protected homes."""
|
| 96 |
+
try:
|
| 97 |
+
return Path(path).is_dir()
|
| 98 |
+
except OSError:
|
| 99 |
+
return False
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def bootstrap_toolchain_path() -> str:
|
| 103 |
+
"""Prepend discovered toolchain dirs to PATH (idempotent)."""
|
| 104 |
+
prepend = toolchain_bin_dirs()
|
| 105 |
+
current_parts = [part for part in os.environ.get("PATH", "").split(":") if part]
|
| 106 |
+
merged: list[str] = []
|
| 107 |
+
for path in prepend + current_parts:
|
| 108 |
+
if path not in merged:
|
| 109 |
+
merged.append(path)
|
| 110 |
+
new_path = ":".join(merged)
|
| 111 |
+
os.environ["PATH"] = new_path
|
| 112 |
+
return new_path
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _bash_login_command(command: str) -> str:
|
| 116 |
+
"""Run ``command`` under bash -lc with an explicit PATH export."""
|
| 117 |
+
path = bootstrap_toolchain_path()
|
| 118 |
+
return f"export PATH={shlex.quote(path)}; {command}"
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def sha256(path: Path) -> str:
|
| 122 |
+
h = hashlib.sha256()
|
| 123 |
+
with path.open("rb") as f:
|
| 124 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 125 |
+
h.update(chunk)
|
| 126 |
+
return h.hexdigest()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def write_json(path: Path, data: dict[str, Any]) -> None:
|
| 130 |
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
| 131 |
+
tmp.write_text(json.dumps(data, indent=2, sort_keys=True))
|
| 132 |
+
tmp.replace(path)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def _read_log_tail(path: Path | None, max_bytes: int = 65536) -> str:
|
| 136 |
+
if path is None or not path.exists():
|
| 137 |
+
return ""
|
| 138 |
+
data = path.read_bytes()
|
| 139 |
+
if len(data) <= max_bytes:
|
| 140 |
+
return data.decode(errors="replace")
|
| 141 |
+
return data[-max_bytes:].decode(errors="replace")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def _close_pipes(proc: subprocess.Popen[Any]) -> None:
|
| 145 |
+
for stream in (proc.stdout, proc.stderr):
|
| 146 |
+
if stream is not None:
|
| 147 |
+
try:
|
| 148 |
+
stream.close()
|
| 149 |
+
except OSError:
|
| 150 |
+
pass
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _terminate_process_tree(proc: subprocess.Popen[Any]) -> None:
|
| 154 |
+
try:
|
| 155 |
+
os.killpg(proc.pid, signal.SIGKILL)
|
| 156 |
+
except ProcessLookupError:
|
| 157 |
+
pass
|
| 158 |
+
try:
|
| 159 |
+
proc.kill()
|
| 160 |
+
except ProcessLookupError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
_PKILL_PATTERNS = (
|
| 165 |
+
f"{WORKSPACE}/eval/",
|
| 166 |
+
f"{WORKSPACE}/tests/",
|
| 167 |
+
"tail -f",
|
| 168 |
+
"development.log",
|
| 169 |
+
" less ",
|
| 170 |
+
" less$",
|
| 171 |
+
"/less ",
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def _pkill_aggressive() -> str:
|
| 176 |
+
"""Best-effort kill of branch pytest/subprocess trees (Modal gVisor fallback)."""
|
| 177 |
+
notes: list[str] = []
|
| 178 |
+
workspace = str(WORKSPACE)
|
| 179 |
+
patterns = list(_PKILL_PATTERNS) + [
|
| 180 |
+
f"pytest.*{workspace}",
|
| 181 |
+
f"xdist.*{workspace}",
|
| 182 |
+
]
|
| 183 |
+
for pattern in patterns:
|
| 184 |
+
result = subprocess.run(
|
| 185 |
+
["pkill", "-9", "-f", pattern],
|
| 186 |
+
capture_output=True,
|
| 187 |
+
text=True,
|
| 188 |
+
)
|
| 189 |
+
notes.append(f"pkill -9 -f {pattern!r}: rc={result.returncode}")
|
| 190 |
+
return "\n".join(notes)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def run_step(
|
| 194 |
+
command: str,
|
| 195 |
+
cwd: Path,
|
| 196 |
+
*,
|
| 197 |
+
timeout: int,
|
| 198 |
+
env: dict[str, str] | None = None,
|
| 199 |
+
step: str,
|
| 200 |
+
accept_failure: bool = False,
|
| 201 |
+
log_output: bool | None = None,
|
| 202 |
+
max_output_bytes: int = 65536,
|
| 203 |
+
) -> dict[str, Any]:
|
| 204 |
+
if log_output is None:
|
| 205 |
+
log_output = step == "run_tests" or timeout >= 60
|
| 206 |
+
|
| 207 |
+
started = time.monotonic()
|
| 208 |
+
stdout_path: Path | None = None
|
| 209 |
+
stderr_path: Path | None = None
|
| 210 |
+
stdout_f = None
|
| 211 |
+
stderr_f = None
|
| 212 |
+
|
| 213 |
+
if log_output:
|
| 214 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 215 |
+
log_id = f"{step}-{int(started * 1000)}"
|
| 216 |
+
stdout_path = LOG_DIR / f"run-step-{log_id}.stdout.log"
|
| 217 |
+
stderr_path = LOG_DIR / f"run-step-{log_id}.stderr.log"
|
| 218 |
+
stdout_f = stdout_path.open("w", encoding="utf-8")
|
| 219 |
+
stderr_f = stderr_path.open("w", encoding="utf-8")
|
| 220 |
+
popen_stdout: Any = stdout_f
|
| 221 |
+
popen_stderr: Any = stderr_f
|
| 222 |
+
else:
|
| 223 |
+
popen_stdout = subprocess.PIPE
|
| 224 |
+
popen_stderr = subprocess.PIPE
|
| 225 |
+
|
| 226 |
+
proc = subprocess.Popen(
|
| 227 |
+
["bash", "-lc", _bash_login_command(command)],
|
| 228 |
+
cwd=cwd,
|
| 229 |
+
env={**os.environ, **(env or {})},
|
| 230 |
+
stdout=popen_stdout,
|
| 231 |
+
stderr=popen_stderr,
|
| 232 |
+
start_new_session=True,
|
| 233 |
+
text=True,
|
| 234 |
+
)
|
| 235 |
+
timed_out = False
|
| 236 |
+
stdout = ""
|
| 237 |
+
stderr = ""
|
| 238 |
+
try:
|
| 239 |
+
if log_output:
|
| 240 |
+
proc.wait(timeout=timeout)
|
| 241 |
+
else:
|
| 242 |
+
stdout, stderr = proc.communicate(timeout=timeout)
|
| 243 |
+
except subprocess.TimeoutExpired:
|
| 244 |
+
timed_out = True
|
| 245 |
+
_terminate_process_tree(proc)
|
| 246 |
+
cleanup_lingering_processes(aggressive=True)
|
| 247 |
+
try:
|
| 248 |
+
proc.wait(timeout=5)
|
| 249 |
+
except subprocess.TimeoutExpired:
|
| 250 |
+
proc.kill()
|
| 251 |
+
if not log_output:
|
| 252 |
+
_close_pipes(proc)
|
| 253 |
+
finally:
|
| 254 |
+
if stdout_f is not None:
|
| 255 |
+
stdout_f.close()
|
| 256 |
+
if stderr_f is not None:
|
| 257 |
+
stderr_f.close()
|
| 258 |
+
|
| 259 |
+
if timed_out:
|
| 260 |
+
if log_output:
|
| 261 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 262 |
+
stderr_path, max_output_bytes
|
| 263 |
+
)
|
| 264 |
+
else:
|
| 265 |
+
output = ""
|
| 266 |
+
entry = {
|
| 267 |
+
"step": step,
|
| 268 |
+
"command": command,
|
| 269 |
+
"wall_time": time.monotonic() - started,
|
| 270 |
+
"output": output,
|
| 271 |
+
"returncode": 124,
|
| 272 |
+
"exception_info": f"timed out after {timeout}s",
|
| 273 |
+
}
|
| 274 |
+
else:
|
| 275 |
+
if log_output:
|
| 276 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 277 |
+
stderr_path, max_output_bytes
|
| 278 |
+
)
|
| 279 |
+
else:
|
| 280 |
+
output = stdout + stderr
|
| 281 |
+
entry = {
|
| 282 |
+
"step": step,
|
| 283 |
+
"command": command,
|
| 284 |
+
"wall_time": time.monotonic() - started,
|
| 285 |
+
"output": output,
|
| 286 |
+
"returncode": proc.returncode,
|
| 287 |
+
"exception_info": "",
|
| 288 |
+
}
|
| 289 |
+
if entry["returncode"] and not accept_failure:
|
| 290 |
+
raise RuntimeError(
|
| 291 |
+
f"{step} failed: {entry['exception_info'] or entry['output']}"
|
| 292 |
+
)
|
| 293 |
+
return entry
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def cleanup_lingering_processes(*, aggressive: bool = False) -> dict[str, Any]:
|
| 297 |
+
started = time.monotonic()
|
| 298 |
+
patterns = [
|
| 299 |
+
str(WORKSPACE / "executable"),
|
| 300 |
+
f"{WORKSPACE}/eval/",
|
| 301 |
+
f"{WORKSPACE}/tests/",
|
| 302 |
+
# lazygit --logs/-l tests spawn `tail -f` outside /workspace/.
|
| 303 |
+
"tail -f",
|
| 304 |
+
"development.log",
|
| 305 |
+
]
|
| 306 |
+
killed: list[int] = []
|
| 307 |
+
proc_root = Path("/proc")
|
| 308 |
+
proc_available = proc_root.exists()
|
| 309 |
+
if proc_available:
|
| 310 |
+
for proc_dir in proc_root.iterdir():
|
| 311 |
+
if not proc_dir.name.isdigit():
|
| 312 |
+
continue
|
| 313 |
+
pid = int(proc_dir.name)
|
| 314 |
+
if pid in {os.getpid(), os.getppid()}:
|
| 315 |
+
continue
|
| 316 |
+
try:
|
| 317 |
+
raw = (proc_dir / "cmdline").read_bytes()
|
| 318 |
+
except (FileNotFoundError, PermissionError, ProcessLookupError):
|
| 319 |
+
continue
|
| 320 |
+
cmdline = raw.replace(b"\0", b" ").decode(errors="replace")
|
| 321 |
+
if not any(pattern in cmdline for pattern in patterns):
|
| 322 |
+
continue
|
| 323 |
+
try:
|
| 324 |
+
os.kill(pid, signal.SIGKILL)
|
| 325 |
+
except (PermissionError, ProcessLookupError):
|
| 326 |
+
continue
|
| 327 |
+
killed.append(pid)
|
| 328 |
+
pkill_output = ""
|
| 329 |
+
if aggressive or not proc_available:
|
| 330 |
+
pkill_output = _pkill_aggressive()
|
| 331 |
+
output_parts = []
|
| 332 |
+
if killed:
|
| 333 |
+
output_parts.append("\n".join(str(pid) for pid in killed))
|
| 334 |
+
if pkill_output:
|
| 335 |
+
output_parts.append(pkill_output)
|
| 336 |
+
return {
|
| 337 |
+
"step": "cleanup_lingering_processes",
|
| 338 |
+
"command": "kill leftover branch processes referencing the workspace",
|
| 339 |
+
"wall_time": time.monotonic() - started,
|
| 340 |
+
"output": "\n".join(output_parts),
|
| 341 |
+
"returncode": 0,
|
| 342 |
+
"exception_info": "",
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
def extract_trusted_blob(tar_path: Path, dest: Path) -> None:
|
| 347 |
+
import tarfile
|
| 348 |
+
|
| 349 |
+
with tarfile.open(tar_path, "r:gz") as tf:
|
| 350 |
+
try:
|
| 351 |
+
tf.extractall(dest, filter="fully_trusted")
|
| 352 |
+
except TypeError:
|
| 353 |
+
tf.extractall(dest)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def find_results_xml() -> Path | None:
|
| 357 |
+
"""Return the junit xml path if pytest wrote one."""
|
| 358 |
+
for candidate in (WORKSPACE / "eval" / "results.xml", WORKSPACE / "results.xml"):
|
| 359 |
+
if candidate.exists():
|
| 360 |
+
return candidate
|
| 361 |
+
return None
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def remove_oracle_handoff_artifacts() -> list[str]:
|
| 365 |
+
"""Drop oracle-agent handoff files from /workspace before snapshot/restore."""
|
| 366 |
+
removed: list[str] = []
|
| 367 |
+
for name in _ORACLE_HANDOFF_NAMES:
|
| 368 |
+
path = WORKSPACE / name
|
| 369 |
+
if path.exists():
|
| 370 |
+
if path.is_dir():
|
| 371 |
+
shutil.rmtree(path)
|
| 372 |
+
else:
|
| 373 |
+
path.unlink()
|
| 374 |
+
removed.append(name)
|
| 375 |
+
return removed
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def _remove_tree(path: Path) -> None:
|
| 379 |
+
"""Remove a file or directory tree, with a shell fallback for overlay races."""
|
| 380 |
+
if path.is_symlink() or path.is_file():
|
| 381 |
+
path.unlink(missing_ok=True)
|
| 382 |
+
return
|
| 383 |
+
if not path.is_dir():
|
| 384 |
+
path.unlink(missing_ok=True)
|
| 385 |
+
return
|
| 386 |
+
for attempt in range(3):
|
| 387 |
+
try:
|
| 388 |
+
shutil.rmtree(path)
|
| 389 |
+
if not path.exists():
|
| 390 |
+
return
|
| 391 |
+
except OSError:
|
| 392 |
+
if attempt == 2:
|
| 393 |
+
run_step(
|
| 394 |
+
f"rm -rf {shlex.quote(str(path))}",
|
| 395 |
+
path.parent,
|
| 396 |
+
timeout=120,
|
| 397 |
+
step="clear_workspace_fallback",
|
| 398 |
+
accept_failure=True,
|
| 399 |
+
)
|
| 400 |
+
if not path.exists():
|
| 401 |
+
return
|
| 402 |
+
raise
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
def ensure_workspace_dir() -> None:
|
| 406 |
+
"""Guarantee WORKSPACE exists as a writable directory (not a symlink/file)."""
|
| 407 |
+
if WORKSPACE.exists() and not WORKSPACE.is_dir():
|
| 408 |
+
if WORKSPACE.is_symlink() or WORKSPACE.is_file():
|
| 409 |
+
WORKSPACE.unlink()
|
| 410 |
+
else:
|
| 411 |
+
shutil.rmtree(WORKSPACE)
|
| 412 |
+
WORKSPACE.mkdir(parents=True, exist_ok=True)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def clear_workspace() -> None:
|
| 416 |
+
ensure_workspace_dir()
|
| 417 |
+
for path in list(WORKSPACE.iterdir()):
|
| 418 |
+
_remove_tree(path)
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
def restore_reference_executable() -> None:
|
| 422 |
+
"""Write the stashed reference binary into /workspace after a branch overlay.
|
| 423 |
+
|
| 424 |
+
Branch blobs may ship ``executable`` as a dangling symlink into
|
| 425 |
+
``target/release/...``; ``shutil.copy2`` would follow it and raise
|
| 426 |
+
``FileNotFoundError``. Drop whatever the blob left and copy the stashed
|
| 427 |
+
reference as a regular file.
|
| 428 |
+
"""
|
| 429 |
+
ensure_workspace_dir()
|
| 430 |
+
if not STASHED_EXECUTABLE.is_file():
|
| 431 |
+
raise FileNotFoundError(
|
| 432 |
+
f"missing stashed reference executable at {STASHED_EXECUTABLE}"
|
| 433 |
+
)
|
| 434 |
+
dest = WORKSPACE / "executable"
|
| 435 |
+
if dest.exists() or dest.is_symlink():
|
| 436 |
+
if dest.is_dir():
|
| 437 |
+
shutil.rmtree(dest)
|
| 438 |
+
else:
|
| 439 |
+
dest.unlink(missing_ok=True)
|
| 440 |
+
shutil.copy2(STASHED_EXECUTABLE, dest)
|
| 441 |
+
dest.chmod(0o755)
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
def snapshot_workspace(dest: Path) -> None:
|
| 445 |
+
if dest.exists():
|
| 446 |
+
shutil.rmtree(dest)
|
| 447 |
+
shutil.copytree(WORKSPACE, dest, symlinks=True)
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def restore_workspace(source: Path) -> None:
|
| 451 |
+
clear_workspace()
|
| 452 |
+
shutil.copytree(source, WORKSPACE, dirs_exist_ok=True, symlinks=True)
|
| 453 |
+
ensure_workspace_dir()
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def remove_hashed_files(root: Path, hashes: set[str]) -> list[str]:
|
| 457 |
+
removed: list[str] = []
|
| 458 |
+
for path in root.rglob("*"):
|
| 459 |
+
if path.is_file() and not path.is_symlink():
|
| 460 |
+
try:
|
| 461 |
+
if sha256(path) in hashes:
|
| 462 |
+
path.unlink()
|
| 463 |
+
removed.append(str(path.relative_to(root)))
|
| 464 |
+
except OSError:
|
| 465 |
+
continue
|
| 466 |
+
return removed
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
def branch_tests(branch_info: dict[str, Any]) -> list[str]:
|
| 470 |
+
ignored = {
|
| 471 |
+
item["name"] for item in branch_info.get("ignored_tests", []) if "name" in item
|
| 472 |
+
}
|
| 473 |
+
return [name for name in branch_info.get("tests", []) if name not in ignored]
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
def ignored_tests(metadata: dict[str, Any]) -> set[str]:
|
| 477 |
+
result: set[str] = set()
|
| 478 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 479 |
+
result.update(
|
| 480 |
+
f"{branch}/{item['name']}"
|
| 481 |
+
for item in info.get("ignored_tests", [])
|
| 482 |
+
if "name" in item
|
| 483 |
+
)
|
| 484 |
+
return result
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def active_tests(metadata: dict[str, Any]) -> set[str]:
|
| 488 |
+
active: set[str] = set()
|
| 489 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 490 |
+
if info.get("ignored"):
|
| 491 |
+
continue
|
| 492 |
+
ignored = {
|
| 493 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 494 |
+
}
|
| 495 |
+
active.update(
|
| 496 |
+
f"{branch}/{name}" for name in info.get("tests", []) if name not in ignored
|
| 497 |
+
)
|
| 498 |
+
return active
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def inject_not_run(
|
| 502 |
+
result: dict[str, Any], branch: str, tests: list[str], error_code: str
|
| 503 |
+
) -> None:
|
| 504 |
+
result["test_results"].extend(
|
| 505 |
+
{
|
| 506 |
+
"name": name,
|
| 507 |
+
"branch": branch,
|
| 508 |
+
"status": "not_run",
|
| 509 |
+
"extra": {"error_code": error_code},
|
| 510 |
+
}
|
| 511 |
+
for name in tests
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def testcase_name(case: ET.Element) -> str:
|
| 516 |
+
classname = case.attrib.get("classname", "")
|
| 517 |
+
name = case.attrib.get("name", "")
|
| 518 |
+
return f"{classname}.{name}" if classname else name
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
# Only these tags under <testcase> represent a result. <system-out> /
|
| 522 |
+
# <system-err> are stdout/stderr captures and must not be treated as results
|
| 523 |
+
# (a leading <system-out> followed by <failure> would otherwise be classified
|
| 524 |
+
# as a stdout-only "passed").
|
| 525 |
+
JUNIT_RESULT_TAGS = {"skipped", "failure", "error"}
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def parse_junit(
|
| 529 |
+
raw_xml: str, branch: str, expected: list[str], ignored: set[str]
|
| 530 |
+
) -> tuple[list[dict[str, Any]], list[str]]:
|
| 531 |
+
root = ET.fromstring(raw_xml)
|
| 532 |
+
got: set[str] = set()
|
| 533 |
+
results: list[dict[str, Any]] = []
|
| 534 |
+
for case in root.iter("testcase"):
|
| 535 |
+
name = testcase_name(case)
|
| 536 |
+
got.add(name)
|
| 537 |
+
extra: dict[str, Any] = {}
|
| 538 |
+
if "time" in case.attrib:
|
| 539 |
+
try:
|
| 540 |
+
extra["time"] = float(case.attrib["time"])
|
| 541 |
+
except ValueError:
|
| 542 |
+
extra["time"] = case.attrib["time"]
|
| 543 |
+
result_children = [c for c in case if c.tag in JUNIT_RESULT_TAGS]
|
| 544 |
+
# Collapse duplicate same-tag result children. Pytest's
|
| 545 |
+
# "pytest.internal" pseudo-test sometimes emits two identical <error>
|
| 546 |
+
# entries; treating that as a system_error would over-flag a real
|
| 547 |
+
# single failure. Mirrors upstream eval.py:816-820.
|
| 548 |
+
if len(result_children) > 1 and len({c.tag for c in result_children}) == 1:
|
| 549 |
+
result_children = [result_children[0]]
|
| 550 |
+
if not result_children:
|
| 551 |
+
status = "passed"
|
| 552 |
+
elif len(result_children) != 1:
|
| 553 |
+
status = "system_error"
|
| 554 |
+
extra["error_details"] = (
|
| 555 |
+
f"Expected 1 result for {name}, got {len(result_children)}: "
|
| 556 |
+
f"{[c.tag for c in result_children]}"
|
| 557 |
+
)
|
| 558 |
+
else:
|
| 559 |
+
first = result_children[0]
|
| 560 |
+
status = first.tag # "skipped" | "failure" | "error"
|
| 561 |
+
extra["message"] = first.attrib.get("message") or ""
|
| 562 |
+
if first.text:
|
| 563 |
+
extra["text"] = first.text
|
| 564 |
+
results.append(
|
| 565 |
+
{"name": name, "branch": branch, "status": status, "extra": extra}
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
active_expected = [name for name in expected if name not in ignored]
|
| 569 |
+
missing = [name for name in active_expected if name not in got]
|
| 570 |
+
results.extend(
|
| 571 |
+
{
|
| 572 |
+
"name": name,
|
| 573 |
+
"branch": branch,
|
| 574 |
+
"status": "not_run",
|
| 575 |
+
"extra": {"error_code": "missing_from_junit_xml"},
|
| 576 |
+
}
|
| 577 |
+
for name in missing
|
| 578 |
+
)
|
| 579 |
+
unexpected = got - set(expected) - ignored
|
| 580 |
+
warnings = (
|
| 581 |
+
[f"Branch {branch}: {len(unexpected)} test(s) in JUnit XML not in tests.json"]
|
| 582 |
+
if unexpected
|
| 583 |
+
else []
|
| 584 |
+
)
|
| 585 |
+
return results, warnings
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
def count_worker_crashes(raw_xml: str) -> int:
|
| 589 |
+
if WORKER_CRASH_PHRASE not in raw_xml:
|
| 590 |
+
return 0
|
| 591 |
+
try:
|
| 592 |
+
root = ET.fromstring(raw_xml)
|
| 593 |
+
except ET.ParseError:
|
| 594 |
+
return 0
|
| 595 |
+
crashes = 0
|
| 596 |
+
for case in root.iter("testcase"):
|
| 597 |
+
for child in case:
|
| 598 |
+
text = (child.get("message") or "") + " " + (child.text or "")
|
| 599 |
+
if (
|
| 600 |
+
child.tag in {"error", "failure"}
|
| 601 |
+
and WORKER_CRASH_PHRASE in text
|
| 602 |
+
and "crashed" in text
|
| 603 |
+
):
|
| 604 |
+
crashes += 1
|
| 605 |
+
break
|
| 606 |
+
return crashes
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def run_output_indicates_xdist_collapse(output: str) -> bool:
|
| 610 |
+
lower = output.lower()
|
| 611 |
+
return any(marker in lower for marker in XDIST_COLLAPSE_MARKERS)
|
| 612 |
+
|
| 613 |
+
|
| 614 |
+
def count_junit_failures(raw_xml: str) -> int:
|
| 615 |
+
try:
|
| 616 |
+
root = ET.fromstring(raw_xml)
|
| 617 |
+
except ET.ParseError:
|
| 618 |
+
return 0
|
| 619 |
+
failures = 0
|
| 620 |
+
for case in root.iter("testcase"):
|
| 621 |
+
for child in case:
|
| 622 |
+
if child.tag in {"failure", "error"}:
|
| 623 |
+
failures += 1
|
| 624 |
+
break
|
| 625 |
+
return failures
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
def count_junit_passed(raw_xml: str) -> int:
|
| 629 |
+
try:
|
| 630 |
+
root = ET.fromstring(raw_xml)
|
| 631 |
+
except ET.ParseError:
|
| 632 |
+
return 0
|
| 633 |
+
passed = 0
|
| 634 |
+
for case in root.iter("testcase"):
|
| 635 |
+
if not any(child.tag in JUNIT_RESULT_TAGS for child in case):
|
| 636 |
+
passed += 1
|
| 637 |
+
return passed
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def branch_attempt_metrics(
|
| 641 |
+
raw_xml: str, *, run_output: str, expected_tests: int
|
| 642 |
+
) -> tuple[int, int, int, int]:
|
| 643 |
+
"""Return (crashes, n_testcases, failures, missing_from_xml)."""
|
| 644 |
+
crashes = count_worker_crashes(raw_xml)
|
| 645 |
+
if run_output_indicates_xdist_collapse(run_output):
|
| 646 |
+
crashes = max(crashes, 1)
|
| 647 |
+
n_tests = count_testcases(raw_xml)
|
| 648 |
+
failures = count_junit_failures(raw_xml)
|
| 649 |
+
missing = max(0, expected_tests - n_tests)
|
| 650 |
+
return crashes, n_tests, failures, missing
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def needs_serial_retry(
|
| 654 |
+
*,
|
| 655 |
+
serial: bool,
|
| 656 |
+
crashes: int,
|
| 657 |
+
missing: int,
|
| 658 |
+
failures: int,
|
| 659 |
+
n_tests: int,
|
| 660 |
+
expected_tests: int,
|
| 661 |
+
run_output: str,
|
| 662 |
+
) -> bool:
|
| 663 |
+
if serial:
|
| 664 |
+
return False
|
| 665 |
+
high_failure_rate = (
|
| 666 |
+
expected_tests > 0 and n_tests >= expected_tests and failures / n_tests >= 0.8
|
| 667 |
+
)
|
| 668 |
+
return (
|
| 669 |
+
crashes > 0
|
| 670 |
+
or missing > 0
|
| 671 |
+
or high_failure_rate
|
| 672 |
+
or run_output_indicates_xdist_collapse(run_output)
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def count_testcases(raw_xml: str) -> int:
|
| 677 |
+
try:
|
| 678 |
+
return sum(1 for _ in ET.fromstring(raw_xml).iter("testcase"))
|
| 679 |
+
except ET.ParseError:
|
| 680 |
+
return 0
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def scored_results(
|
| 684 |
+
result: dict[str, Any], metadata: dict[str, Any]
|
| 685 |
+
) -> list[dict[str, Any]]:
|
| 686 |
+
active = active_tests(metadata)
|
| 687 |
+
by_key = {
|
| 688 |
+
f"{test['branch']}/{test['name']}": test
|
| 689 |
+
for test in result["test_results"]
|
| 690 |
+
if f"{test['branch']}/{test['name']}" in active
|
| 691 |
+
}
|
| 692 |
+
return [
|
| 693 |
+
by_key.get(
|
| 694 |
+
key,
|
| 695 |
+
{
|
| 696 |
+
"branch": key.split("/", 1)[0],
|
| 697 |
+
"name": key.split("/", 1)[1],
|
| 698 |
+
"status": "not_run",
|
| 699 |
+
"extra": {"error_code": "missing_from_results"},
|
| 700 |
+
},
|
| 701 |
+
)
|
| 702 |
+
for key in sorted(active)
|
| 703 |
+
]
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def summarize(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 707 |
+
scored = scored_results(result, metadata)
|
| 708 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 709 |
+
n_tests = len(scored)
|
| 710 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 711 |
+
# Multi-key reward: Harbor's default Mean aggregates each key independently
|
| 712 |
+
# (see harbor.metrics.base.aggregate_reward_dicts), so mean("resolved") is
|
| 713 |
+
# the proportion of tasks scoring a perfect pass-rate and mean of
|
| 714 |
+
# "almost_resolved" is the proportion scoring >= 0.95. "reward" stays the
|
| 715 |
+
# per-task pass-rate whose mean is the overall mean reward.
|
| 716 |
+
return {
|
| 717 |
+
"reward": pass_rate,
|
| 718 |
+
"resolved": 1.0 if pass_rate >= 1.0 else 0.0,
|
| 719 |
+
"almost_resolved": 1.0 if pass_rate >= 0.95 else 0.0,
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
def diagnostics(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 724 |
+
scored = scored_results(result, metadata)
|
| 725 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 726 |
+
n_tests = len(scored)
|
| 727 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 728 |
+
return {
|
| 729 |
+
"pass_rate": pass_rate,
|
| 730 |
+
"resolved": int(
|
| 731 |
+
bool(
|
| 732 |
+
n_tests
|
| 733 |
+
and n_passed == n_tests
|
| 734 |
+
and not result["test_branch_errors"]
|
| 735 |
+
and not result["error_code"]
|
| 736 |
+
)
|
| 737 |
+
),
|
| 738 |
+
"n_passed": n_passed,
|
| 739 |
+
"n_tests": n_tests,
|
| 740 |
+
"n_branch_errors": len(result["test_branch_errors"]),
|
| 741 |
+
"infra_error": int(bool(result["error_code"] or result["test_branch_errors"])),
|
| 742 |
+
"executable_hash_present": int(bool(result.get("executable_hash"))),
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def use_script_pty() -> bool:
|
| 747 |
+
return os.environ.get("PROGRAMGYM_SCRIPT_PTY", "").strip() == "1"
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def script_pty_available() -> bool:
|
| 751 |
+
return shutil.which("script") is not None
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
def branch_env(
|
| 755 |
+
*,
|
| 756 |
+
serial: bool,
|
| 757 |
+
has_rerunfailures: bool,
|
| 758 |
+
extras: dict[str, str] | None = None,
|
| 759 |
+
) -> dict[str, str]:
|
| 760 |
+
addopts = ["--max-worker-restart=4"]
|
| 761 |
+
# A serial fallback is already a complete second execution. Re-running each
|
| 762 |
+
# failing test two more times makes large, failure-heavy suites prohibitively
|
| 763 |
+
# slow and adds little signal.
|
| 764 |
+
if has_rerunfailures and not serial:
|
| 765 |
+
addopts.extend(["--reruns=2", "--reruns-delay=1"])
|
| 766 |
+
env = {
|
| 767 |
+
"PYTEST_ADDOPTS": " ".join(addopts),
|
| 768 |
+
# Match upstream non-TTY regression environments (dirble log format, etc.).
|
| 769 |
+
"NO_COLOR": "1",
|
| 770 |
+
"TERM": "dumb",
|
| 771 |
+
"CLICOLOR": "0",
|
| 772 |
+
"CLICOLOR_FORCE": "0",
|
| 773 |
+
"COLORTERM": "",
|
| 774 |
+
}
|
| 775 |
+
if extras:
|
| 776 |
+
env.update(extras)
|
| 777 |
+
xdist_workers = os.environ.get("PROGRAMGYM_XDIST_WORKERS")
|
| 778 |
+
if serial:
|
| 779 |
+
xdist_workers = "1"
|
| 780 |
+
if xdist_workers:
|
| 781 |
+
env["PYTEST_XDIST_AUTO_NUM_WORKERS"] = xdist_workers
|
| 782 |
+
return env
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
_SERIAL_RUN_SH = ".programgym_run_serial.sh"
|
| 786 |
+
# ``eval/run.sh`` usually passes ``-n auto`` on the command line, which overrides
|
| 787 |
+
# ``PYTEST_ADDOPTS``. Rewrite to ``-n 0`` in a verifier-local copy for retries.
|
| 788 |
+
_RUN_SH_XDIST_RE = re.compile(r"-n\s*(?:auto|\d+)")
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
def prepare_serial_run_sh(run_sh: Path) -> Path:
|
| 792 |
+
"""Write a serial-only copy of ``eval/run.sh`` with xdist disabled."""
|
| 793 |
+
serial_sh = run_sh.with_name(_SERIAL_RUN_SH)
|
| 794 |
+
patched = _RUN_SH_XDIST_RE.sub("-n 0", run_sh.read_text())
|
| 795 |
+
serial_sh.write_text(patched)
|
| 796 |
+
serial_sh.chmod(0o755)
|
| 797 |
+
return serial_sh
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
def run_tests_command(*, serial: bool) -> str:
|
| 801 |
+
if serial:
|
| 802 |
+
inner = f"chmod +x ./eval/{_SERIAL_RUN_SH} && ./eval/{_SERIAL_RUN_SH}"
|
| 803 |
+
else:
|
| 804 |
+
inner = "chmod +x ./eval/run.sh && ./eval/run.sh"
|
| 805 |
+
if use_script_pty() and script_pty_available():
|
| 806 |
+
return f"script -q -c {shlex.quote(inner)} /dev/null"
|
| 807 |
+
return inner
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
BAKED_BLOB_DIR = Path(os.environ.get("PROGRAMGYM_BAKED_BLOB_DIR", "/tests/blobs"))
|
| 811 |
+
|
| 812 |
+
|
| 813 |
+
def resolve_blob_dir(instance_id: str, metadata: dict[str, Any]) -> Path:
|
| 814 |
+
"""Locate the per-instance blob directory.
|
| 815 |
+
|
| 816 |
+
Resolution order:
|
| 817 |
+
|
| 818 |
+
1. ``/tests/blobs/`` if pre-fetched into the task at generation time
|
| 819 |
+
(``programgym-adapter --download-blobs``). Verifier-only mount, so
|
| 820 |
+
agent never sees these.
|
| 821 |
+
2. ``PROGRAMGYM_BLOB_DIR`` env override pointing at an HF-cache-shaped
|
| 822 |
+
tree on disk (``<dir>/<instance_id>/tests/<branch>.tar.gz``). Useful
|
| 823 |
+
for offline reruns sharing a cache across many tasks.
|
| 824 |
+
3. ``huggingface_hub.snapshot_download`` from
|
| 825 |
+
``programgym/ProgramGym-Tests`` (default repo, ``main`` revision).
|
| 826 |
+
|
| 827 |
+
The returned directory contains ``tests/<branch>.tar.gz`` per active
|
| 828 |
+
branch — same shape as ``programgym/ProgramGym-Tests/<instance_id>/``
|
| 829 |
+
on HF.
|
| 830 |
+
"""
|
| 831 |
+
if BAKED_BLOB_DIR.exists() and (BAKED_BLOB_DIR / "tests").exists():
|
| 832 |
+
return BAKED_BLOB_DIR
|
| 833 |
+
|
| 834 |
+
local = os.environ.get("PROGRAMGYM_BLOB_DIR", "").strip()
|
| 835 |
+
if local:
|
| 836 |
+
candidate = Path(local) / instance_id
|
| 837 |
+
if candidate.exists():
|
| 838 |
+
return candidate
|
| 839 |
+
raise FileNotFoundError(
|
| 840 |
+
f"PROGRAMGYM_BLOB_DIR set but {candidate} does not exist"
|
| 841 |
+
)
|
| 842 |
+
|
| 843 |
+
repo_id = os.environ.get("PROGRAMGYM_HF_REPO") or metadata.get(
|
| 844 |
+
"hf_repo_id", DEFAULT_HF_REPO_ID
|
| 845 |
+
)
|
| 846 |
+
revision = os.environ.get("PROGRAMGYM_HF_REVISION") or metadata.get(
|
| 847 |
+
"hf_revision", DEFAULT_HF_REVISION
|
| 848 |
+
)
|
| 849 |
+
|
| 850 |
+
from huggingface_hub import snapshot_download
|
| 851 |
+
|
| 852 |
+
cache_root = Path(
|
| 853 |
+
snapshot_download(
|
| 854 |
+
repo_id,
|
| 855 |
+
repo_type="dataset",
|
| 856 |
+
revision=revision,
|
| 857 |
+
allow_patterns=f"{instance_id}/**",
|
| 858 |
+
)
|
| 859 |
+
)
|
| 860 |
+
blob_dir = cache_root / instance_id
|
| 861 |
+
if not blob_dir.exists():
|
| 862 |
+
raise FileNotFoundError(
|
| 863 |
+
f"HF blob directory missing for {instance_id} at {blob_dir}"
|
| 864 |
+
)
|
| 865 |
+
return blob_dir
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
def evaluate(metadata: dict[str, Any]) -> dict[str, Any]:
|
| 869 |
+
bootstrap_toolchain_path()
|
| 870 |
+
branches = metadata.get("branches", {})
|
| 871 |
+
active_branch_items = [
|
| 872 |
+
(name, info) for name, info in branches.items() if not info.get("ignored")
|
| 873 |
+
]
|
| 874 |
+
result: dict[str, Any] = {
|
| 875 |
+
"test_results": [],
|
| 876 |
+
"error_code": None,
|
| 877 |
+
"error_details": None,
|
| 878 |
+
"log": [],
|
| 879 |
+
"solution_branch": "submission",
|
| 880 |
+
"test_branches": [name for name, _ in active_branch_items],
|
| 881 |
+
"test_branch_errors": {},
|
| 882 |
+
"executable_hash": None,
|
| 883 |
+
"warnings": [],
|
| 884 |
+
}
|
| 885 |
+
|
| 886 |
+
instance_id = metadata["instance_id"]
|
| 887 |
+
|
| 888 |
+
compile_timeout = int(os.environ.get("PROGRAMGYM_COMPILE_TIMEOUT", "900"))
|
| 889 |
+
branch_timeout = int(os.environ.get("PROGRAMGYM_BRANCH_TIMEOUT", "3600"))
|
| 890 |
+
|
| 891 |
+
def fail_all(error_code: str, details: str) -> dict[str, Any]:
|
| 892 |
+
result["error_code"] = error_code
|
| 893 |
+
result["error_details"] = details
|
| 894 |
+
for branch, info in active_branch_items:
|
| 895 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 896 |
+
return result
|
| 897 |
+
|
| 898 |
+
with tempfile.TemporaryDirectory(prefix="programgym-eval-") as tmp:
|
| 899 |
+
compiled_snapshot = Path(tmp) / "compiled"
|
| 900 |
+
|
| 901 |
+
started = time.monotonic()
|
| 902 |
+
removed = remove_hashed_files(
|
| 903 |
+
WORKSPACE, set(metadata.get("eval_clean_hashes", []))
|
| 904 |
+
)
|
| 905 |
+
result["log"].append(
|
| 906 |
+
{
|
| 907 |
+
"step": "remove_hashed_files",
|
| 908 |
+
"command": "remove files matching eval_clean_hashes",
|
| 909 |
+
"wall_time": time.monotonic() - started,
|
| 910 |
+
"output": "".join(f"removed '{path}'\n" for path in removed),
|
| 911 |
+
"returncode": 0,
|
| 912 |
+
"exception_info": "",
|
| 913 |
+
}
|
| 914 |
+
)
|
| 915 |
+
|
| 916 |
+
compile_sh = WORKSPACE / "compile.sh"
|
| 917 |
+
if not compile_sh.exists():
|
| 918 |
+
return fail_all(
|
| 919 |
+
"missing_compile_sh", "submission did not contain compile.sh"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
seed = (
|
| 923 |
+
"if [ ! -d .git ]; then "
|
| 924 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 925 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 926 |
+
"git -c init.defaultBranch=gold init -q && "
|
| 927 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false add -A && "
|
| 928 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 929 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 930 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false commit -q --allow-empty -m gold; "
|
| 931 |
+
"fi"
|
| 932 |
+
)
|
| 933 |
+
try:
|
| 934 |
+
result["log"].append(
|
| 935 |
+
run_step(seed, WORKSPACE, timeout=300, step="seed_git")
|
| 936 |
+
)
|
| 937 |
+
compile_log = run_step(
|
| 938 |
+
"chmod +x ./compile.sh && ./compile.sh",
|
| 939 |
+
WORKSPACE,
|
| 940 |
+
timeout=compile_timeout,
|
| 941 |
+
step="compile",
|
| 942 |
+
accept_failure=True,
|
| 943 |
+
)
|
| 944 |
+
result["log"].append(compile_log)
|
| 945 |
+
if compile_log["returncode"]:
|
| 946 |
+
return fail_all("compile_failed", compile_log["output"])
|
| 947 |
+
executable = WORKSPACE / "executable"
|
| 948 |
+
if not executable.exists():
|
| 949 |
+
return fail_all(
|
| 950 |
+
"missing_executable",
|
| 951 |
+
"compile.sh completed but did not create ./executable",
|
| 952 |
+
)
|
| 953 |
+
STASHED_EXECUTABLE.parent.mkdir(parents=True, exist_ok=True)
|
| 954 |
+
# `move` (not copy) so /workspace doesn't keep a parallel copy of
|
| 955 |
+
# the agent's executable during the stash→restore window. Mirrors
|
| 956 |
+
# upstream `mv ./executable {STASHED}` (eval.py:472).
|
| 957 |
+
shutil.move(str(executable), STASHED_EXECUTABLE)
|
| 958 |
+
result["executable_hash"] = sha256(STASHED_EXECUTABLE)
|
| 959 |
+
result["log"].append(
|
| 960 |
+
run_step(
|
| 961 |
+
"pip3 install -q --disable-pip-version-check pytest-rerunfailures",
|
| 962 |
+
WORKSPACE,
|
| 963 |
+
timeout=120,
|
| 964 |
+
step="install_rerunfailures",
|
| 965 |
+
accept_failure=True,
|
| 966 |
+
)
|
| 967 |
+
)
|
| 968 |
+
has_rerunfailures = result["log"][-1]["returncode"] == 0
|
| 969 |
+
handoff_removed = remove_oracle_handoff_artifacts()
|
| 970 |
+
if handoff_removed:
|
| 971 |
+
result["log"].append(
|
| 972 |
+
{
|
| 973 |
+
"step": "remove_oracle_handoff",
|
| 974 |
+
"command": "remove oracle handoff artifacts from workspace",
|
| 975 |
+
"wall_time": 0.0,
|
| 976 |
+
"output": "".join(
|
| 977 |
+
f"removed '{name}'\n" for name in handoff_removed
|
| 978 |
+
),
|
| 979 |
+
"returncode": 0,
|
| 980 |
+
"exception_info": "",
|
| 981 |
+
}
|
| 982 |
+
)
|
| 983 |
+
snapshot_workspace(compiled_snapshot)
|
| 984 |
+
except Exception as exc:
|
| 985 |
+
return fail_all(type(exc).__name__, str(exc))
|
| 986 |
+
|
| 987 |
+
try:
|
| 988 |
+
blob_dir = resolve_blob_dir(instance_id, metadata)
|
| 989 |
+
except Exception as exc:
|
| 990 |
+
details = f"{type(exc).__name__}: {exc}"
|
| 991 |
+
for branch, info in active_branch_items:
|
| 992 |
+
result["test_branch_errors"][branch] = [
|
| 993 |
+
{
|
| 994 |
+
"error_code": "blob_resolution_failed",
|
| 995 |
+
"error_details": details,
|
| 996 |
+
}
|
| 997 |
+
]
|
| 998 |
+
inject_not_run(
|
| 999 |
+
result, branch, branch_tests(info), "blob_resolution_failed"
|
| 1000 |
+
)
|
| 1001 |
+
return result
|
| 1002 |
+
|
| 1003 |
+
for branch, info in active_branch_items:
|
| 1004 |
+
tests = branch_tests(info)
|
| 1005 |
+
blob = blob_dir / "tests" / f"{branch}.tar.gz"
|
| 1006 |
+
if not blob.exists():
|
| 1007 |
+
result["test_branch_errors"][branch] = [
|
| 1008 |
+
{"error_code": "missing_test_blob", "error_details": blob.name}
|
| 1009 |
+
]
|
| 1010 |
+
inject_not_run(result, branch, tests, "missing_test_blob")
|
| 1011 |
+
continue
|
| 1012 |
+
|
| 1013 |
+
best_xml = ""
|
| 1014 |
+
# Prefer a complete, clean XML result, then the result covering the
|
| 1015 |
+
# most expected tests, and only then the one with the most passes.
|
| 1016 |
+
# Pass-count-only ranking can retain a partial xdist result over a
|
| 1017 |
+
# complete serial result.
|
| 1018 |
+
best_quality = (-1, -1, -1)
|
| 1019 |
+
serial = bool(metadata.get("force_serial_branches"))
|
| 1020 |
+
branch_log: list[dict[str, Any]] = []
|
| 1021 |
+
branch_ignored = {
|
| 1022 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 1023 |
+
}
|
| 1024 |
+
n_expected = len([name for name in tests if name not in branch_ignored])
|
| 1025 |
+
|
| 1026 |
+
def merge_best_xml(raw_xml: str) -> None:
|
| 1027 |
+
try:
|
| 1028 |
+
parsed, warnings = parse_junit(
|
| 1029 |
+
raw_xml, branch, list(info.get("tests", [])), branch_ignored
|
| 1030 |
+
)
|
| 1031 |
+
except Exception as exc:
|
| 1032 |
+
result["test_branch_errors"][branch] = [
|
| 1033 |
+
{"error_code": "xml_parse_error", "error_details": str(exc)}
|
| 1034 |
+
]
|
| 1035 |
+
inject_not_run(result, branch, tests, "xml_parse_error")
|
| 1036 |
+
else:
|
| 1037 |
+
result["test_results"].extend(parsed)
|
| 1038 |
+
result["warnings"].extend(warnings)
|
| 1039 |
+
|
| 1040 |
+
while True:
|
| 1041 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1042 |
+
restore_workspace(compiled_snapshot)
|
| 1043 |
+
extract_trusted_blob(blob, WORKSPACE)
|
| 1044 |
+
restore_reference_executable()
|
| 1045 |
+
actual_hash = sha256(WORKSPACE / "executable")
|
| 1046 |
+
if actual_hash != result["executable_hash"]:
|
| 1047 |
+
result["test_branch_errors"][branch] = [
|
| 1048 |
+
{
|
| 1049 |
+
"error_code": "executable_hash_mismatch",
|
| 1050 |
+
"error_details": (
|
| 1051 |
+
f"expected {result['executable_hash']}, got {actual_hash}"
|
| 1052 |
+
),
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
inject_not_run(result, branch, tests, "executable_hash_mismatch")
|
| 1056 |
+
break
|
| 1057 |
+
run_sh = WORKSPACE / "eval" / "run.sh"
|
| 1058 |
+
if not run_sh.exists():
|
| 1059 |
+
result["test_branch_errors"][branch] = [
|
| 1060 |
+
{
|
| 1061 |
+
"error_code": "missing_run_sh",
|
| 1062 |
+
"error_details": "eval/run.sh missing",
|
| 1063 |
+
}
|
| 1064 |
+
]
|
| 1065 |
+
inject_not_run(result, branch, tests, "missing_run_sh")
|
| 1066 |
+
break
|
| 1067 |
+
# Upstream rewrites thread→signal so xdist workers fail cleanly
|
| 1068 |
+
# instead of os._exit(1) on timeout. That works in fresh
|
| 1069 |
+
# containers per branch; here we reuse one container and
|
| 1070 |
+
# signal timeouts leave TUI/log-watcher subprocesses alive
|
| 1071 |
+
# (e.g. lazygit --logs + tail -f), wedging pytest for up to
|
| 1072 |
+
# branch_timeout. Keep the blob's thread method and rely on
|
| 1073 |
+
# cleanup_lingering_processes + serial fallback after crashes.
|
| 1074 |
+
env = branch_env(
|
| 1075 |
+
serial=serial,
|
| 1076 |
+
has_rerunfailures=has_rerunfailures,
|
| 1077 |
+
extras=metadata.get("branch_env"),
|
| 1078 |
+
)
|
| 1079 |
+
branch_log.append(
|
| 1080 |
+
run_step(
|
| 1081 |
+
"rm -f eval/results.xml results.xml",
|
| 1082 |
+
WORKSPACE,
|
| 1083 |
+
timeout=120,
|
| 1084 |
+
step="clean_stale_results",
|
| 1085 |
+
accept_failure=True,
|
| 1086 |
+
)
|
| 1087 |
+
)
|
| 1088 |
+
if serial:
|
| 1089 |
+
prepare_serial_run_sh(run_sh)
|
| 1090 |
+
run_entry = run_step(
|
| 1091 |
+
run_tests_command(serial=serial),
|
| 1092 |
+
WORKSPACE,
|
| 1093 |
+
timeout=branch_timeout,
|
| 1094 |
+
env=env,
|
| 1095 |
+
step="run_tests",
|
| 1096 |
+
accept_failure=True,
|
| 1097 |
+
)
|
| 1098 |
+
branch_log.append(run_entry)
|
| 1099 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1100 |
+
xml_path = find_results_xml()
|
| 1101 |
+
if xml_path is None:
|
| 1102 |
+
if best_xml:
|
| 1103 |
+
merge_best_xml(best_xml)
|
| 1104 |
+
break
|
| 1105 |
+
if serial:
|
| 1106 |
+
result["test_branch_errors"][branch] = [
|
| 1107 |
+
{
|
| 1108 |
+
"error_code": "missing_results_xml",
|
| 1109 |
+
"error_details": "eval/results.xml was not produced",
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
inject_not_run(result, branch, tests, "missing_results_xml")
|
| 1113 |
+
break
|
| 1114 |
+
serial = True
|
| 1115 |
+
continue
|
| 1116 |
+
raw_xml = xml_path.read_text(errors="replace")
|
| 1117 |
+
crashes, n_tests, failures, missing = branch_attempt_metrics(
|
| 1118 |
+
raw_xml,
|
| 1119 |
+
run_output=run_entry.get("output", ""),
|
| 1120 |
+
expected_tests=n_expected,
|
| 1121 |
+
)
|
| 1122 |
+
useful = count_junit_passed(raw_xml)
|
| 1123 |
+
quality = (
|
| 1124 |
+
int(crashes == 0 and missing == 0),
|
| 1125 |
+
n_tests,
|
| 1126 |
+
useful,
|
| 1127 |
+
)
|
| 1128 |
+
if quality > best_quality:
|
| 1129 |
+
best_xml = raw_xml
|
| 1130 |
+
best_quality = quality
|
| 1131 |
+
retry = needs_serial_retry(
|
| 1132 |
+
serial=serial,
|
| 1133 |
+
crashes=crashes,
|
| 1134 |
+
missing=missing,
|
| 1135 |
+
failures=failures,
|
| 1136 |
+
n_tests=n_tests,
|
| 1137 |
+
expected_tests=n_expected,
|
| 1138 |
+
run_output=run_entry.get("output", ""),
|
| 1139 |
+
)
|
| 1140 |
+
if not retry:
|
| 1141 |
+
merge_best_xml(best_xml)
|
| 1142 |
+
break
|
| 1143 |
+
serial = True
|
| 1144 |
+
for entry in branch_log:
|
| 1145 |
+
entry["branch"] = branch
|
| 1146 |
+
result["log"].extend(branch_log)
|
| 1147 |
+
|
| 1148 |
+
return result
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
def write_outputs(result: dict[str, Any], metadata: dict[str, Any]) -> None:
|
| 1152 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1153 |
+
write_json(LOG_DIR / "programgym_eval.json", result)
|
| 1154 |
+
write_json(LOG_DIR / "harbor_diagnostics.json", diagnostics(result, metadata))
|
| 1155 |
+
rewards = summarize(result, metadata)
|
| 1156 |
+
write_json(LOG_DIR / "reward.json", rewards)
|
| 1157 |
+
(LOG_DIR / "reward.txt").write_text(str(rewards["reward"]))
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
def main() -> None:
|
| 1161 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1162 |
+
log_path = LOG_DIR / "programgym_eval.log"
|
| 1163 |
+
metadata = json.loads(METADATA_PATH.read_text())
|
| 1164 |
+
branches = metadata.get("branches", {})
|
| 1165 |
+
try:
|
| 1166 |
+
result = evaluate(metadata)
|
| 1167 |
+
except Exception as exc:
|
| 1168 |
+
error_code = type(exc).__name__
|
| 1169 |
+
result = {
|
| 1170 |
+
"test_results": [],
|
| 1171 |
+
"error_code": error_code,
|
| 1172 |
+
"error_details": str(exc),
|
| 1173 |
+
"log": [
|
| 1174 |
+
{
|
| 1175 |
+
"step": "evaluator_exception",
|
| 1176 |
+
"exception_info": traceback.format_exc(),
|
| 1177 |
+
"returncode": 1,
|
| 1178 |
+
}
|
| 1179 |
+
],
|
| 1180 |
+
"solution_branch": "submission",
|
| 1181 |
+
"test_branches": [
|
| 1182 |
+
name for name, info in branches.items() if not info.get("ignored")
|
| 1183 |
+
],
|
| 1184 |
+
"test_branch_errors": {
|
| 1185 |
+
"__evaluator__": [{"error_code": error_code, "error_details": str(exc)}]
|
| 1186 |
+
},
|
| 1187 |
+
"executable_hash": None,
|
| 1188 |
+
"warnings": [],
|
| 1189 |
+
}
|
| 1190 |
+
for branch, info in branches.items():
|
| 1191 |
+
if info.get("ignored"):
|
| 1192 |
+
continue
|
| 1193 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 1194 |
+
log_path.write_text(traceback.format_exc())
|
| 1195 |
+
else:
|
| 1196 |
+
log_path.write_text("")
|
| 1197 |
+
write_outputs(result, metadata)
|
| 1198 |
+
|
| 1199 |
+
|
| 1200 |
+
if __name__ == "__main__":
|
| 1201 |
+
main()
|
cesanta--elk.71a86fa/tests/programgym_task.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
cesanta--elk.71a86fa/tests/test.sh
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
# Verifier exec may not inherit image ENV (Modal/gVisor, login-shell resets).
|
| 5 |
+
export PATH="/usr/local/go/bin:/go/bin:/usr/local/cargo/bin:/root/.cargo/bin:${PATH}"
|
| 6 |
+
|
| 7 |
+
mkdir -p /logs/verifier /logs/artifacts
|
| 8 |
+
|
| 9 |
+
write_failure() {
|
| 10 |
+
local code="$1"
|
| 11 |
+
local details="$2"
|
| 12 |
+
python3 - "$code" "$details" <<'PY'
|
| 13 |
+
import json
|
| 14 |
+
import sys
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
code, details = sys.argv[1:3]
|
| 18 |
+
try:
|
| 19 |
+
metadata = json.loads(Path("/tests/programgym_task.json").read_text())
|
| 20 |
+
n_tests = sum(
|
| 21 |
+
len([
|
| 22 |
+
name for name in info.get("tests", [])
|
| 23 |
+
if name not in {item.get("name") for item in info.get("ignored_tests", [])}
|
| 24 |
+
])
|
| 25 |
+
for branch, info in metadata.get("branches", {}).items()
|
| 26 |
+
if not info.get("ignored")
|
| 27 |
+
)
|
| 28 |
+
except Exception:
|
| 29 |
+
n_tests = 0
|
| 30 |
+
result = {
|
| 31 |
+
"test_results": [],
|
| 32 |
+
"error_code": code,
|
| 33 |
+
"error_details": details,
|
| 34 |
+
"log": [],
|
| 35 |
+
"solution_branch": "submission",
|
| 36 |
+
"test_branches": [],
|
| 37 |
+
"test_branch_errors": {
|
| 38 |
+
"__infra__": [{"error_code": code, "error_details": details}]
|
| 39 |
+
},
|
| 40 |
+
"executable_hash": None,
|
| 41 |
+
"warnings": [],
|
| 42 |
+
}
|
| 43 |
+
diagnostics = {
|
| 44 |
+
"pass_rate": 0.0,
|
| 45 |
+
"resolved": 0,
|
| 46 |
+
"n_passed": 0,
|
| 47 |
+
"n_tests": n_tests,
|
| 48 |
+
"n_branch_errors": 1,
|
| 49 |
+
"infra_error": 1,
|
| 50 |
+
"executable_hash_present": 0,
|
| 51 |
+
}
|
| 52 |
+
Path("/logs/verifier/programgym_eval.json").write_text(
|
| 53 |
+
json.dumps(result, indent=2, sort_keys=True)
|
| 54 |
+
)
|
| 55 |
+
Path("/logs/verifier/harbor_diagnostics.json").write_text(
|
| 56 |
+
json.dumps(diagnostics, indent=2, sort_keys=True)
|
| 57 |
+
)
|
| 58 |
+
Path("/logs/verifier/reward.json").write_text(
|
| 59 |
+
json.dumps(
|
| 60 |
+
{"reward": 0.0, "resolved": 0.0, "almost_resolved": 0.0},
|
| 61 |
+
indent=2,
|
| 62 |
+
sort_keys=True,
|
| 63 |
+
)
|
| 64 |
+
)
|
| 65 |
+
Path("/logs/verifier/reward.txt").write_text("0.0")
|
| 66 |
+
Path("/logs/verifier/programgym_eval.log").write_text(details)
|
| 67 |
+
PY
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
if ! command -v python3 >/dev/null 2>&1; then
|
| 71 |
+
write_failure "missing_python3" "python3 is required in the cleanroom image"
|
| 72 |
+
exit 0
|
| 73 |
+
fi
|
| 74 |
+
|
| 75 |
+
if ! python3 /tests/programgym_evaluator.py; then
|
| 76 |
+
if [ ! -s /logs/verifier/reward.txt ]; then
|
| 77 |
+
write_failure "evaluator_crashed" \
|
| 78 |
+
"programgym_evaluator.py exited non-zero with no reward written"
|
| 79 |
+
fi
|
| 80 |
+
fi
|
| 81 |
+
|
| 82 |
+
exit 0
|
cesanta--elk.71a86fa/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c3776c39c515d6cbda0bce7aec3a7046d6b91e4cc122ab08d007aa00e69a941
|
| 3 |
+
size 25736
|
cesarferreira--rip.83f0260/environment/Dockerfile
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM rust:1.97.1-bookworm
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV CARGO_HOME=/usr/local/cargo
|
| 24 |
+
ENV RUSTUP_HOME=/usr/local/rustup
|
| 25 |
+
ENV RUSTUP_TOOLCHAIN=1.97.1
|
| 26 |
+
ENV PROGRAMGYM_RUST_TOOLCHAIN=1.97.1
|
| 27 |
+
ENV PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 28 |
+
ENV PAGER=cat
|
| 29 |
+
ENV MANPAGER=cat
|
| 30 |
+
ENV LESS=-R
|
| 31 |
+
ENV TQDM_DISABLE=1
|
| 32 |
+
RUN apt-get update && apt-get install -y --no-install-recommends apt=2.6.1 bash=5.2.15-2+b13 build-essential=12.9 ca-certificates=20250419~deb12u1 cmake=3.25.1-1 git=1:2.39.5-0+deb12u3 make=4.3-4.1 pkg-config=1.8.1-1 python3=3.11.2-1+b1 python3-pip=23.0.1+dfsg-1 python3-dev=3.11.2-1+b1 autoconf=2.71-3 automake=1:1.16.5-1.3 gettext=0.21-12 file=1:5.44-3 binutils=2.40-2 libtool=2.4.7-7~deb12u1 libncurses-dev=6.4-4 meson=1.0.1-5 ninja-build=1.11.1-2~deb12u1 curl=7.88.1-10+deb12u15 wget=1.21.3-1+deb12u1 xz-utils=5.4.1-1+deb12u1 zstd=1.5.4+dfsg2-5 bzip2=1.0.8-5+b1 zip=3.0-13 unzip=6.0-28+deb12u1 patch=2.7.6-7 grep=3.8-5 python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 33 |
+
RUN rustup component add llvm-tools-preview --toolchain 1.97.1
|
| 34 |
+
RUN RUST_SYSROOT="$(rustc --print sysroot)"; RUST_HOST="$(rustc -vV | sed -n 's/^host: //p')"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-profdata"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-cov"
|
| 35 |
+
RUN rustc --version && cargo --version && rustup show active-toolchain
|
| 36 |
+
WORKDIR /workspace
|
| 37 |
+
ADD workspace.tar.gz /workspace/
|
| 38 |
+
COPY executable /workspace/executable
|
| 39 |
+
COPY download.sh /tmp/programgym-download.sh
|
| 40 |
+
RUN chmod 755 /tmp/programgym-download.sh
|
| 41 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 42 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 43 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 44 |
+
&& rm -f /tmp/programgym-download.sh \
|
| 45 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 46 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 47 |
+
RUN chmod 111 /workspace/executable
|
| 48 |
+
WORKDIR /workspace
|
| 49 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 50 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 51 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 52 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 53 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 54 |
+
RUN mkdir -p /home/agent \
|
| 55 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 56 |
+
&& chown agent:agent /workspace/executable \
|
| 57 |
+
&& chmod 111 /workspace/executable
|
| 58 |
+
ENV HOME=/home/agent
|
| 59 |
+
WORKDIR /workspace
|
cesarferreira--rip.83f0260/environment/download.sh
ADDED
|
@@ -0,0 +1,1341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# download.sh for rip-cli — ProgramGym download stage.
|
| 3 |
+
#
|
| 4 |
+
# This script is executed via `source /source_ro/download.sh` in a read-only
|
| 5 |
+
# repository mount while the container still has network access. It must be
|
| 6 |
+
# safe to source (no `exit` in normal flow) and never compile/link/test/build
|
| 7 |
+
# the project.
|
| 8 |
+
#
|
| 9 |
+
# It ONLY prefetches the exact Rust dependency closure (matching the project's
|
| 10 |
+
# committed Cargo.lock) into the shared Cargo registry cache. It generates a
|
| 11 |
+
# temporary manifest AND a temporary lockfile from inline heredoc data, then
|
| 12 |
+
# runs `cargo fetch --locked --manifest-path`. The locked versions are embedded
|
| 13 |
+
# verbatim so the offline `cargo build --offline` can resolve every exact crate
|
| 14 |
+
# already present in the cache. It reads no repository files.
|
| 15 |
+
|
| 16 |
+
# Dedicated writable work directory for the generated manifest and lockfile.
|
| 17 |
+
RW="${TMPDIR:-/tmp}/pb_rip_cli_fetch"
|
| 18 |
+
|
| 19 |
+
mkdir -p "${RW}/src"
|
| 20 |
+
|
| 21 |
+
# Temporary manifest (dependencies match the project's Cargo.toml). Direct
|
| 22 |
+
# versions are pinned to the exact locked resolution for paranoia; the embedded
|
| 23 |
+
# lockfile below is authoritative for what gets fetched.
|
| 24 |
+
cat > "${RW}/Cargo.toml" <<'EOF'
|
| 25 |
+
[package]
|
| 26 |
+
name = "rip-cli"
|
| 27 |
+
version = "0.7.0"
|
| 28 |
+
edition = "2021"
|
| 29 |
+
|
| 30 |
+
[[bin]]
|
| 31 |
+
name = "rip"
|
| 32 |
+
path = "src/main.rs"
|
| 33 |
+
|
| 34 |
+
[dependencies]
|
| 35 |
+
clap = { version = "=4.5.54", features = ["derive"] }
|
| 36 |
+
sysinfo = "=0.32.1"
|
| 37 |
+
colored = "=2.2.0"
|
| 38 |
+
inquire = "=0.7.5"
|
| 39 |
+
terminal_size = "=0.4.3"
|
| 40 |
+
ratatui = "=0.29.0"
|
| 41 |
+
crossterm = "=0.28.1"
|
| 42 |
+
listeners = "=0.3.0"
|
| 43 |
+
|
| 44 |
+
[target.'cfg(unix)'.dependencies]
|
| 45 |
+
nix = { version = "=0.29.0", features = ["signal"] }
|
| 46 |
+
EOF
|
| 47 |
+
|
| 48 |
+
# Minimal stub source so `cargo fetch --locked` can validate the manifest. It is
|
| 49 |
+
# never compiled during the download stage.
|
| 50 |
+
cat > "${RW}/src/main.rs" <<'EOF'
|
| 51 |
+
fn main() {}
|
| 52 |
+
EOF
|
| 53 |
+
|
| 54 |
+
# Lockfile embedded verbatim from the repository's committed Cargo.lock. Using
|
| 55 |
+
# `cargo fetch --locked` against it downloads exactly the crates the offline
|
| 56 |
+
# build needs, so the cache is fully warm before network is removed.
|
| 57 |
+
cat > "${RW}/Cargo.lock" <<'LOCKEOF'
|
| 58 |
+
# This file is automatically @generated by Cargo.
|
| 59 |
+
# It is not intended for manual editing.
|
| 60 |
+
version = 4
|
| 61 |
+
|
| 62 |
+
[[package]]
|
| 63 |
+
name = "allocator-api2"
|
| 64 |
+
version = "0.2.21"
|
| 65 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 66 |
+
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
| 67 |
+
|
| 68 |
+
[[package]]
|
| 69 |
+
name = "anstream"
|
| 70 |
+
version = "0.6.21"
|
| 71 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 72 |
+
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
|
| 73 |
+
dependencies = [
|
| 74 |
+
"anstyle",
|
| 75 |
+
"anstyle-parse",
|
| 76 |
+
"anstyle-query",
|
| 77 |
+
"anstyle-wincon",
|
| 78 |
+
"colorchoice",
|
| 79 |
+
"is_terminal_polyfill",
|
| 80 |
+
"utf8parse",
|
| 81 |
+
]
|
| 82 |
+
|
| 83 |
+
[[package]]
|
| 84 |
+
name = "anstyle"
|
| 85 |
+
version = "1.0.13"
|
| 86 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 87 |
+
checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
|
| 88 |
+
|
| 89 |
+
[[package]]
|
| 90 |
+
name = "anstyle-parse"
|
| 91 |
+
version = "0.2.7"
|
| 92 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 93 |
+
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
|
| 94 |
+
dependencies = [
|
| 95 |
+
"utf8parse",
|
| 96 |
+
]
|
| 97 |
+
|
| 98 |
+
[[package]]
|
| 99 |
+
name = "anstyle-query"
|
| 100 |
+
version = "1.1.5"
|
| 101 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 102 |
+
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
| 103 |
+
dependencies = [
|
| 104 |
+
"windows-sys 0.61.2",
|
| 105 |
+
]
|
| 106 |
+
|
| 107 |
+
[[package]]
|
| 108 |
+
name = "anstyle-wincon"
|
| 109 |
+
version = "3.0.11"
|
| 110 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 111 |
+
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
| 112 |
+
dependencies = [
|
| 113 |
+
"anstyle",
|
| 114 |
+
"once_cell_polyfill",
|
| 115 |
+
"windows-sys 0.61.2",
|
| 116 |
+
]
|
| 117 |
+
|
| 118 |
+
[[package]]
|
| 119 |
+
name = "bitflags"
|
| 120 |
+
version = "1.3.2"
|
| 121 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 122 |
+
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
| 123 |
+
|
| 124 |
+
[[package]]
|
| 125 |
+
name = "bitflags"
|
| 126 |
+
version = "2.10.0"
|
| 127 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 128 |
+
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
|
| 129 |
+
|
| 130 |
+
[[package]]
|
| 131 |
+
name = "byteorder"
|
| 132 |
+
version = "1.5.0"
|
| 133 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 134 |
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
| 135 |
+
|
| 136 |
+
[[package]]
|
| 137 |
+
name = "cassowary"
|
| 138 |
+
version = "0.3.0"
|
| 139 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 140 |
+
checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
|
| 141 |
+
|
| 142 |
+
[[package]]
|
| 143 |
+
name = "castaway"
|
| 144 |
+
version = "0.2.4"
|
| 145 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 146 |
+
checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"
|
| 147 |
+
dependencies = [
|
| 148 |
+
"rustversion",
|
| 149 |
+
]
|
| 150 |
+
|
| 151 |
+
[[package]]
|
| 152 |
+
name = "cfg-if"
|
| 153 |
+
version = "1.0.4"
|
| 154 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 155 |
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
| 156 |
+
|
| 157 |
+
[[package]]
|
| 158 |
+
name = "cfg_aliases"
|
| 159 |
+
version = "0.2.1"
|
| 160 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 161 |
+
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
| 162 |
+
|
| 163 |
+
[[package]]
|
| 164 |
+
name = "clap"
|
| 165 |
+
version = "4.5.54"
|
| 166 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 167 |
+
checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
|
| 168 |
+
dependencies = [
|
| 169 |
+
"clap_builder",
|
| 170 |
+
"clap_derive",
|
| 171 |
+
]
|
| 172 |
+
|
| 173 |
+
[[package]]
|
| 174 |
+
name = "clap_builder"
|
| 175 |
+
version = "4.5.54"
|
| 176 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 177 |
+
checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
|
| 178 |
+
dependencies = [
|
| 179 |
+
"anstream",
|
| 180 |
+
"anstyle",
|
| 181 |
+
"clap_lex",
|
| 182 |
+
"strsim",
|
| 183 |
+
]
|
| 184 |
+
|
| 185 |
+
[[package]]
|
| 186 |
+
name = "clap_derive"
|
| 187 |
+
version = "4.5.49"
|
| 188 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 189 |
+
checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
|
| 190 |
+
dependencies = [
|
| 191 |
+
"heck",
|
| 192 |
+
"proc-macro2",
|
| 193 |
+
"quote",
|
| 194 |
+
"syn",
|
| 195 |
+
]
|
| 196 |
+
|
| 197 |
+
[[package]]
|
| 198 |
+
name = "clap_lex"
|
| 199 |
+
version = "0.7.6"
|
| 200 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 201 |
+
checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
| 202 |
+
|
| 203 |
+
[[package]]
|
| 204 |
+
name = "colorchoice"
|
| 205 |
+
version = "1.0.4"
|
| 206 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 207 |
+
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
| 208 |
+
|
| 209 |
+
[[package]]
|
| 210 |
+
name = "colored"
|
| 211 |
+
version = "2.2.0"
|
| 212 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 213 |
+
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
|
| 214 |
+
dependencies = [
|
| 215 |
+
"lazy_static",
|
| 216 |
+
"windows-sys 0.59.0",
|
| 217 |
+
]
|
| 218 |
+
|
| 219 |
+
[[package]]
|
| 220 |
+
name = "compact_str"
|
| 221 |
+
version = "0.8.1"
|
| 222 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 223 |
+
checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
|
| 224 |
+
dependencies = [
|
| 225 |
+
"castaway",
|
| 226 |
+
"cfg-if",
|
| 227 |
+
"itoa",
|
| 228 |
+
"rustversion",
|
| 229 |
+
"ryu",
|
| 230 |
+
"static_assertions",
|
| 231 |
+
]
|
| 232 |
+
|
| 233 |
+
[[package]]
|
| 234 |
+
name = "core-foundation-sys"
|
| 235 |
+
version = "0.8.7"
|
| 236 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 237 |
+
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
| 238 |
+
|
| 239 |
+
[[package]]
|
| 240 |
+
name = "crossbeam-deque"
|
| 241 |
+
version = "0.8.6"
|
| 242 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 243 |
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
| 244 |
+
dependencies = [
|
| 245 |
+
"crossbeam-epoch",
|
| 246 |
+
"crossbeam-utils",
|
| 247 |
+
]
|
| 248 |
+
|
| 249 |
+
[[package]]
|
| 250 |
+
name = "crossbeam-epoch"
|
| 251 |
+
version = "0.9.18"
|
| 252 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 253 |
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
| 254 |
+
dependencies = [
|
| 255 |
+
"crossbeam-utils",
|
| 256 |
+
]
|
| 257 |
+
|
| 258 |
+
[[package]]
|
| 259 |
+
name = "crossbeam-utils"
|
| 260 |
+
version = "0.8.21"
|
| 261 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 262 |
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
| 263 |
+
|
| 264 |
+
[[package]]
|
| 265 |
+
name = "crossterm"
|
| 266 |
+
version = "0.25.0"
|
| 267 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 268 |
+
checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67"
|
| 269 |
+
dependencies = [
|
| 270 |
+
"bitflags 1.3.2",
|
| 271 |
+
"crossterm_winapi",
|
| 272 |
+
"libc",
|
| 273 |
+
"mio 0.8.11",
|
| 274 |
+
"parking_lot",
|
| 275 |
+
"signal-hook",
|
| 276 |
+
"signal-hook-mio",
|
| 277 |
+
"winapi",
|
| 278 |
+
]
|
| 279 |
+
|
| 280 |
+
[[package]]
|
| 281 |
+
name = "crossterm"
|
| 282 |
+
version = "0.28.1"
|
| 283 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 284 |
+
checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
|
| 285 |
+
dependencies = [
|
| 286 |
+
"bitflags 2.10.0",
|
| 287 |
+
"crossterm_winapi",
|
| 288 |
+
"mio 1.1.1",
|
| 289 |
+
"parking_lot",
|
| 290 |
+
"rustix 0.38.44",
|
| 291 |
+
"signal-hook",
|
| 292 |
+
"signal-hook-mio",
|
| 293 |
+
"winapi",
|
| 294 |
+
]
|
| 295 |
+
|
| 296 |
+
[[package]]
|
| 297 |
+
name = "crossterm_winapi"
|
| 298 |
+
version = "0.9.1"
|
| 299 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 300 |
+
checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
|
| 301 |
+
dependencies = [
|
| 302 |
+
"winapi",
|
| 303 |
+
]
|
| 304 |
+
|
| 305 |
+
[[package]]
|
| 306 |
+
name = "darling"
|
| 307 |
+
version = "0.23.0"
|
| 308 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 309 |
+
checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
|
| 310 |
+
dependencies = [
|
| 311 |
+
"darling_core",
|
| 312 |
+
"darling_macro",
|
| 313 |
+
]
|
| 314 |
+
|
| 315 |
+
[[package]]
|
| 316 |
+
name = "darling_core"
|
| 317 |
+
version = "0.23.0"
|
| 318 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 319 |
+
checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
|
| 320 |
+
dependencies = [
|
| 321 |
+
"ident_case",
|
| 322 |
+
"proc-macro2",
|
| 323 |
+
"quote",
|
| 324 |
+
"strsim",
|
| 325 |
+
"syn",
|
| 326 |
+
]
|
| 327 |
+
|
| 328 |
+
[[package]]
|
| 329 |
+
name = "darling_macro"
|
| 330 |
+
version = "0.23.0"
|
| 331 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 332 |
+
checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
|
| 333 |
+
dependencies = [
|
| 334 |
+
"darling_core",
|
| 335 |
+
"quote",
|
| 336 |
+
"syn",
|
| 337 |
+
]
|
| 338 |
+
|
| 339 |
+
[[package]]
|
| 340 |
+
name = "dyn-clone"
|
| 341 |
+
version = "1.0.20"
|
| 342 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 343 |
+
checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
|
| 344 |
+
|
| 345 |
+
[[package]]
|
| 346 |
+
name = "either"
|
| 347 |
+
version = "1.15.0"
|
| 348 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 349 |
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
| 350 |
+
|
| 351 |
+
[[package]]
|
| 352 |
+
name = "equivalent"
|
| 353 |
+
version = "1.0.2"
|
| 354 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 355 |
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
| 356 |
+
|
| 357 |
+
[[package]]
|
| 358 |
+
name = "errno"
|
| 359 |
+
version = "0.3.14"
|
| 360 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 361 |
+
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
| 362 |
+
dependencies = [
|
| 363 |
+
"libc",
|
| 364 |
+
"windows-sys 0.61.2",
|
| 365 |
+
]
|
| 366 |
+
|
| 367 |
+
[[package]]
|
| 368 |
+
name = "foldhash"
|
| 369 |
+
version = "0.1.5"
|
| 370 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 371 |
+
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
| 372 |
+
|
| 373 |
+
[[package]]
|
| 374 |
+
name = "fuzzy-matcher"
|
| 375 |
+
version = "0.3.7"
|
| 376 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 377 |
+
checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94"
|
| 378 |
+
dependencies = [
|
| 379 |
+
"thread_local",
|
| 380 |
+
]
|
| 381 |
+
|
| 382 |
+
[[package]]
|
| 383 |
+
name = "fxhash"
|
| 384 |
+
version = "0.2.1"
|
| 385 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 386 |
+
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
| 387 |
+
dependencies = [
|
| 388 |
+
"byteorder",
|
| 389 |
+
]
|
| 390 |
+
|
| 391 |
+
[[package]]
|
| 392 |
+
name = "hashbrown"
|
| 393 |
+
version = "0.15.5"
|
| 394 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 395 |
+
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
|
| 396 |
+
dependencies = [
|
| 397 |
+
"allocator-api2",
|
| 398 |
+
"equivalent",
|
| 399 |
+
"foldhash",
|
| 400 |
+
]
|
| 401 |
+
|
| 402 |
+
[[package]]
|
| 403 |
+
name = "heck"
|
| 404 |
+
version = "0.5.0"
|
| 405 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 406 |
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
| 407 |
+
|
| 408 |
+
[[package]]
|
| 409 |
+
name = "ident_case"
|
| 410 |
+
version = "1.0.1"
|
| 411 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 412 |
+
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
| 413 |
+
|
| 414 |
+
[[package]]
|
| 415 |
+
name = "indoc"
|
| 416 |
+
version = "2.0.7"
|
| 417 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 418 |
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
| 419 |
+
dependencies = [
|
| 420 |
+
"rustversion",
|
| 421 |
+
]
|
| 422 |
+
|
| 423 |
+
[[package]]
|
| 424 |
+
name = "inquire"
|
| 425 |
+
version = "0.7.5"
|
| 426 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 427 |
+
checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a"
|
| 428 |
+
dependencies = [
|
| 429 |
+
"bitflags 2.10.0",
|
| 430 |
+
"crossterm 0.25.0",
|
| 431 |
+
"dyn-clone",
|
| 432 |
+
"fuzzy-matcher",
|
| 433 |
+
"fxhash",
|
| 434 |
+
"newline-converter",
|
| 435 |
+
"once_cell",
|
| 436 |
+
"unicode-segmentation",
|
| 437 |
+
"unicode-width 0.1.14",
|
| 438 |
+
]
|
| 439 |
+
|
| 440 |
+
[[package]]
|
| 441 |
+
name = "instability"
|
| 442 |
+
version = "0.3.11"
|
| 443 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 444 |
+
checksum = "357b7205c6cd18dd2c86ed312d1e70add149aea98e7ef72b9fdf0270e555c11d"
|
| 445 |
+
dependencies = [
|
| 446 |
+
"darling",
|
| 447 |
+
"indoc",
|
| 448 |
+
"proc-macro2",
|
| 449 |
+
"quote",
|
| 450 |
+
"syn",
|
| 451 |
+
]
|
| 452 |
+
|
| 453 |
+
[[package]]
|
| 454 |
+
name = "is_terminal_polyfill"
|
| 455 |
+
version = "1.70.2"
|
| 456 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 457 |
+
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
| 458 |
+
|
| 459 |
+
[[package]]
|
| 460 |
+
name = "itertools"
|
| 461 |
+
version = "0.13.0"
|
| 462 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 463 |
+
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
|
| 464 |
+
dependencies = [
|
| 465 |
+
"either",
|
| 466 |
+
]
|
| 467 |
+
|
| 468 |
+
[[package]]
|
| 469 |
+
name = "itoa"
|
| 470 |
+
version = "1.0.17"
|
| 471 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 472 |
+
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
| 473 |
+
|
| 474 |
+
[[package]]
|
| 475 |
+
name = "lazy_static"
|
| 476 |
+
version = "1.5.0"
|
| 477 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 478 |
+
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
| 479 |
+
|
| 480 |
+
[[package]]
|
| 481 |
+
name = "libc"
|
| 482 |
+
version = "0.2.179"
|
| 483 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 484 |
+
checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f"
|
| 485 |
+
|
| 486 |
+
[[package]]
|
| 487 |
+
name = "linux-raw-sys"
|
| 488 |
+
version = "0.4.15"
|
| 489 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 490 |
+
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
|
| 491 |
+
|
| 492 |
+
[[package]]
|
| 493 |
+
name = "linux-raw-sys"
|
| 494 |
+
version = "0.11.0"
|
| 495 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 496 |
+
checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
|
| 497 |
+
|
| 498 |
+
[[package]]
|
| 499 |
+
name = "listeners"
|
| 500 |
+
version = "0.3.0"
|
| 501 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 502 |
+
checksum = "557f908c6cb431dd2496687aa9ea326507110ee4780517a42ade2df25d31126c"
|
| 503 |
+
dependencies = [
|
| 504 |
+
"byteorder",
|
| 505 |
+
"rustix 1.1.3",
|
| 506 |
+
"windows 0.61.3",
|
| 507 |
+
]
|
| 508 |
+
|
| 509 |
+
[[package]]
|
| 510 |
+
name = "lock_api"
|
| 511 |
+
version = "0.4.14"
|
| 512 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 513 |
+
checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
|
| 514 |
+
dependencies = [
|
| 515 |
+
"scopeguard",
|
| 516 |
+
]
|
| 517 |
+
|
| 518 |
+
[[package]]
|
| 519 |
+
name = "log"
|
| 520 |
+
version = "0.4.29"
|
| 521 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 522 |
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
| 523 |
+
|
| 524 |
+
[[package]]
|
| 525 |
+
name = "lru"
|
| 526 |
+
version = "0.12.5"
|
| 527 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 528 |
+
checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
|
| 529 |
+
dependencies = [
|
| 530 |
+
"hashbrown",
|
| 531 |
+
]
|
| 532 |
+
|
| 533 |
+
[[package]]
|
| 534 |
+
name = "memchr"
|
| 535 |
+
version = "2.7.6"
|
| 536 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 537 |
+
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
| 538 |
+
|
| 539 |
+
[[package]]
|
| 540 |
+
name = "mio"
|
| 541 |
+
version = "0.8.11"
|
| 542 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 543 |
+
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
|
| 544 |
+
dependencies = [
|
| 545 |
+
"libc",
|
| 546 |
+
"log",
|
| 547 |
+
"wasi",
|
| 548 |
+
"windows-sys 0.48.0",
|
| 549 |
+
]
|
| 550 |
+
|
| 551 |
+
[[package]]
|
| 552 |
+
name = "mio"
|
| 553 |
+
version = "1.1.1"
|
| 554 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 555 |
+
checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
|
| 556 |
+
dependencies = [
|
| 557 |
+
"libc",
|
| 558 |
+
"log",
|
| 559 |
+
"wasi",
|
| 560 |
+
"windows-sys 0.61.2",
|
| 561 |
+
]
|
| 562 |
+
|
| 563 |
+
[[package]]
|
| 564 |
+
name = "newline-converter"
|
| 565 |
+
version = "0.3.0"
|
| 566 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 567 |
+
checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f"
|
| 568 |
+
dependencies = [
|
| 569 |
+
"unicode-segmentation",
|
| 570 |
+
]
|
| 571 |
+
|
| 572 |
+
[[package]]
|
| 573 |
+
name = "nix"
|
| 574 |
+
version = "0.29.0"
|
| 575 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 576 |
+
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
|
| 577 |
+
dependencies = [
|
| 578 |
+
"bitflags 2.10.0",
|
| 579 |
+
"cfg-if",
|
| 580 |
+
"cfg_aliases",
|
| 581 |
+
"libc",
|
| 582 |
+
]
|
| 583 |
+
|
| 584 |
+
[[package]]
|
| 585 |
+
name = "ntapi"
|
| 586 |
+
version = "0.4.2"
|
| 587 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 588 |
+
checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081"
|
| 589 |
+
dependencies = [
|
| 590 |
+
"winapi",
|
| 591 |
+
]
|
| 592 |
+
|
| 593 |
+
[[package]]
|
| 594 |
+
name = "once_cell"
|
| 595 |
+
version = "1.21.3"
|
| 596 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 597 |
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
| 598 |
+
|
| 599 |
+
[[package]]
|
| 600 |
+
name = "once_cell_polyfill"
|
| 601 |
+
version = "1.70.2"
|
| 602 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 603 |
+
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
| 604 |
+
|
| 605 |
+
[[package]]
|
| 606 |
+
name = "parking_lot"
|
| 607 |
+
version = "0.12.5"
|
| 608 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 609 |
+
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
|
| 610 |
+
dependencies = [
|
| 611 |
+
"lock_api",
|
| 612 |
+
"parking_lot_core",
|
| 613 |
+
]
|
| 614 |
+
|
| 615 |
+
[[package]]
|
| 616 |
+
name = "parking_lot_core"
|
| 617 |
+
version = "0.9.12"
|
| 618 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 619 |
+
checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
|
| 620 |
+
dependencies = [
|
| 621 |
+
"cfg-if",
|
| 622 |
+
"libc",
|
| 623 |
+
"redox_syscall",
|
| 624 |
+
"smallvec",
|
| 625 |
+
"windows-link 0.2.1",
|
| 626 |
+
]
|
| 627 |
+
|
| 628 |
+
[[package]]
|
| 629 |
+
name = "paste"
|
| 630 |
+
version = "1.0.15"
|
| 631 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 632 |
+
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
| 633 |
+
|
| 634 |
+
[[package]]
|
| 635 |
+
name = "proc-macro2"
|
| 636 |
+
version = "1.0.105"
|
| 637 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 638 |
+
checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7"
|
| 639 |
+
dependencies = [
|
| 640 |
+
"unicode-ident",
|
| 641 |
+
]
|
| 642 |
+
|
| 643 |
+
[[package]]
|
| 644 |
+
name = "quote"
|
| 645 |
+
version = "1.0.43"
|
| 646 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 647 |
+
checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
|
| 648 |
+
dependencies = [
|
| 649 |
+
"proc-macro2",
|
| 650 |
+
]
|
| 651 |
+
|
| 652 |
+
[[package]]
|
| 653 |
+
name = "ratatui"
|
| 654 |
+
version = "0.29.0"
|
| 655 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 656 |
+
checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
|
| 657 |
+
dependencies = [
|
| 658 |
+
"bitflags 2.10.0",
|
| 659 |
+
"cassowary",
|
| 660 |
+
"compact_str",
|
| 661 |
+
"crossterm 0.28.1",
|
| 662 |
+
"indoc",
|
| 663 |
+
"instability",
|
| 664 |
+
"itertools",
|
| 665 |
+
"lru",
|
| 666 |
+
"paste",
|
| 667 |
+
"strum",
|
| 668 |
+
"unicode-segmentation",
|
| 669 |
+
"unicode-truncate",
|
| 670 |
+
"unicode-width 0.2.0",
|
| 671 |
+
]
|
| 672 |
+
|
| 673 |
+
[[package]]
|
| 674 |
+
name = "rayon"
|
| 675 |
+
version = "1.11.0"
|
| 676 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 677 |
+
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
|
| 678 |
+
dependencies = [
|
| 679 |
+
"either",
|
| 680 |
+
"rayon-core",
|
| 681 |
+
]
|
| 682 |
+
|
| 683 |
+
[[package]]
|
| 684 |
+
name = "rayon-core"
|
| 685 |
+
version = "1.13.0"
|
| 686 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 687 |
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
| 688 |
+
dependencies = [
|
| 689 |
+
"crossbeam-deque",
|
| 690 |
+
"crossbeam-utils",
|
| 691 |
+
]
|
| 692 |
+
|
| 693 |
+
[[package]]
|
| 694 |
+
name = "redox_syscall"
|
| 695 |
+
version = "0.5.18"
|
| 696 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 697 |
+
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
|
| 698 |
+
dependencies = [
|
| 699 |
+
"bitflags 2.10.0",
|
| 700 |
+
]
|
| 701 |
+
|
| 702 |
+
[[package]]
|
| 703 |
+
name = "rip-cli"
|
| 704 |
+
version = "0.7.0"
|
| 705 |
+
dependencies = [
|
| 706 |
+
"clap",
|
| 707 |
+
"colored",
|
| 708 |
+
"crossterm 0.28.1",
|
| 709 |
+
"inquire",
|
| 710 |
+
"listeners",
|
| 711 |
+
"nix",
|
| 712 |
+
"ratatui",
|
| 713 |
+
"sysinfo",
|
| 714 |
+
"terminal_size",
|
| 715 |
+
]
|
| 716 |
+
|
| 717 |
+
[[package]]
|
| 718 |
+
name = "rustix"
|
| 719 |
+
version = "0.38.44"
|
| 720 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 721 |
+
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
|
| 722 |
+
dependencies = [
|
| 723 |
+
"bitflags 2.10.0",
|
| 724 |
+
"errno",
|
| 725 |
+
"libc",
|
| 726 |
+
"linux-raw-sys 0.4.15",
|
| 727 |
+
"windows-sys 0.59.0",
|
| 728 |
+
]
|
| 729 |
+
|
| 730 |
+
[[package]]
|
| 731 |
+
name = "rustix"
|
| 732 |
+
version = "1.1.3"
|
| 733 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 734 |
+
checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
|
| 735 |
+
dependencies = [
|
| 736 |
+
"bitflags 2.10.0",
|
| 737 |
+
"errno",
|
| 738 |
+
"libc",
|
| 739 |
+
"linux-raw-sys 0.11.0",
|
| 740 |
+
"windows-sys 0.61.2",
|
| 741 |
+
]
|
| 742 |
+
|
| 743 |
+
[[package]]
|
| 744 |
+
name = "rustversion"
|
| 745 |
+
version = "1.0.22"
|
| 746 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 747 |
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
| 748 |
+
|
| 749 |
+
[[package]]
|
| 750 |
+
name = "ryu"
|
| 751 |
+
version = "1.0.22"
|
| 752 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 753 |
+
checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984"
|
| 754 |
+
|
| 755 |
+
[[package]]
|
| 756 |
+
name = "scopeguard"
|
| 757 |
+
version = "1.2.0"
|
| 758 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 759 |
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
| 760 |
+
|
| 761 |
+
[[package]]
|
| 762 |
+
name = "signal-hook"
|
| 763 |
+
version = "0.3.18"
|
| 764 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 765 |
+
checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
|
| 766 |
+
dependencies = [
|
| 767 |
+
"libc",
|
| 768 |
+
"signal-hook-registry",
|
| 769 |
+
]
|
| 770 |
+
|
| 771 |
+
[[package]]
|
| 772 |
+
name = "signal-hook-mio"
|
| 773 |
+
version = "0.2.5"
|
| 774 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 775 |
+
checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
|
| 776 |
+
dependencies = [
|
| 777 |
+
"libc",
|
| 778 |
+
"mio 0.8.11",
|
| 779 |
+
"mio 1.1.1",
|
| 780 |
+
"signal-hook",
|
| 781 |
+
]
|
| 782 |
+
|
| 783 |
+
[[package]]
|
| 784 |
+
name = "signal-hook-registry"
|
| 785 |
+
version = "1.4.8"
|
| 786 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 787 |
+
checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
|
| 788 |
+
dependencies = [
|
| 789 |
+
"errno",
|
| 790 |
+
"libc",
|
| 791 |
+
]
|
| 792 |
+
|
| 793 |
+
[[package]]
|
| 794 |
+
name = "smallvec"
|
| 795 |
+
version = "1.15.1"
|
| 796 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 797 |
+
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
| 798 |
+
|
| 799 |
+
[[package]]
|
| 800 |
+
name = "static_assertions"
|
| 801 |
+
version = "1.1.0"
|
| 802 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 803 |
+
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
| 804 |
+
|
| 805 |
+
[[package]]
|
| 806 |
+
name = "strsim"
|
| 807 |
+
version = "0.11.1"
|
| 808 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 809 |
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
| 810 |
+
|
| 811 |
+
[[package]]
|
| 812 |
+
name = "strum"
|
| 813 |
+
version = "0.26.3"
|
| 814 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 815 |
+
checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
|
| 816 |
+
dependencies = [
|
| 817 |
+
"strum_macros",
|
| 818 |
+
]
|
| 819 |
+
|
| 820 |
+
[[package]]
|
| 821 |
+
name = "strum_macros"
|
| 822 |
+
version = "0.26.4"
|
| 823 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 824 |
+
checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
|
| 825 |
+
dependencies = [
|
| 826 |
+
"heck",
|
| 827 |
+
"proc-macro2",
|
| 828 |
+
"quote",
|
| 829 |
+
"rustversion",
|
| 830 |
+
"syn",
|
| 831 |
+
]
|
| 832 |
+
|
| 833 |
+
[[package]]
|
| 834 |
+
name = "syn"
|
| 835 |
+
version = "2.0.114"
|
| 836 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 837 |
+
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
|
| 838 |
+
dependencies = [
|
| 839 |
+
"proc-macro2",
|
| 840 |
+
"quote",
|
| 841 |
+
"unicode-ident",
|
| 842 |
+
]
|
| 843 |
+
|
| 844 |
+
[[package]]
|
| 845 |
+
name = "sysinfo"
|
| 846 |
+
version = "0.32.1"
|
| 847 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 848 |
+
checksum = "4c33cd241af0f2e9e3b5c32163b873b29956890b5342e6745b917ce9d490f4af"
|
| 849 |
+
dependencies = [
|
| 850 |
+
"core-foundation-sys",
|
| 851 |
+
"libc",
|
| 852 |
+
"memchr",
|
| 853 |
+
"ntapi",
|
| 854 |
+
"rayon",
|
| 855 |
+
"windows 0.57.0",
|
| 856 |
+
]
|
| 857 |
+
|
| 858 |
+
[[package]]
|
| 859 |
+
name = "terminal_size"
|
| 860 |
+
version = "0.4.3"
|
| 861 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 862 |
+
checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0"
|
| 863 |
+
dependencies = [
|
| 864 |
+
"rustix 1.1.3",
|
| 865 |
+
"windows-sys 0.60.2",
|
| 866 |
+
]
|
| 867 |
+
|
| 868 |
+
[[package]]
|
| 869 |
+
name = "thread_local"
|
| 870 |
+
version = "1.1.9"
|
| 871 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 872 |
+
checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
|
| 873 |
+
dependencies = [
|
| 874 |
+
"cfg-if",
|
| 875 |
+
]
|
| 876 |
+
|
| 877 |
+
[[package]]
|
| 878 |
+
name = "unicode-ident"
|
| 879 |
+
version = "1.0.22"
|
| 880 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 881 |
+
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
|
| 882 |
+
|
| 883 |
+
[[package]]
|
| 884 |
+
name = "unicode-segmentation"
|
| 885 |
+
version = "1.12.0"
|
| 886 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 887 |
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
| 888 |
+
|
| 889 |
+
[[package]]
|
| 890 |
+
name = "unicode-truncate"
|
| 891 |
+
version = "1.1.0"
|
| 892 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 893 |
+
checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
|
| 894 |
+
dependencies = [
|
| 895 |
+
"itertools",
|
| 896 |
+
"unicode-segmentation",
|
| 897 |
+
"unicode-width 0.1.14",
|
| 898 |
+
]
|
| 899 |
+
|
| 900 |
+
[[package]]
|
| 901 |
+
name = "unicode-width"
|
| 902 |
+
version = "0.1.14"
|
| 903 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 904 |
+
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
|
| 905 |
+
|
| 906 |
+
[[package]]
|
| 907 |
+
name = "unicode-width"
|
| 908 |
+
version = "0.2.0"
|
| 909 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 910 |
+
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
|
| 911 |
+
|
| 912 |
+
[[package]]
|
| 913 |
+
name = "utf8parse"
|
| 914 |
+
version = "0.2.2"
|
| 915 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 916 |
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
| 917 |
+
|
| 918 |
+
[[package]]
|
| 919 |
+
name = "wasi"
|
| 920 |
+
version = "0.11.1+wasi-snapshot-preview1"
|
| 921 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 922 |
+
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
| 923 |
+
|
| 924 |
+
[[package]]
|
| 925 |
+
name = "winapi"
|
| 926 |
+
version = "0.3.9"
|
| 927 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 928 |
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
| 929 |
+
dependencies = [
|
| 930 |
+
"winapi-i686-pc-windows-gnu",
|
| 931 |
+
"winapi-x86_64-pc-windows-gnu",
|
| 932 |
+
]
|
| 933 |
+
|
| 934 |
+
[[package]]
|
| 935 |
+
name = "winapi-i686-pc-windows-gnu"
|
| 936 |
+
version = "0.4.0"
|
| 937 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 938 |
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
| 939 |
+
|
| 940 |
+
[[package]]
|
| 941 |
+
name = "winapi-x86_64-pc-windows-gnu"
|
| 942 |
+
version = "0.4.0"
|
| 943 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 944 |
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
| 945 |
+
|
| 946 |
+
[[package]]
|
| 947 |
+
name = "windows"
|
| 948 |
+
version = "0.57.0"
|
| 949 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 950 |
+
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
|
| 951 |
+
dependencies = [
|
| 952 |
+
"windows-core 0.57.0",
|
| 953 |
+
"windows-targets 0.52.6",
|
| 954 |
+
]
|
| 955 |
+
|
| 956 |
+
[[package]]
|
| 957 |
+
name = "windows"
|
| 958 |
+
version = "0.61.3"
|
| 959 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 960 |
+
checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
|
| 961 |
+
dependencies = [
|
| 962 |
+
"windows-collections",
|
| 963 |
+
"windows-core 0.61.2",
|
| 964 |
+
"windows-future",
|
| 965 |
+
"windows-link 0.1.3",
|
| 966 |
+
"windows-numerics",
|
| 967 |
+
]
|
| 968 |
+
|
| 969 |
+
[[package]]
|
| 970 |
+
name = "windows-collections"
|
| 971 |
+
version = "0.2.0"
|
| 972 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 973 |
+
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
|
| 974 |
+
dependencies = [
|
| 975 |
+
"windows-core 0.61.2",
|
| 976 |
+
]
|
| 977 |
+
|
| 978 |
+
[[package]]
|
| 979 |
+
name = "windows-core"
|
| 980 |
+
version = "0.57.0"
|
| 981 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 982 |
+
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
|
| 983 |
+
dependencies = [
|
| 984 |
+
"windows-implement 0.57.0",
|
| 985 |
+
"windows-interface 0.57.0",
|
| 986 |
+
"windows-result 0.1.2",
|
| 987 |
+
"windows-targets 0.52.6",
|
| 988 |
+
]
|
| 989 |
+
|
| 990 |
+
[[package]]
|
| 991 |
+
name = "windows-core"
|
| 992 |
+
version = "0.61.2"
|
| 993 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 994 |
+
checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
|
| 995 |
+
dependencies = [
|
| 996 |
+
"windows-implement 0.60.2",
|
| 997 |
+
"windows-interface 0.59.3",
|
| 998 |
+
"windows-link 0.1.3",
|
| 999 |
+
"windows-result 0.3.4",
|
| 1000 |
+
"windows-strings",
|
| 1001 |
+
]
|
| 1002 |
+
|
| 1003 |
+
[[package]]
|
| 1004 |
+
name = "windows-future"
|
| 1005 |
+
version = "0.2.1"
|
| 1006 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1007 |
+
checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
|
| 1008 |
+
dependencies = [
|
| 1009 |
+
"windows-core 0.61.2",
|
| 1010 |
+
"windows-link 0.1.3",
|
| 1011 |
+
"windows-threading",
|
| 1012 |
+
]
|
| 1013 |
+
|
| 1014 |
+
[[package]]
|
| 1015 |
+
name = "windows-implement"
|
| 1016 |
+
version = "0.57.0"
|
| 1017 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1018 |
+
checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
|
| 1019 |
+
dependencies = [
|
| 1020 |
+
"proc-macro2",
|
| 1021 |
+
"quote",
|
| 1022 |
+
"syn",
|
| 1023 |
+
]
|
| 1024 |
+
|
| 1025 |
+
[[package]]
|
| 1026 |
+
name = "windows-implement"
|
| 1027 |
+
version = "0.60.2"
|
| 1028 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1029 |
+
checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
|
| 1030 |
+
dependencies = [
|
| 1031 |
+
"proc-macro2",
|
| 1032 |
+
"quote",
|
| 1033 |
+
"syn",
|
| 1034 |
+
]
|
| 1035 |
+
|
| 1036 |
+
[[package]]
|
| 1037 |
+
name = "windows-interface"
|
| 1038 |
+
version = "0.57.0"
|
| 1039 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1040 |
+
checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
|
| 1041 |
+
dependencies = [
|
| 1042 |
+
"proc-macro2",
|
| 1043 |
+
"quote",
|
| 1044 |
+
"syn",
|
| 1045 |
+
]
|
| 1046 |
+
|
| 1047 |
+
[[package]]
|
| 1048 |
+
name = "windows-interface"
|
| 1049 |
+
version = "0.59.3"
|
| 1050 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1051 |
+
checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
|
| 1052 |
+
dependencies = [
|
| 1053 |
+
"proc-macro2",
|
| 1054 |
+
"quote",
|
| 1055 |
+
"syn",
|
| 1056 |
+
]
|
| 1057 |
+
|
| 1058 |
+
[[package]]
|
| 1059 |
+
name = "windows-link"
|
| 1060 |
+
version = "0.1.3"
|
| 1061 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1062 |
+
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
|
| 1063 |
+
|
| 1064 |
+
[[package]]
|
| 1065 |
+
name = "windows-link"
|
| 1066 |
+
version = "0.2.1"
|
| 1067 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1068 |
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
| 1069 |
+
|
| 1070 |
+
[[package]]
|
| 1071 |
+
name = "windows-numerics"
|
| 1072 |
+
version = "0.2.0"
|
| 1073 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1074 |
+
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
|
| 1075 |
+
dependencies = [
|
| 1076 |
+
"windows-core 0.61.2",
|
| 1077 |
+
"windows-link 0.1.3",
|
| 1078 |
+
]
|
| 1079 |
+
|
| 1080 |
+
[[package]]
|
| 1081 |
+
name = "windows-result"
|
| 1082 |
+
version = "0.1.2"
|
| 1083 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1084 |
+
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
|
| 1085 |
+
dependencies = [
|
| 1086 |
+
"windows-targets 0.52.6",
|
| 1087 |
+
]
|
| 1088 |
+
|
| 1089 |
+
[[package]]
|
| 1090 |
+
name = "windows-result"
|
| 1091 |
+
version = "0.3.4"
|
| 1092 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1093 |
+
checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
|
| 1094 |
+
dependencies = [
|
| 1095 |
+
"windows-link 0.1.3",
|
| 1096 |
+
]
|
| 1097 |
+
|
| 1098 |
+
[[package]]
|
| 1099 |
+
name = "windows-strings"
|
| 1100 |
+
version = "0.4.2"
|
| 1101 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1102 |
+
checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
|
| 1103 |
+
dependencies = [
|
| 1104 |
+
"windows-link 0.1.3",
|
| 1105 |
+
]
|
| 1106 |
+
|
| 1107 |
+
[[package]]
|
| 1108 |
+
name = "windows-sys"
|
| 1109 |
+
version = "0.48.0"
|
| 1110 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1111 |
+
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
| 1112 |
+
dependencies = [
|
| 1113 |
+
"windows-targets 0.48.5",
|
| 1114 |
+
]
|
| 1115 |
+
|
| 1116 |
+
[[package]]
|
| 1117 |
+
name = "windows-sys"
|
| 1118 |
+
version = "0.59.0"
|
| 1119 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1120 |
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
| 1121 |
+
dependencies = [
|
| 1122 |
+
"windows-targets 0.52.6",
|
| 1123 |
+
]
|
| 1124 |
+
|
| 1125 |
+
[[package]]
|
| 1126 |
+
name = "windows-sys"
|
| 1127 |
+
version = "0.60.2"
|
| 1128 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1129 |
+
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
|
| 1130 |
+
dependencies = [
|
| 1131 |
+
"windows-targets 0.53.5",
|
| 1132 |
+
]
|
| 1133 |
+
|
| 1134 |
+
[[package]]
|
| 1135 |
+
name = "windows-sys"
|
| 1136 |
+
version = "0.61.2"
|
| 1137 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1138 |
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
| 1139 |
+
dependencies = [
|
| 1140 |
+
"windows-link 0.2.1",
|
| 1141 |
+
]
|
| 1142 |
+
|
| 1143 |
+
[[package]]
|
| 1144 |
+
name = "windows-targets"
|
| 1145 |
+
version = "0.48.5"
|
| 1146 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1147 |
+
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
| 1148 |
+
dependencies = [
|
| 1149 |
+
"windows_aarch64_gnullvm 0.48.5",
|
| 1150 |
+
"windows_aarch64_msvc 0.48.5",
|
| 1151 |
+
"windows_i686_gnu 0.48.5",
|
| 1152 |
+
"windows_i686_msvc 0.48.5",
|
| 1153 |
+
"windows_x86_64_gnu 0.48.5",
|
| 1154 |
+
"windows_x86_64_gnullvm 0.48.5",
|
| 1155 |
+
"windows_x86_64_msvc 0.48.5",
|
| 1156 |
+
]
|
| 1157 |
+
|
| 1158 |
+
[[package]]
|
| 1159 |
+
name = "windows-targets"
|
| 1160 |
+
version = "0.52.6"
|
| 1161 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1162 |
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
| 1163 |
+
dependencies = [
|
| 1164 |
+
"windows_aarch64_gnullvm 0.52.6",
|
| 1165 |
+
"windows_aarch64_msvc 0.52.6",
|
| 1166 |
+
"windows_i686_gnu 0.52.6",
|
| 1167 |
+
"windows_i686_gnullvm 0.52.6",
|
| 1168 |
+
"windows_i686_msvc 0.52.6",
|
| 1169 |
+
"windows_x86_64_gnu 0.52.6",
|
| 1170 |
+
"windows_x86_64_gnullvm 0.52.6",
|
| 1171 |
+
"windows_x86_64_msvc 0.52.6",
|
| 1172 |
+
]
|
| 1173 |
+
|
| 1174 |
+
[[package]]
|
| 1175 |
+
name = "windows-targets"
|
| 1176 |
+
version = "0.53.5"
|
| 1177 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1178 |
+
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
|
| 1179 |
+
dependencies = [
|
| 1180 |
+
"windows-link 0.2.1",
|
| 1181 |
+
"windows_aarch64_gnullvm 0.53.1",
|
| 1182 |
+
"windows_aarch64_msvc 0.53.1",
|
| 1183 |
+
"windows_i686_gnu 0.53.1",
|
| 1184 |
+
"windows_i686_gnullvm 0.53.1",
|
| 1185 |
+
"windows_i686_msvc 0.53.1",
|
| 1186 |
+
"windows_x86_64_gnu 0.53.1",
|
| 1187 |
+
"windows_x86_64_gnullvm 0.53.1",
|
| 1188 |
+
"windows_x86_64_msvc 0.53.1",
|
| 1189 |
+
]
|
| 1190 |
+
|
| 1191 |
+
[[package]]
|
| 1192 |
+
name = "windows-threading"
|
| 1193 |
+
version = "0.1.0"
|
| 1194 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1195 |
+
checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
|
| 1196 |
+
dependencies = [
|
| 1197 |
+
"windows-link 0.1.3",
|
| 1198 |
+
]
|
| 1199 |
+
|
| 1200 |
+
[[package]]
|
| 1201 |
+
name = "windows_aarch64_gnullvm"
|
| 1202 |
+
version = "0.48.5"
|
| 1203 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1204 |
+
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
| 1205 |
+
|
| 1206 |
+
[[package]]
|
| 1207 |
+
name = "windows_aarch64_gnullvm"
|
| 1208 |
+
version = "0.52.6"
|
| 1209 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1210 |
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
| 1211 |
+
|
| 1212 |
+
[[package]]
|
| 1213 |
+
name = "windows_aarch64_gnullvm"
|
| 1214 |
+
version = "0.53.1"
|
| 1215 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1216 |
+
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
|
| 1217 |
+
|
| 1218 |
+
[[package]]
|
| 1219 |
+
name = "windows_aarch64_msvc"
|
| 1220 |
+
version = "0.48.5"
|
| 1221 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1222 |
+
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
| 1223 |
+
|
| 1224 |
+
[[package]]
|
| 1225 |
+
name = "windows_aarch64_msvc"
|
| 1226 |
+
version = "0.52.6"
|
| 1227 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1228 |
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
| 1229 |
+
|
| 1230 |
+
[[package]]
|
| 1231 |
+
name = "windows_aarch64_msvc"
|
| 1232 |
+
version = "0.53.1"
|
| 1233 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1234 |
+
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
|
| 1235 |
+
|
| 1236 |
+
[[package]]
|
| 1237 |
+
name = "windows_i686_gnu"
|
| 1238 |
+
version = "0.48.5"
|
| 1239 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1240 |
+
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
| 1241 |
+
|
| 1242 |
+
[[package]]
|
| 1243 |
+
name = "windows_i686_gnu"
|
| 1244 |
+
version = "0.52.6"
|
| 1245 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1246 |
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
| 1247 |
+
|
| 1248 |
+
[[package]]
|
| 1249 |
+
name = "windows_i686_gnu"
|
| 1250 |
+
version = "0.53.1"
|
| 1251 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1252 |
+
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
|
| 1253 |
+
|
| 1254 |
+
[[package]]
|
| 1255 |
+
name = "windows_i686_gnullvm"
|
| 1256 |
+
version = "0.52.6"
|
| 1257 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1258 |
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
| 1259 |
+
|
| 1260 |
+
[[package]]
|
| 1261 |
+
name = "windows_i686_gnullvm"
|
| 1262 |
+
version = "0.53.1"
|
| 1263 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1264 |
+
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
|
| 1265 |
+
|
| 1266 |
+
[[package]]
|
| 1267 |
+
name = "windows_i686_msvc"
|
| 1268 |
+
version = "0.48.5"
|
| 1269 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1270 |
+
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
| 1271 |
+
|
| 1272 |
+
[[package]]
|
| 1273 |
+
name = "windows_i686_msvc"
|
| 1274 |
+
version = "0.52.6"
|
| 1275 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1276 |
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
| 1277 |
+
|
| 1278 |
+
[[package]]
|
| 1279 |
+
name = "windows_i686_msvc"
|
| 1280 |
+
version = "0.53.1"
|
| 1281 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1282 |
+
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
|
| 1283 |
+
|
| 1284 |
+
[[package]]
|
| 1285 |
+
name = "windows_x86_64_gnu"
|
| 1286 |
+
version = "0.48.5"
|
| 1287 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1288 |
+
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
| 1289 |
+
|
| 1290 |
+
[[package]]
|
| 1291 |
+
name = "windows_x86_64_gnu"
|
| 1292 |
+
version = "0.52.6"
|
| 1293 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1294 |
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
| 1295 |
+
|
| 1296 |
+
[[package]]
|
| 1297 |
+
name = "windows_x86_64_gnu"
|
| 1298 |
+
version = "0.53.1"
|
| 1299 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1300 |
+
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
|
| 1301 |
+
|
| 1302 |
+
[[package]]
|
| 1303 |
+
name = "windows_x86_64_gnullvm"
|
| 1304 |
+
version = "0.48.5"
|
| 1305 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1306 |
+
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
| 1307 |
+
|
| 1308 |
+
[[package]]
|
| 1309 |
+
name = "windows_x86_64_gnullvm"
|
| 1310 |
+
version = "0.52.6"
|
| 1311 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1312 |
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
| 1313 |
+
|
| 1314 |
+
[[package]]
|
| 1315 |
+
name = "windows_x86_64_gnullvm"
|
| 1316 |
+
version = "0.53.1"
|
| 1317 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1318 |
+
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
|
| 1319 |
+
|
| 1320 |
+
[[package]]
|
| 1321 |
+
name = "windows_x86_64_msvc"
|
| 1322 |
+
version = "0.48.5"
|
| 1323 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1324 |
+
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
| 1325 |
+
|
| 1326 |
+
[[package]]
|
| 1327 |
+
name = "windows_x86_64_msvc"
|
| 1328 |
+
version = "0.52.6"
|
| 1329 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1330 |
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
| 1331 |
+
|
| 1332 |
+
[[package]]
|
| 1333 |
+
name = "windows_x86_64_msvc"
|
| 1334 |
+
version = "0.53.1"
|
| 1335 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1336 |
+
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
|
| 1337 |
+
LOCKEOF
|
| 1338 |
+
|
| 1339 |
+
# Prefetch the exact pinned dependency closure into the shared Cargo cache.
|
| 1340 |
+
# `cargo fetch --locked` is idempotent; a real failure propagates as nonzero.
|
| 1341 |
+
cargo fetch --locked --manifest-path "${RW}/Cargo.toml"
|
cesarferreira--rip.83f0260/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab3015af45b26ce510d4499cb26644ebfc19bee5a255f88fd93442d81760b452
|
| 3 |
+
size 2507712
|
cesarferreira--rip.83f0260/environment/harbor_prepare_download_env.sh
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
command -v cargo
|
| 4 |
+
command -v rustc
|
| 5 |
+
command -v rustup
|
| 6 |
+
cd /workspace
|
| 7 |
+
set -a
|
| 8 |
+
source /tmp/programgym-download.sh
|
| 9 |
+
set +a
|
| 10 |
+
python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
|
| 11 |
+
import os
|
| 12 |
+
import shlex
|
| 13 |
+
|
| 14 |
+
ignored = {
|
| 15 |
+
"ALL_PROXY",
|
| 16 |
+
"HTTP_PROXY",
|
| 17 |
+
"HTTPS_PROXY",
|
| 18 |
+
"NO_PROXY",
|
| 19 |
+
"OLDPWD",
|
| 20 |
+
"PIP_PROXY",
|
| 21 |
+
"PWD",
|
| 22 |
+
"SHLVL",
|
| 23 |
+
"_",
|
| 24 |
+
"all_proxy",
|
| 25 |
+
"http_proxy",
|
| 26 |
+
"https_proxy",
|
| 27 |
+
"no_proxy",
|
| 28 |
+
"pip_proxy",
|
| 29 |
+
}
|
| 30 |
+
for key in sorted(os.environ):
|
| 31 |
+
if key in ignored or key.startswith("BASH_FUNC_"):
|
| 32 |
+
continue
|
| 33 |
+
value = os.environ[key]
|
| 34 |
+
if "\n" in value:
|
| 35 |
+
continue
|
| 36 |
+
print(f"export {key}={shlex.quote(value)}")
|
| 37 |
+
PY
|
cesarferreira--rip.83f0260/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29adea751b471e397bbb70b823d55e27989ef52890a3273b53cda0ffd25f7dc2
|
| 3 |
+
size 524795
|
cesarferreira--rip.83f0260/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
|
cesarferreira--rip.83f0260/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
|
cesarferreira--rip.83f0260/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/cesarferreira--rip.83f0260"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for cesarferreira/rip"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "rust"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "cesarferreira__rip.83f0260"
|
| 32 |
+
repository = "cesarferreira/rip"
|
| 33 |
+
commit = "83f0260229489cd3db2f60316bf2a9939b87c4a6"
|
| 34 |
+
language = "rust"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.909020854211156
|
| 37 |
+
test_branches = 1
|
| 38 |
+
test_count = 162
|
| 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"
|
cesarferreira--rip.83f0260/tests/Dockerfile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM rust:1.97.1-bookworm
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV CARGO_HOME=/usr/local/cargo
|
| 24 |
+
ENV RUSTUP_HOME=/usr/local/rustup
|
| 25 |
+
ENV RUSTUP_TOOLCHAIN=1.97.1
|
| 26 |
+
ENV PROGRAMGYM_RUST_TOOLCHAIN=1.97.1
|
| 27 |
+
ENV PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 28 |
+
ENV PAGER=cat
|
| 29 |
+
ENV MANPAGER=cat
|
| 30 |
+
ENV LESS=-R
|
| 31 |
+
ENV TQDM_DISABLE=1
|
| 32 |
+
RUN apt-get update && apt-get install -y --no-install-recommends apt=2.6.1 bash=5.2.15-2+b13 build-essential=12.9 ca-certificates=20250419~deb12u1 cmake=3.25.1-1 git=1:2.39.5-0+deb12u3 make=4.3-4.1 pkg-config=1.8.1-1 python3=3.11.2-1+b1 python3-pip=23.0.1+dfsg-1 python3-dev=3.11.2-1+b1 autoconf=2.71-3 automake=1:1.16.5-1.3 gettext=0.21-12 file=1:5.44-3 binutils=2.40-2 libtool=2.4.7-7~deb12u1 libncurses-dev=6.4-4 meson=1.0.1-5 ninja-build=1.11.1-2~deb12u1 curl=7.88.1-10+deb12u15 wget=1.21.3-1+deb12u1 xz-utils=5.4.1-1+deb12u1 zstd=1.5.4+dfsg2-5 bzip2=1.0.8-5+b1 zip=3.0-13 unzip=6.0-28+deb12u1 patch=2.7.6-7 grep=3.8-5 python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 33 |
+
RUN rustup component add llvm-tools-preview --toolchain 1.97.1
|
| 34 |
+
RUN RUST_SYSROOT="$(rustc --print sysroot)"; RUST_HOST="$(rustc -vV | sed -n 's/^host: //p')"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-profdata"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-cov"
|
| 35 |
+
RUN rustc --version && cargo --version && rustup show active-toolchain
|
| 36 |
+
WORKDIR /workspace
|
| 37 |
+
ADD workspace.tar.gz /workspace/
|
| 38 |
+
COPY executable /workspace/executable
|
| 39 |
+
COPY download.sh /tmp/programgym-download.sh
|
| 40 |
+
RUN chmod 755 /tmp/programgym-download.sh
|
| 41 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 42 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 43 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 44 |
+
&& rm -f /tmp/programgym-download.sh \
|
| 45 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 46 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 47 |
+
RUN chmod 111 /workspace/executable
|
| 48 |
+
WORKDIR /workspace
|
| 49 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 50 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 51 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 52 |
+
&& mkdir -p /workspace /tests
|
| 53 |
+
|
| 54 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 55 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 56 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 57 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 58 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 59 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 60 |
+
RUN python3 -m pip install --break-system-packages \
|
| 61 |
+
--no-cache-dir --disable-pip-version-check \
|
| 62 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 63 |
+
|
| 64 |
+
COPY test.sh /tests/test.sh
|
| 65 |
+
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
|
cesarferreira--rip.83f0260/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:ea6f3d15be29b89c41e583ebd1018b5c29b048449471c9d1805c7ae0e6650ed6
|
| 3 |
+
size 15979
|