Datasets:
commit (part 45)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +8 -0
- ggerganov--imtui.b7c0887/tests/Dockerfile +1 -0
- ghtz08--kugou-kgm-decoder.20ee463/environment/Dockerfile +60 -0
- ghtz08--kugou-kgm-decoder.20ee463/environment/download.sh +484 -0
- ghtz08--kugou-kgm-decoder.20ee463/environment/executable +3 -0
- ghtz08--kugou-kgm-decoder.20ee463/environment/harbor_prepare_download_env.sh +37 -0
- ghtz08--kugou-kgm-decoder.20ee463/environment/workspace.tar.gz +3 -0
- ghtz08--kugou-kgm-decoder.20ee463/instruction.md +98 -0
- ghtz08--kugou-kgm-decoder.20ee463/solution/solve.sh +33 -0
- ghtz08--kugou-kgm-decoder.20ee463/task.toml +69 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/Dockerfile +69 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/blobs/tests/generated_module_04.tar.gz +3 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/download.sh +484 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/executable +3 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/harbor_prepare_download_env.sh +37 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/programgym_evaluator.py +1201 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/programgym_task.json +1392 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/test.sh +82 -0
- ghtz08--kugou-kgm-decoder.20ee463/tests/workspace.tar.gz +3 -0
- giacomo-b--cpprobotics.e2b5cda/environment/Dockerfile +1 -0
- giacomo-b--cpprobotics.e2b5cda/tests/Dockerfile +1 -0
- gibtnix--msiklm.e9a7594/environment/Dockerfile +1 -0
- gibtnix--msiklm.e9a7594/tests/Dockerfile +1 -0
- gillesdebunne--libqglviewer.da4bfad/environment/Dockerfile +65 -0
- gillesdebunne--libqglviewer.da4bfad/environment/docker-compose.yaml +11 -0
- gillesdebunne--libqglviewer.da4bfad/environment/download.sh +60 -0
- gillesdebunne--libqglviewer.da4bfad/environment/executable +0 -0
- gillesdebunne--libqglviewer.da4bfad/environment/harbor_configure_apt_mirror.sh +37 -0
- gillesdebunne--libqglviewer.da4bfad/environment/harbor_prepare_download_env.sh +34 -0
- gillesdebunne--libqglviewer.da4bfad/environment/workspace.tar.gz +3 -0
- gillesdebunne--libqglviewer.da4bfad/instruction.md +98 -0
- gillesdebunne--libqglviewer.da4bfad/solution/solve.sh +33 -0
- gillesdebunne--libqglviewer.da4bfad/task.toml +69 -0
- gillesdebunne--libqglviewer.da4bfad/tests/Dockerfile +73 -0
- gillesdebunne--libqglviewer.da4bfad/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- gillesdebunne--libqglviewer.da4bfad/tests/blobs/tests/generated_module_04.tar.gz +3 -0
- gillesdebunne--libqglviewer.da4bfad/tests/blobs/tests/generated_module_05.tar.gz +3 -0
- gillesdebunne--libqglviewer.da4bfad/tests/blobs/tests/generated_module_06.tar.gz +3 -0
- gillesdebunne--libqglviewer.da4bfad/tests/docker-compose.yaml +11 -0
- gillesdebunne--libqglviewer.da4bfad/tests/download.sh +60 -0
- gillesdebunne--libqglviewer.da4bfad/tests/executable +0 -0
- gillesdebunne--libqglviewer.da4bfad/tests/harbor_configure_apt_mirror.sh +37 -0
- gillesdebunne--libqglviewer.da4bfad/tests/harbor_prepare_download_env.sh +34 -0
- gillesdebunne--libqglviewer.da4bfad/tests/programgym_evaluator.py +1201 -0
- gillesdebunne--libqglviewer.da4bfad/tests/programgym_task.json +272 -0
- gillesdebunne--libqglviewer.da4bfad/tests/test.sh +82 -0
- gillesdebunne--libqglviewer.da4bfad/tests/workspace.tar.gz +3 -0
.gitattributes
CHANGED
|
@@ -3242,3 +3242,11 @@ genbattle--dkm.7207b7a/environment/executable filter=lfs diff=lfs merge=lfs -tex
|
|
| 3242 |
genbattle--dkm.7207b7a/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 3243 |
gepser--markdown-progress.0441c83/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 3244 |
gepser--markdown-progress.0441c83/tests/executable filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3242 |
genbattle--dkm.7207b7a/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 3243 |
gepser--markdown-progress.0441c83/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 3244 |
gepser--markdown-progress.0441c83/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 3245 |
+
ghtz08--kugou-kgm-decoder.20ee463/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 3246 |
+
ghtz08--kugou-kgm-decoder.20ee463/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 3247 |
+
git-hooks--git-hooks.fd3d80c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 3248 |
+
git-hooks--git-hooks.fd3d80c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 3249 |
+
github-release--github-release.2c19b11/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 3250 |
+
github-release--github-release.2c19b11/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 3251 |
+
githubnemo--compiledaemon.6cc7bd4/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 3252 |
+
githubnemo--compiledaemon.6cc7bd4/tests/executable filter=lfs diff=lfs merge=lfs -text
|
ggerganov--imtui.b7c0887/tests/Dockerfile
CHANGED
|
@@ -61,3 +61,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
|
| 61 |
COPY programgym_task.json /tests/programgym_task.json
|
| 62 |
COPY blobs/ /tests/blobs/
|
| 63 |
RUN chmod +x /tests/test.sh
|
|
|
|
|
|
| 61 |
COPY programgym_task.json /tests/programgym_task.json
|
| 62 |
COPY blobs/ /tests/blobs/
|
| 63 |
RUN chmod +x /tests/test.sh
|
| 64 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
ghtz08--kugou-kgm-decoder.20ee463/environment/Dockerfile
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 60 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
ghtz08--kugou-kgm-decoder.20ee463/environment/download.sh
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# download.sh — ProgramGym networked dependency prefetch for kgm-decoder
|
| 4 |
+
#
|
| 5 |
+
# This script is executed via `source /source_ro/download.sh`, so it must be
|
| 6 |
+
# source-safe: all env vars are exported, no positional args are used, and it
|
| 7 |
+
# never calls `exit` in normal control flow.
|
| 8 |
+
#
|
| 9 |
+
# It ONLY fetches Cargo dependencies and prepares the registry cache. It
|
| 10 |
+
# performs no compile, link, test, package, or install step for the project.
|
| 11 |
+
#
|
| 12 |
+
# The repository source tree is NOT available during the download stage, so all
|
| 13 |
+
# dependency information is embedded inline here. We generate a temporary
|
| 14 |
+
# Cargo.toml AND the exact Cargo.lock (mirror of the repository lockfile) from
|
| 15 |
+
# inline heredocs, then run `cargo fetch --locked --manifest-path` against them.
|
| 16 |
+
# `--locked` forces the offline resolver in build.sh to use exactly these
|
| 17 |
+
# pinned versions, and ensures every transitive crate they need is fetched.
|
| 18 |
+
|
| 19 |
+
# ---------------------------------------------------------------------------
|
| 20 |
+
# Generated temporary manifest + lockfile for kgm-decoder
|
| 21 |
+
# ---------------------------------------------------------------------------
|
| 22 |
+
|
| 23 |
+
cargo_home_default="${HOME:-/root}/.cargo"
|
| 24 |
+
export CARGO_HOME="${CARGO_HOME:-$cargo_home_default}"
|
| 25 |
+
|
| 26 |
+
tmpdir="${TMPDIR:-/tmp}/kgm-download-$$"
|
| 27 |
+
mkdir -p "$tmpdir/src"
|
| 28 |
+
|
| 29 |
+
# Inline manifest mirroring the repository Cargo.toml dependency ranges.
|
| 30 |
+
cat > "$tmpdir/Cargo.toml" <<'TOML'
|
| 31 |
+
[package]
|
| 32 |
+
name = "kgm-decoder"
|
| 33 |
+
version = "0.1.3-dev"
|
| 34 |
+
edition = "2024"
|
| 35 |
+
|
| 36 |
+
[dependencies]
|
| 37 |
+
clap = { version = "4.5.40", features = ["derive"] }
|
| 38 |
+
infer = "0.19.0"
|
| 39 |
+
xz2 = "0.1.7"
|
| 40 |
+
TOML
|
| 41 |
+
|
| 42 |
+
# Minimal stub so the package resolves during `cargo fetch --locked`. The real
|
| 43 |
+
# bin is src/main.rs in the repository; cargo fetch does not compile it.
|
| 44 |
+
cat > "$tmpdir/src/main.rs" <<'RS'
|
| 45 |
+
fn main() {}
|
| 46 |
+
RS
|
| 47 |
+
|
| 48 |
+
# Exact Cargo.lock mirroring the repository lockfile so the offline build
|
| 49 |
+
# resolves the identical dependency graph (must match our embedded manifest).
|
| 50 |
+
cat > "$tmpdir/Cargo.lock" <<'LOCK'
|
| 51 |
+
# This file is automatically @generated by Cargo.
|
| 52 |
+
# It is not intended for manual editing.
|
| 53 |
+
version = 4
|
| 54 |
+
|
| 55 |
+
[[package]]
|
| 56 |
+
name = "anstream"
|
| 57 |
+
version = "0.6.18"
|
| 58 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 59 |
+
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
|
| 60 |
+
dependencies = [
|
| 61 |
+
"anstyle",
|
| 62 |
+
"anstyle-parse",
|
| 63 |
+
"anstyle-query",
|
| 64 |
+
"anstyle-wincon",
|
| 65 |
+
"colorchoice",
|
| 66 |
+
"is_terminal_polyfill",
|
| 67 |
+
"utf8parse",
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
[[package]]
|
| 71 |
+
name = "anstyle"
|
| 72 |
+
version = "1.0.10"
|
| 73 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 74 |
+
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
| 75 |
+
|
| 76 |
+
[[package]]
|
| 77 |
+
name = "anstyle-parse"
|
| 78 |
+
version = "0.2.6"
|
| 79 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 80 |
+
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
|
| 81 |
+
dependencies = [
|
| 82 |
+
"utf8parse",
|
| 83 |
+
]
|
| 84 |
+
|
| 85 |
+
[[package]]
|
| 86 |
+
name = "anstyle-query"
|
| 87 |
+
version = "1.1.2"
|
| 88 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 89 |
+
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
|
| 90 |
+
dependencies = [
|
| 91 |
+
"windows-sys",
|
| 92 |
+
]
|
| 93 |
+
|
| 94 |
+
[[package]]
|
| 95 |
+
name = "anstyle-wincon"
|
| 96 |
+
version = "3.0.7"
|
| 97 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 98 |
+
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
|
| 99 |
+
dependencies = [
|
| 100 |
+
"anstyle",
|
| 101 |
+
"once_cell",
|
| 102 |
+
"windows-sys",
|
| 103 |
+
]
|
| 104 |
+
|
| 105 |
+
[[package]]
|
| 106 |
+
name = "bumpalo"
|
| 107 |
+
version = "3.19.0"
|
| 108 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 109 |
+
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
| 110 |
+
|
| 111 |
+
[[package]]
|
| 112 |
+
name = "byteorder"
|
| 113 |
+
version = "1.5.0"
|
| 114 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 115 |
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
| 116 |
+
|
| 117 |
+
[[package]]
|
| 118 |
+
name = "cc"
|
| 119 |
+
version = "1.2.17"
|
| 120 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 121 |
+
checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a"
|
| 122 |
+
dependencies = [
|
| 123 |
+
"shlex",
|
| 124 |
+
]
|
| 125 |
+
|
| 126 |
+
[[package]]
|
| 127 |
+
name = "cfb"
|
| 128 |
+
version = "0.7.3"
|
| 129 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 130 |
+
checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"
|
| 131 |
+
dependencies = [
|
| 132 |
+
"byteorder",
|
| 133 |
+
"fnv",
|
| 134 |
+
"uuid",
|
| 135 |
+
]
|
| 136 |
+
|
| 137 |
+
[[package]]
|
| 138 |
+
name = "cfg-if"
|
| 139 |
+
version = "1.0.1"
|
| 140 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 141 |
+
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
| 142 |
+
|
| 143 |
+
[[package]]
|
| 144 |
+
name = "clap"
|
| 145 |
+
version = "4.5.40"
|
| 146 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 147 |
+
checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f"
|
| 148 |
+
dependencies = [
|
| 149 |
+
"clap_builder",
|
| 150 |
+
"clap_derive",
|
| 151 |
+
]
|
| 152 |
+
|
| 153 |
+
[[package]]
|
| 154 |
+
name = "clap_builder"
|
| 155 |
+
version = "4.5.40"
|
| 156 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 157 |
+
checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e"
|
| 158 |
+
dependencies = [
|
| 159 |
+
"anstream",
|
| 160 |
+
"anstyle",
|
| 161 |
+
"clap_lex",
|
| 162 |
+
"strsim",
|
| 163 |
+
]
|
| 164 |
+
|
| 165 |
+
[[package]]
|
| 166 |
+
name = "clap_derive"
|
| 167 |
+
version = "4.5.40"
|
| 168 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 169 |
+
checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce"
|
| 170 |
+
dependencies = [
|
| 171 |
+
"heck",
|
| 172 |
+
"proc-macro2",
|
| 173 |
+
"quote",
|
| 174 |
+
"syn",
|
| 175 |
+
]
|
| 176 |
+
|
| 177 |
+
[[package]]
|
| 178 |
+
name = "clap_lex"
|
| 179 |
+
version = "0.7.4"
|
| 180 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 181 |
+
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
| 182 |
+
|
| 183 |
+
[[package]]
|
| 184 |
+
name = "colorchoice"
|
| 185 |
+
version = "1.0.3"
|
| 186 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 187 |
+
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
| 188 |
+
|
| 189 |
+
[[package]]
|
| 190 |
+
name = "fnv"
|
| 191 |
+
version = "1.0.7"
|
| 192 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 193 |
+
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
| 194 |
+
|
| 195 |
+
[[package]]
|
| 196 |
+
name = "heck"
|
| 197 |
+
version = "0.5.0"
|
| 198 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 199 |
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
| 200 |
+
|
| 201 |
+
[[package]]
|
| 202 |
+
name = "infer"
|
| 203 |
+
version = "0.19.0"
|
| 204 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 205 |
+
checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7"
|
| 206 |
+
dependencies = [
|
| 207 |
+
"cfb",
|
| 208 |
+
]
|
| 209 |
+
|
| 210 |
+
[[package]]
|
| 211 |
+
name = "is_terminal_polyfill"
|
| 212 |
+
version = "1.70.1"
|
| 213 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 214 |
+
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
| 215 |
+
|
| 216 |
+
[[package]]
|
| 217 |
+
name = "js-sys"
|
| 218 |
+
version = "0.3.77"
|
| 219 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 220 |
+
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
|
| 221 |
+
dependencies = [
|
| 222 |
+
"once_cell",
|
| 223 |
+
"wasm-bindgen",
|
| 224 |
+
]
|
| 225 |
+
|
| 226 |
+
[[package]]
|
| 227 |
+
name = "kgm-decoder"
|
| 228 |
+
version = "0.1.3-dev"
|
| 229 |
+
dependencies = [
|
| 230 |
+
"clap",
|
| 231 |
+
"infer",
|
| 232 |
+
"xz2",
|
| 233 |
+
]
|
| 234 |
+
|
| 235 |
+
[[package]]
|
| 236 |
+
name = "libc"
|
| 237 |
+
version = "0.2.171"
|
| 238 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 239 |
+
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
|
| 240 |
+
|
| 241 |
+
[[package]]
|
| 242 |
+
name = "log"
|
| 243 |
+
version = "0.4.27"
|
| 244 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 245 |
+
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
| 246 |
+
|
| 247 |
+
[[package]]
|
| 248 |
+
name = "lzma-sys"
|
| 249 |
+
version = "0.1.20"
|
| 250 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 251 |
+
checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
|
| 252 |
+
dependencies = [
|
| 253 |
+
"cc",
|
| 254 |
+
"libc",
|
| 255 |
+
"pkg-config",
|
| 256 |
+
]
|
| 257 |
+
|
| 258 |
+
[[package]]
|
| 259 |
+
name = "once_cell"
|
| 260 |
+
version = "1.21.1"
|
| 261 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 262 |
+
checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
|
| 263 |
+
|
| 264 |
+
[[package]]
|
| 265 |
+
name = "pkg-config"
|
| 266 |
+
version = "0.3.32"
|
| 267 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 268 |
+
checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
|
| 269 |
+
|
| 270 |
+
[[package]]
|
| 271 |
+
name = "proc-macro2"
|
| 272 |
+
version = "1.0.94"
|
| 273 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 274 |
+
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
| 275 |
+
dependencies = [
|
| 276 |
+
"unicode-ident",
|
| 277 |
+
]
|
| 278 |
+
|
| 279 |
+
[[package]]
|
| 280 |
+
name = "quote"
|
| 281 |
+
version = "1.0.40"
|
| 282 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 283 |
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
| 284 |
+
dependencies = [
|
| 285 |
+
"proc-macro2",
|
| 286 |
+
]
|
| 287 |
+
|
| 288 |
+
[[package]]
|
| 289 |
+
name = "rustversion"
|
| 290 |
+
version = "1.0.21"
|
| 291 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 292 |
+
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
|
| 293 |
+
|
| 294 |
+
[[package]]
|
| 295 |
+
name = "shlex"
|
| 296 |
+
version = "1.3.0"
|
| 297 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 298 |
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
| 299 |
+
|
| 300 |
+
[[package]]
|
| 301 |
+
name = "strsim"
|
| 302 |
+
version = "0.11.1"
|
| 303 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 304 |
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
| 305 |
+
|
| 306 |
+
[[package]]
|
| 307 |
+
name = "syn"
|
| 308 |
+
version = "2.0.100"
|
| 309 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 310 |
+
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
|
| 311 |
+
dependencies = [
|
| 312 |
+
"proc-macro2",
|
| 313 |
+
"quote",
|
| 314 |
+
"unicode-ident",
|
| 315 |
+
]
|
| 316 |
+
|
| 317 |
+
[[package]]
|
| 318 |
+
name = "unicode-ident"
|
| 319 |
+
version = "1.0.18"
|
| 320 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 321 |
+
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
| 322 |
+
|
| 323 |
+
[[package]]
|
| 324 |
+
name = "utf8parse"
|
| 325 |
+
version = "0.2.2"
|
| 326 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 327 |
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
| 328 |
+
|
| 329 |
+
[[package]]
|
| 330 |
+
name = "uuid"
|
| 331 |
+
version = "1.17.0"
|
| 332 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 333 |
+
checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d"
|
| 334 |
+
dependencies = [
|
| 335 |
+
"js-sys",
|
| 336 |
+
"wasm-bindgen",
|
| 337 |
+
]
|
| 338 |
+
|
| 339 |
+
[[package]]
|
| 340 |
+
name = "wasm-bindgen"
|
| 341 |
+
version = "0.2.100"
|
| 342 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 343 |
+
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
| 344 |
+
dependencies = [
|
| 345 |
+
"cfg-if",
|
| 346 |
+
"once_cell",
|
| 347 |
+
"rustversion",
|
| 348 |
+
"wasm-bindgen-macro",
|
| 349 |
+
]
|
| 350 |
+
|
| 351 |
+
[[package]]
|
| 352 |
+
name = "wasm-bindgen-backend"
|
| 353 |
+
version = "0.2.100"
|
| 354 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 355 |
+
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
| 356 |
+
dependencies = [
|
| 357 |
+
"bumpalo",
|
| 358 |
+
"log",
|
| 359 |
+
"proc-macro2",
|
| 360 |
+
"quote",
|
| 361 |
+
"syn",
|
| 362 |
+
"wasm-bindgen-shared",
|
| 363 |
+
]
|
| 364 |
+
|
| 365 |
+
[[package]]
|
| 366 |
+
name = "wasm-bindgen-macro"
|
| 367 |
+
version = "0.2.100"
|
| 368 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 369 |
+
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
| 370 |
+
dependencies = [
|
| 371 |
+
"quote",
|
| 372 |
+
"wasm-bindgen-macro-support",
|
| 373 |
+
]
|
| 374 |
+
|
| 375 |
+
[[package]]
|
| 376 |
+
name = "wasm-bindgen-macro-support"
|
| 377 |
+
version = "0.2.100"
|
| 378 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 379 |
+
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
| 380 |
+
dependencies = [
|
| 381 |
+
"proc-macro2",
|
| 382 |
+
"quote",
|
| 383 |
+
"syn",
|
| 384 |
+
"wasm-bindgen-backend",
|
| 385 |
+
"wasm-bindgen-shared",
|
| 386 |
+
]
|
| 387 |
+
|
| 388 |
+
[[package]]
|
| 389 |
+
name = "wasm-bindgen-shared"
|
| 390 |
+
version = "0.2.100"
|
| 391 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 392 |
+
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
| 393 |
+
dependencies = [
|
| 394 |
+
"unicode-ident",
|
| 395 |
+
]
|
| 396 |
+
|
| 397 |
+
[[package]]
|
| 398 |
+
name = "windows-sys"
|
| 399 |
+
version = "0.59.0"
|
| 400 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 401 |
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
| 402 |
+
dependencies = [
|
| 403 |
+
"windows-targets",
|
| 404 |
+
]
|
| 405 |
+
|
| 406 |
+
[[package]]
|
| 407 |
+
name = "windows-targets"
|
| 408 |
+
version = "0.52.6"
|
| 409 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 410 |
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
| 411 |
+
dependencies = [
|
| 412 |
+
"windows_aarch64_gnullvm",
|
| 413 |
+
"windows_aarch64_msvc",
|
| 414 |
+
"windows_i686_gnu",
|
| 415 |
+
"windows_i686_gnullvm",
|
| 416 |
+
"windows_i686_msvc",
|
| 417 |
+
"windows_x86_64_gnu",
|
| 418 |
+
"windows_x86_64_gnullvm",
|
| 419 |
+
"windows_x86_64_msvc",
|
| 420 |
+
]
|
| 421 |
+
|
| 422 |
+
[[package]]
|
| 423 |
+
name = "windows_aarch64_gnullvm"
|
| 424 |
+
version = "0.52.6"
|
| 425 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 426 |
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
| 427 |
+
|
| 428 |
+
[[package]]
|
| 429 |
+
name = "windows_aarch64_msvc"
|
| 430 |
+
version = "0.52.6"
|
| 431 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 432 |
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
| 433 |
+
|
| 434 |
+
[[package]]
|
| 435 |
+
name = "windows_i686_gnu"
|
| 436 |
+
version = "0.52.6"
|
| 437 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 438 |
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
| 439 |
+
|
| 440 |
+
[[package]]
|
| 441 |
+
name = "windows_i686_gnullvm"
|
| 442 |
+
version = "0.52.6"
|
| 443 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 444 |
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
| 445 |
+
|
| 446 |
+
[[package]]
|
| 447 |
+
name = "windows_i686_msvc"
|
| 448 |
+
version = "0.52.6"
|
| 449 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 450 |
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
| 451 |
+
|
| 452 |
+
[[package]]
|
| 453 |
+
name = "windows_x86_64_gnu"
|
| 454 |
+
version = "0.52.6"
|
| 455 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 456 |
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
| 457 |
+
|
| 458 |
+
[[package]]
|
| 459 |
+
name = "windows_x86_64_gnullvm"
|
| 460 |
+
version = "0.52.6"
|
| 461 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 462 |
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
| 463 |
+
|
| 464 |
+
[[package]]
|
| 465 |
+
name = "windows_x86_64_msvc"
|
| 466 |
+
version = "0.52.6"
|
| 467 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 468 |
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
| 469 |
+
|
| 470 |
+
[[package]]
|
| 471 |
+
name = "xz2"
|
| 472 |
+
version = "0.1.7"
|
| 473 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 474 |
+
checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2"
|
| 475 |
+
dependencies = [
|
| 476 |
+
"lzma-sys",
|
| 477 |
+
]
|
| 478 |
+
LOCK
|
| 479 |
+
|
| 480 |
+
# ---------------------------------------------------------------------------
|
| 481 |
+
# Prefetch all locked dependencies into the cargo registry cache (networked
|
| 482 |
+
# stage). `--locked` guarantees build.sh's offline resolver finds every crate.
|
| 483 |
+
# ---------------------------------------------------------------------------
|
| 484 |
+
cargo fetch --locked --manifest-path "$tmpdir/Cargo.toml"
|
ghtz08--kugou-kgm-decoder.20ee463/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad564acc8d9644d23b1d724f06ecf73793fa7d13186479678c20f84a970db5e3
|
| 3 |
+
size 1309992
|
ghtz08--kugou-kgm-decoder.20ee463/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
|
ghtz08--kugou-kgm-decoder.20ee463/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:84e87d24b6a266ceb1645bc58a208ca11d07d16f6c297a9e90b642874213d945
|
| 3 |
+
size 104009
|
ghtz08--kugou-kgm-decoder.20ee463/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
|
ghtz08--kugou-kgm-decoder.20ee463/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
|
ghtz08--kugou-kgm-decoder.20ee463/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/ghtz08--kugou-kgm-decoder.20ee463"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for ghtz08/kugou-kgm-decoder"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "rust"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "ghtz08__kugou-kgm-decoder.20ee463"
|
| 32 |
+
repository = "ghtz08/kugou-kgm-decoder"
|
| 33 |
+
commit = "20ee463537e241de443166aec326b99f3bd8f534"
|
| 34 |
+
language = "rust"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.2127201544178425
|
| 37 |
+
test_branches = 4
|
| 38 |
+
test_count = 642
|
| 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"
|
ghtz08--kugou-kgm-decoder.20ee463/tests/Dockerfile
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 69 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
ghtz08--kugou-kgm-decoder.20ee463/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:6b80b0303c08af3aa67d6f0f9ab320d6364d40cf2e2ec141954791eb159a48dc
|
| 3 |
+
size 26466
|
ghtz08--kugou-kgm-decoder.20ee463/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:5c667a1afed38dd375dd55cc0a25aa7c31fee5aac8edf4aaead81ff85f84e548
|
| 3 |
+
size 19305
|
ghtz08--kugou-kgm-decoder.20ee463/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:ec42fcc34d2b1d2d518d39f7916cfd23a0e9c13396ec3f836b593a791f627d1a
|
| 3 |
+
size 31500
|
ghtz08--kugou-kgm-decoder.20ee463/tests/blobs/tests/generated_module_04.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:124da1e01af72536b517652ceb906141824a727621e420154250cdb51940457e
|
| 3 |
+
size 118771
|
ghtz08--kugou-kgm-decoder.20ee463/tests/download.sh
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# download.sh — ProgramGym networked dependency prefetch for kgm-decoder
|
| 4 |
+
#
|
| 5 |
+
# This script is executed via `source /source_ro/download.sh`, so it must be
|
| 6 |
+
# source-safe: all env vars are exported, no positional args are used, and it
|
| 7 |
+
# never calls `exit` in normal control flow.
|
| 8 |
+
#
|
| 9 |
+
# It ONLY fetches Cargo dependencies and prepares the registry cache. It
|
| 10 |
+
# performs no compile, link, test, package, or install step for the project.
|
| 11 |
+
#
|
| 12 |
+
# The repository source tree is NOT available during the download stage, so all
|
| 13 |
+
# dependency information is embedded inline here. We generate a temporary
|
| 14 |
+
# Cargo.toml AND the exact Cargo.lock (mirror of the repository lockfile) from
|
| 15 |
+
# inline heredocs, then run `cargo fetch --locked --manifest-path` against them.
|
| 16 |
+
# `--locked` forces the offline resolver in build.sh to use exactly these
|
| 17 |
+
# pinned versions, and ensures every transitive crate they need is fetched.
|
| 18 |
+
|
| 19 |
+
# ---------------------------------------------------------------------------
|
| 20 |
+
# Generated temporary manifest + lockfile for kgm-decoder
|
| 21 |
+
# ---------------------------------------------------------------------------
|
| 22 |
+
|
| 23 |
+
cargo_home_default="${HOME:-/root}/.cargo"
|
| 24 |
+
export CARGO_HOME="${CARGO_HOME:-$cargo_home_default}"
|
| 25 |
+
|
| 26 |
+
tmpdir="${TMPDIR:-/tmp}/kgm-download-$$"
|
| 27 |
+
mkdir -p "$tmpdir/src"
|
| 28 |
+
|
| 29 |
+
# Inline manifest mirroring the repository Cargo.toml dependency ranges.
|
| 30 |
+
cat > "$tmpdir/Cargo.toml" <<'TOML'
|
| 31 |
+
[package]
|
| 32 |
+
name = "kgm-decoder"
|
| 33 |
+
version = "0.1.3-dev"
|
| 34 |
+
edition = "2024"
|
| 35 |
+
|
| 36 |
+
[dependencies]
|
| 37 |
+
clap = { version = "4.5.40", features = ["derive"] }
|
| 38 |
+
infer = "0.19.0"
|
| 39 |
+
xz2 = "0.1.7"
|
| 40 |
+
TOML
|
| 41 |
+
|
| 42 |
+
# Minimal stub so the package resolves during `cargo fetch --locked`. The real
|
| 43 |
+
# bin is src/main.rs in the repository; cargo fetch does not compile it.
|
| 44 |
+
cat > "$tmpdir/src/main.rs" <<'RS'
|
| 45 |
+
fn main() {}
|
| 46 |
+
RS
|
| 47 |
+
|
| 48 |
+
# Exact Cargo.lock mirroring the repository lockfile so the offline build
|
| 49 |
+
# resolves the identical dependency graph (must match our embedded manifest).
|
| 50 |
+
cat > "$tmpdir/Cargo.lock" <<'LOCK'
|
| 51 |
+
# This file is automatically @generated by Cargo.
|
| 52 |
+
# It is not intended for manual editing.
|
| 53 |
+
version = 4
|
| 54 |
+
|
| 55 |
+
[[package]]
|
| 56 |
+
name = "anstream"
|
| 57 |
+
version = "0.6.18"
|
| 58 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 59 |
+
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
|
| 60 |
+
dependencies = [
|
| 61 |
+
"anstyle",
|
| 62 |
+
"anstyle-parse",
|
| 63 |
+
"anstyle-query",
|
| 64 |
+
"anstyle-wincon",
|
| 65 |
+
"colorchoice",
|
| 66 |
+
"is_terminal_polyfill",
|
| 67 |
+
"utf8parse",
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
[[package]]
|
| 71 |
+
name = "anstyle"
|
| 72 |
+
version = "1.0.10"
|
| 73 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 74 |
+
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
| 75 |
+
|
| 76 |
+
[[package]]
|
| 77 |
+
name = "anstyle-parse"
|
| 78 |
+
version = "0.2.6"
|
| 79 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 80 |
+
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
|
| 81 |
+
dependencies = [
|
| 82 |
+
"utf8parse",
|
| 83 |
+
]
|
| 84 |
+
|
| 85 |
+
[[package]]
|
| 86 |
+
name = "anstyle-query"
|
| 87 |
+
version = "1.1.2"
|
| 88 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 89 |
+
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
|
| 90 |
+
dependencies = [
|
| 91 |
+
"windows-sys",
|
| 92 |
+
]
|
| 93 |
+
|
| 94 |
+
[[package]]
|
| 95 |
+
name = "anstyle-wincon"
|
| 96 |
+
version = "3.0.7"
|
| 97 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 98 |
+
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
|
| 99 |
+
dependencies = [
|
| 100 |
+
"anstyle",
|
| 101 |
+
"once_cell",
|
| 102 |
+
"windows-sys",
|
| 103 |
+
]
|
| 104 |
+
|
| 105 |
+
[[package]]
|
| 106 |
+
name = "bumpalo"
|
| 107 |
+
version = "3.19.0"
|
| 108 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 109 |
+
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
| 110 |
+
|
| 111 |
+
[[package]]
|
| 112 |
+
name = "byteorder"
|
| 113 |
+
version = "1.5.0"
|
| 114 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 115 |
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
| 116 |
+
|
| 117 |
+
[[package]]
|
| 118 |
+
name = "cc"
|
| 119 |
+
version = "1.2.17"
|
| 120 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 121 |
+
checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a"
|
| 122 |
+
dependencies = [
|
| 123 |
+
"shlex",
|
| 124 |
+
]
|
| 125 |
+
|
| 126 |
+
[[package]]
|
| 127 |
+
name = "cfb"
|
| 128 |
+
version = "0.7.3"
|
| 129 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 130 |
+
checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"
|
| 131 |
+
dependencies = [
|
| 132 |
+
"byteorder",
|
| 133 |
+
"fnv",
|
| 134 |
+
"uuid",
|
| 135 |
+
]
|
| 136 |
+
|
| 137 |
+
[[package]]
|
| 138 |
+
name = "cfg-if"
|
| 139 |
+
version = "1.0.1"
|
| 140 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 141 |
+
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
| 142 |
+
|
| 143 |
+
[[package]]
|
| 144 |
+
name = "clap"
|
| 145 |
+
version = "4.5.40"
|
| 146 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 147 |
+
checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f"
|
| 148 |
+
dependencies = [
|
| 149 |
+
"clap_builder",
|
| 150 |
+
"clap_derive",
|
| 151 |
+
]
|
| 152 |
+
|
| 153 |
+
[[package]]
|
| 154 |
+
name = "clap_builder"
|
| 155 |
+
version = "4.5.40"
|
| 156 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 157 |
+
checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e"
|
| 158 |
+
dependencies = [
|
| 159 |
+
"anstream",
|
| 160 |
+
"anstyle",
|
| 161 |
+
"clap_lex",
|
| 162 |
+
"strsim",
|
| 163 |
+
]
|
| 164 |
+
|
| 165 |
+
[[package]]
|
| 166 |
+
name = "clap_derive"
|
| 167 |
+
version = "4.5.40"
|
| 168 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 169 |
+
checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce"
|
| 170 |
+
dependencies = [
|
| 171 |
+
"heck",
|
| 172 |
+
"proc-macro2",
|
| 173 |
+
"quote",
|
| 174 |
+
"syn",
|
| 175 |
+
]
|
| 176 |
+
|
| 177 |
+
[[package]]
|
| 178 |
+
name = "clap_lex"
|
| 179 |
+
version = "0.7.4"
|
| 180 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 181 |
+
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
| 182 |
+
|
| 183 |
+
[[package]]
|
| 184 |
+
name = "colorchoice"
|
| 185 |
+
version = "1.0.3"
|
| 186 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 187 |
+
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
| 188 |
+
|
| 189 |
+
[[package]]
|
| 190 |
+
name = "fnv"
|
| 191 |
+
version = "1.0.7"
|
| 192 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 193 |
+
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
| 194 |
+
|
| 195 |
+
[[package]]
|
| 196 |
+
name = "heck"
|
| 197 |
+
version = "0.5.0"
|
| 198 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 199 |
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
| 200 |
+
|
| 201 |
+
[[package]]
|
| 202 |
+
name = "infer"
|
| 203 |
+
version = "0.19.0"
|
| 204 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 205 |
+
checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7"
|
| 206 |
+
dependencies = [
|
| 207 |
+
"cfb",
|
| 208 |
+
]
|
| 209 |
+
|
| 210 |
+
[[package]]
|
| 211 |
+
name = "is_terminal_polyfill"
|
| 212 |
+
version = "1.70.1"
|
| 213 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 214 |
+
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
| 215 |
+
|
| 216 |
+
[[package]]
|
| 217 |
+
name = "js-sys"
|
| 218 |
+
version = "0.3.77"
|
| 219 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 220 |
+
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
|
| 221 |
+
dependencies = [
|
| 222 |
+
"once_cell",
|
| 223 |
+
"wasm-bindgen",
|
| 224 |
+
]
|
| 225 |
+
|
| 226 |
+
[[package]]
|
| 227 |
+
name = "kgm-decoder"
|
| 228 |
+
version = "0.1.3-dev"
|
| 229 |
+
dependencies = [
|
| 230 |
+
"clap",
|
| 231 |
+
"infer",
|
| 232 |
+
"xz2",
|
| 233 |
+
]
|
| 234 |
+
|
| 235 |
+
[[package]]
|
| 236 |
+
name = "libc"
|
| 237 |
+
version = "0.2.171"
|
| 238 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 239 |
+
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
|
| 240 |
+
|
| 241 |
+
[[package]]
|
| 242 |
+
name = "log"
|
| 243 |
+
version = "0.4.27"
|
| 244 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 245 |
+
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
| 246 |
+
|
| 247 |
+
[[package]]
|
| 248 |
+
name = "lzma-sys"
|
| 249 |
+
version = "0.1.20"
|
| 250 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 251 |
+
checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
|
| 252 |
+
dependencies = [
|
| 253 |
+
"cc",
|
| 254 |
+
"libc",
|
| 255 |
+
"pkg-config",
|
| 256 |
+
]
|
| 257 |
+
|
| 258 |
+
[[package]]
|
| 259 |
+
name = "once_cell"
|
| 260 |
+
version = "1.21.1"
|
| 261 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 262 |
+
checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
|
| 263 |
+
|
| 264 |
+
[[package]]
|
| 265 |
+
name = "pkg-config"
|
| 266 |
+
version = "0.3.32"
|
| 267 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 268 |
+
checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
|
| 269 |
+
|
| 270 |
+
[[package]]
|
| 271 |
+
name = "proc-macro2"
|
| 272 |
+
version = "1.0.94"
|
| 273 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 274 |
+
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
| 275 |
+
dependencies = [
|
| 276 |
+
"unicode-ident",
|
| 277 |
+
]
|
| 278 |
+
|
| 279 |
+
[[package]]
|
| 280 |
+
name = "quote"
|
| 281 |
+
version = "1.0.40"
|
| 282 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 283 |
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
| 284 |
+
dependencies = [
|
| 285 |
+
"proc-macro2",
|
| 286 |
+
]
|
| 287 |
+
|
| 288 |
+
[[package]]
|
| 289 |
+
name = "rustversion"
|
| 290 |
+
version = "1.0.21"
|
| 291 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 292 |
+
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
|
| 293 |
+
|
| 294 |
+
[[package]]
|
| 295 |
+
name = "shlex"
|
| 296 |
+
version = "1.3.0"
|
| 297 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 298 |
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
| 299 |
+
|
| 300 |
+
[[package]]
|
| 301 |
+
name = "strsim"
|
| 302 |
+
version = "0.11.1"
|
| 303 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 304 |
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
| 305 |
+
|
| 306 |
+
[[package]]
|
| 307 |
+
name = "syn"
|
| 308 |
+
version = "2.0.100"
|
| 309 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 310 |
+
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
|
| 311 |
+
dependencies = [
|
| 312 |
+
"proc-macro2",
|
| 313 |
+
"quote",
|
| 314 |
+
"unicode-ident",
|
| 315 |
+
]
|
| 316 |
+
|
| 317 |
+
[[package]]
|
| 318 |
+
name = "unicode-ident"
|
| 319 |
+
version = "1.0.18"
|
| 320 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 321 |
+
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
| 322 |
+
|
| 323 |
+
[[package]]
|
| 324 |
+
name = "utf8parse"
|
| 325 |
+
version = "0.2.2"
|
| 326 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 327 |
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
| 328 |
+
|
| 329 |
+
[[package]]
|
| 330 |
+
name = "uuid"
|
| 331 |
+
version = "1.17.0"
|
| 332 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 333 |
+
checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d"
|
| 334 |
+
dependencies = [
|
| 335 |
+
"js-sys",
|
| 336 |
+
"wasm-bindgen",
|
| 337 |
+
]
|
| 338 |
+
|
| 339 |
+
[[package]]
|
| 340 |
+
name = "wasm-bindgen"
|
| 341 |
+
version = "0.2.100"
|
| 342 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 343 |
+
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
| 344 |
+
dependencies = [
|
| 345 |
+
"cfg-if",
|
| 346 |
+
"once_cell",
|
| 347 |
+
"rustversion",
|
| 348 |
+
"wasm-bindgen-macro",
|
| 349 |
+
]
|
| 350 |
+
|
| 351 |
+
[[package]]
|
| 352 |
+
name = "wasm-bindgen-backend"
|
| 353 |
+
version = "0.2.100"
|
| 354 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 355 |
+
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
| 356 |
+
dependencies = [
|
| 357 |
+
"bumpalo",
|
| 358 |
+
"log",
|
| 359 |
+
"proc-macro2",
|
| 360 |
+
"quote",
|
| 361 |
+
"syn",
|
| 362 |
+
"wasm-bindgen-shared",
|
| 363 |
+
]
|
| 364 |
+
|
| 365 |
+
[[package]]
|
| 366 |
+
name = "wasm-bindgen-macro"
|
| 367 |
+
version = "0.2.100"
|
| 368 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 369 |
+
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
| 370 |
+
dependencies = [
|
| 371 |
+
"quote",
|
| 372 |
+
"wasm-bindgen-macro-support",
|
| 373 |
+
]
|
| 374 |
+
|
| 375 |
+
[[package]]
|
| 376 |
+
name = "wasm-bindgen-macro-support"
|
| 377 |
+
version = "0.2.100"
|
| 378 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 379 |
+
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
| 380 |
+
dependencies = [
|
| 381 |
+
"proc-macro2",
|
| 382 |
+
"quote",
|
| 383 |
+
"syn",
|
| 384 |
+
"wasm-bindgen-backend",
|
| 385 |
+
"wasm-bindgen-shared",
|
| 386 |
+
]
|
| 387 |
+
|
| 388 |
+
[[package]]
|
| 389 |
+
name = "wasm-bindgen-shared"
|
| 390 |
+
version = "0.2.100"
|
| 391 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 392 |
+
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
| 393 |
+
dependencies = [
|
| 394 |
+
"unicode-ident",
|
| 395 |
+
]
|
| 396 |
+
|
| 397 |
+
[[package]]
|
| 398 |
+
name = "windows-sys"
|
| 399 |
+
version = "0.59.0"
|
| 400 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 401 |
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
| 402 |
+
dependencies = [
|
| 403 |
+
"windows-targets",
|
| 404 |
+
]
|
| 405 |
+
|
| 406 |
+
[[package]]
|
| 407 |
+
name = "windows-targets"
|
| 408 |
+
version = "0.52.6"
|
| 409 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 410 |
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
| 411 |
+
dependencies = [
|
| 412 |
+
"windows_aarch64_gnullvm",
|
| 413 |
+
"windows_aarch64_msvc",
|
| 414 |
+
"windows_i686_gnu",
|
| 415 |
+
"windows_i686_gnullvm",
|
| 416 |
+
"windows_i686_msvc",
|
| 417 |
+
"windows_x86_64_gnu",
|
| 418 |
+
"windows_x86_64_gnullvm",
|
| 419 |
+
"windows_x86_64_msvc",
|
| 420 |
+
]
|
| 421 |
+
|
| 422 |
+
[[package]]
|
| 423 |
+
name = "windows_aarch64_gnullvm"
|
| 424 |
+
version = "0.52.6"
|
| 425 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 426 |
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
| 427 |
+
|
| 428 |
+
[[package]]
|
| 429 |
+
name = "windows_aarch64_msvc"
|
| 430 |
+
version = "0.52.6"
|
| 431 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 432 |
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
| 433 |
+
|
| 434 |
+
[[package]]
|
| 435 |
+
name = "windows_i686_gnu"
|
| 436 |
+
version = "0.52.6"
|
| 437 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 438 |
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
| 439 |
+
|
| 440 |
+
[[package]]
|
| 441 |
+
name = "windows_i686_gnullvm"
|
| 442 |
+
version = "0.52.6"
|
| 443 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 444 |
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
| 445 |
+
|
| 446 |
+
[[package]]
|
| 447 |
+
name = "windows_i686_msvc"
|
| 448 |
+
version = "0.52.6"
|
| 449 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 450 |
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
| 451 |
+
|
| 452 |
+
[[package]]
|
| 453 |
+
name = "windows_x86_64_gnu"
|
| 454 |
+
version = "0.52.6"
|
| 455 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 456 |
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
| 457 |
+
|
| 458 |
+
[[package]]
|
| 459 |
+
name = "windows_x86_64_gnullvm"
|
| 460 |
+
version = "0.52.6"
|
| 461 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 462 |
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
| 463 |
+
|
| 464 |
+
[[package]]
|
| 465 |
+
name = "windows_x86_64_msvc"
|
| 466 |
+
version = "0.52.6"
|
| 467 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 468 |
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
| 469 |
+
|
| 470 |
+
[[package]]
|
| 471 |
+
name = "xz2"
|
| 472 |
+
version = "0.1.7"
|
| 473 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 474 |
+
checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2"
|
| 475 |
+
dependencies = [
|
| 476 |
+
"lzma-sys",
|
| 477 |
+
]
|
| 478 |
+
LOCK
|
| 479 |
+
|
| 480 |
+
# ---------------------------------------------------------------------------
|
| 481 |
+
# Prefetch all locked dependencies into the cargo registry cache (networked
|
| 482 |
+
# stage). `--locked` guarantees build.sh's offline resolver finds every crate.
|
| 483 |
+
# ---------------------------------------------------------------------------
|
| 484 |
+
cargo fetch --locked --manifest-path "$tmpdir/Cargo.toml"
|
ghtz08--kugou-kgm-decoder.20ee463/tests/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad564acc8d9644d23b1d724f06ecf73793fa7d13186479678c20f84a970db5e3
|
| 3 |
+
size 1309992
|
ghtz08--kugou-kgm-decoder.20ee463/tests/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
|
ghtz08--kugou-kgm-decoder.20ee463/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/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()
|
ghtz08--kugou-kgm-decoder.20ee463/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,1392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [
|
| 7 |
+
{
|
| 8 |
+
"name": "eval.tests.test_cli.TestArgumentValidation.test_combined_short_flags_accepted",
|
| 9 |
+
"reasons": [
|
| 10 |
+
{
|
| 11 |
+
"id": "sole_returncode",
|
| 12 |
+
"message": "pytest test only asserts returncode == 0",
|
| 13 |
+
"path": "eval/tests/test_cli.py",
|
| 14 |
+
"repair_hint": "Check stdout, stderr, generated files, or structured output in addition to exit code.",
|
| 15 |
+
"severity": "error",
|
| 16 |
+
"stage": "static_lint"
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"id": "all_assertions_weak",
|
| 20 |
+
"message": "pytest test uses only weak assertions",
|
| 21 |
+
"path": "eval/tests/test_cli.py",
|
| 22 |
+
"repair_hint": "Add at least one semantic oracle over concrete output, files, schema, or state.",
|
| 23 |
+
"severity": "error",
|
| 24 |
+
"stage": "static_lint"
|
| 25 |
+
}
|
| 26 |
+
]
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"name": "eval.tests.test_cli.TestArgumentValidation.test_explicit_dashdash_separator",
|
| 30 |
+
"reasons": [
|
| 31 |
+
{
|
| 32 |
+
"id": "sole_returncode",
|
| 33 |
+
"message": "pytest test only asserts returncode == 0",
|
| 34 |
+
"path": "eval/tests/test_cli.py",
|
| 35 |
+
"repair_hint": "Check stdout, stderr, generated files, or structured output in addition to exit code.",
|
| 36 |
+
"severity": "error",
|
| 37 |
+
"stage": "static_lint"
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"id": "all_assertions_weak",
|
| 41 |
+
"message": "pytest test uses only weak assertions",
|
| 42 |
+
"path": "eval/tests/test_cli.py",
|
| 43 |
+
"repair_hint": "Add at least one semantic oracle over concrete output, files, schema, or state.",
|
| 44 |
+
"severity": "error",
|
| 45 |
+
"stage": "static_lint"
|
| 46 |
+
}
|
| 47 |
+
]
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"name": "eval.tests.test_cli.TestArgumentValidation.test_extra_positional_golden",
|
| 51 |
+
"reasons": [
|
| 52 |
+
{
|
| 53 |
+
"id": "missing_fixture_assets",
|
| 54 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 55 |
+
"path": "eval/tests/test_cli.py",
|
| 56 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 57 |
+
"severity": "error",
|
| 58 |
+
"stage": "static_lint"
|
| 59 |
+
}
|
| 60 |
+
]
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"name": "eval.tests.test_cli.TestArgumentValidation.test_flags_after_target_accepted",
|
| 64 |
+
"reasons": [
|
| 65 |
+
{
|
| 66 |
+
"id": "sole_returncode",
|
| 67 |
+
"message": "pytest test only asserts returncode == 0",
|
| 68 |
+
"path": "eval/tests/test_cli.py",
|
| 69 |
+
"repair_hint": "Check stdout, stderr, generated files, or structured output in addition to exit code.",
|
| 70 |
+
"severity": "error",
|
| 71 |
+
"stage": "static_lint"
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"id": "all_assertions_weak",
|
| 75 |
+
"message": "pytest test uses only weak assertions",
|
| 76 |
+
"path": "eval/tests/test_cli.py",
|
| 77 |
+
"repair_hint": "Add at least one semantic oracle over concrete output, files, schema, or state.",
|
| 78 |
+
"severity": "error",
|
| 79 |
+
"stage": "static_lint"
|
| 80 |
+
}
|
| 81 |
+
]
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"name": "eval.tests.test_cli.TestArgumentValidation.test_flags_before_target_accepted",
|
| 85 |
+
"reasons": [
|
| 86 |
+
{
|
| 87 |
+
"id": "sole_returncode",
|
| 88 |
+
"message": "pytest test only asserts returncode == 0",
|
| 89 |
+
"path": "eval/tests/test_cli.py",
|
| 90 |
+
"repair_hint": "Check stdout, stderr, generated files, or structured output in addition to exit code.",
|
| 91 |
+
"severity": "error",
|
| 92 |
+
"stage": "static_lint"
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"id": "all_assertions_weak",
|
| 96 |
+
"message": "pytest test uses only weak assertions",
|
| 97 |
+
"path": "eval/tests/test_cli.py",
|
| 98 |
+
"repair_hint": "Add at least one semantic oracle over concrete output, files, schema, or state.",
|
| 99 |
+
"severity": "error",
|
| 100 |
+
"stage": "static_lint"
|
| 101 |
+
}
|
| 102 |
+
]
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"name": "eval.tests.test_cli.TestArgumentValidation.test_output_extension_eats_target_golden",
|
| 106 |
+
"reasons": [
|
| 107 |
+
{
|
| 108 |
+
"id": "missing_fixture_assets",
|
| 109 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 110 |
+
"path": "eval/tests/test_cli.py",
|
| 111 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 112 |
+
"severity": "error",
|
| 113 |
+
"stage": "static_lint"
|
| 114 |
+
}
|
| 115 |
+
]
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"name": "eval.tests.test_cli.TestArgumentValidation.test_unknown_flag_full_text_mentions_tip",
|
| 119 |
+
"reasons": [
|
| 120 |
+
{
|
| 121 |
+
"id": "missing_fixture_assets",
|
| 122 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 123 |
+
"path": "eval/tests/test_cli.py",
|
| 124 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 125 |
+
"severity": "error",
|
| 126 |
+
"stage": "static_lint"
|
| 127 |
+
}
|
| 128 |
+
]
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"name": "eval.tests.test_decode.TestSuccessfulDecode.test_decode_copy_of_resource_matches_golden",
|
| 132 |
+
"reasons": [
|
| 133 |
+
{
|
| 134 |
+
"id": "golden_written_in_test",
|
| 135 |
+
"message": "pytest test writes to its own golden file",
|
| 136 |
+
"path": "eval/tests/test_decode.py",
|
| 137 |
+
"repair_hint": "Read committed golden data instead of writing expected output inside the test.",
|
| 138 |
+
"severity": "error",
|
| 139 |
+
"stage": "static_lint"
|
| 140 |
+
}
|
| 141 |
+
]
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"name": "eval.tests.test_discovery.TestDirectoryTraversal.test_directory_with_hidden_files",
|
| 145 |
+
"reasons": [
|
| 146 |
+
{
|
| 147 |
+
"id": "no_assertions",
|
| 148 |
+
"message": "pytest test contains no assert statements",
|
| 149 |
+
"path": "eval/tests/test_discovery.py",
|
| 150 |
+
"repair_hint": "Add concrete assert statements over observable executable behavior.",
|
| 151 |
+
"severity": "error",
|
| 152 |
+
"stage": "static_lint"
|
| 153 |
+
}
|
| 154 |
+
]
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"name": "eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_counts_files_across_depth",
|
| 158 |
+
"reasons": [
|
| 159 |
+
{
|
| 160 |
+
"id": "no_assertions",
|
| 161 |
+
"message": "pytest test contains no assert statements",
|
| 162 |
+
"path": "eval/tests/test_discovery.py",
|
| 163 |
+
"repair_hint": "Add concrete assert statements over observable executable behavior.",
|
| 164 |
+
"severity": "error",
|
| 165 |
+
"stage": "static_lint"
|
| 166 |
+
}
|
| 167 |
+
]
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"name": "eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_mixed_header_and_decode",
|
| 171 |
+
"reasons": [
|
| 172 |
+
{
|
| 173 |
+
"id": "no_assertions",
|
| 174 |
+
"message": "pytest test contains no assert statements",
|
| 175 |
+
"path": "eval/tests/test_discovery.py",
|
| 176 |
+
"repair_hint": "Add concrete assert statements over observable executable behavior.",
|
| 177 |
+
"severity": "error",
|
| 178 |
+
"stage": "static_lint"
|
| 179 |
+
}
|
| 180 |
+
]
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"name": "eval.tests.test_errors.TestBatchAndDepthTraversal.test_recursive_long_form_traverses_deep",
|
| 184 |
+
"reasons": [
|
| 185 |
+
{
|
| 186 |
+
"id": "all_assertions_weak",
|
| 187 |
+
"message": "pytest test uses only weak assertions",
|
| 188 |
+
"path": "eval/tests/test_errors.py",
|
| 189 |
+
"repair_hint": "Add at least one semantic oracle over concrete output, files, schema, or state.",
|
| 190 |
+
"severity": "error",
|
| 191 |
+
"stage": "static_lint"
|
| 192 |
+
}
|
| 193 |
+
]
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"name": "eval.tests.test_errors.TestCliArgumentErrors.test_repeated_output_extension_variants_share_diagnostic",
|
| 197 |
+
"reasons": [
|
| 198 |
+
{
|
| 199 |
+
"id": "missing_fixture_assets",
|
| 200 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 201 |
+
"path": "eval/tests/test_errors.py",
|
| 202 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 203 |
+
"severity": "error",
|
| 204 |
+
"stage": "static_lint"
|
| 205 |
+
}
|
| 206 |
+
]
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"name": "eval.tests.test_errors.TestDiscoveryEdgeTargets.test_dot_target_decodes_current_dir",
|
| 210 |
+
"reasons": [
|
| 211 |
+
{
|
| 212 |
+
"id": "generic_keyword_oracle",
|
| 213 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 214 |
+
"path": "eval/tests/test_errors.py",
|
| 215 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 216 |
+
"severity": "error",
|
| 217 |
+
"stage": "static_lint"
|
| 218 |
+
}
|
| 219 |
+
]
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"name": "eval.tests.test_overwrite.TestOverwriteAcrossFiles.test_two_prompts_both_accepted",
|
| 223 |
+
"reasons": [
|
| 224 |
+
{
|
| 225 |
+
"id": "short_substring",
|
| 226 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 227 |
+
"path": "eval/tests/test_overwrite.py",
|
| 228 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 229 |
+
"severity": "error",
|
| 230 |
+
"stage": "static_lint"
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"id": "generic_keyword_oracle",
|
| 234 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 235 |
+
"path": "eval/tests/test_overwrite.py",
|
| 236 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 237 |
+
"severity": "error",
|
| 238 |
+
"stage": "static_lint"
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"id": "golden_written_in_test",
|
| 242 |
+
"message": "pytest test writes to its own golden file",
|
| 243 |
+
"path": "eval/tests/test_overwrite.py",
|
| 244 |
+
"repair_hint": "Read committed golden data instead of writing expected output inside the test.",
|
| 245 |
+
"severity": "error",
|
| 246 |
+
"stage": "static_lint"
|
| 247 |
+
}
|
| 248 |
+
]
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"name": "eval.tests.test_overwrite.TestOverwriteAcrossFiles.test_two_prompts_both_declined",
|
| 252 |
+
"reasons": [
|
| 253 |
+
{
|
| 254 |
+
"id": "short_substring",
|
| 255 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 256 |
+
"path": "eval/tests/test_overwrite.py",
|
| 257 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 258 |
+
"severity": "error",
|
| 259 |
+
"stage": "static_lint"
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"id": "generic_keyword_oracle",
|
| 263 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 264 |
+
"path": "eval/tests/test_overwrite.py",
|
| 265 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 266 |
+
"severity": "error",
|
| 267 |
+
"stage": "static_lint"
|
| 268 |
+
}
|
| 269 |
+
]
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"name": "eval.tests.test_overwrite.TestOverwriteAcrossFiles.test_two_prompts_mixed",
|
| 273 |
+
"reasons": [
|
| 274 |
+
{
|
| 275 |
+
"id": "short_substring",
|
| 276 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 277 |
+
"path": "eval/tests/test_overwrite.py",
|
| 278 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 279 |
+
"severity": "error",
|
| 280 |
+
"stage": "static_lint"
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"id": "generic_keyword_oracle",
|
| 284 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 285 |
+
"path": "eval/tests/test_overwrite.py",
|
| 286 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 287 |
+
"severity": "error",
|
| 288 |
+
"stage": "static_lint"
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"id": "golden_written_in_test",
|
| 292 |
+
"message": "pytest test writes to its own golden file",
|
| 293 |
+
"path": "eval/tests/test_overwrite.py",
|
| 294 |
+
"repair_hint": "Read committed golden data instead of writing expected output inside the test.",
|
| 295 |
+
"severity": "error",
|
| 296 |
+
"stage": "static_lint"
|
| 297 |
+
}
|
| 298 |
+
]
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"name": "eval.tests.test_workflow.TestKeepFileStateTransition.test_keep_then_accept_overwrite_keeps",
|
| 302 |
+
"reasons": [
|
| 303 |
+
{
|
| 304 |
+
"id": "golden_written_in_test",
|
| 305 |
+
"message": "pytest test writes to its own golden file",
|
| 306 |
+
"path": "eval/tests/test_workflow.py",
|
| 307 |
+
"repair_hint": "Read committed golden data instead of writing expected output inside the test.",
|
| 308 |
+
"severity": "error",
|
| 309 |
+
"stage": "static_lint"
|
| 310 |
+
}
|
| 311 |
+
]
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"name": "eval.tests.test_workflow.TestMultiFileWorkflows.test_recursive_second_pass_after_keep_keeps_inputs",
|
| 315 |
+
"reasons": [
|
| 316 |
+
{
|
| 317 |
+
"id": "short_substring",
|
| 318 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 319 |
+
"path": "eval/tests/test_workflow.py",
|
| 320 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 321 |
+
"severity": "error",
|
| 322 |
+
"stage": "static_lint"
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"id": "generic_keyword_oracle",
|
| 326 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 327 |
+
"path": "eval/tests/test_workflow.py",
|
| 328 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 329 |
+
"severity": "error",
|
| 330 |
+
"stage": "static_lint"
|
| 331 |
+
}
|
| 332 |
+
]
|
| 333 |
+
}
|
| 334 |
+
],
|
| 335 |
+
"tests": [
|
| 336 |
+
"eval.tests.test_cli.TestArgumentValidation.test_assignment_style_output_extension",
|
| 337 |
+
"eval.tests.test_cli.TestArgumentValidation.test_combined_short_flags_accepted",
|
| 338 |
+
"eval.tests.test_cli.TestArgumentValidation.test_empty_target_reports_invalid",
|
| 339 |
+
"eval.tests.test_cli.TestArgumentValidation.test_explicit_dashdash_separator",
|
| 340 |
+
"eval.tests.test_cli.TestArgumentValidation.test_extra_positional_golden",
|
| 341 |
+
"eval.tests.test_cli.TestArgumentValidation.test_flags_after_target_accepted",
|
| 342 |
+
"eval.tests.test_cli.TestArgumentValidation.test_flags_before_target_accepted",
|
| 343 |
+
"eval.tests.test_cli.TestArgumentValidation.test_missing_output_extension_value_golden[long]",
|
| 344 |
+
"eval.tests.test_cli.TestArgumentValidation.test_missing_output_extension_value_golden[short]",
|
| 345 |
+
"eval.tests.test_cli.TestArgumentValidation.test_missing_target_golden_mentions_required_arg",
|
| 346 |
+
"eval.tests.test_cli.TestArgumentValidation.test_missing_target_returns_usage_error",
|
| 347 |
+
"eval.tests.test_cli.TestArgumentValidation.test_missing_target_usage_is_golden",
|
| 348 |
+
"eval.tests.test_cli.TestArgumentValidation.test_output_extension_eats_target_golden",
|
| 349 |
+
"eval.tests.test_cli.TestArgumentValidation.test_unknown_flag_full_text_mentions_tip",
|
| 350 |
+
"eval.tests.test_cli.TestArgumentValidation.test_unknown_flag_golden[unknown_long]",
|
| 351 |
+
"eval.tests.test_cli.TestArgumentValidation.test_unknown_flag_golden[unknown_short]",
|
| 352 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_help_lists_author_and_repository",
|
| 353 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_help_lists_option_flags_once",
|
| 354 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_help_matches_golden[long]",
|
| 355 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_help_matches_golden[short]",
|
| 356 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_help_option_lines_exact",
|
| 357 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_help_requires_no_target",
|
| 358 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_help_stdout_has_zero_stderr",
|
| 359 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_short_V_and_long_version_identical",
|
| 360 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_version_matches_golden[long]",
|
| 361 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_version_matches_golden[short]",
|
| 362 |
+
"eval.tests.test_cli.TestHelpAndVersion.test_version_output_is_single_line",
|
| 363 |
+
"eval.tests.test_decode.TestDecodeSkips.test_empty_file_skipped",
|
| 364 |
+
"eval.tests.test_decode.TestDecodeSkips.test_invalid_magic_skipped_no_decoder",
|
| 365 |
+
"eval.tests.test_decode.TestDecodeSkips.test_short_file_skipped",
|
| 366 |
+
"eval.tests.test_decode.TestDecodeSkips.test_truncated_header_skipped",
|
| 367 |
+
"eval.tests.test_decode.TestDecodeSkips.test_wrong_magic_mutated_file_kept",
|
| 368 |
+
"eval.tests.test_decode.TestDecodeSkips.test_wrong_magic_same_length_kept",
|
| 369 |
+
"eval.tests.test_decode.TestExtensionFallback.test_uninferable_head_collision_accept_removes_self",
|
| 370 |
+
"eval.tests.test_decode.TestExtensionFallback.test_uninferable_head_no_extension_does_not_collide",
|
| 371 |
+
"eval.tests.test_decode.TestExtensionFallback.test_uninferable_head_uses_extension_and_collides[raw.mkv]",
|
| 372 |
+
"eval.tests.test_decode.TestExtensionFallback.test_uninferable_head_uses_extension_and_collides[song.abc]",
|
| 373 |
+
"eval.tests.test_decode.TestExtensionFallback.test_uninferable_head_uses_extension_and_collides[tone.wav]",
|
| 374 |
+
"eval.tests.test_decode.TestExtensionFallback.test_uninferable_head_uses_own_extension_collides_then_declined",
|
| 375 |
+
"eval.tests.test_decode.TestKeepFile.test_keep_file_original_bytes_unchanged",
|
| 376 |
+
"eval.tests.test_decode.TestKeepFile.test_keep_file_output_content_still_golden",
|
| 377 |
+
"eval.tests.test_decode.TestKeepFile.test_keep_file_preserves_original[long]",
|
| 378 |
+
"eval.tests.test_decode.TestKeepFile.test_keep_file_preserves_original[short]",
|
| 379 |
+
"eval.tests.test_decode.TestKeepFile.test_without_keep_original_removed",
|
| 380 |
+
"eval.tests.test_decode.TestNonUtf8OutputPath.test_non_utf8_kgm_name_decodes_to_literal_output",
|
| 381 |
+
"eval.tests.test_decode.TestNonUtf8OutputPath.test_non_utf8_names_collide_on_shared_output_and_prompt",
|
| 382 |
+
"eval.tests.test_decode.TestNonUtf8OutputPath.test_non_utf8_uninferable_head_falls_back_to_output_mp3",
|
| 383 |
+
"eval.tests.test_decode.TestOutputExtension.test_custom_extension_contents_correct[bak]",
|
| 384 |
+
"eval.tests.test_decode.TestOutputExtension.test_custom_extension_contents_correct[m4a]",
|
| 385 |
+
"eval.tests.test_decode.TestOutputExtension.test_custom_extension_contents_correct[ogg]",
|
| 386 |
+
"eval.tests.test_decode.TestOutputExtension.test_custom_extension_contents_correct[wav]",
|
| 387 |
+
"eval.tests.test_decode.TestOutputExtension.test_custom_extension_used[long]",
|
| 388 |
+
"eval.tests.test_decode.TestOutputExtension.test_custom_extension_used[short]",
|
| 389 |
+
"eval.tests.test_decode.TestOutputExtension.test_dot_extension_value_produces_double_dot",
|
| 390 |
+
"eval.tests.test_decode.TestOutputExtension.test_empty_extension_defaults_to_inferred",
|
| 391 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_double_extension_content_golden",
|
| 392 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_double_kgm_extension_stripped",
|
| 393 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_no_extension_falls_back_to_stem",
|
| 394 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_output_basename_matrix[double]",
|
| 395 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_output_basename_matrix[none]",
|
| 396 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_output_basename_matrix[other]",
|
| 397 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_output_basename_matrix[single]",
|
| 398 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_output_basename_matrix[triple]",
|
| 399 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_output_basename_matrix[upper]",
|
| 400 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_output_in_same_directory_as_input",
|
| 401 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_stem_overrides_original_extension",
|
| 402 |
+
"eval.tests.test_decode.TestOutputPathBuilding.test_uppercase_KGM_extension_stripped",
|
| 403 |
+
"eval.tests.test_decode.TestReadHeaderSkip.test_header_only_kgm_skipped",
|
| 404 |
+
"eval.tests.test_decode.TestReadHeaderSkip.test_header_only_skipped_across_names[HDR]",
|
| 405 |
+
"eval.tests.test_decode.TestReadHeaderSkip.test_header_only_skipped_across_names[a_b]",
|
| 406 |
+
"eval.tests.test_decode.TestReadHeaderSkip.test_header_only_skipped_across_names[empty_hdr]",
|
| 407 |
+
"eval.tests.test_decode.TestReadHeaderSkip.test_header_only_skipped_across_names[hdr]",
|
| 408 |
+
"eval.tests.test_decode.TestReadHeaderSkip.test_header_only_target_kept_after_skip",
|
| 409 |
+
"eval.tests.test_decode.TestReadHeaderSkip.test_header_plus_one_payload_byte_no_extension_decodes",
|
| 410 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decode_copy_of_resource_matches_golden",
|
| 411 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decode_creates_output_and_deletes_input",
|
| 412 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decode_file_without_kgm_extension",
|
| 413 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decode_reports_completion_ratio",
|
| 414 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decoded_content_exact_size_and_magic",
|
| 415 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decoded_content_golden_across_names[audio]",
|
| 416 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decoded_content_golden_across_names[clip]",
|
| 417 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decoded_content_golden_across_names[song]",
|
| 418 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decoded_content_golden_across_names[track_01]",
|
| 419 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decoded_content_matches_golden",
|
| 420 |
+
"eval.tests.test_decode.TestSuccessfulDecode.test_decoded_extension_is_mp3_for_id3",
|
| 421 |
+
"eval.tests.test_decode.TestUnableToCreateFile.test_output_path_is_directory_decline_keeps_input",
|
| 422 |
+
"eval.tests.test_decode.TestUnableToCreateFile.test_output_path_is_directory_error",
|
| 423 |
+
"eval.tests.test_decode.TestUnableToCreateFile.test_output_path_is_directory_with_keep",
|
| 424 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_count_summary[one]",
|
| 425 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_count_summary[onehdr]",
|
| 426 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_count_summary[three]",
|
| 427 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_count_summary[two]",
|
| 428 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_count_summary[twohdr]",
|
| 429 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_lists_regular_files",
|
| 430 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_with_hidden_files",
|
| 431 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_with_only_subdir_finds_zero",
|
| 432 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_directory_with_only_subdir_recursive_finds_nested",
|
| 433 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_empty_directory_finds_zero",
|
| 434 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_empty_directory_recursive_finds_zero",
|
| 435 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_non_recursive_excludes_subdirectories",
|
| 436 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_counts_files_across_depth",
|
| 437 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_includes_subdirectories",
|
| 438 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_mixed_header_and_decode",
|
| 439 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_mixed_skip_and_decode",
|
| 440 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_nested_hidden_subdir",
|
| 441 |
+
"eval.tests.test_discovery.TestDirectoryTraversal.test_recursive_short_file_skipped_kept",
|
| 442 |
+
"eval.tests.test_discovery.TestNonRegularTargetDiscovery.test_fifo_target_is_not_a_regular_file",
|
| 443 |
+
"eval.tests.test_discovery.TestNonRegularTargetDiscovery.test_symlink_target_is_not_a_regular_file",
|
| 444 |
+
"eval.tests.test_discovery.TestNonRegularTargetDiscovery.test_symlink_to_directory_not_descended",
|
| 445 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_empty_regular_file_found_but_skipped",
|
| 446 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_just_under_header_len_is_no_decoder",
|
| 447 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_nonexistent_absolute_path_full_output",
|
| 448 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_nonexistent_target_full_output",
|
| 449 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_read_header_only_target",
|
| 450 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_regular_file_found_and_decoded",
|
| 451 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_regular_file_with_invalid_content_counted",
|
| 452 |
+
"eval.tests.test_discovery.TestSingleTargetDiscovery.test_uppercase_extension_target_regular_file",
|
| 453 |
+
"eval.tests.test_discovery.TestSymlinkEntriesWithinDirectory.test_broken_symlink_does_not_hide_valid_sibling",
|
| 454 |
+
"eval.tests.test_discovery.TestSymlinkEntriesWithinDirectory.test_broken_symlink_inside_dir_silently_skipped",
|
| 455 |
+
"eval.tests.test_discovery.TestSymlinkEntriesWithinDirectory.test_symlink_to_dir_inside_scanned_dir_not_descended",
|
| 456 |
+
"eval.tests.test_discovery.TestSymlinkEntriesWithinDirectory.test_symlink_to_file_inside_dir_not_counted",
|
| 457 |
+
"eval.tests.test_errors.TestArgSurfaceShortCircuit.test_help_short_circuits_with_target_and_flags[long]",
|
| 458 |
+
"eval.tests.test_errors.TestArgSurfaceShortCircuit.test_help_short_circuits_with_target_and_flags[short]",
|
| 459 |
+
"eval.tests.test_errors.TestArgSurfaceShortCircuit.test_version_short_circuits_with_target[long]",
|
| 460 |
+
"eval.tests.test_errors.TestArgSurfaceShortCircuit.test_version_short_circuits_with_target[short]",
|
| 461 |
+
"eval.tests.test_errors.TestBatchAndDepthTraversal.test_large_batch_all_skipped",
|
| 462 |
+
"eval.tests.test_errors.TestBatchAndDepthTraversal.test_large_batch_directory_decode",
|
| 463 |
+
"eval.tests.test_errors.TestBatchAndDepthTraversal.test_recursive_long_form_traverses_deep",
|
| 464 |
+
"eval.tests.test_errors.TestBuildOutPathMultibytePanic.test_multibyte_stem_preserved_after_abort[cjk_two]",
|
| 465 |
+
"eval.tests.test_errors.TestBuildOutPathMultibytePanic.test_multibyte_stem_preserved_after_abort[cjk_word]",
|
| 466 |
+
"eval.tests.test_errors.TestBuildOutPathMultibytePanic.test_multibyte_stem_preserved_after_abort[emoji_ascii]",
|
| 467 |
+
"eval.tests.test_errors.TestBuildOutPathMultibytePanic.test_multibyte_stem_rejects_keep_and_delete",
|
| 468 |
+
"eval.tests.test_errors.TestCliArgumentErrors.test_repeated_output_extension_rejected[assign_assign]",
|
| 469 |
+
"eval.tests.test_errors.TestCliArgumentErrors.test_repeated_output_extension_rejected[long_long]",
|
| 470 |
+
"eval.tests.test_errors.TestCliArgumentErrors.test_repeated_output_extension_rejected[short_short]",
|
| 471 |
+
"eval.tests.test_errors.TestCliArgumentErrors.test_repeated_output_extension_variants_share_diagnostic",
|
| 472 |
+
"eval.tests.test_errors.TestDiscoveryEdgeTargets.test_dot_target_decodes_current_dir",
|
| 473 |
+
"eval.tests.test_errors.TestDiscoveryEdgeTargets.test_dot_target_deletes_input",
|
| 474 |
+
"eval.tests.test_errors.TestDiscoveryEdgeTargets.test_fifo_inside_directory_is_silently_ignored",
|
| 475 |
+
"eval.tests.test_errors.TestDiscoveryEdgeTargets.test_trailing_slash_directory_target",
|
| 476 |
+
"eval.tests.test_errors.TestHardlinkDecode.test_hardlink_sibling_survives_decode",
|
| 477 |
+
"eval.tests.test_errors.TestHardlinkDecode.test_hardlink_still_decodeable_as_second_link",
|
| 478 |
+
"eval.tests.test_overwrite.TestOverwriteAccept.test_accept_overwrites_with_golden[Y]",
|
| 479 |
+
"eval.tests.test_overwrite.TestOverwriteAccept.test_accept_overwrites_with_golden[mixed]",
|
| 480 |
+
"eval.tests.test_overwrite.TestOverwriteAccept.test_accept_overwrites_with_golden[trim]",
|
| 481 |
+
"eval.tests.test_overwrite.TestOverwriteAccept.test_accept_overwrites_with_golden[y]",
|
| 482 |
+
"eval.tests.test_overwrite.TestOverwriteAccept.test_accept_overwrites_with_golden[yes]",
|
| 483 |
+
"eval.tests.test_overwrite.TestOverwriteAccept.test_accept_removes_input",
|
| 484 |
+
"eval.tests.test_overwrite.TestOverwriteAccept.test_accept_y_full_exact_output",
|
| 485 |
+
"eval.tests.test_overwrite.TestOverwriteAcrossFiles.test_two_prompts_both_accepted",
|
| 486 |
+
"eval.tests.test_overwrite.TestOverwriteAcrossFiles.test_two_prompts_both_declined",
|
| 487 |
+
"eval.tests.test_overwrite.TestOverwriteAcrossFiles.test_two_prompts_mixed",
|
| 488 |
+
"eval.tests.test_overwrite.TestOverwriteDecline.test_decline_does_not_create_or_touch_output",
|
| 489 |
+
"eval.tests.test_overwrite.TestOverwriteDecline.test_decline_keeps_output_and_input[n]",
|
| 490 |
+
"eval.tests.test_overwrite.TestOverwriteDecline.test_decline_keeps_output_and_input[no]",
|
| 491 |
+
"eval.tests.test_overwrite.TestOverwriteDecline.test_decline_n_keeps_output",
|
| 492 |
+
"eval.tests.test_overwrite.TestOverwriteInvalidInput.test_invalid_then_decision[inv_inv_n]",
|
| 493 |
+
"eval.tests.test_overwrite.TestOverwriteInvalidInput.test_invalid_then_decision[inv_inv_y]",
|
| 494 |
+
"eval.tests.test_overwrite.TestOverwriteInvalidInput.test_invalid_then_decision[inv_n]",
|
| 495 |
+
"eval.tests.test_overwrite.TestOverwriteInvalidInput.test_invalid_then_decision[inv_y]",
|
| 496 |
+
"eval.tests.test_overwrite.TestOverwriteInvalidInput.test_invalid_then_invalid_then_accept_count",
|
| 497 |
+
"eval.tests.test_overwrite.TestOverwriteInvalidInput.test_invalid_then_invalid_then_decline_count",
|
| 498 |
+
"eval.tests.test_overwrite.TestOverwriteWithKeep.test_keep_overwrite_accept_exact_output",
|
| 499 |
+
"eval.tests.test_overwrite.TestOverwriteWithKeep.test_keep_overwrite_accept_overwrites_keeps_input",
|
| 500 |
+
"eval.tests.test_overwrite.TestOverwriteWithKeep.test_keep_overwrite_decline_preserves_both",
|
| 501 |
+
"eval.tests.test_workflow.TestEmptyWorkSet.test_empty_dir_summary",
|
| 502 |
+
"eval.tests.test_workflow.TestEmptyWorkSet.test_no_decodeable_files_summary",
|
| 503 |
+
"eval.tests.test_workflow.TestKeepFileStateTransition.test_keep_multiple_runs_keeps_until_delete",
|
| 504 |
+
"eval.tests.test_workflow.TestKeepFileStateTransition.test_keep_then_accept_overwrite_keeps",
|
| 505 |
+
"eval.tests.test_workflow.TestKeepFileStateTransition.test_keep_then_delete_if_decoded",
|
| 506 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_all_map_to_outputs[one]",
|
| 507 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_all_map_to_outputs[three]",
|
| 508 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_all_map_to_outputs[two]",
|
| 509 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_all_skipped_inputs_kept",
|
| 510 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_full_success",
|
| 511 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_mixed_depth_recursive",
|
| 512 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_mixed_header_and_junk",
|
| 513 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_directory_skipped_files_not_deleted",
|
| 514 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_first_pass_removes_inputs_from_second_pass",
|
| 515 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_recursive_monotonic_shrink_on_repeat",
|
| 516 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_recursive_second_pass_after_keep_keeps_inputs",
|
| 517 |
+
"eval.tests.test_workflow.TestMultiFileWorkflows.test_recursive_second_pass_sees_outputs",
|
| 518 |
+
"eval.tests.test_workflow.TestStatefulRepeatDecode.test_decode_twice_with_keep",
|
| 519 |
+
"eval.tests.test_workflow.TestStatefulRepeatDecode.test_multi_pass_with_mixed_inputs"
|
| 520 |
+
]
|
| 521 |
+
},
|
| 522 |
+
"generated_module_02": {
|
| 523 |
+
"ignore_reason": "",
|
| 524 |
+
"ignored": false,
|
| 525 |
+
"ignored_tests": [],
|
| 526 |
+
"tests": [
|
| 527 |
+
"eval.tests.test_config_cli.test_bool_flag_with_assigned_value_rejected[--keep-file---keep-file]",
|
| 528 |
+
"eval.tests.test_config_cli.test_bool_flag_with_assigned_value_rejected[--recursive---recursive]",
|
| 529 |
+
"eval.tests.test_config_cli.test_broken_symlink_target_not_regular",
|
| 530 |
+
"eval.tests.test_config_cli.test_bundled_short_flags_with_value_rkeout",
|
| 531 |
+
"eval.tests.test_config_cli.test_causal_keep_then_delete_pipeline",
|
| 532 |
+
"eval.tests.test_config_cli.test_combined_flags_without_target_error",
|
| 533 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[aac]",
|
| 534 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[bin]",
|
| 535 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[flac]",
|
| 536 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[foo]",
|
| 537 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[m4a]",
|
| 538 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[mid]",
|
| 539 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[mp3]",
|
| 540 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[ogg]",
|
| 541 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[out]",
|
| 542 |
+
"eval.tests.test_config_cli.test_decode_keep_file_preserves_source[wav]",
|
| 543 |
+
"eval.tests.test_config_cli.test_decode_reports_exact_ok_line",
|
| 544 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[aac]",
|
| 545 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[bin]",
|
| 546 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[flac]",
|
| 547 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[foo]",
|
| 548 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[m4a]",
|
| 549 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[mid]",
|
| 550 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[mp3]",
|
| 551 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[ogg]",
|
| 552 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[out]",
|
| 553 |
+
"eval.tests.test_config_cli.test_decode_writes_output_with_override_extension[wav]",
|
| 554 |
+
"eval.tests.test_config_cli.test_decoded_payload_is_deterministic_and_distinct",
|
| 555 |
+
"eval.tests.test_config_cli.test_directory_non_recursive_top_level_only",
|
| 556 |
+
"eval.tests.test_config_cli.test_directory_read_error_reports_skip",
|
| 557 |
+
"eval.tests.test_config_cli.test_double_dash_terminates_option_parsing",
|
| 558 |
+
"eval.tests.test_config_cli.test_double_dash_then_e_arrow_is_positional",
|
| 559 |
+
"eval.tests.test_config_cli.test_double_extension_kgm_no_keep",
|
| 560 |
+
"eval.tests.test_config_cli.test_double_extension_kgm_stripped",
|
| 561 |
+
"eval.tests.test_config_cli.test_double_extension_kgm_uppercase_stripped",
|
| 562 |
+
"eval.tests.test_config_cli.test_e_with_value_but_no_target_errors",
|
| 563 |
+
"eval.tests.test_config_cli.test_empty_directory_reports_zero_files",
|
| 564 |
+
"eval.tests.test_config_cli.test_empty_output_extension_value_parses",
|
| 565 |
+
"eval.tests.test_config_cli.test_empty_string_target_is_invalid",
|
| 566 |
+
"eval.tests.test_config_cli.test_equals_long_output_extension_before_target",
|
| 567 |
+
"eval.tests.test_config_cli.test_flag_after_target_and_short_recursive",
|
| 568 |
+
"eval.tests.test_config_cli.test_help_after_positional_target_still_prints_body",
|
| 569 |
+
"eval.tests.test_config_cli.test_help_appears_even_with_keep_flag_present",
|
| 570 |
+
"eval.tests.test_config_cli.test_help_does_not_mask_repeated_flag_error",
|
| 571 |
+
"eval.tests.test_config_cli.test_help_does_not_mask_unknown_flag_error",
|
| 572 |
+
"eval.tests.test_config_cli.test_help_emits_nothing_on_stderr",
|
| 573 |
+
"eval.tests.test_config_cli.test_help_footer_contains_after_help_author_line",
|
| 574 |
+
"eval.tests.test_config_cli.test_help_footer_contains_after_help_repository_line",
|
| 575 |
+
"eval.tests.test_config_cli.test_help_lists_usage_argument_and_all_four_options",
|
| 576 |
+
"eval.tests.test_config_cli.test_help_overrides_known_flags",
|
| 577 |
+
"eval.tests.test_config_cli.test_help_precedes_when_version_flag_also_present",
|
| 578 |
+
"eval.tests.test_config_cli.test_help_prints_exact_full_body[--help]",
|
| 579 |
+
"eval.tests.test_config_cli.test_help_prints_exact_full_body[-h]",
|
| 580 |
+
"eval.tests.test_config_cli.test_help_shows_empty_output_extension_default",
|
| 581 |
+
"eval.tests.test_config_cli.test_help_with_extra_positional_still_prints_full_body",
|
| 582 |
+
"eval.tests.test_config_cli.test_invalid_confirm_input_then_no[answers0]",
|
| 583 |
+
"eval.tests.test_config_cli.test_invalid_confirm_input_then_no[answers1]",
|
| 584 |
+
"eval.tests.test_config_cli.test_invalid_confirm_input_then_no[answers2]",
|
| 585 |
+
"eval.tests.test_config_cli.test_invalid_confirm_input_then_yes[answers0-1]",
|
| 586 |
+
"eval.tests.test_config_cli.test_invalid_confirm_input_then_yes[answers1-2]",
|
| 587 |
+
"eval.tests.test_config_cli.test_keep_file_multiple_sources_all_preserved",
|
| 588 |
+
"eval.tests.test_config_cli.test_keep_flag_alone_still_requires_target",
|
| 589 |
+
"eval.tests.test_config_cli.test_keep_flag_does_not_consume_target",
|
| 590 |
+
"eval.tests.test_config_cli.test_keep_variants_preserve_source[keep_flags0]",
|
| 591 |
+
"eval.tests.test_config_cli.test_keep_variants_preserve_source[keep_flags1]",
|
| 592 |
+
"eval.tests.test_config_cli.test_long_e_with_value_but_no_target_errors",
|
| 593 |
+
"eval.tests.test_config_cli.test_long_recursive_alone_still_requires_target",
|
| 594 |
+
"eval.tests.test_config_cli.test_mixed_keep_and_skip_directory_counts",
|
| 595 |
+
"eval.tests.test_config_cli.test_no_arguments_errors_required_target",
|
| 596 |
+
"eval.tests.test_config_cli.test_no_keep_multiple_sources_all_removed",
|
| 597 |
+
"eval.tests.test_config_cli.test_non_kgm_double_extension_not_stripped",
|
| 598 |
+
"eval.tests.test_config_cli.test_nonexistent_target_reports_invalid",
|
| 599 |
+
"eval.tests.test_config_cli.test_optional_flags_after_positional_accepted",
|
| 600 |
+
"eval.tests.test_config_cli.test_output_create_failure_under_nonexistent_subdir",
|
| 601 |
+
"eval.tests.test_config_cli.test_output_extension_applies_full_path_per_file",
|
| 602 |
+
"eval.tests.test_config_cli.test_output_extension_attached_short_value_consumed",
|
| 603 |
+
"eval.tests.test_config_cli.test_output_extension_before_and_after_target",
|
| 604 |
+
"eval.tests.test_config_cli.test_output_extension_empty_equals_form_parses",
|
| 605 |
+
"eval.tests.test_config_cli.test_output_extension_long_equals_form",
|
| 606 |
+
"eval.tests.test_config_cli.test_output_extension_long_missing_value",
|
| 607 |
+
"eval.tests.test_config_cli.test_output_extension_matches_source_requires_keep",
|
| 608 |
+
"eval.tests.test_config_cli.test_output_extension_missing_value",
|
| 609 |
+
"eval.tests.test_config_cli.test_output_extension_short_equals_form",
|
| 610 |
+
"eval.tests.test_config_cli.test_output_override_prevents_any_inferred_extension",
|
| 611 |
+
"eval.tests.test_config_cli.test_output_path_is_directory_triggers_overwrite_confirm",
|
| 612 |
+
"eval.tests.test_config_cli.test_overwrite_accepted_replaces_output",
|
| 613 |
+
"eval.tests.test_config_cli.test_overwrite_accepts_yes_variants[ yes \\n]",
|
| 614 |
+
"eval.tests.test_config_cli.test_overwrite_accepts_yes_variants[Y\\n]",
|
| 615 |
+
"eval.tests.test_config_cli.test_overwrite_accepts_yes_variants[YeS\\n]",
|
| 616 |
+
"eval.tests.test_config_cli.test_overwrite_accepts_yes_variants[y\\n]",
|
| 617 |
+
"eval.tests.test_config_cli.test_overwrite_accepts_yes_variants[yes\\n]",
|
| 618 |
+
"eval.tests.test_config_cli.test_overwrite_refused_does_not_decode",
|
| 619 |
+
"eval.tests.test_config_cli.test_overwrite_refused_keeps_existing_output",
|
| 620 |
+
"eval.tests.test_config_cli.test_overwrite_refused_without_keep_leaves_source",
|
| 621 |
+
"eval.tests.test_config_cli.test_overwrite_refuses_no_variants[ no \\n]",
|
| 622 |
+
"eval.tests.test_config_cli.test_overwrite_refuses_no_variants[NO\\n]",
|
| 623 |
+
"eval.tests.test_config_cli.test_overwrite_refuses_no_variants[N\\n]",
|
| 624 |
+
"eval.tests.test_config_cli.test_overwrite_refuses_no_variants[n\\n]",
|
| 625 |
+
"eval.tests.test_config_cli.test_overwrite_refuses_no_variants[no\\n]",
|
| 626 |
+
"eval.tests.test_config_cli.test_plain_file_no_decoder_skipped",
|
| 627 |
+
"eval.tests.test_config_cli.test_recursive_flag_alone_still_requires_target",
|
| 628 |
+
"eval.tests.test_config_cli.test_recursive_flag_does_not_consume_target",
|
| 629 |
+
"eval.tests.test_config_cli.test_recursive_nested_plain_files_counted",
|
| 630 |
+
"eval.tests.test_config_cli.test_recursive_variants_enumerate_subdir[flags0]",
|
| 631 |
+
"eval.tests.test_config_cli.test_recursive_variants_enumerate_subdir[flags1]",
|
| 632 |
+
"eval.tests.test_config_cli.test_relative_directory_target",
|
| 633 |
+
"eval.tests.test_config_cli.test_repeated_flag_is_rejected[args0---recursive]",
|
| 634 |
+
"eval.tests.test_config_cli.test_repeated_flag_is_rejected[args1---recursive]",
|
| 635 |
+
"eval.tests.test_config_cli.test_repeated_flag_is_rejected[args2---keep-file]",
|
| 636 |
+
"eval.tests.test_config_cli.test_repeated_flag_is_rejected[args3---keep-file]",
|
| 637 |
+
"eval.tests.test_config_cli.test_repeated_flag_is_rejected[args4---output-extension <OUTPUT_EXTENSION>]",
|
| 638 |
+
"eval.tests.test_config_cli.test_repeated_flag_is_rejected[args5---recursive]",
|
| 639 |
+
"eval.tests.test_config_cli.test_repeated_flag_is_rejected[args6---keep-file]",
|
| 640 |
+
"eval.tests.test_config_cli.test_repeated_output_extension_long_rejected",
|
| 641 |
+
"eval.tests.test_config_cli.test_short_keep_flag_alone_still_requires_target",
|
| 642 |
+
"eval.tests.test_config_cli.test_target_with_trailing_slash_directory",
|
| 643 |
+
"eval.tests.test_config_cli.test_triple_extension_keeps_stem",
|
| 644 |
+
"eval.tests.test_config_cli.test_two_positionals_names_the_second",
|
| 645 |
+
"eval.tests.test_config_cli.test_two_positionals_rejected[extra]",
|
| 646 |
+
"eval.tests.test_config_cli.test_two_positionals_rejected[second]",
|
| 647 |
+
"eval.tests.test_config_cli.test_two_positionals_rejected[tail]",
|
| 648 |
+
"eval.tests.test_config_cli.test_typo_gets_similar_argument_suggestion[--keep-filee---keep-file-executable {SUG} <TARGET>]",
|
| 649 |
+
"eval.tests.test_config_cli.test_typo_gets_similar_argument_suggestion[--keepfile---keep-file-executable {SUG} <TARGET>]",
|
| 650 |
+
"eval.tests.test_config_cli.test_typo_gets_similar_argument_suggestion[--output-extension-extra---output-extension-executable {SUG} <OUTPUT_EXTENSION> <TARGET>]",
|
| 651 |
+
"eval.tests.test_config_cli.test_typo_gets_similar_argument_suggestion[--recursiv---recursive-executable {SUG} <TARGET>]",
|
| 652 |
+
"eval.tests.test_config_cli.test_typo_gets_similar_argument_suggestion[--recursivx---recursive-executable {SUG} <TARGET>]",
|
| 653 |
+
"eval.tests.test_config_cli.test_unknown_flag_closest_keep_suggestion",
|
| 654 |
+
"eval.tests.test_config_cli.test_unknown_flag_closest_recursive_suggestion",
|
| 655 |
+
"eval.tests.test_config_cli.test_unknown_flag_error_precedes_version",
|
| 656 |
+
"eval.tests.test_config_cli.test_unknown_flag_names_own_message[--bogus]",
|
| 657 |
+
"eval.tests.test_config_cli.test_unknown_flag_names_own_message[-q]",
|
| 658 |
+
"eval.tests.test_config_cli.test_unknown_flag_names_own_message[-z]",
|
| 659 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[---triple]",
|
| 660 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[--bogus]",
|
| 661 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[--nosuchoption]",
|
| 662 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[--nothinglikeit]",
|
| 663 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[--totallyunknown]",
|
| 664 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[-Q]",
|
| 665 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[-q]",
|
| 666 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[-w]",
|
| 667 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[-x]",
|
| 668 |
+
"eval.tests.test_config_cli.test_unknown_long_and_short_flags_rejected[-z]",
|
| 669 |
+
"eval.tests.test_config_cli.test_upper_case_long_flag_rejected",
|
| 670 |
+
"eval.tests.test_config_cli.test_upper_case_short_flag_rejected",
|
| 671 |
+
"eval.tests.test_config_cli.test_version_after_target_still_prints",
|
| 672 |
+
"eval.tests.test_config_cli.test_version_does_not_masquerade_as_parse_error",
|
| 673 |
+
"eval.tests.test_config_cli.test_version_precedes_when_help_flag_also_present",
|
| 674 |
+
"eval.tests.test_config_cli.test_version_prints_exact_string[--version]",
|
| 675 |
+
"eval.tests.test_config_cli.test_version_prints_exact_string[-V]"
|
| 676 |
+
]
|
| 677 |
+
},
|
| 678 |
+
"generated_module_03": {
|
| 679 |
+
"ignore_reason": "",
|
| 680 |
+
"ignored": false,
|
| 681 |
+
"ignored_tests": [
|
| 682 |
+
{
|
| 683 |
+
"name": "eval.tests.test_cli_args.TestArgumentValidation.test_missing_target_is_rejected",
|
| 684 |
+
"reasons": [
|
| 685 |
+
{
|
| 686 |
+
"id": "short_substring",
|
| 687 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 688 |
+
"path": "eval/tests/test_cli_args.py",
|
| 689 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 690 |
+
"severity": "error",
|
| 691 |
+
"stage": "static_lint"
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"id": "generic_keyword_oracle",
|
| 695 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 696 |
+
"path": "eval/tests/test_cli_args.py",
|
| 697 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 698 |
+
"severity": "error",
|
| 699 |
+
"stage": "static_lint"
|
| 700 |
+
}
|
| 701 |
+
]
|
| 702 |
+
},
|
| 703 |
+
{
|
| 704 |
+
"name": "eval.tests.test_cli_args.TestArgumentValidation.test_target_cannot_be_missing_with_flags",
|
| 705 |
+
"reasons": [
|
| 706 |
+
{
|
| 707 |
+
"id": "short_substring",
|
| 708 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 709 |
+
"path": "eval/tests/test_cli_args.py",
|
| 710 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 711 |
+
"severity": "error",
|
| 712 |
+
"stage": "static_lint"
|
| 713 |
+
},
|
| 714 |
+
{
|
| 715 |
+
"id": "generic_keyword_oracle",
|
| 716 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 717 |
+
"path": "eval/tests/test_cli_args.py",
|
| 718 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 719 |
+
"severity": "error",
|
| 720 |
+
"stage": "static_lint"
|
| 721 |
+
}
|
| 722 |
+
]
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"name": "eval.tests.test_cli_args.TestArgumentValidation.test_unknown_flag_is_rejected",
|
| 726 |
+
"reasons": [
|
| 727 |
+
{
|
| 728 |
+
"id": "short_substring",
|
| 729 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 730 |
+
"path": "eval/tests/test_cli_args.py",
|
| 731 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 732 |
+
"severity": "error",
|
| 733 |
+
"stage": "static_lint"
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"id": "generic_keyword_oracle",
|
| 737 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 738 |
+
"path": "eval/tests/test_cli_args.py",
|
| 739 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 740 |
+
"severity": "error",
|
| 741 |
+
"stage": "static_lint"
|
| 742 |
+
}
|
| 743 |
+
]
|
| 744 |
+
},
|
| 745 |
+
{
|
| 746 |
+
"name": "eval.tests.test_golden_sample.TestGoldenSample.test_decoded_size_is_input_minus_header",
|
| 747 |
+
"reasons": [
|
| 748 |
+
{
|
| 749 |
+
"id": "golden_docstring",
|
| 750 |
+
"message": "pytest test docstring mentions golden data that is not used in the body",
|
| 751 |
+
"path": "eval/tests/test_golden_sample.py",
|
| 752 |
+
"repair_hint": "Use the golden fixture mentioned in the docstring or remove the misleading claim.",
|
| 753 |
+
"severity": "error",
|
| 754 |
+
"stage": "static_lint"
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"id": "golden_no_equality",
|
| 758 |
+
"message": "pytest test references golden data without equality comparison",
|
| 759 |
+
"path": "eval/tests/test_golden_sample.py",
|
| 760 |
+
"repair_hint": "Compare observed output to golden data with equality after any explicit normalization.",
|
| 761 |
+
"severity": "error",
|
| 762 |
+
"stage": "static_lint"
|
| 763 |
+
}
|
| 764 |
+
]
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"name": "eval.tests.test_sniff_edge_cases.TestMixedDirectorySniff.test_directory_decodes_to_per_format_extensions",
|
| 768 |
+
"reasons": [
|
| 769 |
+
{
|
| 770 |
+
"id": "short_substring",
|
| 771 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 772 |
+
"path": "eval/tests/test_sniff_edge_cases.py",
|
| 773 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 774 |
+
"severity": "error",
|
| 775 |
+
"stage": "static_lint"
|
| 776 |
+
}
|
| 777 |
+
]
|
| 778 |
+
},
|
| 779 |
+
{
|
| 780 |
+
"name": "eval.tests.test_sniff_edge_cases.TestMixedDirectorySniff.test_directory_with_unknown_sig_count_reflected",
|
| 781 |
+
"reasons": [
|
| 782 |
+
{
|
| 783 |
+
"id": "short_substring",
|
| 784 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 785 |
+
"path": "eval/tests/test_sniff_edge_cases.py",
|
| 786 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 787 |
+
"severity": "error",
|
| 788 |
+
"stage": "static_lint"
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"id": "generic_keyword_oracle",
|
| 792 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 793 |
+
"path": "eval/tests/test_sniff_edge_cases.py",
|
| 794 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 795 |
+
"severity": "error",
|
| 796 |
+
"stage": "static_lint"
|
| 797 |
+
}
|
| 798 |
+
]
|
| 799 |
+
},
|
| 800 |
+
{
|
| 801 |
+
"name": "eval.tests.test_sniff_edge_cases.TestUnknownSignatureFallback.test_unknown_signature_under_non_kgm_ext_also_prompts",
|
| 802 |
+
"reasons": [
|
| 803 |
+
{
|
| 804 |
+
"id": "short_substring",
|
| 805 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 806 |
+
"path": "eval/tests/test_sniff_edge_cases.py",
|
| 807 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 808 |
+
"severity": "error",
|
| 809 |
+
"stage": "static_lint"
|
| 810 |
+
},
|
| 811 |
+
{
|
| 812 |
+
"id": "generic_keyword_oracle",
|
| 813 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 814 |
+
"path": "eval/tests/test_sniff_edge_cases.py",
|
| 815 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 816 |
+
"severity": "error",
|
| 817 |
+
"stage": "static_lint"
|
| 818 |
+
}
|
| 819 |
+
]
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"name": "eval.tests.test_sniff_edge_cases.TestUnknownSignatureFallback.test_unknown_signature_without_override_prompts_overwrite",
|
| 823 |
+
"reasons": [
|
| 824 |
+
{
|
| 825 |
+
"id": "short_substring",
|
| 826 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 827 |
+
"path": "eval/tests/test_sniff_edge_cases.py",
|
| 828 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 829 |
+
"severity": "error",
|
| 830 |
+
"stage": "static_lint"
|
| 831 |
+
},
|
| 832 |
+
{
|
| 833 |
+
"id": "generic_keyword_oracle",
|
| 834 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 835 |
+
"path": "eval/tests/test_sniff_edge_cases.py",
|
| 836 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 837 |
+
"severity": "error",
|
| 838 |
+
"stage": "static_lint"
|
| 839 |
+
}
|
| 840 |
+
]
|
| 841 |
+
},
|
| 842 |
+
{
|
| 843 |
+
"name": "eval.tests.test_stdout_golden.TestGoldenDirectory.test_dir_counts_track_completed_ok",
|
| 844 |
+
"reasons": [
|
| 845 |
+
{
|
| 846 |
+
"id": "assertion_disjunction",
|
| 847 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 848 |
+
"path": "eval/tests/test_stdout_golden.py",
|
| 849 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 850 |
+
"severity": "error",
|
| 851 |
+
"stage": "static_lint"
|
| 852 |
+
}
|
| 853 |
+
]
|
| 854 |
+
},
|
| 855 |
+
{
|
| 856 |
+
"name": "eval.tests.test_stdout_golden.TestGoldenSingleSuccess.test_success_stdout_matches_exact",
|
| 857 |
+
"reasons": [
|
| 858 |
+
{
|
| 859 |
+
"detail": "subprocess.TimeoutExpired: Command '['/workspace/golden-2/executable', '-k', '-e', 'bin', 'album.kgm']' timed out after 120 seconds",
|
| 860 |
+
"id": "gold_fail",
|
| 861 |
+
"message": "test failed against the reference executable",
|
| 862 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 863 |
+
"severity": "error",
|
| 864 |
+
"stage": "gold_execution"
|
| 865 |
+
}
|
| 866 |
+
]
|
| 867 |
+
}
|
| 868 |
+
],
|
| 869 |
+
"tests": [
|
| 870 |
+
"eval.tests.test_cli_args.TestArgumentValidation.test_empty_target_string_is_invalid_path",
|
| 871 |
+
"eval.tests.test_cli_args.TestArgumentValidation.test_missing_target_is_rejected",
|
| 872 |
+
"eval.tests.test_cli_args.TestArgumentValidation.test_target_cannot_be_missing_with_flags",
|
| 873 |
+
"eval.tests.test_cli_args.TestArgumentValidation.test_unknown_flag_is_rejected",
|
| 874 |
+
"eval.tests.test_cli_args.TestHelpVersion.test_help_exact_text[long-help]",
|
| 875 |
+
"eval.tests.test_cli_args.TestHelpVersion.test_help_exact_text[short-help]",
|
| 876 |
+
"eval.tests.test_cli_args.TestHelpVersion.test_short_and_long_help_identical",
|
| 877 |
+
"eval.tests.test_cli_args.TestHelpVersion.test_version_prints_package_version[long-version]",
|
| 878 |
+
"eval.tests.test_cli_args.TestHelpVersion.test_version_prints_package_version[short-version]",
|
| 879 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_adjacent_payload_lengths_differ",
|
| 880 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[h2x1]",
|
| 881 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[h2x]",
|
| 882 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[h8191]",
|
| 883 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[h8192]",
|
| 884 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[h8193]",
|
| 885 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[m271]",
|
| 886 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[m272]",
|
| 887 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[m273]",
|
| 888 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[m2]",
|
| 889 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[ow1]",
|
| 890 |
+
"eval.tests.test_decode_transform.TestChunkBoundaries.test_output_length_equals_payload_at_boundaries[ow2]",
|
| 891 |
+
"eval.tests.test_decode_transform.TestInterleavedOwnKeyPayload.test_distinct_payloads_with_same_key_differ",
|
| 892 |
+
"eval.tests.test_decode_transform.TestInterleavedOwnKeyPayload.test_position_shift_affects_early_and_late_bytes",
|
| 893 |
+
"eval.tests.test_decode_transform.TestInterleavedOwnKeyPayload.test_varied_payload_seed_dequeues_full_length[s00]",
|
| 894 |
+
"eval.tests.test_decode_transform.TestInterleavedOwnKeyPayload.test_varied_payload_seed_dequeues_full_length[s10]",
|
| 895 |
+
"eval.tests.test_decode_transform.TestInterleavedOwnKeyPayload.test_varied_payload_seed_dequeues_full_length[sA5]",
|
| 896 |
+
"eval.tests.test_decode_transform.TestInterleavedOwnKeyPayload.test_varied_payload_seed_dequeues_full_length[sA]",
|
| 897 |
+
"eval.tests.test_decode_transform.TestInterleavedOwnKeyPayload.test_varied_payload_seed_dequeues_full_length[sFF]",
|
| 898 |
+
"eval.tests.test_decoder_errors.TestCreateErrorDirectory.test_create_error_directory_never_prompts_overwrite",
|
| 899 |
+
"eval.tests.test_decoder_errors.TestCreateErrorDirectory.test_directory_create_error_reports_each_and_counts_zero",
|
| 900 |
+
"eval.tests.test_decoder_errors.TestCreateErrorSingle.test_create_error_absolute_target_message[baddeep]",
|
| 901 |
+
"eval.tests.test_decoder_errors.TestCreateErrorSingle.test_create_error_absolute_target_message[emptynope]",
|
| 902 |
+
"eval.tests.test_decoder_errors.TestCreateErrorSingle.test_create_error_absolute_target_message[missout]",
|
| 903 |
+
"eval.tests.test_decoder_errors.TestCreateErrorSingle.test_create_error_various_nested_depths[onelevel]",
|
| 904 |
+
"eval.tests.test_decoder_errors.TestCreateErrorSingle.test_create_error_various_nested_depths[threelvl]",
|
| 905 |
+
"eval.tests.test_decoder_errors.TestCreateErrorSingle.test_create_error_various_nested_depths[twolevel]",
|
| 906 |
+
"eval.tests.test_decoder_errors.TestCreateErrorSingle.test_relative_create_error_matches_golden",
|
| 907 |
+
"eval.tests.test_decoder_errors.TestEmptyStemNaming.test_extension_only_filename_decodes_to_empty_stem_output",
|
| 908 |
+
"eval.tests.test_decoder_errors.TestEmptyStemNaming.test_source_filename_with_double_dot_names_final_bit",
|
| 909 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_empty_file_is_rejected",
|
| 910 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_exactly_1024_or_more_header_bytes_is_valid[0]",
|
| 911 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_exactly_1024_or_more_header_bytes_is_valid[127]",
|
| 912 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_exactly_1024_or_more_header_bytes_is_valid[1]",
|
| 913 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_exactly_1024_or_more_header_bytes_is_valid[4096]",
|
| 914 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_file_shorter_than_1024_is_rejected",
|
| 915 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_magic_header_replaced_byte_zero_becomes_all_bytes",
|
| 916 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_magic_mutation_at_offset_is_rejected[14]",
|
| 917 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_magic_mutation_at_offset_is_rejected[1]",
|
| 918 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_magic_mutation_at_offset_is_rejected[20]",
|
| 919 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_magic_mutation_at_offset_is_rejected[27]",
|
| 920 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_magic_mutation_at_offset_is_rejected[5]",
|
| 921 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_valid_magic_header_decodes",
|
| 922 |
+
"eval.tests.test_decoder_factory.TestFactoryDetection.test_wrong_first_byte_is_not_a_decoder",
|
| 923 |
+
"eval.tests.test_decoder_factory.TestHeaderBoundaries.test_1023_bytes_with_magic_rejected",
|
| 924 |
+
"eval.tests.test_decoder_factory.TestHeaderBoundaries.test_1024_bytes_with_magic_and_no_payload_skips_failed_read_head",
|
| 925 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_decode_is_deterministic_across_runs",
|
| 926 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_different_payload_lengths_produce_different_outputs",
|
| 927 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_output_length_equals_payload_after_header[l100]",
|
| 928 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_output_length_equals_payload_after_header[l1024]",
|
| 929 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_output_length_equals_payload_after_header[l1]",
|
| 930 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_output_length_equals_payload_after_header[l2]",
|
| 931 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_output_length_equals_payload_after_header[l4096]",
|
| 932 |
+
"eval.tests.test_decoder_factory.TestPayloadCharacteristics.test_output_length_equals_payload_after_header[l5]",
|
| 933 |
+
"eval.tests.test_directory.TestDirectoryTraversal.test_deep_recursion_touches_all_levels",
|
| 934 |
+
"eval.tests.test_directory.TestDirectoryTraversal.test_empty_directory_finds_no_files",
|
| 935 |
+
"eval.tests.test_directory.TestDirectoryTraversal.test_non_recursive_ignores_subdirectories",
|
| 936 |
+
"eval.tests.test_directory.TestDirectoryTraversal.test_recursive_finds_nested_files",
|
| 937 |
+
"eval.tests.test_directory.TestMixedDirectoryProcessing.test_all_valid_directory_decodes_completely",
|
| 938 |
+
"eval.tests.test_directory.TestMixedDirectoryProcessing.test_mixed_outputs_written_alongside_sources",
|
| 939 |
+
"eval.tests.test_directory.TestMixedDirectoryProcessing.test_mixed_valid_and_invalid_counts",
|
| 940 |
+
"eval.tests.test_file_lifecycle.TestInputRetention.test_default_deletes_input_after_success",
|
| 941 |
+
"eval.tests.test_file_lifecycle.TestInputRetention.test_keep_file_flag_preserves_input",
|
| 942 |
+
"eval.tests.test_file_lifecycle.TestInputRetention.test_long_flag_keep_file_equivalent",
|
| 943 |
+
"eval.tests.test_file_lifecycle.TestInputRetention.test_skipped_file_is_not_deleted",
|
| 944 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_affirmative_variants_overwrite[YES]",
|
| 945 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_affirmative_variants_overwrite[Y]",
|
| 946 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_affirmative_variants_overwrite[y]",
|
| 947 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_affirmative_variants_overwrite[yes]",
|
| 948 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_blank_input_reprompts_until_answer",
|
| 949 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_invalid_then_valid_prompt_loops_once",
|
| 950 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_negative_variants_skip[NO]",
|
| 951 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_negative_variants_skip[N]",
|
| 952 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_negative_variants_skip[n]",
|
| 953 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_negative_variants_skip[no]",
|
| 954 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_overwrite_accepted_replaces_output",
|
| 955 |
+
"eval.tests.test_file_lifecycle.TestOverwriteConfirmation.test_overwrite_declined_leaves_output_intact",
|
| 956 |
+
"eval.tests.test_golden_sample.TestGoldenSample.test_decode_matches_golden_output_bytes",
|
| 957 |
+
"eval.tests.test_golden_sample.TestGoldenSample.test_decoded_size_is_input_minus_header",
|
| 958 |
+
"eval.tests.test_golden_sample.TestGoldenSample.test_from_golden_extension_override_changes_only_suffix",
|
| 959 |
+
"eval.tests.test_io_edges.TestMixedTopLevel.test_mixed_with_empty_file_skips_and_decodes",
|
| 960 |
+
"eval.tests.test_io_edges.TestNonRegularTargets.test_directory_itself_is_not_decoded",
|
| 961 |
+
"eval.tests.test_io_edges.TestNonRegularTargets.test_fifo_target_is_skipped",
|
| 962 |
+
"eval.tests.test_io_edges.TestNonRegularTargets.test_nonexistent_path_reports_invalid",
|
| 963 |
+
"eval.tests.test_io_edges.TestNonRegularTargets.test_top_level_symlink_is_not_a_regular_file",
|
| 964 |
+
"eval.tests.test_io_edges.TestRegularFileVariants.test_any_regular_filename_decodes[a.kgm]",
|
| 965 |
+
"eval.tests.test_io_edges.TestRegularFileVariants.test_any_regular_filename_decodes[b.kgm]",
|
| 966 |
+
"eval.tests.test_io_edges.TestRegularFileVariants.test_any_regular_filename_decodes[song.KGM]",
|
| 967 |
+
"eval.tests.test_io_edges.TestRegularFileVariants.test_any_regular_filename_decodes[track.kgm]",
|
| 968 |
+
"eval.tests.test_io_edges.TestRegularFileVariants.test_hidden_dotfile_with_magic_decodes",
|
| 969 |
+
"eval.tests.test_io_edges.TestRegularFileVariants.test_uppercase_kgm_extension_decodes",
|
| 970 |
+
"eval.tests.test_output_naming.TestExtensionFallback.test_real_sample_default_extension_is_mp3",
|
| 971 |
+
"eval.tests.test_output_naming.TestOutputNaming.test_double_extension_file_gets_single_stripped_output",
|
| 972 |
+
"eval.tests.test_output_naming.TestOutputNaming.test_extension_override_controls_output",
|
| 973 |
+
"eval.tests.test_output_naming.TestOutputNaming.test_kgm_stem_stripped_when_using_extension",
|
| 974 |
+
"eval.tests.test_output_naming.TestOutputNaming.test_long_output_extension_flag",
|
| 975 |
+
"eval.tests.test_output_naming.TestOutputNaming.test_output_prompt_message_names_existing_file",
|
| 976 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_all_bytes_key_variants_share_length[5a]",
|
| 977 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_all_bytes_key_variants_share_length[ff]",
|
| 978 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_all_bytes_key_variants_share_length[zero]",
|
| 979 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_distinct_own_keys_yield_distinct_output[as-vs-zeros]",
|
| 980 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_distinct_own_keys_yield_distinct_output[asc-vs-desc]",
|
| 981 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_distinct_own_keys_yield_distinct_output[zeros-vs-ascending]",
|
| 982 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_distinct_own_keys_yield_distinct_output[zeros-vs-ffs]",
|
| 983 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_own_key_is_read_specifically_from_offset_0x1c",
|
| 984 |
+
"eval.tests.test_own_key.TestOwnKeyInfluence.test_same_own_key_yields_identical_output",
|
| 985 |
+
"eval.tests.test_sniff_edge_cases.TestMixedDirectorySniff.test_directory_decodes_to_per_format_extensions",
|
| 986 |
+
"eval.tests.test_sniff_edge_cases.TestMixedDirectorySniff.test_directory_with_unknown_sig_count_reflected",
|
| 987 |
+
"eval.tests.test_sniff_edge_cases.TestOverRideBypassesSniff.test_e_override_names_output_extension",
|
| 988 |
+
"eval.tests.test_sniff_edge_cases.TestOverRideBypassesSniff.test_empty_extension_defaults_to_sniff",
|
| 989 |
+
"eval.tests.test_sniff_edge_cases.TestOverRideBypassesSniff.test_long_output_extension_flag_also_overrides_sniff",
|
| 990 |
+
"eval.tests.test_sniff_edge_cases.TestOverRideBypassesSniff.test_override_on_unknown_signature_writes_clean_output",
|
| 991 |
+
"eval.tests.test_sniff_edge_cases.TestUnknownSignatureFallback.test_unknown_signature_accepted_overwrites_input_with_decoded",
|
| 992 |
+
"eval.tests.test_sniff_edge_cases.TestUnknownSignatureFallback.test_unknown_signature_under_non_kgm_ext_also_prompts",
|
| 993 |
+
"eval.tests.test_sniff_edge_cases.TestUnknownSignatureFallback.test_unknown_signature_without_override_prompts_overwrite",
|
| 994 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_magic_drives_output_extension[gif]",
|
| 995 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_magic_drives_output_extension[jpeg]",
|
| 996 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_magic_drives_output_extension[mp3]",
|
| 997 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_magic_drives_output_extension[pdf]",
|
| 998 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_magic_drives_output_extension[png]",
|
| 999 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_magic_drives_output_extension[wav]",
|
| 1000 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_magic_drives_output_extension[zip]",
|
| 1001 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_output_is_the_exact_golden[gif]",
|
| 1002 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_output_is_the_exact_golden[jpeg]",
|
| 1003 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_output_is_the_exact_golden[mp3]",
|
| 1004 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_output_is_the_exact_golden[pdf]",
|
| 1005 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_output_is_the_exact_golden[png]",
|
| 1006 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_output_is_the_exact_golden[wav]",
|
| 1007 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_decoded_output_is_the_exact_golden[zip]",
|
| 1008 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_output_size_is_input_minus_header[gif]",
|
| 1009 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_output_size_is_input_minus_header[jpeg]",
|
| 1010 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_output_size_is_input_minus_header[mp3]",
|
| 1011 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_output_size_is_input_minus_header[pdf]",
|
| 1012 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_output_size_is_input_minus_header[png]",
|
| 1013 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_output_size_is_input_minus_header[wav]",
|
| 1014 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_output_size_is_input_minus_header[zip]",
|
| 1015 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_sniff_magic_prefix_matches_expected[gif]",
|
| 1016 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_sniff_magic_prefix_matches_expected[jpeg]",
|
| 1017 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_sniff_magic_prefix_matches_expected[mp3]",
|
| 1018 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_sniff_magic_prefix_matches_expected[pdf]",
|
| 1019 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_sniff_magic_prefix_matches_expected[png]",
|
| 1020 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_sniff_magic_prefix_matches_expected[wav]",
|
| 1021 |
+
"eval.tests.test_sniff_extension.TestSniffAutoExtension.test_sniff_magic_prefix_matches_expected[zip]",
|
| 1022 |
+
"eval.tests.test_sniff_extension.TestSniffDeterminismAndNaming.test_jpeg_fixture_normalizes_to_jpg",
|
| 1023 |
+
"eval.tests.test_sniff_extension.TestSniffDeterminismAndNaming.test_sniff_ignores_input_extension_name",
|
| 1024 |
+
"eval.tests.test_sniff_extension.TestSniffDeterminismAndNaming.test_sniffed_output_is_deterministic",
|
| 1025 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[gif]",
|
| 1026 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[jpeg]",
|
| 1027 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[mp3]",
|
| 1028 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[pdf]",
|
| 1029 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[plain]",
|
| 1030 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[png]",
|
| 1031 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[wav]",
|
| 1032 |
+
"eval.tests.test_sniff_extension.TestSniffGoldenPresence.test_sniff_fixture_and_golden_are_present[zip]",
|
| 1033 |
+
"eval.tests.test_stdout_golden.TestGoldenDirectory.test_dir_counts_track_completed_ok",
|
| 1034 |
+
"eval.tests.test_stdout_golden.TestGoldenDirectory.test_mixed_dir_stdout_matches_exact",
|
| 1035 |
+
"eval.tests.test_stdout_golden.TestGoldenSingleSkip.test_no_decoder_stdout_matches_exact",
|
| 1036 |
+
"eval.tests.test_stdout_golden.TestGoldenSingleSuccess.test_success_stdout_matches_exact"
|
| 1037 |
+
]
|
| 1038 |
+
},
|
| 1039 |
+
"generated_module_04": {
|
| 1040 |
+
"ignore_reason": "",
|
| 1041 |
+
"ignored": false,
|
| 1042 |
+
"ignored_tests": [
|
| 1043 |
+
{
|
| 1044 |
+
"name": "eval.tests.test_decode_alignment.test_high_nibble_own_key",
|
| 1045 |
+
"reasons": [
|
| 1046 |
+
{
|
| 1047 |
+
"id": "no_assertions",
|
| 1048 |
+
"message": "pytest test contains no assert statements",
|
| 1049 |
+
"path": "eval/tests/test_decode_alignment.py",
|
| 1050 |
+
"repair_hint": "Add concrete assert statements over observable executable behavior.",
|
| 1051 |
+
"severity": "error",
|
| 1052 |
+
"stage": "static_lint"
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
},
|
| 1056 |
+
{
|
| 1057 |
+
"name": "eval.tests.test_decode_alignment.test_high_nibble_shift_sweep",
|
| 1058 |
+
"reasons": [
|
| 1059 |
+
{
|
| 1060 |
+
"id": "no_assertions",
|
| 1061 |
+
"message": "pytest test contains no assert statements",
|
| 1062 |
+
"path": "eval/tests/test_decode_alignment.py",
|
| 1063 |
+
"repair_hint": "Add concrete assert statements over observable executable behavior.",
|
| 1064 |
+
"severity": "error",
|
| 1065 |
+
"stage": "static_lint"
|
| 1066 |
+
}
|
| 1067 |
+
]
|
| 1068 |
+
},
|
| 1069 |
+
{
|
| 1070 |
+
"name": "eval.tests.test_decode_alignment.test_two_megabyte_payload_exact",
|
| 1071 |
+
"reasons": [
|
| 1072 |
+
{
|
| 1073 |
+
"id": "no_assertions",
|
| 1074 |
+
"message": "pytest test contains no assert statements",
|
| 1075 |
+
"path": "eval/tests/test_decode_alignment.py",
|
| 1076 |
+
"repair_hint": "Add concrete assert statements over observable executable behavior.",
|
| 1077 |
+
"severity": "error",
|
| 1078 |
+
"stage": "static_lint"
|
| 1079 |
+
}
|
| 1080 |
+
]
|
| 1081 |
+
},
|
| 1082 |
+
{
|
| 1083 |
+
"name": "eval.tests.test_decode_output.test_decode_mp3_via_default_inference",
|
| 1084 |
+
"reasons": [
|
| 1085 |
+
{
|
| 1086 |
+
"id": "golden_docstring",
|
| 1087 |
+
"message": "pytest test docstring mentions golden data that is not used in the body",
|
| 1088 |
+
"path": "eval/tests/test_decode_output.py",
|
| 1089 |
+
"repair_hint": "Use the golden fixture mentioned in the docstring or remove the misleading claim.",
|
| 1090 |
+
"severity": "error",
|
| 1091 |
+
"stage": "static_lint"
|
| 1092 |
+
},
|
| 1093 |
+
{
|
| 1094 |
+
"id": "golden_no_equality",
|
| 1095 |
+
"message": "pytest test references golden data without equality comparison",
|
| 1096 |
+
"path": "eval/tests/test_decode_output.py",
|
| 1097 |
+
"repair_hint": "Compare observed output to golden data with equality after any explicit normalization.",
|
| 1098 |
+
"severity": "error",
|
| 1099 |
+
"stage": "static_lint"
|
| 1100 |
+
}
|
| 1101 |
+
]
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"name": "eval.tests.test_decode_output.test_stdout_ok_line_uses_source_and_dest",
|
| 1105 |
+
"reasons": [
|
| 1106 |
+
{
|
| 1107 |
+
"id": "golden_written_in_test",
|
| 1108 |
+
"message": "pytest test writes to its own golden file",
|
| 1109 |
+
"path": "eval/tests/test_decode_output.py",
|
| 1110 |
+
"repair_hint": "Read committed golden data instead of writing expected output inside the test.",
|
| 1111 |
+
"severity": "error",
|
| 1112 |
+
"stage": "static_lint"
|
| 1113 |
+
}
|
| 1114 |
+
]
|
| 1115 |
+
}
|
| 1116 |
+
],
|
| 1117 |
+
"tests": [
|
| 1118 |
+
"eval.tests.test_cli_args.test_flag_value_errors[missing-value-long]",
|
| 1119 |
+
"eval.tests.test_cli_args.test_flag_value_errors[missing-value-short]",
|
| 1120 |
+
"eval.tests.test_cli_args.test_flag_value_errors[trailing-value]",
|
| 1121 |
+
"eval.tests.test_cli_args.test_help_appears_on_usage_error",
|
| 1122 |
+
"eval.tests.test_cli_args.test_help_exits_cleanly[long-help]",
|
| 1123 |
+
"eval.tests.test_cli_args.test_help_exits_cleanly[short-help]",
|
| 1124 |
+
"eval.tests.test_cli_args.test_known_flags_parse_and_reach_decode[combined-flags]",
|
| 1125 |
+
"eval.tests.test_cli_args.test_known_flags_parse_and_reach_decode[ext-eq]",
|
| 1126 |
+
"eval.tests.test_cli_args.test_known_flags_parse_and_reach_decode[keep]",
|
| 1127 |
+
"eval.tests.test_cli_args.test_known_flags_parse_and_reach_decode[recursive]",
|
| 1128 |
+
"eval.tests.test_cli_args.test_missing_target_is_usage_error",
|
| 1129 |
+
"eval.tests.test_cli_args.test_short_help_flag_full_usage",
|
| 1130 |
+
"eval.tests.test_cli_args.test_unknown_long_flag_is_usage_error",
|
| 1131 |
+
"eval.tests.test_cli_args.test_unknown_short_flag_is_usage_error",
|
| 1132 |
+
"eval.tests.test_cli_args.test_version_line_matches_prerelease_semver",
|
| 1133 |
+
"eval.tests.test_cli_args.test_version_prints_exact_semver[long-version]",
|
| 1134 |
+
"eval.tests.test_cli_args.test_version_prints_exact_semver[short-version]",
|
| 1135 |
+
"eval.tests.test_core_deep.test_key_block_and_pos_advancement[1000]",
|
| 1136 |
+
"eval.tests.test_core_deep.test_key_block_and_pos_advancement[128]",
|
| 1137 |
+
"eval.tests.test_core_deep.test_key_block_and_pos_advancement[32]",
|
| 1138 |
+
"eval.tests.test_core_deep.test_key_block_and_pos_advancement[480]",
|
| 1139 |
+
"eval.tests.test_core_deep.test_key_block_and_pos_advancement[64]",
|
| 1140 |
+
"eval.tests.test_core_deep.test_large_multi_chunk_payload_exact[200000]",
|
| 1141 |
+
"eval.tests.test_core_deep.test_large_multi_chunk_payload_exact[500000]",
|
| 1142 |
+
"eval.tests.test_core_deep.test_large_multi_chunk_payload_exact[70000]",
|
| 1143 |
+
"eval.tests.test_core_deep.test_large_payload_file_size_equals_payload",
|
| 1144 |
+
"eval.tests.test_core_deep.test_position_offset_payload_alignment[0]",
|
| 1145 |
+
"eval.tests.test_core_deep.test_position_offset_payload_alignment[15]",
|
| 1146 |
+
"eval.tests.test_core_deep.test_position_offset_payload_alignment[16]",
|
| 1147 |
+
"eval.tests.test_core_deep.test_position_offset_payload_alignment[17]",
|
| 1148 |
+
"eval.tests.test_core_deep.test_position_offset_payload_alignment[1]",
|
| 1149 |
+
"eval.tests.test_core_deep.test_position_offset_payload_alignment[271]",
|
| 1150 |
+
"eval.tests.test_core_deep.test_pub_key_mend_table_wrap_boundary[1088]",
|
| 1151 |
+
"eval.tests.test_core_deep.test_pub_key_mend_table_wrap_boundary[272]",
|
| 1152 |
+
"eval.tests.test_core_deep.test_pub_key_mend_table_wrap_boundary[544]",
|
| 1153 |
+
"eval.tests.test_core_deep.test_pub_key_mend_table_wrap_boundary[816]",
|
| 1154 |
+
"eval.tests.test_core_deep.test_reencoded_reference_roundtrip",
|
| 1155 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[271]",
|
| 1156 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[287]",
|
| 1157 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[32639]",
|
| 1158 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[32641]",
|
| 1159 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[543]",
|
| 1160 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[559]",
|
| 1161 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[815]",
|
| 1162 |
+
"eval.tests.test_decode_alignment.test_boundary_adjacent_sizes[817]",
|
| 1163 |
+
"eval.tests.test_decode_alignment.test_combined_wrap_alignment_sizes[1000001]",
|
| 1164 |
+
"eval.tests.test_decode_alignment.test_combined_wrap_alignment_sizes[1104]",
|
| 1165 |
+
"eval.tests.test_decode_alignment.test_combined_wrap_alignment_sizes[288]",
|
| 1166 |
+
"eval.tests.test_decode_alignment.test_combined_wrap_alignment_sizes[560]",
|
| 1167 |
+
"eval.tests.test_decode_alignment.test_combined_wrap_alignment_sizes[832]",
|
| 1168 |
+
"eval.tests.test_decode_alignment.test_edge_own_key_patterns[80to8F]",
|
| 1169 |
+
"eval.tests.test_decode_alignment.test_edge_own_key_patterns[F0-0F-altern]",
|
| 1170 |
+
"eval.tests.test_decode_alignment.test_edge_own_key_patterns[all-0F]",
|
| 1171 |
+
"eval.tests.test_decode_alignment.test_edge_own_key_patterns[all-FF]",
|
| 1172 |
+
"eval.tests.test_decode_alignment.test_edge_own_key_patterns[asc-step]",
|
| 1173 |
+
"eval.tests.test_decode_alignment.test_edge_own_key_patterns[repeated-A5]",
|
| 1174 |
+
"eval.tests.test_decode_alignment.test_feeding_mp3_output_back_is_skipped",
|
| 1175 |
+
"eval.tests.test_decode_alignment.test_feeding_produced_output_back_is_skipped",
|
| 1176 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[16385]",
|
| 1177 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[24576]",
|
| 1178 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[32768]",
|
| 1179 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[32769]",
|
| 1180 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[4096]",
|
| 1181 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[8191]",
|
| 1182 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[8193]",
|
| 1183 |
+
"eval.tests.test_decode_alignment.test_head_read_chunk_boundary_sizes[8194]",
|
| 1184 |
+
"eval.tests.test_decode_alignment.test_high_nibble_own_key",
|
| 1185 |
+
"eval.tests.test_decode_alignment.test_high_nibble_shift_sweep",
|
| 1186 |
+
"eval.tests.test_decode_alignment.test_large_flac_head_inferred_extension",
|
| 1187 |
+
"eval.tests.test_decode_alignment.test_repeated_payload_byte_patterns[0-1-2-3]",
|
| 1188 |
+
"eval.tests.test_decode_alignment.test_repeated_payload_byte_patterns[0x80-repeat]",
|
| 1189 |
+
"eval.tests.test_decode_alignment.test_repeated_payload_byte_patterns[10-10]",
|
| 1190 |
+
"eval.tests.test_decode_alignment.test_repeated_payload_byte_patterns[D5-ramp]",
|
| 1191 |
+
"eval.tests.test_decode_alignment.test_repeated_payload_byte_patterns[all-FF]",
|
| 1192 |
+
"eval.tests.test_decode_alignment.test_repeated_payload_byte_patterns[mod3]",
|
| 1193 |
+
"eval.tests.test_decode_alignment.test_two_megabyte_payload_exact",
|
| 1194 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_first_byte",
|
| 1195 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_inner_byte[idx12]",
|
| 1196 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_inner_byte[idx13]",
|
| 1197 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_inner_byte[idx20]",
|
| 1198 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_inner_byte[idx26]",
|
| 1199 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_inner_byte[idx27]",
|
| 1200 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_inner_byte[idx2]",
|
| 1201 |
+
"eval.tests.test_decode_errors.test_corrupt_magic_inner_byte[idx7]",
|
| 1202 |
+
"eval.tests.test_decode_errors.test_directory_target_dangling_symlink_is_skipped",
|
| 1203 |
+
"eval.tests.test_decode_errors.test_missing_file_is_invalid_not_skipped",
|
| 1204 |
+
"eval.tests.test_decode_errors.test_mixed_dir_skips_non_kgm_but_decodes_kgm",
|
| 1205 |
+
"eval.tests.test_decode_errors.test_non_kgm_files_are_skipped[byte-range]",
|
| 1206 |
+
"eval.tests.test_decode_errors.test_non_kgm_files_are_skipped[empty]",
|
| 1207 |
+
"eval.tests.test_decode_errors.test_non_kgm_files_are_skipped[ff-bytes]",
|
| 1208 |
+
"eval.tests.test_decode_errors.test_non_kgm_files_are_skipped[single-byte]",
|
| 1209 |
+
"eval.tests.test_decode_errors.test_non_kgm_files_are_skipped[text]",
|
| 1210 |
+
"eval.tests.test_decode_errors.test_non_kgm_files_are_skipped[zeros]",
|
| 1211 |
+
"eval.tests.test_decode_errors.test_short_file_under_header_length[100-bytes]",
|
| 1212 |
+
"eval.tests.test_decode_errors.test_short_file_under_header_length[512-bytes]",
|
| 1213 |
+
"eval.tests.test_decode_errors.test_short_file_under_header_length[900-bytes]",
|
| 1214 |
+
"eval.tests.test_decode_errors.test_truncated_tiny_payload_still_named_mp3[1]",
|
| 1215 |
+
"eval.tests.test_decode_errors.test_truncated_tiny_payload_still_named_mp3[5]",
|
| 1216 |
+
"eval.tests.test_decode_errors.test_truncated_tiny_payload_still_named_mp3[63]",
|
| 1217 |
+
"eval.tests.test_decode_errors.test_valid_magic_with_empty_payload",
|
| 1218 |
+
"eval.tests.test_decode_extension.test_double_kgm_extension_case_insensitive",
|
| 1219 |
+
"eval.tests.test_decode_extension.test_double_kgm_extension_stripped",
|
| 1220 |
+
"eval.tests.test_decode_extension.test_extension_override_empty_defaults_off",
|
| 1221 |
+
"eval.tests.test_decode_extension.test_fallback_to_input_extension_when_not_sniffable",
|
| 1222 |
+
"eval.tests.test_decode_extension.test_infer_decoded_extension[flac]",
|
| 1223 |
+
"eval.tests.test_decode_extension.test_infer_decoded_extension[mp3]",
|
| 1224 |
+
"eval.tests.test_decode_extension.test_infer_decoded_extension[ogg]",
|
| 1225 |
+
"eval.tests.test_decode_extension.test_infer_decoded_extension[png]",
|
| 1226 |
+
"eval.tests.test_decode_extension.test_infer_decoded_extension[wav]",
|
| 1227 |
+
"eval.tests.test_decode_extension.test_long_output_extension_flag",
|
| 1228 |
+
"eval.tests.test_decode_extension.test_no_extension_input_gets_default_ext",
|
| 1229 |
+
"eval.tests.test_decode_extension.test_output_extension_override[FLUFF]",
|
| 1230 |
+
"eval.tests.test_decode_extension.test_output_extension_override[audio.raw]",
|
| 1231 |
+
"eval.tests.test_decode_extension.test_output_extension_override[bin]",
|
| 1232 |
+
"eval.tests.test_decode_extension.test_output_extension_override[dat]",
|
| 1233 |
+
"eval.tests.test_decode_extension.test_output_extension_override[flac]",
|
| 1234 |
+
"eval.tests.test_decode_extension.test_output_extension_override[mp3]",
|
| 1235 |
+
"eval.tests.test_decode_extension.test_output_extension_override[ogg]",
|
| 1236 |
+
"eval.tests.test_decode_extension.test_output_extension_override[wav]",
|
| 1237 |
+
"eval.tests.test_decode_extension.test_plain_kgm_single_extension_become_mp3",
|
| 1238 |
+
"eval.tests.test_decode_output.test_decode_emits_only_decoded_payload",
|
| 1239 |
+
"eval.tests.test_decode_output.test_decode_golden_mp3",
|
| 1240 |
+
"eval.tests.test_decode_output.test_decode_mp3_via_default_inference",
|
| 1241 |
+
"eval.tests.test_decode_output.test_decode_own_key_length_17_padding",
|
| 1242 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[0]",
|
| 1243 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[10]",
|
| 1244 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[11]",
|
| 1245 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[1]",
|
| 1246 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[2]",
|
| 1247 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[3]",
|
| 1248 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[4]",
|
| 1249 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[5]",
|
| 1250 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[6]",
|
| 1251 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[7]",
|
| 1252 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[8]",
|
| 1253 |
+
"eval.tests.test_decode_output.test_decode_random_payloads[9]",
|
| 1254 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[1024]",
|
| 1255 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[16384]",
|
| 1256 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[16]",
|
| 1257 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[17]",
|
| 1258 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[1]",
|
| 1259 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[272]",
|
| 1260 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[273]",
|
| 1261 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[31]",
|
| 1262 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[7]",
|
| 1263 |
+
"eval.tests.test_decode_output.test_decode_small_payload_sizes[8192]",
|
| 1264 |
+
"eval.tests.test_decode_output.test_decode_various_own_keys[ascending]",
|
| 1265 |
+
"eval.tests.test_decode_output.test_decode_various_own_keys[descending]",
|
| 1266 |
+
"eval.tests.test_decode_output.test_decode_various_own_keys[lcg]",
|
| 1267 |
+
"eval.tests.test_decode_output.test_decode_various_own_keys[reference]",
|
| 1268 |
+
"eval.tests.test_decode_output.test_decode_various_own_keys[zeros]",
|
| 1269 |
+
"eval.tests.test_decode_output.test_stdout_ok_line_uses_source_and_dest",
|
| 1270 |
+
"eval.tests.test_decode_output.test_stdout_reports_zero_files_found",
|
| 1271 |
+
"eval.tests.test_file_io.test_default_deletes_source",
|
| 1272 |
+
"eval.tests.test_file_io.test_delete_does_not_touch_non_kgm_source",
|
| 1273 |
+
"eval.tests.test_file_io.test_directory_non_recursive_processes_top_level_only",
|
| 1274 |
+
"eval.tests.test_file_io.test_directory_recursive_processes_nested",
|
| 1275 |
+
"eval.tests.test_file_io.test_keep_file_preserves_source",
|
| 1276 |
+
"eval.tests.test_file_io.test_keep_long_flag",
|
| 1277 |
+
"eval.tests.test_file_io.test_missing_target_directory_counts_zero",
|
| 1278 |
+
"eval.tests.test_file_io.test_multiple_files_directory_partial_success",
|
| 1279 |
+
"eval.tests.test_file_io.test_output_path_matches_input_dir",
|
| 1280 |
+
"eval.tests.test_file_io.test_overwrite_case_insensitive_full_word",
|
| 1281 |
+
"eval.tests.test_file_io.test_overwrite_prompt_accept_replaces",
|
| 1282 |
+
"eval.tests.test_file_io.test_overwrite_prompt_decline_leaves_existing",
|
| 1283 |
+
"eval.tests.test_file_io.test_overwrite_uses_variants[Title]",
|
| 1284 |
+
"eval.tests.test_file_io.test_overwrite_uses_variants[UPPER]",
|
| 1285 |
+
"eval.tests.test_file_io.test_overwrite_uses_variants[y]",
|
| 1286 |
+
"eval.tests.test_file_io.test_overwrite_uses_variants[yes]",
|
| 1287 |
+
"eval.tests.test_file_io.test_relative_target_path",
|
| 1288 |
+
"eval.tests.test_io_interactions.test_confirm_retry_invalid_then_accept",
|
| 1289 |
+
"eval.tests.test_io_interactions.test_confirm_retry_invalid_then_decline",
|
| 1290 |
+
"eval.tests.test_io_interactions.test_non_recursive_with_delete_keeps_nested_source",
|
| 1291 |
+
"eval.tests.test_io_interactions.test_overwrite_accept_reports_completed_preserving_count",
|
| 1292 |
+
"eval.tests.test_io_interactions.test_overwrite_decline_preserves_source_even_without_keep",
|
| 1293 |
+
"eval.tests.test_io_interactions.test_recursive_with_delete_removes_nested_sources"
|
| 1294 |
+
]
|
| 1295 |
+
}
|
| 1296 |
+
},
|
| 1297 |
+
"commit": "20ee463537e241de443166aec326b99f3bd8f534",
|
| 1298 |
+
"data_source": "synthetic_programgym",
|
| 1299 |
+
"difficulty": "easy",
|
| 1300 |
+
"difficulty_score": 1.2127201544178425,
|
| 1301 |
+
"eval_clean_hashes": [
|
| 1302 |
+
"ad564acc8d9644d23b1d724f06ecf73793fa7d13186479678c20f84a970db5e3"
|
| 1303 |
+
],
|
| 1304 |
+
"input_record": {
|
| 1305 |
+
"codeql_db_mb": 84.04,
|
| 1306 |
+
"codeql_status": true,
|
| 1307 |
+
"codeql_time": 45.55801236908883,
|
| 1308 |
+
"commit": "20ee463537e241de443166aec326b99f3bd8f534",
|
| 1309 |
+
"commits": 48,
|
| 1310 |
+
"contributors": 3,
|
| 1311 |
+
"difficulty": "easy",
|
| 1312 |
+
"difficulty_code_lines": 408,
|
| 1313 |
+
"difficulty_has_tests": false,
|
| 1314 |
+
"difficulty_product_code_lines": 408,
|
| 1315 |
+
"difficulty_runtime_deps": 3,
|
| 1316 |
+
"difficulty_score": 1.2127201544178425,
|
| 1317 |
+
"difficulty_test_code_lines": 0,
|
| 1318 |
+
"full_name": "ghtz08/kugou-kgm-decoder",
|
| 1319 |
+
"github_stars": null,
|
| 1320 |
+
"input_codeql_db": "rust_codeql/ghtz08__kugou-kgm-decoder",
|
| 1321 |
+
"language": "rs",
|
| 1322 |
+
"pb_match": [
|
| 1323 |
+
{
|
| 1324 |
+
"pb_fullname": "Lymphatus/caesium-clt",
|
| 1325 |
+
"rank": 136,
|
| 1326 |
+
"similarity": 0.5145018100738525
|
| 1327 |
+
},
|
| 1328 |
+
{
|
| 1329 |
+
"pb_fullname": "crowdagger/crowbook",
|
| 1330 |
+
"rank": 785,
|
| 1331 |
+
"similarity": 0.4151729345321655
|
| 1332 |
+
},
|
| 1333 |
+
{
|
| 1334 |
+
"pb_fullname": "Y2Z/monolith",
|
| 1335 |
+
"rank": 804,
|
| 1336 |
+
"similarity": 0.4559735655784607
|
| 1337 |
+
},
|
| 1338 |
+
{
|
| 1339 |
+
"pb_fullname": "yaa110/nomino",
|
| 1340 |
+
"rank": 579,
|
| 1341 |
+
"similarity": 0.4440682828426361
|
| 1342 |
+
}
|
| 1343 |
+
],
|
| 1344 |
+
"repo_age": null,
|
| 1345 |
+
"repo_path": "rust/ghtz08__kugou-kgm-decoder",
|
| 1346 |
+
"rust_channel": "stable",
|
| 1347 |
+
"rust_edition": "2024",
|
| 1348 |
+
"rust_release_date": "2025-02-20",
|
| 1349 |
+
"rust_version": "1.85.0",
|
| 1350 |
+
"rust_version_source": "edition",
|
| 1351 |
+
"source": "commit:20ee463537e241de443166aec326b99f3bd8f534",
|
| 1352 |
+
"status": "done",
|
| 1353 |
+
"url": "https://github.com/ghtz08/kugou-kgm-decoder"
|
| 1354 |
+
},
|
| 1355 |
+
"instance_id": "ghtz08__kugou-kgm-decoder.20ee463",
|
| 1356 |
+
"language": "rust",
|
| 1357 |
+
"module_iterations": [
|
| 1358 |
+
{
|
| 1359 |
+
"actual_iterations": 5,
|
| 1360 |
+
"branch_name": "generated_module_01",
|
| 1361 |
+
"iteration_limit": 5,
|
| 1362 |
+
"module_index": 1,
|
| 1363 |
+
"module_kind": "source",
|
| 1364 |
+
"termination_reason": "max_iterations"
|
| 1365 |
+
},
|
| 1366 |
+
{
|
| 1367 |
+
"actual_iterations": 5,
|
| 1368 |
+
"branch_name": "generated_module_02",
|
| 1369 |
+
"iteration_limit": 5,
|
| 1370 |
+
"module_index": 2,
|
| 1371 |
+
"module_kind": "source",
|
| 1372 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 1373 |
+
},
|
| 1374 |
+
{
|
| 1375 |
+
"actual_iterations": 5,
|
| 1376 |
+
"branch_name": "generated_module_03",
|
| 1377 |
+
"iteration_limit": 5,
|
| 1378 |
+
"module_index": 3,
|
| 1379 |
+
"module_kind": "source",
|
| 1380 |
+
"termination_reason": "max_iterations"
|
| 1381 |
+
},
|
| 1382 |
+
{
|
| 1383 |
+
"actual_iterations": 5,
|
| 1384 |
+
"branch_name": "generated_module_04",
|
| 1385 |
+
"iteration_limit": 5,
|
| 1386 |
+
"module_index": 4,
|
| 1387 |
+
"module_kind": "source",
|
| 1388 |
+
"termination_reason": "max_iterations"
|
| 1389 |
+
}
|
| 1390 |
+
],
|
| 1391 |
+
"repository": "ghtz08/kugou-kgm-decoder"
|
| 1392 |
+
}
|
ghtz08--kugou-kgm-decoder.20ee463/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
|
ghtz08--kugou-kgm-decoder.20ee463/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:84e87d24b6a266ceb1645bc58a208ca11d07d16f6c297a9e90b642874213d945
|
| 3 |
+
size 104009
|
giacomo-b--cpprobotics.e2b5cda/environment/Dockerfile
CHANGED
|
@@ -64,3 +64,4 @@ RUN mkdir -p /home/agent \
|
|
| 64 |
&& chmod 111 /workspace/executable
|
| 65 |
ENV HOME=/home/agent
|
| 66 |
WORKDIR /workspace
|
|
|
|
|
|
| 64 |
&& chmod 111 /workspace/executable
|
| 65 |
ENV HOME=/home/agent
|
| 66 |
WORKDIR /workspace
|
| 67 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
giacomo-b--cpprobotics.e2b5cda/tests/Dockerfile
CHANGED
|
@@ -72,3 +72,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
|
| 72 |
COPY programgym_task.json /tests/programgym_task.json
|
| 73 |
COPY blobs/ /tests/blobs/
|
| 74 |
RUN chmod +x /tests/test.sh
|
|
|
|
|
|
| 72 |
COPY programgym_task.json /tests/programgym_task.json
|
| 73 |
COPY blobs/ /tests/blobs/
|
| 74 |
RUN chmod +x /tests/test.sh
|
| 75 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
gibtnix--msiklm.e9a7594/environment/Dockerfile
CHANGED
|
@@ -54,3 +54,4 @@ RUN mkdir -p /home/agent \
|
|
| 54 |
&& chmod 111 /workspace/executable
|
| 55 |
ENV HOME=/home/agent
|
| 56 |
WORKDIR /workspace
|
|
|
|
|
|
| 54 |
&& chmod 111 /workspace/executable
|
| 55 |
ENV HOME=/home/agent
|
| 56 |
WORKDIR /workspace
|
| 57 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
gibtnix--msiklm.e9a7594/tests/Dockerfile
CHANGED
|
@@ -68,3 +68,4 @@ COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
|
| 68 |
COPY programgym_task.json /tests/programgym_task.json
|
| 69 |
COPY blobs/ /tests/blobs/
|
| 70 |
RUN chmod +x /tests/test.sh
|
|
|
|
|
|
| 68 |
COPY programgym_task.json /tests/programgym_task.json
|
| 69 |
COPY blobs/ /tests/blobs/
|
| 70 |
RUN chmod +x /tests/test.sh
|
| 71 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
gillesdebunne--libqglviewer.da4bfad/environment/Dockerfile
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
ARG PROGRAMGYM_APT_REPOSITORY_BASE_URL=""
|
| 3 |
+
ARG PROGRAMGYM_GOPROXY="https://proxy.golang.org,direct"
|
| 4 |
+
ARG PROGRAMGYM_NPM_REGISTRY="https://registry.npmjs.org/"
|
| 5 |
+
ARG PROGRAMGYM_NPM_STRICT_SSL="true"
|
| 6 |
+
ARG PROGRAMGYM_PYPI_INDEX_URL="https://pypi.org/simple"
|
| 7 |
+
ARG PROGRAMGYM_PYPI_TRUSTED_HOST=""
|
| 8 |
+
ARG PROGRAMGYM_UV_INSECURE_HOST=""
|
| 9 |
+
ENV GOPROXY=${PROGRAMGYM_GOPROXY}
|
| 10 |
+
ENV PIP_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
|
| 11 |
+
ENV PIP_TRUSTED_HOST=${PROGRAMGYM_PYPI_TRUSTED_HOST}
|
| 12 |
+
ENV UV_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
|
| 13 |
+
ENV UV_INSECURE_HOST=${PROGRAMGYM_UV_INSECURE_HOST}
|
| 14 |
+
ENV npm_config_registry=${PROGRAMGYM_NPM_REGISTRY}
|
| 15 |
+
ENV npm_config_strict_ssl=${PROGRAMGYM_NPM_STRICT_SSL}
|
| 16 |
+
COPY harbor_configure_apt_mirror.sh /tmp/harbor_configure_apt_mirror.sh
|
| 17 |
+
RUN chmod 0755 /tmp/harbor_configure_apt_mirror.sh \
|
| 18 |
+
&& /bin/bash /tmp/harbor_configure_apt_mirror.sh "${PROGRAMGYM_APT_REPOSITORY_BASE_URL}" \
|
| 19 |
+
&& rm -f /tmp/harbor_configure_apt_mirror.sh
|
| 20 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 21 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 22 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 23 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 24 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 25 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 26 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 27 |
+
ENV GOTOOLCHAIN=auto
|
| 28 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 29 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 30 |
+
ENV HOME=/workspace
|
| 31 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 32 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 33 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 34 |
+
ENV PAGER=cat
|
| 35 |
+
ENV MANPAGER=cat
|
| 36 |
+
ENV LESS=-R
|
| 37 |
+
ENV TQDM_DISABLE=1
|
| 38 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip autoconf automake gettext file binutils g++ libtool libncurses-dev meson ninja-build python3-pytest python3-pytest-xdist python3-coverage curl tar && rm -rf /var/lib/apt/lists/*
|
| 39 |
+
ARG CMAKE_VERSION=3.31.12
|
| 40 |
+
RUN set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in amd64) CMAKE_ARCH="x86_64" ;; arm64) CMAKE_ARCH="aarch64" ;; *) echo "unsupported architecture for CMake: ${ARCH}" >&2; exit 1 ;; esac; curl -fsSL -o /tmp/cmake.tar.gz "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz"; rm -rf /opt/cmake; mkdir -p /opt/cmake; tar -xzf /tmp/cmake.tar.gz --strip-components=1 -C /opt/cmake; ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake; ln -sf /opt/cmake/bin/ctest /usr/local/bin/ctest; ln -sf /opt/cmake/bin/cpack /usr/local/bin/cpack; rm -f /tmp/cmake.tar.gz; cmake --version
|
| 41 |
+
WORKDIR /workspace
|
| 42 |
+
ADD workspace.tar.gz /workspace/
|
| 43 |
+
COPY executable /workspace/executable
|
| 44 |
+
COPY download.sh /workspace/download.sh
|
| 45 |
+
RUN chmod 755 /workspace/download.sh
|
| 46 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 47 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 48 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 49 |
+
&& rm -f /workspace/download.sh \
|
| 50 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 51 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 52 |
+
RUN chmod 111 /workspace/executable
|
| 53 |
+
WORKDIR /workspace
|
| 54 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 55 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 56 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 57 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 58 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 59 |
+
RUN mkdir -p /home/agent \
|
| 60 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 61 |
+
&& chown agent:agent /workspace/executable \
|
| 62 |
+
&& chmod 111 /workspace/executable
|
| 63 |
+
ENV HOME=/home/agent
|
| 64 |
+
WORKDIR /workspace
|
| 65 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
gillesdebunne--libqglviewer.da4bfad/environment/docker-compose.yaml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
main:
|
| 3 |
+
build:
|
| 4 |
+
args:
|
| 5 |
+
PROGRAMGYM_APT_REPOSITORY_BASE_URL: ${PROGRAMGYM_APT_REPOSITORY_BASE_URL:-}
|
| 6 |
+
PROGRAMGYM_GOPROXY: ${PROGRAMGYM_GOPROXY:-https://proxy.golang.org,direct}
|
| 7 |
+
PROGRAMGYM_NPM_REGISTRY: ${PROGRAMGYM_NPM_REGISTRY:-https://registry.npmjs.org/}
|
| 8 |
+
PROGRAMGYM_NPM_STRICT_SSL: ${PROGRAMGYM_NPM_STRICT_SSL:-true}
|
| 9 |
+
PROGRAMGYM_PYPI_INDEX_URL: ${PROGRAMGYM_PYPI_INDEX_URL:-https://pypi.org/simple}
|
| 10 |
+
PROGRAMGYM_PYPI_TRUSTED_HOST: ${PROGRAMGYM_PYPI_TRUSTED_HOST:-}
|
| 11 |
+
PROGRAMGYM_UV_INSECURE_HOST: ${PROGRAMGYM_UV_INSECURE_HOST:-}
|
gillesdebunne--libqglviewer.da4bfad/environment/download.sh
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# download.sh — ProgramGym networked dependency stage for libQGLViewer.
|
| 4 |
+
#
|
| 5 |
+
# This file is SOURCED (not executed) from a read-only repository mount while
|
| 6 |
+
# the container still has network access. It only installs/packages the
|
| 7 |
+
# development dependencies that build.sh needs. It performs NO compilation,
|
| 8 |
+
# linking, testing, or build steps.
|
| 9 |
+
#
|
| 10 |
+
# The base image already ships the C/C++ toolchain (gcc, g++, make, pkg-config)
|
| 11 |
+
# and a recent CMake, so only the Qt5 and OpenGL/GLU development packages are
|
| 12 |
+
# installed here.
|
| 13 |
+
#
|
| 14 |
+
# THIS SCRIPT IS STANDALONE: it must not read any repository source or build
|
| 15 |
+
# file, so every dependency is stated explicitly below. It is valid in shell
|
| 16 |
+
# source mode (exports are kept in the current shell, no positional arguments,
|
| 17 |
+
# no `exit` in normal control flow).
|
| 18 |
+
|
| 19 |
+
# --- fail: propagate failure whether sourced or executed ---------------------
|
| 20 |
+
_fail() {
|
| 21 |
+
echo "[download.sh] ERROR: $*" >&2
|
| 22 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 23 |
+
return 1
|
| 24 |
+
else
|
| 25 |
+
exit 1
|
| 26 |
+
fi
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
# --- Refresh apt package index ----------------------------------------------
|
| 30 |
+
if ! apt-get update; then
|
| 31 |
+
_fail "apt-get update failed"
|
| 32 |
+
fi
|
| 33 |
+
|
| 34 |
+
# --- Install Qt5 + OpenGL/GLU development dependencies -----------------------
|
| 35 |
+
# qtbase5-dev provides Qt5 5.15 Core/Widgets/Xml/OpenGL runtime+dev and the
|
| 36 |
+
# Qt5Core/Qt5Widgets/Qt5Xml CMake package configs.
|
| 37 |
+
#
|
| 38 |
+
# libqt5opengl5-dev provides Qt5OpenGLConfig.cmake. On Ubuntu 22.04 this module
|
| 39 |
+
# config is NOT shipped by qtbase5-dev (that package only carries the
|
| 40 |
+
# Qt5OpenGLExtensions config); without it the project's
|
| 41 |
+
# 'find_package(Qt5 5.15 REQUIRED COMPONENTS Core Widgets Xml OpenGL)' fails with
|
| 42 |
+
# "Could not find ... Qt5OpenGLConfig.cmake" at configure time.
|
| 43 |
+
# libgl1-mesa-dev provides the OpenGL::GL headers/libs; libglu1-mesa-dev
|
| 44 |
+
# provides the OpenGL::GLU headers/libs that the targets link against.
|
| 45 |
+
if ! apt-get install -y --no-install-recommends \
|
| 46 |
+
qtbase5-dev \
|
| 47 |
+
libqt5opengl5-dev \
|
| 48 |
+
libgl1-mesa-dev \
|
| 49 |
+
libglu1-mesa-dev; then
|
| 50 |
+
_fail "apt-get install of Qt5/OpenGL development dependencies failed"
|
| 51 |
+
fi
|
| 52 |
+
|
| 53 |
+
# --- Export build-environment variables used by build.sh ---------------------
|
| 54 |
+
# qtbase5-dev places its CMake configs under the standard /usr prefix, so
|
| 55 |
+
# CMake finds Qt5 without extra hints. Export empty-valued variables anyway so
|
| 56 |
+
# build.sh sees a consistent environment and no stale values leak through.
|
| 57 |
+
export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:-}"
|
| 58 |
+
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:-}"
|
| 59 |
+
|
| 60 |
+
echo "[download.sh] Qt5 (incl. Qt5OpenGL), OpenGL and GLU development dependencies installed successfully."
|
gillesdebunne--libqglviewer.da4bfad/environment/executable
ADDED
|
Binary file (41.3 kB). View file
|
|
|
gillesdebunne--libqglviewer.da4bfad/environment/harbor_configure_apt_mirror.sh
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
repository_base="${1%/}"
|
| 5 |
+
if [[ -z "$repository_base" ]]; then
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
|
| 9 |
+
. /etc/os-release
|
| 10 |
+
codename="${VERSION_CODENAME:-}"
|
| 11 |
+
if [[ -z "$codename" ]]; then
|
| 12 |
+
echo "VERSION_CODENAME is not set" >&2
|
| 13 |
+
exit 1
|
| 14 |
+
fi
|
| 15 |
+
|
| 16 |
+
if [[ "$ID" == "ubuntu" ]]; then
|
| 17 |
+
repository_name="apt-proxy"
|
| 18 |
+
components="main universe restricted multiverse"
|
| 19 |
+
else
|
| 20 |
+
repository_name="debian-proxy"
|
| 21 |
+
components="main contrib non-free non-free-firmware"
|
| 22 |
+
fi
|
| 23 |
+
|
| 24 |
+
install -d /etc/apt/sources.list.d
|
| 25 |
+
rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
|
| 26 |
+
printf 'deb [trusted=yes] %s/%s %s %s\n' \
|
| 27 |
+
"$repository_base" "$repository_name" "$codename" "$components" \
|
| 28 |
+
>/etc/apt/sources.list
|
| 29 |
+
printf 'deb [trusted=yes] %s/%s %s-updates %s\n' \
|
| 30 |
+
"$repository_base" "$repository_name" "$codename" "$components" \
|
| 31 |
+
>>/etc/apt/sources.list
|
| 32 |
+
|
| 33 |
+
if [[ "$ID" != "ubuntu" ]]; then
|
| 34 |
+
printf 'deb [trusted=yes] %s/%s %s-security %s\n' \
|
| 35 |
+
"$repository_base" "debian-proxy-security" "$codename" "$components" \
|
| 36 |
+
>>/etc/apt/sources.list
|
| 37 |
+
fi
|
gillesdebunne--libqglviewer.da4bfad/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
|
gillesdebunne--libqglviewer.da4bfad/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19742c2e5f74f84c7874baa6c88751dcc098a0d4065b35e625cce9142aff0355
|
| 3 |
+
size 6148
|
gillesdebunne--libqglviewer.da4bfad/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
|
gillesdebunne--libqglviewer.da4bfad/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
|
gillesdebunne--libqglviewer.da4bfad/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/gillesdebunne--libqglviewer.da4bfad"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for GillesDebunne/libQGLViewer"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "cpp"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "GillesDebunne__libQGLViewer.da4bfad"
|
| 32 |
+
repository = "GillesDebunne/libQGLViewer"
|
| 33 |
+
commit = "da4bfad6c53b234088492ba4bae62e736a12f8f5"
|
| 34 |
+
language = "cpp"
|
| 35 |
+
difficulty = "medium"
|
| 36 |
+
difficulty_score = 2.9857856177726054
|
| 37 |
+
test_branches = 3
|
| 38 |
+
test_count = 116
|
| 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"
|
gillesdebunne--libqglviewer.da4bfad/tests/Dockerfile
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
ARG PROGRAMGYM_APT_REPOSITORY_BASE_URL=""
|
| 3 |
+
ARG PROGRAMGYM_GOPROXY="https://proxy.golang.org,direct"
|
| 4 |
+
ARG PROGRAMGYM_NPM_REGISTRY="https://registry.npmjs.org/"
|
| 5 |
+
ARG PROGRAMGYM_NPM_STRICT_SSL="true"
|
| 6 |
+
ARG PROGRAMGYM_PYPI_INDEX_URL="https://pypi.org/simple"
|
| 7 |
+
ARG PROGRAMGYM_PYPI_TRUSTED_HOST=""
|
| 8 |
+
ARG PROGRAMGYM_UV_INSECURE_HOST=""
|
| 9 |
+
ENV GOPROXY=${PROGRAMGYM_GOPROXY}
|
| 10 |
+
ENV PIP_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
|
| 11 |
+
ENV PIP_TRUSTED_HOST=${PROGRAMGYM_PYPI_TRUSTED_HOST}
|
| 12 |
+
ENV UV_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
|
| 13 |
+
ENV UV_INSECURE_HOST=${PROGRAMGYM_UV_INSECURE_HOST}
|
| 14 |
+
ENV npm_config_registry=${PROGRAMGYM_NPM_REGISTRY}
|
| 15 |
+
ENV npm_config_strict_ssl=${PROGRAMGYM_NPM_STRICT_SSL}
|
| 16 |
+
COPY harbor_configure_apt_mirror.sh /tmp/harbor_configure_apt_mirror.sh
|
| 17 |
+
RUN chmod 0755 /tmp/harbor_configure_apt_mirror.sh \
|
| 18 |
+
&& /bin/bash /tmp/harbor_configure_apt_mirror.sh "${PROGRAMGYM_APT_REPOSITORY_BASE_URL}" \
|
| 19 |
+
&& rm -f /tmp/harbor_configure_apt_mirror.sh
|
| 20 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 21 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 22 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 23 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 24 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 25 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 26 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 27 |
+
ENV GOTOOLCHAIN=auto
|
| 28 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 29 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 30 |
+
ENV HOME=/workspace
|
| 31 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 32 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 33 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 34 |
+
ENV PAGER=cat
|
| 35 |
+
ENV MANPAGER=cat
|
| 36 |
+
ENV LESS=-R
|
| 37 |
+
ENV TQDM_DISABLE=1
|
| 38 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip autoconf automake gettext file binutils g++ libtool libncurses-dev meson ninja-build python3-pytest python3-pytest-xdist python3-coverage curl tar && rm -rf /var/lib/apt/lists/*
|
| 39 |
+
ARG CMAKE_VERSION=3.31.12
|
| 40 |
+
RUN set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in amd64) CMAKE_ARCH="x86_64" ;; arm64) CMAKE_ARCH="aarch64" ;; *) echo "unsupported architecture for CMake: ${ARCH}" >&2; exit 1 ;; esac; curl -fsSL -o /tmp/cmake.tar.gz "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz"; rm -rf /opt/cmake; mkdir -p /opt/cmake; tar -xzf /tmp/cmake.tar.gz --strip-components=1 -C /opt/cmake; ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake; ln -sf /opt/cmake/bin/ctest /usr/local/bin/ctest; ln -sf /opt/cmake/bin/cpack /usr/local/bin/cpack; rm -f /tmp/cmake.tar.gz; cmake --version
|
| 41 |
+
WORKDIR /workspace
|
| 42 |
+
ADD workspace.tar.gz /workspace/
|
| 43 |
+
COPY executable /workspace/executable
|
| 44 |
+
COPY download.sh /workspace/download.sh
|
| 45 |
+
RUN chmod 755 /workspace/download.sh
|
| 46 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 47 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 48 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 49 |
+
&& rm -f /workspace/download.sh \
|
| 50 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 51 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 52 |
+
RUN chmod 111 /workspace/executable
|
| 53 |
+
WORKDIR /workspace
|
| 54 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 55 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 56 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 57 |
+
&& mkdir -p /workspace /tests
|
| 58 |
+
|
| 59 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 60 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 61 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 62 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 63 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 64 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 65 |
+
RUN python3 -m pip install --no-cache-dir --disable-pip-version-check \
|
| 66 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 67 |
+
|
| 68 |
+
COPY test.sh /tests/test.sh
|
| 69 |
+
COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
| 70 |
+
COPY programgym_task.json /tests/programgym_task.json
|
| 71 |
+
COPY blobs/ /tests/blobs/
|
| 72 |
+
RUN chmod +x /tests/test.sh
|
| 73 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /tmp/programgym-download.sh /tmp/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
gillesdebunne--libqglviewer.da4bfad/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:0e88f152da20cf68683d1e7e669701bc8708b59617c3ce288588871f0dbe530d
|
| 3 |
+
size 10687
|
gillesdebunne--libqglviewer.da4bfad/tests/blobs/tests/generated_module_04.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a973b1db89ca3e681ff8d6be36b3e93c29d8968cf216e9fd504734df56c3be45
|
| 3 |
+
size 19855
|
gillesdebunne--libqglviewer.da4bfad/tests/blobs/tests/generated_module_05.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa646202d130d16e12614823de93c049ad022cba962812ba6b187011639be584
|
| 3 |
+
size 14198
|
gillesdebunne--libqglviewer.da4bfad/tests/blobs/tests/generated_module_06.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f187b1d9ea3f80e2610ba7db92c32a5e4bd8d7f362619fa1b96cd62b4afec064
|
| 3 |
+
size 12531
|
gillesdebunne--libqglviewer.da4bfad/tests/docker-compose.yaml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
main:
|
| 3 |
+
build:
|
| 4 |
+
args:
|
| 5 |
+
PROGRAMGYM_APT_REPOSITORY_BASE_URL: ${PROGRAMGYM_APT_REPOSITORY_BASE_URL:-}
|
| 6 |
+
PROGRAMGYM_GOPROXY: ${PROGRAMGYM_GOPROXY:-https://proxy.golang.org,direct}
|
| 7 |
+
PROGRAMGYM_NPM_REGISTRY: ${PROGRAMGYM_NPM_REGISTRY:-https://registry.npmjs.org/}
|
| 8 |
+
PROGRAMGYM_NPM_STRICT_SSL: ${PROGRAMGYM_NPM_STRICT_SSL:-true}
|
| 9 |
+
PROGRAMGYM_PYPI_INDEX_URL: ${PROGRAMGYM_PYPI_INDEX_URL:-https://pypi.org/simple}
|
| 10 |
+
PROGRAMGYM_PYPI_TRUSTED_HOST: ${PROGRAMGYM_PYPI_TRUSTED_HOST:-}
|
| 11 |
+
PROGRAMGYM_UV_INSECURE_HOST: ${PROGRAMGYM_UV_INSECURE_HOST:-}
|
gillesdebunne--libqglviewer.da4bfad/tests/download.sh
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# download.sh — ProgramGym networked dependency stage for libQGLViewer.
|
| 4 |
+
#
|
| 5 |
+
# This file is SOURCED (not executed) from a read-only repository mount while
|
| 6 |
+
# the container still has network access. It only installs/packages the
|
| 7 |
+
# development dependencies that build.sh needs. It performs NO compilation,
|
| 8 |
+
# linking, testing, or build steps.
|
| 9 |
+
#
|
| 10 |
+
# The base image already ships the C/C++ toolchain (gcc, g++, make, pkg-config)
|
| 11 |
+
# and a recent CMake, so only the Qt5 and OpenGL/GLU development packages are
|
| 12 |
+
# installed here.
|
| 13 |
+
#
|
| 14 |
+
# THIS SCRIPT IS STANDALONE: it must not read any repository source or build
|
| 15 |
+
# file, so every dependency is stated explicitly below. It is valid in shell
|
| 16 |
+
# source mode (exports are kept in the current shell, no positional arguments,
|
| 17 |
+
# no `exit` in normal control flow).
|
| 18 |
+
|
| 19 |
+
# --- fail: propagate failure whether sourced or executed ---------------------
|
| 20 |
+
_fail() {
|
| 21 |
+
echo "[download.sh] ERROR: $*" >&2
|
| 22 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 23 |
+
return 1
|
| 24 |
+
else
|
| 25 |
+
exit 1
|
| 26 |
+
fi
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
# --- Refresh apt package index ----------------------------------------------
|
| 30 |
+
if ! apt-get update; then
|
| 31 |
+
_fail "apt-get update failed"
|
| 32 |
+
fi
|
| 33 |
+
|
| 34 |
+
# --- Install Qt5 + OpenGL/GLU development dependencies -----------------------
|
| 35 |
+
# qtbase5-dev provides Qt5 5.15 Core/Widgets/Xml/OpenGL runtime+dev and the
|
| 36 |
+
# Qt5Core/Qt5Widgets/Qt5Xml CMake package configs.
|
| 37 |
+
#
|
| 38 |
+
# libqt5opengl5-dev provides Qt5OpenGLConfig.cmake. On Ubuntu 22.04 this module
|
| 39 |
+
# config is NOT shipped by qtbase5-dev (that package only carries the
|
| 40 |
+
# Qt5OpenGLExtensions config); without it the project's
|
| 41 |
+
# 'find_package(Qt5 5.15 REQUIRED COMPONENTS Core Widgets Xml OpenGL)' fails with
|
| 42 |
+
# "Could not find ... Qt5OpenGLConfig.cmake" at configure time.
|
| 43 |
+
# libgl1-mesa-dev provides the OpenGL::GL headers/libs; libglu1-mesa-dev
|
| 44 |
+
# provides the OpenGL::GLU headers/libs that the targets link against.
|
| 45 |
+
if ! apt-get install -y --no-install-recommends \
|
| 46 |
+
qtbase5-dev \
|
| 47 |
+
libqt5opengl5-dev \
|
| 48 |
+
libgl1-mesa-dev \
|
| 49 |
+
libglu1-mesa-dev; then
|
| 50 |
+
_fail "apt-get install of Qt5/OpenGL development dependencies failed"
|
| 51 |
+
fi
|
| 52 |
+
|
| 53 |
+
# --- Export build-environment variables used by build.sh ---------------------
|
| 54 |
+
# qtbase5-dev places its CMake configs under the standard /usr prefix, so
|
| 55 |
+
# CMake finds Qt5 without extra hints. Export empty-valued variables anyway so
|
| 56 |
+
# build.sh sees a consistent environment and no stale values leak through.
|
| 57 |
+
export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:-}"
|
| 58 |
+
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:-}"
|
| 59 |
+
|
| 60 |
+
echo "[download.sh] Qt5 (incl. Qt5OpenGL), OpenGL and GLU development dependencies installed successfully."
|
gillesdebunne--libqglviewer.da4bfad/tests/executable
ADDED
|
Binary file (41.3 kB). View file
|
|
|
gillesdebunne--libqglviewer.da4bfad/tests/harbor_configure_apt_mirror.sh
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
repository_base="${1%/}"
|
| 5 |
+
if [[ -z "$repository_base" ]]; then
|
| 6 |
+
exit 0
|
| 7 |
+
fi
|
| 8 |
+
|
| 9 |
+
. /etc/os-release
|
| 10 |
+
codename="${VERSION_CODENAME:-}"
|
| 11 |
+
if [[ -z "$codename" ]]; then
|
| 12 |
+
echo "VERSION_CODENAME is not set" >&2
|
| 13 |
+
exit 1
|
| 14 |
+
fi
|
| 15 |
+
|
| 16 |
+
if [[ "$ID" == "ubuntu" ]]; then
|
| 17 |
+
repository_name="apt-proxy"
|
| 18 |
+
components="main universe restricted multiverse"
|
| 19 |
+
else
|
| 20 |
+
repository_name="debian-proxy"
|
| 21 |
+
components="main contrib non-free non-free-firmware"
|
| 22 |
+
fi
|
| 23 |
+
|
| 24 |
+
install -d /etc/apt/sources.list.d
|
| 25 |
+
rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
|
| 26 |
+
printf 'deb [trusted=yes] %s/%s %s %s\n' \
|
| 27 |
+
"$repository_base" "$repository_name" "$codename" "$components" \
|
| 28 |
+
>/etc/apt/sources.list
|
| 29 |
+
printf 'deb [trusted=yes] %s/%s %s-updates %s\n' \
|
| 30 |
+
"$repository_base" "$repository_name" "$codename" "$components" \
|
| 31 |
+
>>/etc/apt/sources.list
|
| 32 |
+
|
| 33 |
+
if [[ "$ID" != "ubuntu" ]]; then
|
| 34 |
+
printf 'deb [trusted=yes] %s/%s %s-security %s\n' \
|
| 35 |
+
"$repository_base" "debian-proxy-security" "$codename" "$components" \
|
| 36 |
+
>>/etc/apt/sources.list
|
| 37 |
+
fi
|
gillesdebunne--libqglviewer.da4bfad/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
|
gillesdebunne--libqglviewer.da4bfad/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()
|
gillesdebunne--libqglviewer.da4bfad/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [
|
| 7 |
+
{
|
| 8 |
+
"name": "eval.tests.test_qglviewer_state_roundtrip.test_missing_display_attributes_emit_defaulting_diagnostics",
|
| 9 |
+
"reasons": [
|
| 10 |
+
{
|
| 11 |
+
"id": "missing_fixture_assets",
|
| 12 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 13 |
+
"path": "eval/tests/test_qglviewer_state_roundtrip.py",
|
| 14 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 15 |
+
"severity": "error",
|
| 16 |
+
"stage": "static_lint"
|
| 17 |
+
}
|
| 18 |
+
]
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"name": "eval.tests.test_qglviewer_state_roundtrip.test_version_warning_emitted_for_unsupported_version",
|
| 22 |
+
"reasons": [
|
| 23 |
+
{
|
| 24 |
+
"id": "missing_fixture_assets",
|
| 25 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 26 |
+
"path": "eval/tests/test_qglviewer_state_roundtrip.py",
|
| 27 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 28 |
+
"severity": "error",
|
| 29 |
+
"stage": "static_lint"
|
| 30 |
+
}
|
| 31 |
+
]
|
| 32 |
+
}
|
| 33 |
+
],
|
| 34 |
+
"tests": [
|
| 35 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_camera_edited_state_preserves_real_zclipping",
|
| 36 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_camera_projection_parameters_round_trip",
|
| 37 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_camera_stereo_and_manipulated_frame_round_trip",
|
| 38 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_empty_state_file_falls_back_to_defaults",
|
| 39 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_exit_via_escape_writes_state_file",
|
| 40 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_fore_and_background_color_round_trip",
|
| 41 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_fullscreen_geometry_round_trip",
|
| 42 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_malformed_state_file_ignored_no_crash",
|
| 43 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_missing_display_attributes_emit_defaulting_diagnostics",
|
| 44 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_restored_display_flags_round_trip",
|
| 45 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_restored_widget_geometry_round_trip",
|
| 46 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_scenecenter_round_trip",
|
| 47 |
+
"eval.tests.test_qglviewer_state_roundtrip.test_version_warning_emitted_for_unsupported_version"
|
| 48 |
+
]
|
| 49 |
+
},
|
| 50 |
+
"generated_module_04": {
|
| 51 |
+
"ignore_reason": "",
|
| 52 |
+
"ignored": false,
|
| 53 |
+
"ignored_tests": [],
|
| 54 |
+
"tests": [
|
| 55 |
+
"eval.tests.test_deliverable.test_executable_dynamically_links_qglviewer",
|
| 56 |
+
"eval.tests.test_deliverable.test_executable_is_nonempty_elf",
|
| 57 |
+
"eval.tests.test_deliverable.test_module_public_symbols_surface_as_linkable",
|
| 58 |
+
"eval.tests.test_deliverable.test_qt_runtime_libraries_linked",
|
| 59 |
+
"eval.tests.test_quaternion_dom.test_quat_ctor_missing_attributes_identity",
|
| 60 |
+
"eval.tests.test_quaternion_dom.test_quat_ctor_partial_attributes",
|
| 61 |
+
"eval.tests.test_quaternion_dom.test_quat_ctor_reads_attributes",
|
| 62 |
+
"eval.tests.test_quaternion_dom.test_quat_domElement_roundtrip",
|
| 63 |
+
"eval.tests.test_quaternion_dom.test_quat_domElement_roundtrip_negative",
|
| 64 |
+
"eval.tests.test_quaternion_dom.test_quat_initFromDOMElement_copies",
|
| 65 |
+
"eval.tests.test_quaternion_interpolation.test_exp_inverse_of_log_roundtrips",
|
| 66 |
+
"eval.tests.test_quaternion_interpolation.test_exp_of_zero_vector_is_identity",
|
| 67 |
+
"eval.tests.test_quaternion_interpolation.test_lnDif_nonzero_for_different",
|
| 68 |
+
"eval.tests.test_quaternion_interpolation.test_lnDif_of_identical_is_zero",
|
| 69 |
+
"eval.tests.test_quaternion_interpolation.test_log_is_axis_scaled_by_half_angle",
|
| 70 |
+
"eval.tests.test_quaternion_interpolation.test_log_of_identity_is_zero",
|
| 71 |
+
"eval.tests.test_quaternion_interpolation.test_randomQuaternion_is_unit",
|
| 72 |
+
"eval.tests.test_quaternion_interpolation.test_slerp_allow_flip_finds_short_path",
|
| 73 |
+
"eval.tests.test_quaternion_interpolation.test_slerp_close_quaternions_use_linear_path",
|
| 74 |
+
"eval.tests.test_quaternion_interpolation.test_slerp_endpoints_preserved",
|
| 75 |
+
"eval.tests.test_quaternion_interpolation.test_slerp_midpoint_is_half_angle_rotation",
|
| 76 |
+
"eval.tests.test_quaternion_interpolation.test_squadTangent_constant_sequence_is_center",
|
| 77 |
+
"eval.tests.test_quaternion_interpolation.test_squad_average_property",
|
| 78 |
+
"eval.tests.test_quaternion_matrix_inverse.test_getInverseMatrix16_120_is_transpose",
|
| 79 |
+
"eval.tests.test_quaternion_matrix_inverse.test_getInverseMatrix16_is_transpose_of_matrix",
|
| 80 |
+
"eval.tests.test_quaternion_matrix_inverse.test_matrix_120_about_111_is_cyclic_permutation",
|
| 81 |
+
"eval.tests.test_quaternion_matrix_inverse.test_matrix_agrees_with_getMatrix_16",
|
| 82 |
+
"eval.tests.test_quaternion_matrix_inverse.test_matrix_identity_returns_identity",
|
| 83 |
+
"eval.tests.test_quaternion_matrix_inverse.test_matrix_static_buffer_reused_and_overwritten",
|
| 84 |
+
"eval.tests.test_quaternion_rotation.test_angle_90_degrees",
|
| 85 |
+
"eval.tests.test_quaternion_rotation.test_angle_reduced_to_pi_when_q3_negative",
|
| 86 |
+
"eval.tests.test_quaternion_rotation.test_axis_flips_sign_when_q3_negative",
|
| 87 |
+
"eval.tests.test_quaternion_rotation.test_axis_identity_is_zero_vector",
|
| 88 |
+
"eval.tests.test_quaternion_rotation.test_axis_returns_unit_axis",
|
| 89 |
+
"eval.tests.test_quaternion_rotation.test_getAxisAngle_large_angle_flips_axis",
|
| 90 |
+
"eval.tests.test_quaternion_rotation.test_getAxisAngle_roundtrip",
|
| 91 |
+
"eval.tests.test_quaternion_rotation.test_getInverseRotationMatrix_is_inverse",
|
| 92 |
+
"eval.tests.test_quaternion_rotation.test_getMatrix_4x4_opengl_layout",
|
| 93 |
+
"eval.tests.test_quaternion_rotation.test_getRotationMatrix_european_layout",
|
| 94 |
+
"eval.tests.test_quaternion_rotation.test_inverse_matrix_is_transpose_inverse",
|
| 95 |
+
"eval.tests.test_quaternion_rotation.test_inverse_rotate_undoes_rotate",
|
| 96 |
+
"eval.tests.test_quaternion_rotation.test_quaternion_antiparallel_uses_pi_and_orthogonal_axis",
|
| 97 |
+
"eval.tests.test_quaternion_rotation.test_quaternion_from_vectors_right_angle",
|
| 98 |
+
"eval.tests.test_quaternion_rotation.test_quaternion_identical_vectors_is_identity",
|
| 99 |
+
"eval.tests.test_quaternion_rotation.test_quaternion_null_vector_is_identity",
|
| 100 |
+
"eval.tests.test_quaternion_rotation.test_rotate_about_x_90",
|
| 101 |
+
"eval.tests.test_quaternion_rotation.test_rotate_about_z_90",
|
| 102 |
+
"eval.tests.test_quaternion_rotation.test_rotate_preserves_norm",
|
| 103 |
+
"eval.tests.test_quaternion_rotation.test_setFromRotatedBase_deprecated_produces_same",
|
| 104 |
+
"eval.tests.test_quaternion_rotation.test_setFromRotatedBasis",
|
| 105 |
+
"eval.tests.test_quaternion_rotation.test_setFromRotationMatrix_180_about_x",
|
| 106 |
+
"eval.tests.test_quaternion_rotation.test_setFromRotationMatrix_180_about_y",
|
| 107 |
+
"eval.tests.test_quaternion_rotation.test_setFromRotationMatrix_180_about_z",
|
| 108 |
+
"eval.tests.test_quaternion_rotation.test_setFromRotationMatrix_identity",
|
| 109 |
+
"eval.tests.test_quaternion_rotation.test_setFromRotationMatrix_rotation_90z",
|
| 110 |
+
"eval.tests.test_stream_operators.test_quat_stream_negative_fractional_first",
|
| 111 |
+
"eval.tests.test_stream_operators.test_quat_stream_whole_components",
|
| 112 |
+
"eval.tests.test_stream_operators.test_quat_stream_zero_first_component",
|
| 113 |
+
"eval.tests.test_stream_operators.test_vec_and_quat_streams_write_distinct_first_fields",
|
| 114 |
+
"eval.tests.test_stream_operators.test_vec_stream_negative_first_component",
|
| 115 |
+
"eval.tests.test_stream_operators.test_vec_stream_single_fractional_components",
|
| 116 |
+
"eval.tests.test_stream_operators.test_vec_stream_subunit_first_component",
|
| 117 |
+
"eval.tests.test_stream_operators.test_vec_stream_zero_components",
|
| 118 |
+
"eval.tests.test_vec.test_orthogonalVec_else_branch",
|
| 119 |
+
"eval.tests.test_vec.test_orthogonalVec_is_orthogonal",
|
| 120 |
+
"eval.tests.test_vec.test_orthogonalVec_x_dominant",
|
| 121 |
+
"eval.tests.test_vec.test_orthogonalVec_y_dominant",
|
| 122 |
+
"eval.tests.test_vec.test_projectOnAxis_onto_unit_axis",
|
| 123 |
+
"eval.tests.test_vec.test_projectOnAxis_unnormalized_direction",
|
| 124 |
+
"eval.tests.test_vec.test_projectOnPlane_general_normal",
|
| 125 |
+
"eval.tests.test_vec.test_projectOnPlane_keeps_parallel_component",
|
| 126 |
+
"eval.tests.test_vec_dom.test_vec_ctor_different_tag_names",
|
| 127 |
+
"eval.tests.test_vec_dom.test_vec_ctor_integer_attributes",
|
| 128 |
+
"eval.tests.test_vec_dom.test_vec_ctor_missing_all_is_zero",
|
| 129 |
+
"eval.tests.test_vec_dom.test_vec_ctor_missing_attributes_default_to_zero",
|
| 130 |
+
"eval.tests.test_vec_dom.test_vec_ctor_reads_attributes",
|
| 131 |
+
"eval.tests.test_vec_dom.test_vec_domElement_roundtrip",
|
| 132 |
+
"eval.tests.test_vec_dom.test_vec_domElement_roundtrip_float_negatives",
|
| 133 |
+
"eval.tests.test_vec_dom.test_vec_initFromDOMElement_copies"
|
| 134 |
+
]
|
| 135 |
+
},
|
| 136 |
+
"generated_module_06": {
|
| 137 |
+
"ignore_reason": "",
|
| 138 |
+
"ignored": false,
|
| 139 |
+
"ignored_tests": [
|
| 140 |
+
{
|
| 141 |
+
"name": "eval.tests.test_offscreen_launch.test_blank_workdir_produces_no_output_files",
|
| 142 |
+
"reasons": [
|
| 143 |
+
{
|
| 144 |
+
"id": "golden_docstring",
|
| 145 |
+
"message": "pytest test docstring mentions golden data that is not used in the body",
|
| 146 |
+
"path": "eval/tests/test_offscreen_launch.py",
|
| 147 |
+
"repair_hint": "Use the golden fixture mentioned in the docstring or remove the misleading claim.",
|
| 148 |
+
"severity": "error",
|
| 149 |
+
"stage": "static_lint"
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"id": "golden_no_equality",
|
| 153 |
+
"message": "pytest test references golden data without equality comparison",
|
| 154 |
+
"path": "eval/tests/test_offscreen_launch.py",
|
| 155 |
+
"repair_hint": "Compare observed output to golden data with equality after any explicit normalization.",
|
| 156 |
+
"severity": "error",
|
| 157 |
+
"stage": "static_lint"
|
| 158 |
+
}
|
| 159 |
+
]
|
| 160 |
+
}
|
| 161 |
+
],
|
| 162 |
+
"tests": [
|
| 163 |
+
"eval.tests.test_binary_artifact.test_executable_is_an_x86_64_elf_binary_and_executable",
|
| 164 |
+
"eval.tests.test_binary_artifact.test_executable_is_large_enough_for_a_qt_gui_binary",
|
| 165 |
+
"eval.tests.test_binary_artifact.test_executable_launches_a_live_qt_process",
|
| 166 |
+
"eval.tests.test_camera_state_parse.test_camera_dom_value_parse_branch_is_tolerated[non_finite_scene_center]",
|
| 167 |
+
"eval.tests.test_camera_state_parse.test_camera_dom_value_parse_branch_is_tolerated[non_numeric_scalar_parameters]",
|
| 168 |
+
"eval.tests.test_camera_state_parse.test_camera_dom_value_parse_branch_is_tolerated[orthographic_camera_type]",
|
| 169 |
+
"eval.tests.test_camera_state_parse.test_camera_dom_value_parse_branch_is_tolerated[perspective_scalar_parameters]",
|
| 170 |
+
"eval.tests.test_camera_state_parse.test_camera_dom_value_parse_branch_is_tolerated[scene_center_vec_attributes]",
|
| 171 |
+
"eval.tests.test_camera_state_parse.test_camera_dom_value_parse_branch_is_tolerated[stereo_parameters_restored]",
|
| 172 |
+
"eval.tests.test_camera_state_parse.test_camera_dom_value_parse_branch_is_tolerated[unrecognized_camera_type]",
|
| 173 |
+
"eval.tests.test_offscreen_launch.test_blank_workdir_produces_no_output_files",
|
| 174 |
+
"eval.tests.test_offscreen_launch.test_headless_launch_stderr_matches_golden",
|
| 175 |
+
"eval.tests.test_offscreen_launch.test_invalid_style_override_emits_qt_warning_and_is_ignored",
|
| 176 |
+
"eval.tests.test_offscreen_launch.test_qt_argument_vector_is_accepted_and_does_not_change_startup",
|
| 177 |
+
"eval.tests.test_offscreen_launch.test_state_file_invalid_xml_is_tolerated",
|
| 178 |
+
"eval.tests.test_offscreen_launch.test_state_file_restore_endures_into_runloop",
|
| 179 |
+
"eval.tests.test_offscreen_launch.test_state_file_valid_xml_is_tolerated",
|
| 180 |
+
"eval.tests.test_offscreen_launch.test_stylesheet_load_failure_emits_css_parser_diagnostic",
|
| 181 |
+
"eval.tests.test_statefile_matrix.test_startup_state_file_shape_is_tolerated[binary_non_utf8_content]",
|
| 182 |
+
"eval.tests.test_statefile_matrix.test_startup_state_file_shape_is_tolerated[deeply_nested_xml]",
|
| 183 |
+
"eval.tests.test_statefile_matrix.test_startup_state_file_shape_is_tolerated[empty_document]",
|
| 184 |
+
"eval.tests.test_statefile_matrix.test_startup_state_file_shape_is_tolerated[maximal_valid_document]",
|
| 185 |
+
"eval.tests.test_statefile_matrix.test_startup_state_file_shape_is_tolerated[state_path_is_a_directory]",
|
| 186 |
+
"eval.tests.test_statefile_matrix.test_startup_state_file_shape_is_tolerated[unknown_root_element]",
|
| 187 |
+
"eval.tests.test_vrender_reachability.test_headless_launch_stderr_is_the_exact_gl_gate_diagnostic",
|
| 188 |
+
"eval.tests.test_vrender_reachability.test_vectorial_export_produces_no_payload_without_gl",
|
| 189 |
+
"eval.tests.test_vrender_reachability.test_vectorial_export_requires_interactive_snapshot_never_happens"
|
| 190 |
+
]
|
| 191 |
+
}
|
| 192 |
+
},
|
| 193 |
+
"commit": "da4bfad6c53b234088492ba4bae62e736a12f8f5",
|
| 194 |
+
"data_source": "synthetic_programgym",
|
| 195 |
+
"difficulty": "medium",
|
| 196 |
+
"difficulty_score": 2.9857856177726054,
|
| 197 |
+
"eval_clean_hashes": [
|
| 198 |
+
"cc4b169d4d18f9dc102a789d9bd68df53fd92e2849a5be06caf273cdaa3f3093"
|
| 199 |
+
],
|
| 200 |
+
"input_record": {
|
| 201 |
+
"commit": "da4bfad6c53b234088492ba4bae62e736a12f8f5",
|
| 202 |
+
"full_name": "GillesDebunne/libQGLViewer",
|
| 203 |
+
"input_joern_zip": "cpp_joern/GillesDebunne__libQGLViewer.zip",
|
| 204 |
+
"joern_status": true,
|
| 205 |
+
"joern_time": 18.254824225092307,
|
| 206 |
+
"language": "cpp",
|
| 207 |
+
"pb_match": [
|
| 208 |
+
{
|
| 209 |
+
"pb_fullname": "OSGeo/PROJ",
|
| 210 |
+
"rank": 685,
|
| 211 |
+
"similarity": 0.395694375038147
|
| 212 |
+
}
|
| 213 |
+
],
|
| 214 |
+
"repo_path": "cpp/GillesDebunne__libQGLViewer",
|
| 215 |
+
"source": "commit:da4bfad6c53b234088492ba4bae62e736a12f8f5",
|
| 216 |
+
"status": "done",
|
| 217 |
+
"url": "https://github.com/GillesDebunne/libQGLViewer"
|
| 218 |
+
},
|
| 219 |
+
"instance_id": "GillesDebunne__libQGLViewer.da4bfad",
|
| 220 |
+
"language": "cpp",
|
| 221 |
+
"module_iterations": [
|
| 222 |
+
{
|
| 223 |
+
"actual_iterations": 5,
|
| 224 |
+
"branch_name": "generated_module_01",
|
| 225 |
+
"iteration_limit": 10,
|
| 226 |
+
"module_index": 1,
|
| 227 |
+
"module_kind": "source",
|
| 228 |
+
"termination_reason": "early_stopping"
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"actual_iterations": 10,
|
| 232 |
+
"branch_name": "generated_module_02",
|
| 233 |
+
"iteration_limit": 10,
|
| 234 |
+
"module_index": 2,
|
| 235 |
+
"module_kind": "source",
|
| 236 |
+
"termination_reason": "max_iterations"
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"actual_iterations": 6,
|
| 240 |
+
"branch_name": "generated_module_03",
|
| 241 |
+
"iteration_limit": 10,
|
| 242 |
+
"module_index": 3,
|
| 243 |
+
"module_kind": "source",
|
| 244 |
+
"termination_reason": "early_stopping"
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"actual_iterations": 4,
|
| 248 |
+
"branch_name": "generated_module_04",
|
| 249 |
+
"iteration_limit": 10,
|
| 250 |
+
"module_index": 4,
|
| 251 |
+
"module_kind": "source",
|
| 252 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"actual_iterations": 10,
|
| 256 |
+
"branch_name": "generated_module_05",
|
| 257 |
+
"iteration_limit": 10,
|
| 258 |
+
"module_index": 5,
|
| 259 |
+
"module_kind": "source",
|
| 260 |
+
"termination_reason": "max_iterations"
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"actual_iterations": 7,
|
| 264 |
+
"branch_name": "generated_module_06",
|
| 265 |
+
"iteration_limit": 10,
|
| 266 |
+
"module_index": 6,
|
| 267 |
+
"module_kind": "source",
|
| 268 |
+
"termination_reason": "early_stopping"
|
| 269 |
+
}
|
| 270 |
+
],
|
| 271 |
+
"repository": "GillesDebunne/libQGLViewer"
|
| 272 |
+
}
|
gillesdebunne--libqglviewer.da4bfad/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
|
gillesdebunne--libqglviewer.da4bfad/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19742c2e5f74f84c7874baa6c88751dcc098a0d4065b35e625cce9142aff0355
|
| 3 |
+
size 6148
|