Marquis03 commited on
Commit
eb93f25
·
verified ·
1 Parent(s): 6cdeeaa

commit (part 88)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +13 -0
  2. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/blobs/tests/generated_module_04.tar.gz +3 -0
  3. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/docker-compose.yaml +11 -0
  4. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/download.sh +51 -0
  5. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/executable +3 -0
  6. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/harbor_configure_apt_mirror.sh +37 -0
  7. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/harbor_prepare_download_env.sh +34 -0
  8. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/programgym_evaluator.py +1201 -0
  9. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/programgym_task.json +314 -0
  10. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/test.sh +82 -0
  11. ned-kelly--docker-voltronic-homeassistant.ac26426/tests/workspace.tar.gz +3 -0
  12. neobrain--blobify.bcd0ad8/environment/Dockerfile +92 -0
  13. neobrain--blobify.bcd0ad8/environment/docker-compose.yaml +22 -0
  14. neobrain--blobify.bcd0ad8/environment/download.sh +116 -0
  15. neobrain--blobify.bcd0ad8/environment/executable +0 -0
  16. neobrain--blobify.bcd0ad8/environment/harbor_configure_apt_mirror.sh +37 -0
  17. neobrain--blobify.bcd0ad8/environment/harbor_configure_java_mirrors.sh +50 -0
  18. neobrain--blobify.bcd0ad8/environment/harbor_prepare_download_env.sh +44 -0
  19. neobrain--blobify.bcd0ad8/environment/programgym-gcc13.tar.gz +3 -0
  20. neobrain--blobify.bcd0ad8/environment/workspace.tar.gz +3 -0
  21. neobrain--blobify.bcd0ad8/instruction.md +98 -0
  22. neobrain--blobify.bcd0ad8/solution/solve.sh +33 -0
  23. neobrain--blobify.bcd0ad8/task.toml +69 -0
  24. neobrain--blobify.bcd0ad8/tests/Dockerfile +106 -0
  25. neobrain--blobify.bcd0ad8/tests/blobs/tests/generated_module_01.tar.gz +3 -0
  26. neobrain--blobify.bcd0ad8/tests/blobs/tests/generated_module_02.tar.gz +3 -0
  27. neobrain--blobify.bcd0ad8/tests/blobs/tests/generated_module_03.tar.gz +3 -0
  28. neobrain--blobify.bcd0ad8/tests/blobs/tests/generated_module_04.tar.gz +3 -0
  29. neobrain--blobify.bcd0ad8/tests/blobs/tests/generated_upstream.tar.gz +3 -0
  30. neobrain--blobify.bcd0ad8/tests/docker-compose.yaml +22 -0
  31. neobrain--blobify.bcd0ad8/tests/download.sh +116 -0
  32. neobrain--blobify.bcd0ad8/tests/executable +0 -0
  33. neobrain--blobify.bcd0ad8/tests/harbor_configure_apt_mirror.sh +37 -0
  34. neobrain--blobify.bcd0ad8/tests/harbor_configure_java_mirrors.sh +50 -0
  35. neobrain--blobify.bcd0ad8/tests/harbor_prepare_download_env.sh +44 -0
  36. neobrain--blobify.bcd0ad8/tests/programgym-gcc13.tar.gz +3 -0
  37. neobrain--blobify.bcd0ad8/tests/programgym_evaluator.py +1201 -0
  38. neobrain--blobify.bcd0ad8/tests/programgym_task.json +0 -0
  39. neobrain--blobify.bcd0ad8/tests/test.sh +82 -0
  40. neobrain--blobify.bcd0ad8/tests/workspace.tar.gz +3 -0
  41. neodyme-labs--solana-security-txt.ef36a4b/environment/Dockerfile +60 -0
  42. neodyme-labs--solana-security-txt.ef36a4b/environment/download.sh +3494 -0
  43. neodyme-labs--solana-security-txt.ef36a4b/environment/executable +3 -0
  44. neodyme-labs--solana-security-txt.ef36a4b/environment/harbor_prepare_download_env.sh +37 -0
  45. neodyme-labs--solana-security-txt.ef36a4b/environment/workspace.tar.gz +3 -0
  46. neodyme-labs--solana-security-txt.ef36a4b/instruction.md +98 -0
  47. neodyme-labs--solana-security-txt.ef36a4b/solution/solve.sh +33 -0
  48. neodyme-labs--solana-security-txt.ef36a4b/task.toml +69 -0
  49. neodyme-labs--solana-security-txt.ef36a4b/tests/Dockerfile +69 -0
  50. neodyme-labs--solana-security-txt.ef36a4b/tests/blobs/tests/generated_module_01.tar.gz +3 -0
.gitattributes CHANGED
@@ -3503,3 +3503,16 @@ nathany--get-programming-with-go.231ee88/tests/executable filter=lfs diff=lfs me
3503
  nbering--terraform-provider-ansible.ef9e239/environment/executable filter=lfs diff=lfs merge=lfs -text
3504
  nbering--terraform-provider-ansible.ef9e239/tests/executable filter=lfs diff=lfs merge=lfs -text
3505
  ned-kelly--docker-voltronic-homeassistant.ac26426/environment/executable filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3503
  nbering--terraform-provider-ansible.ef9e239/environment/executable filter=lfs diff=lfs merge=lfs -text
3504
  nbering--terraform-provider-ansible.ef9e239/tests/executable filter=lfs diff=lfs merge=lfs -text
3505
  ned-kelly--docker-voltronic-homeassistant.ac26426/environment/executable filter=lfs diff=lfs merge=lfs -text
3506
+ ned-kelly--docker-voltronic-homeassistant.ac26426/tests/executable filter=lfs diff=lfs merge=lfs -text
3507
+ neodyme-labs--solana-security-txt.ef36a4b/environment/executable filter=lfs diff=lfs merge=lfs -text
3508
+ neodyme-labs--solana-security-txt.ef36a4b/tests/executable filter=lfs diff=lfs merge=lfs -text
3509
+ netblue30--firetools.ead99ac/environment/executable filter=lfs diff=lfs merge=lfs -text
3510
+ netblue30--firetools.ead99ac/tests/executable filter=lfs diff=lfs merge=lfs -text
3511
+ nextronsystems--ransomware-simulator.4090e0b/environment/executable filter=lfs diff=lfs merge=lfs -text
3512
+ nextronsystems--ransomware-simulator.4090e0b/tests/executable filter=lfs diff=lfs merge=lfs -text
3513
+ nihui--waifu2x-ncnn-vulkan.6491466/environment/executable filter=lfs diff=lfs merge=lfs -text
3514
+ nihui--waifu2x-ncnn-vulkan.6491466/tests/executable filter=lfs diff=lfs merge=lfs -text
3515
+ nikivdev--alfred-web-searches.9807dc3/environment/executable filter=lfs diff=lfs merge=lfs -text
3516
+ nikivdev--alfred-web-searches.9807dc3/tests/executable filter=lfs diff=lfs merge=lfs -text
3517
+ nikolaydubina--go-binsize-treemap.af13908/environment/executable filter=lfs diff=lfs merge=lfs -text
3518
+ nikolaydubina--go-binsize-treemap.af13908/tests/executable filter=lfs diff=lfs merge=lfs -text
ned-kelly--docker-voltronic-homeassistant.ac26426/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:254a2165ecfb1f26468bef97cb0250451b2bcb1d3ad435a36626c9e7da75c528
3
+ size 7303
ned-kelly--docker-voltronic-homeassistant.ac26426/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:-}
ned-kelly--docker-voltronic-homeassistant.ac26426/tests/download.sh ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # download.sh — ProgramGym dependency setup for ned-kelly/docker-voltronic-homeassistant
2
+ #
3
+ # The selected target inverter_poller (sources/inverter-cli) is a self-contained
4
+ # C++ CMake executable that depends only on the C++ standard library, POSIX
5
+ # headers, and pthread. The base image already provides g++ 13.3 and cmake 3.31,
6
+ # so there is nothing to download or install for the offline build.
7
+ #
8
+ # This script is sourced via `source /source_ro/download.sh`, so it:
9
+ # * never uses positional arguments,
10
+ # * never calls exit in normal control flow (safe fail-return instead),
11
+ # * keeps exported variables in the current shell,
12
+ # * performs no compile/link/test/package step.
13
+ #
14
+ # The only resource needed between the download and build stages is the C++
15
+ # toolchain, so this script verifies g++ and cmake exist and exports the CXXFLAGS
16
+ # that build.sh must use to compile cleanly under GCC 13.
17
+
18
+ # Fail safely whether sourced or executed.
19
+ fail_script() {
20
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
21
+ return 1
22
+ else
23
+ exit 1
24
+ fi
25
+ }
26
+
27
+ # Verify the C++ compiler is available. A missing toolchain is a real failure
28
+ # and must not be papered over.
29
+ if ! command -v g++; then
30
+ printf '%s\n' "download.sh: required g++ compiler not found." >&2
31
+ fail_script
32
+ fi
33
+
34
+ # Verify cmake is available.
35
+ if ! command -v cmake; then
36
+ printf '%s\n' "download.sh: required cmake not found." >&2
37
+ fail_script
38
+ fi
39
+
40
+ # Export the compile flags build.sh will pass through cmake:
41
+ # * `-include string` — the project source (inverter.h / inverter.cpp) uses
42
+ # std::string while including only <thread>/<mutex>/<fcntl.h>/<stdio.h>.
43
+ # GCC 13 no longer pulls <string> in transitively, so std::string is left an
44
+ # incomplete type and fails to compile. Force-including <string> restores the
45
+ # code's original (implicit <thread> -> <string>) assumption.
46
+ # * `-static-libstdc++ -static-libgcc` — the GCC 13 toolchain emits libstdc++
47
+ # symbols newer than the base image's system libstdc++, so statically linking
48
+ # the C++ runtime makes ./executable self-contained at cleanroom runtime.
49
+ export INVERTER_BUILD_CXXFLAGS="-include string -static-libstdc++ -static-libgcc"
50
+
51
+ printf '%s\n' "download.sh: toolchain verified (g++ and cmake present); no external dependencies required."
ned-kelly--docker-voltronic-homeassistant.ac26426/tests/executable ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee6eaf5a154262e1a1370dcb915896bff2edc8b5092425bda8883580cc36cf26
3
+ size 3106856
ned-kelly--docker-voltronic-homeassistant.ac26426/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
ned-kelly--docker-voltronic-homeassistant.ac26426/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
ned-kelly--docker-voltronic-homeassistant.ac26426/tests/programgym_evaluator.py ADDED
@@ -0,0 +1,1201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()
ned-kelly--docker-voltronic-homeassistant.ac26426/tests/programgym_task.json ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "branches": {
3
+ "generated_module_01": {
4
+ "ignore_reason": "",
5
+ "ignored": false,
6
+ "ignored_tests": [],
7
+ "tests": [
8
+ "eval.tests.test_command_line.test_argv_program_name_is_not_an_option",
9
+ "eval.tests.test_command_line.test_debug_flag_without_run_once_enters_poll_loop",
10
+ "eval.tests.test_command_line.test_double_dash_run_once_is_equivalent",
11
+ "eval.tests.test_command_line.test_help_precedes_run_once_flag",
12
+ "eval.tests.test_command_line.test_raw_command_precedes_run_once_emit",
13
+ "eval.tests.test_command_line.test_raw_command_with_debug_prints_debug_set_line",
14
+ "eval.tests.test_command_line.test_raw_command_without_debug_omits_debug_set_line",
15
+ "eval.tests.test_command_line.test_run_once_with_debug_still_emits_json",
16
+ "eval.tests.test_command_line.test_unknown_flag_after_run_once_is_ignored",
17
+ "eval.tests.test_command_line.test_unknown_flag_is_ignored",
18
+ "eval.tests.test_config.test_amperage_factor_scales_input_current",
19
+ "eval.tests.test_config.test_amperage_factor_units_follow_wattfactor",
20
+ "eval.tests.test_config.test_empty_config_file_still_runs",
21
+ "eval.tests.test_config.test_hash_comment_lines_are_ignored",
22
+ "eval.tests.test_config.test_inline_hash_in_device_value_is_not_a_comment",
23
+ "eval.tests.test_config.test_inline_hash_in_numeric_setting_is_not_a_comment",
24
+ "eval.tests.test_config.test_invalid_float_setting_continues_polling",
25
+ "eval.tests.test_config.test_invalid_float_setting_reports_error",
26
+ "eval.tests.test_config.test_invalid_int_setting_reports_error",
27
+ "eval.tests.test_config.test_line_without_equals_is_ignored",
28
+ "eval.tests.test_config.test_load_watthour_uses_run_interval",
29
+ "eval.tests.test_config.test_missing_config_file_hangs_poller",
30
+ "eval.tests.test_config.test_missing_config_file_hangs_raw_command",
31
+ "eval.tests.test_config.test_negative_run_interval_yields_negative_watthour",
32
+ "eval.tests.test_config.test_run_interval_changes_watthour_denominator",
33
+ "eval.tests.test_config.test_run_interval_default_watthour",
34
+ "eval.tests.test_config.test_unknown_keys_are_ignored",
35
+ "eval.tests.test_config.test_valid_conf_is_used_for_polling",
36
+ "eval.tests.test_config.test_zero_run_interval_divides_by_zero",
37
+ "eval.tests.test_config_edge_cases.test_embedded_equals_in_device_value_is_preserved",
38
+ "eval.tests.test_config_edge_cases.test_empty_device_value_prevents_polling",
39
+ "eval.tests.test_config_edge_cases.test_matching_scalar_sizes_still_emit_json[qmod]",
40
+ "eval.tests.test_config_edge_cases.test_matching_scalar_sizes_still_emit_json[qpigs]",
41
+ "eval.tests.test_config_edge_cases.test_matching_scalar_sizes_still_emit_json[qpiri]",
42
+ "eval.tests.test_config_edge_cases.test_matching_scalar_sizes_still_emit_json[qpiws]",
43
+ "eval.tests.test_config_edge_cases.test_whitespace_prefixed_key_is_not_matched",
44
+ "eval.tests.test_config_edge_cases.test_wrong_qmod_size_breaks_json_emit",
45
+ "eval.tests.test_config_edge_cases.test_wrong_qpigs_size_breaks_json_emit",
46
+ "eval.tests.test_config_edge_cases.test_wrong_qpiri_size_breaks_json_emit",
47
+ "eval.tests.test_help.test_help_dash_h_exits_one",
48
+ "eval.tests.test_help.test_help_does_not_need_serial_device",
49
+ "eval.tests.test_help.test_help_has_no_supported_arguments_missing",
50
+ "eval.tests.test_help.test_help_lists_raw_command_examples",
51
+ "eval.tests.test_help.test_help_lists_supported_arguments",
52
+ "eval.tests.test_help.test_help_long_flag_exits_one",
53
+ "eval.tests.test_help.test_help_precedes_debug_flag",
54
+ "eval.tests.test_help.test_help_precedes_debug_flag_reversed",
55
+ "eval.tests.test_help.test_help_precedes_raw_command",
56
+ "eval.tests.test_help.test_help_prints_usage_banner",
57
+ "eval.tests.test_json_edge_cases.test_ac_charge_flag_sets_only_when_bit7_one",
58
+ "eval.tests.test_json_edge_cases.test_battery_discharge_current_is_forwarded",
59
+ "eval.tests.test_json_edge_cases.test_device_status_charger_flag_mapping[00000000-exp1]",
60
+ "eval.tests.test_json_edge_cases.test_device_status_charger_flag_mapping[00000110-exp4]",
61
+ "eval.tests.test_json_edge_cases.test_device_status_charger_flag_mapping[00010001-exp3]",
62
+ "eval.tests.test_json_edge_cases.test_device_status_charger_flag_mapping[00010110-exp0]",
63
+ "eval.tests.test_json_edge_cases.test_device_status_charger_flag_mapping[00011000-exp2]",
64
+ "eval.tests.test_json_edge_cases.test_heatsink_temperature_is_forwarded",
65
+ "eval.tests.test_json_edge_cases.test_load_percent_is_forwarded",
66
+ "eval.tests.test_json_edge_cases.test_more_qpigs_scalars_are_forwarded",
67
+ "eval.tests.test_polling_json.test_debug_flag_custom_factors_printed_exactly",
68
+ "eval.tests.test_polling_json.test_debug_flag_emits_config_debug",
69
+ "eval.tests.test_polling_json.test_debug_flag_without_flag_emits_no_debug",
70
+ "eval.tests.test_polling_json.test_device_status_flags_map_to_chargers",
71
+ "eval.tests.test_polling_json.test_dropped_reply_prevents_json_emit",
72
+ "eval.tests.test_polling_json.test_json_block_matches_golden",
73
+ "eval.tests.test_polling_json.test_json_has_all_expected_fields",
74
+ "eval.tests.test_polling_json.test_mode_letter_maps_to_inverter_mode[B-4]",
75
+ "eval.tests.test_polling_json.test_mode_letter_maps_to_inverter_mode[F-5]",
76
+ "eval.tests.test_polling_json.test_mode_letter_maps_to_inverter_mode[H-6]",
77
+ "eval.tests.test_polling_json.test_mode_letter_maps_to_inverter_mode[L-3]",
78
+ "eval.tests.test_polling_json.test_mode_letter_maps_to_inverter_mode[P-1]",
79
+ "eval.tests.test_polling_json.test_mode_letter_maps_to_inverter_mode[S-2]",
80
+ "eval.tests.test_polling_json.test_pv_calculation_matches_documented_formula",
81
+ "eval.tests.test_polling_json.test_qpigs_field_values_are_forwarded",
82
+ "eval.tests.test_polling_json.test_qpiri_rating_fields_are_forwarded",
83
+ "eval.tests.test_polling_json.test_run_once_exits_after_single_emit",
84
+ "eval.tests.test_polling_json.test_run_once_full_cycle_emits_json",
85
+ "eval.tests.test_polling_json.test_unknown_mode_maps_to_zero",
86
+ "eval.tests.test_polling_json.test_warnings_reply_forwarded",
87
+ "eval.tests.test_polling_state.test_mode_change_updates_inverter_mode_across_cycles",
88
+ "eval.tests.test_polling_state.test_poll_loop_without_debug_is_json_only",
89
+ "eval.tests.test_polling_state.test_polling_loop_documents_shadowed_status_change",
90
+ "eval.tests.test_polling_state.test_polling_loop_repeats_cycles",
91
+ "eval.tests.test_polling_state.test_verbose_query_debug_shows_protocol_exchange",
92
+ "eval.tests.test_raw_command.test_raw_command_different_reply_body_is_echoed",
93
+ "eval.tests.test_raw_command.test_raw_command_echoes_reply",
94
+ "eval.tests.test_raw_command.test_raw_command_exits_without_polling_loop",
95
+ "eval.tests.test_raw_command.test_raw_command_help_precedence",
96
+ "eval.tests.test_raw_command.test_raw_command_missing_device_reports_empty",
97
+ "eval.tests.test_raw_command.test_raw_command_numeric_reply_body_is_echoed",
98
+ "eval.tests.test_raw_command.test_raw_command_transmits_exact_command",
99
+ "eval.tests.test_raw_command.test_raw_command_without_value_falls_back_to_poll"
100
+ ]
101
+ },
102
+ "generated_module_02": {
103
+ "ignore_reason": "",
104
+ "ignored": false,
105
+ "ignored_tests": [
106
+ {
107
+ "name": "eval.tests.test_raw_command_pty.test_partial_zero_of_seven_is_distinct_from_full_reply",
108
+ "reasons": [
109
+ {
110
+ "id": "generic_keyword_oracle",
111
+ "message": "pytest test uses a generic keyword oracle",
112
+ "path": "eval/tests/test_raw_command_pty.py",
113
+ "repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
114
+ "severity": "error",
115
+ "stage": "static_lint"
116
+ }
117
+ ]
118
+ }
119
+ ],
120
+ "tests": [
121
+ "eval.tests.test_help.test_help_documents_charger_priority_commands",
122
+ "eval.tests.test_help.test_help_documents_enable_disable_commands",
123
+ "eval.tests.test_help.test_help_documents_source_priority_commands",
124
+ "eval.tests.test_help.test_help_exits_without_touching_config",
125
+ "eval.tests.test_help.test_help_long_flag_matches_exact_text_and_exit_code",
126
+ "eval.tests.test_help.test_help_short_flag_matches_exact_text_and_exit_code",
127
+ "eval.tests.test_help.test_help_takes_precedence_over_raw_command",
128
+ "eval.tests.test_help.test_help_usage_line_describes_raw_command_flag",
129
+ "eval.tests.test_poll.test_poll_debug_reports_all_four_command_crcs",
130
+ "eval.tests.test_poll.test_poll_device_status_fields_render",
131
+ "eval.tests.test_poll.test_poll_honours_config_reply_sizes",
132
+ "eval.tests.test_poll.test_poll_mode_mapping_parametrized",
133
+ "eval.tests.test_poll.test_poll_output_matches_exact_json",
134
+ "eval.tests.test_poll.test_poll_output_structure",
135
+ "eval.tests.test_poll.test_poll_qmod_failure_suppresses_any_output_block",
136
+ "eval.tests.test_poll.test_poll_qpigs_values_surfaced_in_output",
137
+ "eval.tests.test_poll.test_poll_qpiri_ratings_surfaced_in_output",
138
+ "eval.tests.test_poll.test_poll_qpiws_replysize_reflected_in_debug_line",
139
+ "eval.tests.test_poll.test_poll_run_once_exits_with_code_zero",
140
+ "eval.tests.test_poll.test_poll_warnings_field_reflects_qpiws_payload",
141
+ "eval.tests.test_poll_cycles.test_poll_mode_change_detected_across_cycles",
142
+ "eval.tests.test_poll_cycles.test_poll_mode_stable_when_qmod_unchanged",
143
+ "eval.tests.test_raw_command_pty.test_byte_by_byte_reply_still_accepted",
144
+ "eval.tests.test_raw_command_pty.test_no_reply_read_timeout_and_reply_short",
145
+ "eval.tests.test_raw_command_pty.test_partial_reply_then_timeout_reports_too_short_count[1]",
146
+ "eval.tests.test_raw_command_pty.test_partial_reply_then_timeout_reports_too_short_count[3]",
147
+ "eval.tests.test_raw_command_pty.test_partial_reply_then_timeout_reports_too_short_count[5]",
148
+ "eval.tests.test_raw_command_pty.test_partial_reply_then_timeout_reports_too_short_count[6]",
149
+ "eval.tests.test_raw_command_pty.test_partial_zero_of_seven_is_distinct_from_full_reply",
150
+ "eval.tests.test_raw_command_pty.test_split_two_reads_still_accepted",
151
+ "eval.tests.test_raw_command_pty.test_valid_reply_via_pty_is_accepted",
152
+ "eval.tests.test_raw_command_pty.test_valid_reply_via_pty_without_debug",
153
+ "eval.tests.test_raw_regular.test_bad_start_byte_reply_is_rejected",
154
+ "eval.tests.test_raw_regular.test_bad_stop_byte_reply_is_rejected",
155
+ "eval.tests.test_raw_regular.test_config_device_path_is_honored",
156
+ "eval.tests.test_raw_regular.test_crc_collision_escaped_crc_accepted[high_byte_0x0d_carriage_return- !f-3580-3836]",
157
+ "eval.tests.test_raw_regular.test_crc_collision_escaped_crc_accepted[high_byte_0x28_of_lparen- T-10460-10716]",
158
+ "eval.tests.test_raw_regular.test_crc_collision_escaped_crc_accepted[low_byte_0x0d_carriage_return- (+-11789-11790]",
159
+ "eval.tests.test_raw_regular.test_crc_collision_escaped_crc_accepted[low_byte_0x28_of_lparen- '-26152-26153]",
160
+ "eval.tests.test_raw_regular.test_crc_collision_unescaped_crc_rejected[high_byte_0x0d_carriage_return- !f-3580-3836]",
161
+ "eval.tests.test_raw_regular.test_crc_collision_unescaped_crc_rejected[high_byte_0x28_of_lparen- T-10460-10716]",
162
+ "eval.tests.test_raw_regular.test_crc_collision_unescaped_crc_rejected[low_byte_0x0d_carriage_return- (+-11789-11790]",
163
+ "eval.tests.test_raw_regular.test_crc_collision_unescaped_crc_rejected[low_byte_0x28_of_lparen- '-26152-26153]",
164
+ "eval.tests.test_raw_regular.test_crc_escape_0x0a_low_byte_documented",
165
+ "eval.tests.test_raw_regular.test_crc_escape_adjusts_reserved_bytes",
166
+ "eval.tests.test_raw_regular.test_crc_of_qmod_command_debug_line",
167
+ "eval.tests.test_raw_regular.test_crc_of_qpigs_and_qpiri_commands_parametrized",
168
+ "eval.tests.test_raw_regular.test_crc_of_qpiws_command_debug_line",
169
+ "eval.tests.test_raw_regular.test_crced_reply_echoes_executed_command_payload",
170
+ "eval.tests.test_raw_regular.test_invalid_crc_reply_is_rejected",
171
+ "eval.tests.test_raw_regular.test_no_device_open_failure_reports_errno",
172
+ "eval.tests.test_raw_regular.test_no_device_prints_empty_reply_without_debug",
173
+ "eval.tests.test_raw_regular.test_query_writes_exact_crc_and_framing_to_device",
174
+ "eval.tests.test_raw_regular.test_raw_qpigs_command_echoes_payload",
175
+ "eval.tests.test_raw_regular.test_reply_read_exact_seven_bytes_for_raw",
176
+ "eval.tests.test_raw_regular.test_valid_crced_reply_passes_and_populates_status",
177
+ "eval.tests.test_raw_regular.test_valid_reply_without_debug_echoes_payload"
178
+ ]
179
+ },
180
+ "generated_module_04": {
181
+ "ignore_reason": "",
182
+ "ignored": false,
183
+ "ignored_tests": [],
184
+ "tests": [
185
+ "eval.tests.test_help.test_help_argument_description_slice_exact[--help]",
186
+ "eval.tests.test_help.test_help_argument_description_slice_exact[-h]",
187
+ "eval.tests.test_help.test_help_combined_with_all_flags",
188
+ "eval.tests.test_help.test_help_contains_all_section_headers",
189
+ "eval.tests.test_help.test_help_debug_flag_line_exact[--help]",
190
+ "eval.tests.test_help.test_help_debug_flag_line_exact[-h]",
191
+ "eval.tests.test_help.test_help_flag_returns_exit_code_and_golden[--help]",
192
+ "eval.tests.test_help.test_help_flag_returns_exit_code_and_golden[-h]",
193
+ "eval.tests.test_help.test_help_h_and_long_flag_identical",
194
+ "eval.tests.test_help.test_help_long_flag_matches_golden_exact",
195
+ "eval.tests.test_help.test_help_nonempty_and_full_size",
196
+ "eval.tests.test_help.test_help_precedes_debug_flag[--help]",
197
+ "eval.tests.test_help.test_help_precedes_debug_flag[-h]",
198
+ "eval.tests.test_help.test_help_precedes_raw_command_argument",
199
+ "eval.tests.test_help.test_help_precedes_run_once_flag[--run-once]",
200
+ "eval.tests.test_help.test_help_precedes_run_once_flag[-1]",
201
+ "eval.tests.test_help.test_help_raw_command_example_slice_exact",
202
+ "eval.tests.test_help.test_help_run_once_line_exact",
203
+ "eval.tests.test_help.test_help_stdout_matches_golden_exact",
204
+ "eval.tests.test_help.test_help_trailing_newline_exact",
205
+ "eval.tests.test_help.test_help_usage_header_line_exact[--help]",
206
+ "eval.tests.test_help.test_help_usage_header_line_exact[-h]",
207
+ "eval.tests.test_help.test_help_wins_over_junk_positional_args[extra_args0]",
208
+ "eval.tests.test_help.test_help_wins_over_junk_positional_args[extra_args1]",
209
+ "eval.tests.test_help.test_help_wins_over_junk_positional_args[extra_args2]",
210
+ "eval.tests.test_lprintf.test_debug_disabled_long_help_flag_path",
211
+ "eval.tests.test_lprintf.test_debug_disabled_raw_path_emits_no_lprintf_lines",
212
+ "eval.tests.test_lprintf.test_debug_emits_startup_debug_set_line",
213
+ "eval.tests.test_lprintf.test_debug_errno_diagnostic_is_varargs_formatted",
214
+ "eval.tests.test_lprintf.test_debug_error_line_has_timestamp_prefix",
215
+ "eval.tests.test_lprintf.test_debug_raw_command_exits_cleanly",
216
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[PCP00]",
217
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[PCP03]",
218
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[PDb]",
219
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[PEa]",
220
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[PEu]",
221
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[POP00]",
222
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[POP01]",
223
+ "eval.tests.test_lprintf.test_debug_raw_command_variants_deterministic[POP02]",
224
+ "eval.tests.test_lprintf.test_debug_raw_output_has_exactly_three_lines",
225
+ "eval.tests.test_lprintf.test_debug_raw_output_stable_across_independent_runs",
226
+ "eval.tests.test_lprintf.test_debug_raw_path_stdout_matches_golden_exact",
227
+ "eval.tests.test_lprintf.test_debug_raw_reply_line_after_re_run_exact",
228
+ "eval.tests.test_lprintf.test_debug_raw_reply_line_trailing_spaces_exact",
229
+ "eval.tests.test_lprintf.test_debug_set_line_is_newline_terminated",
230
+ "eval.tests.test_lprintf.test_debug_set_precedes_unable_to_open",
231
+ "eval.tests.test_lprintf.test_debug_timestamp_weekday_is_english",
232
+ "eval.tests.test_lprintf.test_debug_timestamp_year_is_plausible",
233
+ "eval.tests.test_lprintf.test_nodebug_raw_output_exact_short_command",
234
+ "eval.tests.test_lprintf.test_nodebug_raw_output_has_single_reply_line",
235
+ "eval.tests.test_lprintf.test_raw_path_still_prints_empty_reply"
236
+ ]
237
+ }
238
+ },
239
+ "commit": "ac2642639f5669f4439eb84a2cbe3066216f0496",
240
+ "data_source": "synthetic_programgym",
241
+ "difficulty": "easy",
242
+ "difficulty_score": 0.8709888137605755,
243
+ "eval_clean_hashes": [
244
+ "ee6eaf5a154262e1a1370dcb915896bff2edc8b5092425bda8883580cc36cf26"
245
+ ],
246
+ "input_record": {
247
+ "commit": "ac2642639f5669f4439eb84a2cbe3066216f0496",
248
+ "difficulty": "easy",
249
+ "difficulty_code_lines": 743,
250
+ "difficulty_has_tests": false,
251
+ "difficulty_product_code_lines": 743,
252
+ "difficulty_runtime_deps": 0,
253
+ "difficulty_score": 0.8709888137605755,
254
+ "difficulty_test_code_lines": 0,
255
+ "full_name": "ned-kelly/docker-voltronic-homeassistant",
256
+ "input_joern_zip": "cpp_joern/ned-kelly__docker-voltronic-homeassistant.zip",
257
+ "joern_status": true,
258
+ "joern_time": 12.171918954933062,
259
+ "language": "cpp",
260
+ "pb_match": [
261
+ {
262
+ "pb_fullname": "ArthurSonzogni/json-tui",
263
+ "rank": 432,
264
+ "similarity": 0.47343677282333374
265
+ },
266
+ {
267
+ "pb_fullname": "NikolaDucak/caps-log",
268
+ "rank": 983,
269
+ "similarity": 0.37950658798217773
270
+ }
271
+ ],
272
+ "repo_path": "cpp/ned-kelly__docker-voltronic-homeassistant",
273
+ "source": "commit:ac2642639f5669f4439eb84a2cbe3066216f0496",
274
+ "status": "done",
275
+ "url": "https://github.com/ned-kelly/docker-voltronic-homeassistant"
276
+ },
277
+ "instance_id": "ned-kelly__docker-voltronic-homeassistant.ac26426",
278
+ "language": "cpp",
279
+ "module_iterations": [
280
+ {
281
+ "actual_iterations": 4,
282
+ "branch_name": "generated_module_01",
283
+ "iteration_limit": 5,
284
+ "module_index": 1,
285
+ "module_kind": "source",
286
+ "termination_reason": "module_coverage_threshold_reached"
287
+ },
288
+ {
289
+ "actual_iterations": 5,
290
+ "branch_name": "generated_module_02",
291
+ "iteration_limit": 5,
292
+ "module_index": 2,
293
+ "module_kind": "source",
294
+ "termination_reason": "max_iterations"
295
+ },
296
+ {
297
+ "actual_iterations": 5,
298
+ "branch_name": "generated_module_03",
299
+ "iteration_limit": 5,
300
+ "module_index": 3,
301
+ "module_kind": "source",
302
+ "termination_reason": "max_iterations"
303
+ },
304
+ {
305
+ "actual_iterations": 3,
306
+ "branch_name": "generated_module_04",
307
+ "iteration_limit": 5,
308
+ "module_index": 4,
309
+ "module_kind": "source",
310
+ "termination_reason": "module_coverage_threshold_reached"
311
+ }
312
+ ],
313
+ "repository": "ned-kelly/docker-voltronic-homeassistant"
314
+ }
ned-kelly--docker-voltronic-homeassistant.ac26426/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
ned-kelly--docker-voltronic-homeassistant.ac26426/tests/workspace.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a034bca8379ccea8b2cf850bd29eec0b04bda4c5ae22901e1f8e5c8d8fa0a3c6
3
+ size 4300
neobrain--blobify.bcd0ad8/environment/Dockerfile ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+ ARG PROGRAMGYM_APT_REPOSITORY_BASE_URL=""
3
+ ARG PROGRAMGYM_GOPROXY="https://proxy.golang.org,direct"
4
+ ARG PROGRAMGYM_GOSUMDB="sum.golang.org"
5
+ ARG PROGRAMGYM_NPM_REGISTRY="https://registry.npmjs.org/"
6
+ ARG PROGRAMGYM_NPM_STRICT_SSL="true"
7
+ ARG PROGRAMGYM_PYPI_INDEX_URL="https://pypi.org/simple"
8
+ ARG PROGRAMGYM_PYPI_TRUSTED_HOST=""
9
+ ARG PROGRAMGYM_UV_INSECURE_HOST=""
10
+ ARG PROGRAMGYM_RUSTUP_DIST_SERVER="https://static.rust-lang.org"
11
+ ARG PROGRAMGYM_RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
12
+ ARG PROGRAMGYM_CARGO_INDEX="sparse+https://index.crates.io/"
13
+ ARG PROGRAMGYM_CARGO_NET_RETRY="10"
14
+ ARG PROGRAMGYM_CARGO_HTTP_TIMEOUT="600"
15
+ ARG PROGRAMGYM_CARGO_HTTP_MULTIPLEXING="false"
16
+ ARG PROGRAMGYM_MAVEN_MIRROR_URL=""
17
+ ARG PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=""
18
+ ARG PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL="https://services.gradle.org/distributions"
19
+ ARG PROGRAMGYM_JITPACK_REPOSITORY_URL="https://jitpack.io"
20
+ ENV GOPROXY=${PROGRAMGYM_GOPROXY}
21
+ ENV GOSUMDB=${PROGRAMGYM_GOSUMDB}
22
+ ENV PIP_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
23
+ ENV PIP_TRUSTED_HOST=${PROGRAMGYM_PYPI_TRUSTED_HOST}
24
+ ENV UV_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
25
+ ENV UV_INSECURE_HOST=${PROGRAMGYM_UV_INSECURE_HOST}
26
+ ENV npm_config_registry=${PROGRAMGYM_NPM_REGISTRY}
27
+ ENV npm_config_strict_ssl=${PROGRAMGYM_NPM_STRICT_SSL}
28
+ ENV RUSTUP_DIST_SERVER=${PROGRAMGYM_RUSTUP_DIST_SERVER}
29
+ ENV RUSTUP_UPDATE_ROOT=${PROGRAMGYM_RUSTUP_UPDATE_ROOT}
30
+ ENV CARGO_REGISTRIES_CRATES_IO_INDEX=${PROGRAMGYM_CARGO_INDEX}
31
+ ENV CARGO_NET_RETRY=${PROGRAMGYM_CARGO_NET_RETRY}
32
+ ENV CARGO_HTTP_TIMEOUT=${PROGRAMGYM_CARGO_HTTP_TIMEOUT}
33
+ ENV CARGO_HTTP_MULTIPLEXING=${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING}
34
+ ENV PROGRAMGYM_MAVEN_MIRROR_URL=${PROGRAMGYM_MAVEN_MIRROR_URL}
35
+ ENV PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}
36
+ ENV PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL=${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL}
37
+ ENV PROGRAMGYM_JITPACK_REPOSITORY_URL=${PROGRAMGYM_JITPACK_REPOSITORY_URL}
38
+ COPY harbor_configure_apt_mirror.sh /tmp/harbor_configure_apt_mirror.sh
39
+ RUN chmod 0755 /tmp/harbor_configure_apt_mirror.sh \
40
+ && /bin/bash /tmp/harbor_configure_apt_mirror.sh "${PROGRAMGYM_APT_REPOSITORY_BASE_URL}" \
41
+ && rm -f /tmp/harbor_configure_apt_mirror.sh
42
+ COPY harbor_configure_java_mirrors.sh /tmp/harbor_configure_java_mirrors.sh
43
+ RUN chmod 0755 /tmp/harbor_configure_java_mirrors.sh \
44
+ && /bin/bash /tmp/harbor_configure_java_mirrors.sh "${PROGRAMGYM_MAVEN_MIRROR_URL}" "${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}" "${PROGRAMGYM_JITPACK_REPOSITORY_URL}" \
45
+ && rm -f /tmp/harbor_configure_java_mirrors.sh
46
+ ENV DEBIAN_FRONTEND=noninteractive
47
+ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
48
+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
49
+ ENV GOTOOLCHAIN=auto
50
+ ENV UV_CACHE_DIR=/workspace/.cache/uv
51
+ ENV npm_config_cache=/workspace/.cache/npm
52
+ ENV HOME=/workspace
53
+ ENV XDG_CACHE_HOME=/workspace/.cache
54
+ ENV PIP_CACHE_DIR=/workspace/.cache/pip
55
+ ENV PYTHONUSERBASE=/workspace/.local
56
+ ENV PAGER=cat
57
+ ENV MANPAGER=cat
58
+ ENV LESS=-R
59
+ ENV TQDM_DISABLE=1
60
+ 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 unzip wget curl xz-utils bzip2 zip zstd patch python3-pytest python3-pytest-xdist python3-coverage tar && rm -rf /var/lib/apt/lists/*
61
+ ARG CMAKE_VERSION=3.31.10
62
+ RUN set -eux; python3 -m pip install --no-cache-dir "cmake==${CMAKE_VERSION}"; cmake --version; ctest --version; cpack --version
63
+ COPY programgym-gcc13.tar.gz /tmp/gcc.tar.gz
64
+ ARG GCC_VERSION=13.3.0
65
+ RUN set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in amd64) GCC_ARCH="x64" ;; arm64) GCC_ARCH="arm64" ;; *) echo "unsupported architecture for GCC 13: ${ARCH}" >&2; exit 1 ;; esac; if [ "${GCC_ARCH}" != "x64" ]; then echo "the staged GCC 13 archive is for x64, got ${GCC_ARCH}" >&2; exit 1; fi; rm -rf /opt/gcc-13; mkdir -p /opt/gcc-13; tar -xzf /tmp/gcc.tar.gz --strip-components=1 -C /opt/gcc-13; ln -sf /opt/gcc-13/bin/gcc /usr/local/bin/gcc; ln -sf /opt/gcc-13/bin/g++ /usr/local/bin/g++; ln -sf /opt/gcc-13/bin/gcc /usr/local/bin/cc; ln -sf /opt/gcc-13/bin/g++ /usr/local/bin/c++; ln -sf /opt/gcc-13/bin/gcc /usr/local/bin/gcc-13; ln -sf /opt/gcc-13/bin/g++ /usr/local/bin/g++-13; for PROGRAMGYM_GCOV_TOOL in gcov gcov-dump gcov-tool; do if [ -x "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" ]; then ln -sf "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" "/usr/local/bin/${PROGRAMGYM_GCOV_TOOL}"; ln -sf "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" "/usr/local/bin/${PROGRAMGYM_GCOV_TOOL}-13"; ln -sf "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" "/usr/bin/${PROGRAMGYM_GCOV_TOOL}"; fi; done; ln -sf /opt/gcc-13/bin/gcc /usr/bin/gcc; ln -sf /opt/gcc-13/bin/g++ /usr/bin/g++; ln -sf /opt/gcc-13/bin/gcc /usr/bin/cc; ln -sf /opt/gcc-13/bin/g++ /usr/bin/c++; rm -f /tmp/gcc.tar.gz; gcc --version; g++ --version; gcov --version; command -v gcov-dump >/dev/null && gcov-dump --version | head -n 1 || true
66
+ # programgym_quota_aware_nproc=1
67
+ RUN set -eux; printf '%s\n' '#!/bin/sh' 'if [ "$#" -gt 0 ]; then exec /usr/bin/nproc "$@"; fi' 'visible="$(/usr/bin/nproc)"' 'quota=""' 'period=""' 'if [ -r /sys/fs/cgroup/cpu.max ]; then' ' set -- $(cat /sys/fs/cgroup/cpu.max)' ' quota="${1:-}"' ' period="${2:-}"' 'elif [ -r /sys/fs/cgroup/cpu/cpu.cfs_quota_us ] && [ -r /sys/fs/cgroup/cpu/cpu.cfs_period_us ]; then' ' quota="$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)"' ' period="$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)"' fi 'if [ -n "$quota" ] && [ "$quota" != max ] && [ "$quota" -gt 0 ] 2>/dev/null && [ "$period" -gt 0 ] 2>/dev/null; then' ' limit=$(( (quota + period - 1) / period ))' ' if [ "$limit" -lt 1 ]; then limit=1; fi' ' if [ "$limit" -lt "$visible" ]; then visible="$limit"; fi' fi 'printf "%s\n" "$visible"' > /usr/local/bin/nproc; chmod 0755 /usr/local/bin/nproc; /usr/local/bin/nproc >/dev/null
68
+ WORKDIR /workspace
69
+ ADD workspace.tar.gz /workspace/
70
+ COPY executable /workspace/executable
71
+ COPY download.sh /workspace/download.sh
72
+ RUN chmod 755 /workspace/download.sh
73
+ COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
74
+ RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
75
+ && /bin/bash /tmp/harbor_prepare_download_env.sh \
76
+ && rm -f /workspace/download.sh \
77
+ && rm -f /tmp/harbor_prepare_download_env.sh
78
+ ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
79
+ RUN chmod 111 /workspace/executable
80
+ WORKDIR /workspace
81
+ # Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
82
+ # Keep tool/runtime state under /home/agent and reserve /workspace for the
83
+ # submission handed to the separate verifier. Keep the reference executable
84
+ # execute-only; the oracle temporarily restores owner read permission.
85
+ RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
86
+ RUN mkdir -p /home/agent \
87
+ && chown -R agent:agent /home/agent /workspace \
88
+ && chown agent:agent /workspace/executable \
89
+ && chmod 111 /workspace/executable
90
+ ENV HOME=/home/agent
91
+ WORKDIR /workspace
92
+ 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"]
neobrain--blobify.bcd0ad8/environment/docker-compose.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ main:
3
+ build:
4
+ args:
5
+ PROGRAMGYM_APT_REPOSITORY_BASE_URL: ${PROGRAMGYM_APT_REPOSITORY_BASE_URL:-}
6
+ PROGRAMGYM_GOPROXY: ${PROGRAMGYM_GOPROXY:-https://proxy.golang.org,direct}
7
+ PROGRAMGYM_GOSUMDB: ${PROGRAMGYM_GOSUMDB:-sum.golang.org}
8
+ PROGRAMGYM_NPM_REGISTRY: ${PROGRAMGYM_NPM_REGISTRY:-https://registry.npmjs.org/}
9
+ PROGRAMGYM_NPM_STRICT_SSL: ${PROGRAMGYM_NPM_STRICT_SSL:-true}
10
+ PROGRAMGYM_PYPI_INDEX_URL: ${PROGRAMGYM_PYPI_INDEX_URL:-https://pypi.org/simple}
11
+ PROGRAMGYM_PYPI_TRUSTED_HOST: ${PROGRAMGYM_PYPI_TRUSTED_HOST:-}
12
+ PROGRAMGYM_UV_INSECURE_HOST: ${PROGRAMGYM_UV_INSECURE_HOST:-}
13
+ PROGRAMGYM_RUSTUP_DIST_SERVER: ${PROGRAMGYM_RUSTUP_DIST_SERVER:-https://static.rust-lang.org}
14
+ PROGRAMGYM_RUSTUP_UPDATE_ROOT: ${PROGRAMGYM_RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}
15
+ PROGRAMGYM_CARGO_INDEX: ${PROGRAMGYM_CARGO_INDEX:-sparse+https://index.crates.io/}
16
+ PROGRAMGYM_CARGO_NET_RETRY: ${PROGRAMGYM_CARGO_NET_RETRY:-10}
17
+ PROGRAMGYM_CARGO_HTTP_TIMEOUT: ${PROGRAMGYM_CARGO_HTTP_TIMEOUT:-600}
18
+ PROGRAMGYM_CARGO_HTTP_MULTIPLEXING: ${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING:-false}
19
+ PROGRAMGYM_MAVEN_MIRROR_URL: ${PROGRAMGYM_MAVEN_MIRROR_URL:-}
20
+ PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL: ${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL:-}
21
+ PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL: ${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL:-https://services.gradle.org/distributions}
22
+ PROGRAMGYM_JITPACK_REPOSITORY_URL: ${PROGRAMGYM_JITPACK_REPOSITORY_URL:-https://jitpack.io}
neobrain--blobify.bcd0ad8/environment/download.sh ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ #
3
+ # download.sh — ProgramGym download stage for blobify (neobrain/blobify).
4
+ #
5
+ # blobify is a header-only C++17 library. Building its example program
6
+ # (example-bmp) requires two header-only third-party dependencies that the
7
+ # repository declares as git submodules, but which are NOT present in the
8
+ # mounted source tree: boost::pfr (header layout include/boost/pfr/...) and
9
+ # magic_enum (header layout include/magic_enum/... + a top-level magic_enum.hpp).
10
+ #
11
+ # This file is standalone and source-safe. It downloads and unpacks those two
12
+ # header-only dependency archives into a cache directory and exports the
13
+ # variables that build.sh relies on. It must NOT compile, link, test, package,
14
+ # or run any build step, and it must NOT read any repository source file.
15
+ #
16
+ # All URLs and versions are pinned inline below.
17
+
18
+ set -u
19
+
20
+ # Cache directory for the dependency headers. build.sh reads the exported
21
+ # PROGRAMGYM_DEPS_DIR (set to ${HOME}/.programgym_deps) and passes its
22
+ # `include/` directory to CMake via CMAKE_INCLUDE_PATH.
23
+ export PROGRAMGYM_DEPS_DIR="${HOME}/.programgym_deps"
24
+ export PROGRAMGYM_DEPS_INCLUDE="${PROGRAMGYM_DEPS_DIR}/include"
25
+
26
+ # Pinned upstream releases (reproducible, header-only).
27
+ PFR_VERSION="boost-1.85.0"
28
+ PFR_URL="https://codeload.github.com/boostorg/pfr/tar.gz/refs/tags/${PFR_VERSION}"
29
+ MAGIC_ENUM_VERSION="v0.9.7"
30
+ MAGIC_ENUM_URL="https://codeload.github.com/Neargye/magic_enum/tar.gz/refs/tags/${MAGIC_ENUM_VERSION}"
31
+
32
+ # Failure helper that works whether this file is sourced or executed.
33
+ fail() {
34
+ echo "download.sh: ERROR: $1" >&2
35
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
36
+ return 1
37
+ else
38
+ exit 1
39
+ fi
40
+ }
41
+
42
+ # Idempotency: if the deps already exist and the marker file is present, we are
43
+ # done. Skip re-downloading so the stage is cheap to re-run.
44
+ marker="${PROGRAMGYM_DEPS_DIR}/.fetched"
45
+ if [ -f "${marker}" ] && [ -f "${PROGRAMGYM_DEPS_INCLUDE}/boost/pfr.hpp" ] && [ -f "${PROGRAMGYM_DEPS_INCLUDE}/magic_enum.hpp" ]; then
46
+ echo "download.sh: dependencies already present, skipping download."
47
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
48
+ return 0
49
+ else
50
+ exit 0
51
+ fi
52
+ fi
53
+
54
+ mkdir -p "${PROGRAMGYM_DEPS_INCLUDE}"
55
+
56
+ workdir="$(mktemp -d /tmp/blobify_dl_XXXXXX)" || fail "could not create temporary download directory"
57
+
58
+ # CURL is available in the base image. Ensure we fail loudly on HTTP errors.
59
+ set -e
60
+
61
+ # -- 1. Download and unpack boost::pfr --------------------------------------
62
+ pfr_archive="${workdir}/pfr.tar.gz"
63
+ if [ ! -f "${pfr_archive}" ]; then
64
+ curl --retry 5 --retry-all-errors --retry-delay 2 -sSL --fail --retry 3 --output "${pfr_archive}" "${PFR_URL}" \
65
+ || fail "failed to download boost::pfr from ${PFR_URL}"
66
+ fi
67
+
68
+ mkdir -p "${workdir}/pfr_src"
69
+ tar -xzf "${pfr_archive}" -C "${workdir}/pfr_src" || fail "failed to unpack boost::pfr archive"
70
+
71
+ # Locate the extracted top-level include directory (layout: <root>/include/boost/...).
72
+ pfr_root="$(find "${workdir}/pfr_src" -maxdepth 1 -type d -name 'pfr-*' | head -n 1)"
73
+ if [ -z "${pfr_root}" ]; then
74
+ fail "boost::pfr archive did not contain an expected top-level directory"
75
+ fi
76
+ pfr_include="${pfr_root}/include"
77
+ if [ -d "${pfr_include}/boost" ]; then
78
+ cp -r "${pfr_include}/boost" "${PROGRAMGYM_DEPS_INCLUDE}/boost"
79
+ else
80
+ fail "boost::pfr archive is missing its include/boost header tree"
81
+ fi
82
+
83
+ # -- 2. Download and unpack magic_enum ---------------------------------------
84
+ me_archive="${workdir}/magic_enum.tar.gz"
85
+ if [ ! -f "${me_archive}" ]; then
86
+ curl --retry 5 --retry-all-errors --retry-delay 2 -sSL --fail --retry 3 --output "${me_archive}" "${MAGIC_ENUM_URL}" \
87
+ || fail "failed to download magic_enum from ${MAGIC_ENUM_URL}"
88
+ fi
89
+
90
+ mkdir -p "${workdir}/me_src"
91
+ tar -xzf "${me_archive}" -C "${workdir}/me_src" || fail "failed to unpack magic_enum archive"
92
+
93
+ me_root="$(find "${workdir}/me_src" -maxdepth 1 -type d -name 'magic_enum-*' | head -n 1)"
94
+ if [ -z "${me_root}" ]; then
95
+ fail "magic_enum archive did not contain an expected top-level directory"
96
+ fi
97
+ me_include="${me_root}/include"
98
+ if [ -d "${me_include}/magic_enum" ]; then
99
+ cp -r "${me_include}/magic_enum" "${PROGRAMGYM_DEPS_INCLUDE}/magic_enum"
100
+ else
101
+ fail "magic_enum archive is missing its include/magic_enum header tree"
102
+ fi
103
+
104
+ # blobify's headers do `#include <magic_enum.hpp>` (top-level single header of
105
+ # old magic_enum releases). The vendored magic_enum exposes its content at
106
+ # <magic_enum/magic_enum.hpp>, so generate a thin top-level shim inline.
107
+ printf '%s\n' '#pragma once' '#include <magic_enum/magic_enum.hpp>' \
108
+ > "${PROGRAMGYM_DEPS_INCLUDE}/magic_enum.hpp" \
109
+ || fail "could not write magic_enum.hpp shim"
110
+
111
+ # -- 3. Leave a marker and clean up -------------------------------------------
112
+ touch "${marker}"
113
+ rm -rf "${workdir}"
114
+
115
+ echo "download.sh: dependencies installed into ${PROGRAMGYM_DEPS_DIR}"
116
+ echo "download.sh: exported PROGRAMGYM_DEPS_DIR=${PROGRAMGYM_DEPS_DIR}"
neobrain--blobify.bcd0ad8/environment/executable ADDED
Binary file (68.6 kB). View file
 
neobrain--blobify.bcd0ad8/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
neobrain--blobify.bcd0ad8/environment/harbor_configure_java_mirrors.sh ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ maven_url="${1%/}"
5
+ plugin_url="${2%/}"
6
+ jitpack_url="${3%/}"
7
+
8
+ install -d /workspace/.m2 /workspace/.gradle/init.d /opt/programgym/gradle-init
9
+ if [[ -n "$maven_url" ]]; then
10
+ cat >/workspace/.m2/settings.xml <<EOF
11
+ <?xml version="1.0" encoding="UTF-8"?>
12
+ <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0">
13
+ <mirrors>
14
+ <mirror>
15
+ <id>programgym-maven</id>
16
+ <name>ProgramGym Maven mirror</name>
17
+ <url>${maven_url}</url>
18
+ <mirrorOf>*</mirrorOf>
19
+ </mirror>
20
+ </mirrors>
21
+ </settings>
22
+ EOF
23
+ fi
24
+
25
+ cat >/opt/programgym/gradle-init/programgym-mirrors.gradle <<'EOF'
26
+ def pbMaven = System.getenv('PROGRAMGYM_MAVEN_MIRROR_URL')
27
+ def pbPlugins = System.getenv('PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL')
28
+ def pbJitpack = System.getenv('PROGRAMGYM_JITPACK_REPOSITORY_URL')
29
+
30
+ settingsEvaluated { settings ->
31
+ settings.pluginManagement.repositories {
32
+ if (pbPlugins) { maven { url = uri(pbPlugins) } }
33
+ if (pbMaven) { maven { url = uri(pbMaven) } }
34
+ }
35
+ }
36
+
37
+ allprojects {
38
+ buildscript.repositories {
39
+ if (pbPlugins) { maven { url = uri(pbPlugins) } }
40
+ if (pbMaven) { maven { url = uri(pbMaven) } }
41
+ if (pbJitpack) { maven { url = uri(pbJitpack) } }
42
+ }
43
+ repositories {
44
+ if (pbMaven) { maven { url = uri(pbMaven) } }
45
+ if (pbJitpack) { maven { url = uri(pbJitpack) } }
46
+ }
47
+ }
48
+ EOF
49
+ cp /opt/programgym/gradle-init/programgym-mirrors.gradle \
50
+ /workspace/.gradle/init.d/programgym-mirrors.gradle
neobrain--blobify.bcd0ad8/environment/harbor_prepare_download_env.sh ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ cd /workspace
4
+ set -a
5
+ if [[ -n "${PROGRAMGYM_MAVEN_MIRROR_URL:-}" ]]; then
6
+ sed -i -e "s|https://repo.maven.apache.org/maven2|${PROGRAMGYM_MAVEN_MIRROR_URL%/}|g" -e "s|https://repo1.maven.org/maven2|${PROGRAMGYM_MAVEN_MIRROR_URL%/}|g" /workspace/download.sh
7
+ fi
8
+ if [[ -n "${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL:-}" ]]; then
9
+ sed -i -e "s|https://services.gradle.org/distributions|${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL%/}|g" -e "s|https://downloads.gradle.org/distributions|${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL%/}|g" /workspace/download.sh
10
+ fi
11
+ if [[ -n "${PROGRAMGYM_JITPACK_REPOSITORY_URL:-}" ]]; then
12
+ sed -i -e "s|https://jitpack.io|${PROGRAMGYM_JITPACK_REPOSITORY_URL%/}|g" /workspace/download.sh
13
+ fi
14
+ source /workspace/download.sh
15
+ set +a
16
+ python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
17
+ import os
18
+ import shlex
19
+
20
+ ignored = {
21
+ "ALL_PROXY",
22
+ "HTTP_PROXY",
23
+ "HTTPS_PROXY",
24
+ "NO_PROXY",
25
+ "OLDPWD",
26
+ "PIP_PROXY",
27
+ "PWD",
28
+ "SHLVL",
29
+ "_",
30
+ "all_proxy",
31
+ "http_proxy",
32
+ "https_proxy",
33
+ "no_proxy",
34
+ "pip_proxy",
35
+ }
36
+ for key in sorted(os.environ):
37
+ if key in ignored or key.startswith("BASH_FUNC_"):
38
+ continue
39
+ value = os.environ[key]
40
+ if "\n" in value:
41
+ continue
42
+ print(f"export {key}={shlex.quote(value)}")
43
+ PY
44
+ chmod 0644 /etc/profile.d/programgym_download_env.sh
neobrain--blobify.bcd0ad8/environment/programgym-gcc13.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f67d082b220036c564f110ec9a2dffb736597685d2424761993561d836ebf88
3
+ size 146620404
neobrain--blobify.bcd0ad8/environment/workspace.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cebff9d633b210748f92d3fd891a01243bec6e2066d675b98b7cde70514d7e8
3
+ size 3817
neobrain--blobify.bcd0ad8/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
neobrain--blobify.bcd0ad8/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
neobrain--blobify.bcd0ad8/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/neobrain--blobify.bcd0ad8"
25
+ description = "Synthetic ProgramGym cleanroom reconstruction task for neobrain/blobify"
26
+ authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
27
+ keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "cpp"]
28
+
29
+ [metadata]
30
+ source = "ProgramGym"
31
+ instance_id = "neobrain__blobify.bcd0ad8"
32
+ repository = "neobrain/blobify"
33
+ commit = "bcd0ad8eb7f67dafe6e01bf0b6a13d28876dcf59"
34
+ language = "cpp"
35
+ difficulty = "easy"
36
+ difficulty_score = 1.6547539332529304
37
+ test_branches = 5
38
+ test_count = 842
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"
neobrain--blobify.bcd0ad8/tests/Dockerfile ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+ ARG PROGRAMGYM_APT_REPOSITORY_BASE_URL=""
3
+ ARG PROGRAMGYM_GOPROXY="https://proxy.golang.org,direct"
4
+ ARG PROGRAMGYM_GOSUMDB="sum.golang.org"
5
+ ARG PROGRAMGYM_NPM_REGISTRY="https://registry.npmjs.org/"
6
+ ARG PROGRAMGYM_NPM_STRICT_SSL="true"
7
+ ARG PROGRAMGYM_PYPI_INDEX_URL="https://pypi.org/simple"
8
+ ARG PROGRAMGYM_PYPI_TRUSTED_HOST=""
9
+ ARG PROGRAMGYM_UV_INSECURE_HOST=""
10
+ ARG PROGRAMGYM_RUSTUP_DIST_SERVER="https://static.rust-lang.org"
11
+ ARG PROGRAMGYM_RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
12
+ ARG PROGRAMGYM_CARGO_INDEX="sparse+https://index.crates.io/"
13
+ ARG PROGRAMGYM_CARGO_NET_RETRY="10"
14
+ ARG PROGRAMGYM_CARGO_HTTP_TIMEOUT="600"
15
+ ARG PROGRAMGYM_CARGO_HTTP_MULTIPLEXING="false"
16
+ ARG PROGRAMGYM_MAVEN_MIRROR_URL=""
17
+ ARG PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=""
18
+ ARG PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL="https://services.gradle.org/distributions"
19
+ ARG PROGRAMGYM_JITPACK_REPOSITORY_URL="https://jitpack.io"
20
+ ENV GOPROXY=${PROGRAMGYM_GOPROXY}
21
+ ENV GOSUMDB=${PROGRAMGYM_GOSUMDB}
22
+ ENV PIP_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
23
+ ENV PIP_TRUSTED_HOST=${PROGRAMGYM_PYPI_TRUSTED_HOST}
24
+ ENV UV_INDEX_URL=${PROGRAMGYM_PYPI_INDEX_URL}
25
+ ENV UV_INSECURE_HOST=${PROGRAMGYM_UV_INSECURE_HOST}
26
+ ENV npm_config_registry=${PROGRAMGYM_NPM_REGISTRY}
27
+ ENV npm_config_strict_ssl=${PROGRAMGYM_NPM_STRICT_SSL}
28
+ ENV RUSTUP_DIST_SERVER=${PROGRAMGYM_RUSTUP_DIST_SERVER}
29
+ ENV RUSTUP_UPDATE_ROOT=${PROGRAMGYM_RUSTUP_UPDATE_ROOT}
30
+ ENV CARGO_REGISTRIES_CRATES_IO_INDEX=${PROGRAMGYM_CARGO_INDEX}
31
+ ENV CARGO_NET_RETRY=${PROGRAMGYM_CARGO_NET_RETRY}
32
+ ENV CARGO_HTTP_TIMEOUT=${PROGRAMGYM_CARGO_HTTP_TIMEOUT}
33
+ ENV CARGO_HTTP_MULTIPLEXING=${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING}
34
+ ENV PROGRAMGYM_MAVEN_MIRROR_URL=${PROGRAMGYM_MAVEN_MIRROR_URL}
35
+ ENV PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL=${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}
36
+ ENV PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL=${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL}
37
+ ENV PROGRAMGYM_JITPACK_REPOSITORY_URL=${PROGRAMGYM_JITPACK_REPOSITORY_URL}
38
+ COPY harbor_configure_apt_mirror.sh /tmp/harbor_configure_apt_mirror.sh
39
+ RUN chmod 0755 /tmp/harbor_configure_apt_mirror.sh \
40
+ && /bin/bash /tmp/harbor_configure_apt_mirror.sh "${PROGRAMGYM_APT_REPOSITORY_BASE_URL}" \
41
+ && rm -f /tmp/harbor_configure_apt_mirror.sh
42
+ COPY harbor_configure_java_mirrors.sh /tmp/harbor_configure_java_mirrors.sh
43
+ RUN chmod 0755 /tmp/harbor_configure_java_mirrors.sh \
44
+ && /bin/bash /tmp/harbor_configure_java_mirrors.sh "${PROGRAMGYM_MAVEN_MIRROR_URL}" "${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL}" "${PROGRAMGYM_JITPACK_REPOSITORY_URL}" \
45
+ && rm -f /tmp/harbor_configure_java_mirrors.sh
46
+ ENV DEBIAN_FRONTEND=noninteractive
47
+ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
48
+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
49
+ ENV GOTOOLCHAIN=auto
50
+ ENV UV_CACHE_DIR=/workspace/.cache/uv
51
+ ENV npm_config_cache=/workspace/.cache/npm
52
+ ENV HOME=/workspace
53
+ ENV XDG_CACHE_HOME=/workspace/.cache
54
+ ENV PIP_CACHE_DIR=/workspace/.cache/pip
55
+ ENV PYTHONUSERBASE=/workspace/.local
56
+ ENV PAGER=cat
57
+ ENV MANPAGER=cat
58
+ ENV LESS=-R
59
+ ENV TQDM_DISABLE=1
60
+ 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 unzip wget curl xz-utils bzip2 zip zstd patch python3-pytest python3-pytest-xdist python3-coverage tar && rm -rf /var/lib/apt/lists/*
61
+ ARG CMAKE_VERSION=3.31.10
62
+ RUN set -eux; python3 -m pip install --no-cache-dir "cmake==${CMAKE_VERSION}"; cmake --version; ctest --version; cpack --version
63
+ COPY programgym-gcc13.tar.gz /tmp/gcc.tar.gz
64
+ ARG GCC_VERSION=13.3.0
65
+ RUN set -eux; ARCH="$(dpkg --print-architecture)"; case "${ARCH}" in amd64) GCC_ARCH="x64" ;; arm64) GCC_ARCH="arm64" ;; *) echo "unsupported architecture for GCC 13: ${ARCH}" >&2; exit 1 ;; esac; if [ "${GCC_ARCH}" != "x64" ]; then echo "the staged GCC 13 archive is for x64, got ${GCC_ARCH}" >&2; exit 1; fi; rm -rf /opt/gcc-13; mkdir -p /opt/gcc-13; tar -xzf /tmp/gcc.tar.gz --strip-components=1 -C /opt/gcc-13; ln -sf /opt/gcc-13/bin/gcc /usr/local/bin/gcc; ln -sf /opt/gcc-13/bin/g++ /usr/local/bin/g++; ln -sf /opt/gcc-13/bin/gcc /usr/local/bin/cc; ln -sf /opt/gcc-13/bin/g++ /usr/local/bin/c++; ln -sf /opt/gcc-13/bin/gcc /usr/local/bin/gcc-13; ln -sf /opt/gcc-13/bin/g++ /usr/local/bin/g++-13; for PROGRAMGYM_GCOV_TOOL in gcov gcov-dump gcov-tool; do if [ -x "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" ]; then ln -sf "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" "/usr/local/bin/${PROGRAMGYM_GCOV_TOOL}"; ln -sf "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" "/usr/local/bin/${PROGRAMGYM_GCOV_TOOL}-13"; ln -sf "/opt/gcc-13/bin/${PROGRAMGYM_GCOV_TOOL}" "/usr/bin/${PROGRAMGYM_GCOV_TOOL}"; fi; done; ln -sf /opt/gcc-13/bin/gcc /usr/bin/gcc; ln -sf /opt/gcc-13/bin/g++ /usr/bin/g++; ln -sf /opt/gcc-13/bin/gcc /usr/bin/cc; ln -sf /opt/gcc-13/bin/g++ /usr/bin/c++; rm -f /tmp/gcc.tar.gz; gcc --version; g++ --version; gcov --version; command -v gcov-dump >/dev/null && gcov-dump --version | head -n 1 || true
66
+ # programgym_quota_aware_nproc=1
67
+ RUN set -eux; printf '%s\n' '#!/bin/sh' 'if [ "$#" -gt 0 ]; then exec /usr/bin/nproc "$@"; fi' 'visible="$(/usr/bin/nproc)"' 'quota=""' 'period=""' 'if [ -r /sys/fs/cgroup/cpu.max ]; then' ' set -- $(cat /sys/fs/cgroup/cpu.max)' ' quota="${1:-}"' ' period="${2:-}"' 'elif [ -r /sys/fs/cgroup/cpu/cpu.cfs_quota_us ] && [ -r /sys/fs/cgroup/cpu/cpu.cfs_period_us ]; then' ' quota="$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)"' ' period="$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)"' fi 'if [ -n "$quota" ] && [ "$quota" != max ] && [ "$quota" -gt 0 ] 2>/dev/null && [ "$period" -gt 0 ] 2>/dev/null; then' ' limit=$(( (quota + period - 1) / period ))' ' if [ "$limit" -lt 1 ]; then limit=1; fi' ' if [ "$limit" -lt "$visible" ]; then visible="$limit"; fi' fi 'printf "%s\n" "$visible"' > /usr/local/bin/nproc; chmod 0755 /usr/local/bin/nproc; /usr/local/bin/nproc >/dev/null
68
+ WORKDIR /workspace
69
+ ADD workspace.tar.gz /workspace/
70
+ COPY executable /workspace/executable
71
+ COPY download.sh /workspace/download.sh
72
+ RUN chmod 755 /workspace/download.sh
73
+ COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
74
+ RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
75
+ && /bin/bash /tmp/harbor_prepare_download_env.sh \
76
+ && rm -f /workspace/download.sh \
77
+ && rm -f /tmp/harbor_prepare_download_env.sh
78
+ ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
79
+ RUN chmod 111 /workspace/executable
80
+ WORKDIR /workspace
81
+ # Harbor uses tests/ as the separate verifier build context. Start with the
82
+ # same toolchain as the agent, then remove every cleanroom workspace artifact.
83
+ RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
84
+ && mkdir -p /workspace /tests
85
+
86
+ # Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
87
+ # Installing a newer pytest alone leaves that apt package importable and creates
88
+ # an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
89
+ # Install and constrain the verifier test runner as one coherent pip toolchain.
90
+ RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
91
+ ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
92
+ RUN set -eu; \
93
+ pip_break_system_packages=""; \
94
+ if python3 -m pip install --help | grep -q -- '--break-system-packages'; then \
95
+ pip_break_system_packages="--break-system-packages"; \
96
+ fi; \
97
+ python3 -m pip install ${pip_break_system_packages} \
98
+ --no-cache-dir --disable-pip-version-check --retries 10 --timeout 120 \
99
+ 'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
100
+
101
+ COPY test.sh /tests/test.sh
102
+ COPY programgym_evaluator.py /tests/programgym_evaluator.py
103
+ COPY programgym_task.json /tests/programgym_task.json
104
+ COPY blobs/ /tests/blobs/
105
+ RUN chmod +x /tests/test.sh
106
+ 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"]
neobrain--blobify.bcd0ad8/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:ad1bfcf17c0592b6aa909387a9a4c5e6003f966f3e3dcb9042729691fbcc9e8c
3
+ size 164181
neobrain--blobify.bcd0ad8/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:ee6faccb7dff8ab26949c7bc9711297cd44c1d143f06c9fd8840925b2ab77bba
3
+ size 16184
neobrain--blobify.bcd0ad8/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:707bc73af697f70e439f3dd736927e35ae7edc14af3960be9090a63a57d95b40
3
+ size 25659
neobrain--blobify.bcd0ad8/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:bc91ce4ca537dd7aaf1f6f4bbdd932247d674c4c427eeb36ce7c25308e40abf8
3
+ size 12654
neobrain--blobify.bcd0ad8/tests/blobs/tests/generated_upstream.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7724115761dbb842f8af5c657be8baa4c820d7cb2bff464174bd91c3f00f5fc2
3
+ size 7211
neobrain--blobify.bcd0ad8/tests/docker-compose.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ main:
3
+ build:
4
+ args:
5
+ PROGRAMGYM_APT_REPOSITORY_BASE_URL: ${PROGRAMGYM_APT_REPOSITORY_BASE_URL:-}
6
+ PROGRAMGYM_GOPROXY: ${PROGRAMGYM_GOPROXY:-https://proxy.golang.org,direct}
7
+ PROGRAMGYM_GOSUMDB: ${PROGRAMGYM_GOSUMDB:-sum.golang.org}
8
+ PROGRAMGYM_NPM_REGISTRY: ${PROGRAMGYM_NPM_REGISTRY:-https://registry.npmjs.org/}
9
+ PROGRAMGYM_NPM_STRICT_SSL: ${PROGRAMGYM_NPM_STRICT_SSL:-true}
10
+ PROGRAMGYM_PYPI_INDEX_URL: ${PROGRAMGYM_PYPI_INDEX_URL:-https://pypi.org/simple}
11
+ PROGRAMGYM_PYPI_TRUSTED_HOST: ${PROGRAMGYM_PYPI_TRUSTED_HOST:-}
12
+ PROGRAMGYM_UV_INSECURE_HOST: ${PROGRAMGYM_UV_INSECURE_HOST:-}
13
+ PROGRAMGYM_RUSTUP_DIST_SERVER: ${PROGRAMGYM_RUSTUP_DIST_SERVER:-https://static.rust-lang.org}
14
+ PROGRAMGYM_RUSTUP_UPDATE_ROOT: ${PROGRAMGYM_RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}
15
+ PROGRAMGYM_CARGO_INDEX: ${PROGRAMGYM_CARGO_INDEX:-sparse+https://index.crates.io/}
16
+ PROGRAMGYM_CARGO_NET_RETRY: ${PROGRAMGYM_CARGO_NET_RETRY:-10}
17
+ PROGRAMGYM_CARGO_HTTP_TIMEOUT: ${PROGRAMGYM_CARGO_HTTP_TIMEOUT:-600}
18
+ PROGRAMGYM_CARGO_HTTP_MULTIPLEXING: ${PROGRAMGYM_CARGO_HTTP_MULTIPLEXING:-false}
19
+ PROGRAMGYM_MAVEN_MIRROR_URL: ${PROGRAMGYM_MAVEN_MIRROR_URL:-}
20
+ PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL: ${PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL:-}
21
+ PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL: ${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL:-https://services.gradle.org/distributions}
22
+ PROGRAMGYM_JITPACK_REPOSITORY_URL: ${PROGRAMGYM_JITPACK_REPOSITORY_URL:-https://jitpack.io}
neobrain--blobify.bcd0ad8/tests/download.sh ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ #
3
+ # download.sh — ProgramGym download stage for blobify (neobrain/blobify).
4
+ #
5
+ # blobify is a header-only C++17 library. Building its example program
6
+ # (example-bmp) requires two header-only third-party dependencies that the
7
+ # repository declares as git submodules, but which are NOT present in the
8
+ # mounted source tree: boost::pfr (header layout include/boost/pfr/...) and
9
+ # magic_enum (header layout include/magic_enum/... + a top-level magic_enum.hpp).
10
+ #
11
+ # This file is standalone and source-safe. It downloads and unpacks those two
12
+ # header-only dependency archives into a cache directory and exports the
13
+ # variables that build.sh relies on. It must NOT compile, link, test, package,
14
+ # or run any build step, and it must NOT read any repository source file.
15
+ #
16
+ # All URLs and versions are pinned inline below.
17
+
18
+ set -u
19
+
20
+ # Cache directory for the dependency headers. build.sh reads the exported
21
+ # PROGRAMGYM_DEPS_DIR (set to ${HOME}/.programgym_deps) and passes its
22
+ # `include/` directory to CMake via CMAKE_INCLUDE_PATH.
23
+ export PROGRAMGYM_DEPS_DIR="${HOME}/.programgym_deps"
24
+ export PROGRAMGYM_DEPS_INCLUDE="${PROGRAMGYM_DEPS_DIR}/include"
25
+
26
+ # Pinned upstream releases (reproducible, header-only).
27
+ PFR_VERSION="boost-1.85.0"
28
+ PFR_URL="https://codeload.github.com/boostorg/pfr/tar.gz/refs/tags/${PFR_VERSION}"
29
+ MAGIC_ENUM_VERSION="v0.9.7"
30
+ MAGIC_ENUM_URL="https://codeload.github.com/Neargye/magic_enum/tar.gz/refs/tags/${MAGIC_ENUM_VERSION}"
31
+
32
+ # Failure helper that works whether this file is sourced or executed.
33
+ fail() {
34
+ echo "download.sh: ERROR: $1" >&2
35
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
36
+ return 1
37
+ else
38
+ exit 1
39
+ fi
40
+ }
41
+
42
+ # Idempotency: if the deps already exist and the marker file is present, we are
43
+ # done. Skip re-downloading so the stage is cheap to re-run.
44
+ marker="${PROGRAMGYM_DEPS_DIR}/.fetched"
45
+ if [ -f "${marker}" ] && [ -f "${PROGRAMGYM_DEPS_INCLUDE}/boost/pfr.hpp" ] && [ -f "${PROGRAMGYM_DEPS_INCLUDE}/magic_enum.hpp" ]; then
46
+ echo "download.sh: dependencies already present, skipping download."
47
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
48
+ return 0
49
+ else
50
+ exit 0
51
+ fi
52
+ fi
53
+
54
+ mkdir -p "${PROGRAMGYM_DEPS_INCLUDE}"
55
+
56
+ workdir="$(mktemp -d /tmp/blobify_dl_XXXXXX)" || fail "could not create temporary download directory"
57
+
58
+ # CURL is available in the base image. Ensure we fail loudly on HTTP errors.
59
+ set -e
60
+
61
+ # -- 1. Download and unpack boost::pfr --------------------------------------
62
+ pfr_archive="${workdir}/pfr.tar.gz"
63
+ if [ ! -f "${pfr_archive}" ]; then
64
+ curl --retry 5 --retry-all-errors --retry-delay 2 -sSL --fail --retry 3 --output "${pfr_archive}" "${PFR_URL}" \
65
+ || fail "failed to download boost::pfr from ${PFR_URL}"
66
+ fi
67
+
68
+ mkdir -p "${workdir}/pfr_src"
69
+ tar -xzf "${pfr_archive}" -C "${workdir}/pfr_src" || fail "failed to unpack boost::pfr archive"
70
+
71
+ # Locate the extracted top-level include directory (layout: <root>/include/boost/...).
72
+ pfr_root="$(find "${workdir}/pfr_src" -maxdepth 1 -type d -name 'pfr-*' | head -n 1)"
73
+ if [ -z "${pfr_root}" ]; then
74
+ fail "boost::pfr archive did not contain an expected top-level directory"
75
+ fi
76
+ pfr_include="${pfr_root}/include"
77
+ if [ -d "${pfr_include}/boost" ]; then
78
+ cp -r "${pfr_include}/boost" "${PROGRAMGYM_DEPS_INCLUDE}/boost"
79
+ else
80
+ fail "boost::pfr archive is missing its include/boost header tree"
81
+ fi
82
+
83
+ # -- 2. Download and unpack magic_enum ---------------------------------------
84
+ me_archive="${workdir}/magic_enum.tar.gz"
85
+ if [ ! -f "${me_archive}" ]; then
86
+ curl --retry 5 --retry-all-errors --retry-delay 2 -sSL --fail --retry 3 --output "${me_archive}" "${MAGIC_ENUM_URL}" \
87
+ || fail "failed to download magic_enum from ${MAGIC_ENUM_URL}"
88
+ fi
89
+
90
+ mkdir -p "${workdir}/me_src"
91
+ tar -xzf "${me_archive}" -C "${workdir}/me_src" || fail "failed to unpack magic_enum archive"
92
+
93
+ me_root="$(find "${workdir}/me_src" -maxdepth 1 -type d -name 'magic_enum-*' | head -n 1)"
94
+ if [ -z "${me_root}" ]; then
95
+ fail "magic_enum archive did not contain an expected top-level directory"
96
+ fi
97
+ me_include="${me_root}/include"
98
+ if [ -d "${me_include}/magic_enum" ]; then
99
+ cp -r "${me_include}/magic_enum" "${PROGRAMGYM_DEPS_INCLUDE}/magic_enum"
100
+ else
101
+ fail "magic_enum archive is missing its include/magic_enum header tree"
102
+ fi
103
+
104
+ # blobify's headers do `#include <magic_enum.hpp>` (top-level single header of
105
+ # old magic_enum releases). The vendored magic_enum exposes its content at
106
+ # <magic_enum/magic_enum.hpp>, so generate a thin top-level shim inline.
107
+ printf '%s\n' '#pragma once' '#include <magic_enum/magic_enum.hpp>' \
108
+ > "${PROGRAMGYM_DEPS_INCLUDE}/magic_enum.hpp" \
109
+ || fail "could not write magic_enum.hpp shim"
110
+
111
+ # -- 3. Leave a marker and clean up -------------------------------------------
112
+ touch "${marker}"
113
+ rm -rf "${workdir}"
114
+
115
+ echo "download.sh: dependencies installed into ${PROGRAMGYM_DEPS_DIR}"
116
+ echo "download.sh: exported PROGRAMGYM_DEPS_DIR=${PROGRAMGYM_DEPS_DIR}"
neobrain--blobify.bcd0ad8/tests/executable ADDED
Binary file (68.6 kB). View file
 
neobrain--blobify.bcd0ad8/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
neobrain--blobify.bcd0ad8/tests/harbor_configure_java_mirrors.sh ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ maven_url="${1%/}"
5
+ plugin_url="${2%/}"
6
+ jitpack_url="${3%/}"
7
+
8
+ install -d /workspace/.m2 /workspace/.gradle/init.d /opt/programgym/gradle-init
9
+ if [[ -n "$maven_url" ]]; then
10
+ cat >/workspace/.m2/settings.xml <<EOF
11
+ <?xml version="1.0" encoding="UTF-8"?>
12
+ <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0">
13
+ <mirrors>
14
+ <mirror>
15
+ <id>programgym-maven</id>
16
+ <name>ProgramGym Maven mirror</name>
17
+ <url>${maven_url}</url>
18
+ <mirrorOf>*</mirrorOf>
19
+ </mirror>
20
+ </mirrors>
21
+ </settings>
22
+ EOF
23
+ fi
24
+
25
+ cat >/opt/programgym/gradle-init/programgym-mirrors.gradle <<'EOF'
26
+ def pbMaven = System.getenv('PROGRAMGYM_MAVEN_MIRROR_URL')
27
+ def pbPlugins = System.getenv('PROGRAMGYM_GRADLE_PLUGIN_REPOSITORY_URL')
28
+ def pbJitpack = System.getenv('PROGRAMGYM_JITPACK_REPOSITORY_URL')
29
+
30
+ settingsEvaluated { settings ->
31
+ settings.pluginManagement.repositories {
32
+ if (pbPlugins) { maven { url = uri(pbPlugins) } }
33
+ if (pbMaven) { maven { url = uri(pbMaven) } }
34
+ }
35
+ }
36
+
37
+ allprojects {
38
+ buildscript.repositories {
39
+ if (pbPlugins) { maven { url = uri(pbPlugins) } }
40
+ if (pbMaven) { maven { url = uri(pbMaven) } }
41
+ if (pbJitpack) { maven { url = uri(pbJitpack) } }
42
+ }
43
+ repositories {
44
+ if (pbMaven) { maven { url = uri(pbMaven) } }
45
+ if (pbJitpack) { maven { url = uri(pbJitpack) } }
46
+ }
47
+ }
48
+ EOF
49
+ cp /opt/programgym/gradle-init/programgym-mirrors.gradle \
50
+ /workspace/.gradle/init.d/programgym-mirrors.gradle
neobrain--blobify.bcd0ad8/tests/harbor_prepare_download_env.sh ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ cd /workspace
4
+ set -a
5
+ if [[ -n "${PROGRAMGYM_MAVEN_MIRROR_URL:-}" ]]; then
6
+ sed -i -e "s|https://repo.maven.apache.org/maven2|${PROGRAMGYM_MAVEN_MIRROR_URL%/}|g" -e "s|https://repo1.maven.org/maven2|${PROGRAMGYM_MAVEN_MIRROR_URL%/}|g" /workspace/download.sh
7
+ fi
8
+ if [[ -n "${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL:-}" ]]; then
9
+ sed -i -e "s|https://services.gradle.org/distributions|${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL%/}|g" -e "s|https://downloads.gradle.org/distributions|${PROGRAMGYM_GRADLE_DISTRIBUTION_BASE_URL%/}|g" /workspace/download.sh
10
+ fi
11
+ if [[ -n "${PROGRAMGYM_JITPACK_REPOSITORY_URL:-}" ]]; then
12
+ sed -i -e "s|https://jitpack.io|${PROGRAMGYM_JITPACK_REPOSITORY_URL%/}|g" /workspace/download.sh
13
+ fi
14
+ source /workspace/download.sh
15
+ set +a
16
+ python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
17
+ import os
18
+ import shlex
19
+
20
+ ignored = {
21
+ "ALL_PROXY",
22
+ "HTTP_PROXY",
23
+ "HTTPS_PROXY",
24
+ "NO_PROXY",
25
+ "OLDPWD",
26
+ "PIP_PROXY",
27
+ "PWD",
28
+ "SHLVL",
29
+ "_",
30
+ "all_proxy",
31
+ "http_proxy",
32
+ "https_proxy",
33
+ "no_proxy",
34
+ "pip_proxy",
35
+ }
36
+ for key in sorted(os.environ):
37
+ if key in ignored or key.startswith("BASH_FUNC_"):
38
+ continue
39
+ value = os.environ[key]
40
+ if "\n" in value:
41
+ continue
42
+ print(f"export {key}={shlex.quote(value)}")
43
+ PY
44
+ chmod 0644 /etc/profile.d/programgym_download_env.sh
neobrain--blobify.bcd0ad8/tests/programgym-gcc13.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f67d082b220036c564f110ec9a2dffb736597685d2424761993561d836ebf88
3
+ size 146620404
neobrain--blobify.bcd0ad8/tests/programgym_evaluator.py ADDED
@@ -0,0 +1,1201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()
neobrain--blobify.bcd0ad8/tests/programgym_task.json ADDED
The diff for this file is too large to render. See raw diff
 
neobrain--blobify.bcd0ad8/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
neobrain--blobify.bcd0ad8/tests/workspace.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cebff9d633b210748f92d3fd891a01243bec6e2066d675b98b7cde70514d7e8
3
+ size 3817
neodyme-labs--solana-security-txt.ef36a4b/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"]
neodyme-labs--solana-security-txt.ef36a4b/environment/download.sh ADDED
@@ -0,0 +1,3494 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ #
3
+ # download.sh — ProgramGym networked dependency-prefetch stage.
4
+ #
5
+ # This script is standalone and source-safe. It runs `cargo fetch --locked`
6
+ # against a *generated* temporary workspace that mirrors the real repository's
7
+ # three member crates and reproduces the exact Cargo.lock, so that the offline
8
+ # `build.sh` later builds with a fully populated CARGO_HOME cache, using the
9
+ # precise locked versions, and no network. It never reads repository files and
10
+ # never compiles anything.
11
+
12
+ # Fail loudly if sourced with an error. download.sh is executed via
13
+ # `source /source_ro/download.sh`, so source mode is the normal path.
14
+ if [ "${BASH_SOURCE[0]}" != "$0" ]; then
15
+ _download_is_sourced=1
16
+ else
17
+ _download_is_sourced=0
18
+ fi
19
+
20
+ _download_fail() {
21
+ if [ "$_download_is_sourced" = "1" ]; then
22
+ return 1
23
+ else
24
+ exit 1
25
+ fi
26
+ }
27
+
28
+ # Use the persistent CARGO_HOME so the prefetched registry cache survives into
29
+ # the offline build stage.
30
+ export CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}"
31
+ export CARGO_TARGET_DIR="target"
32
+
33
+ # Create an isolated temporary workspace that mirrors the repository layout.
34
+ tmp_ws="$(mktemp -d)"
35
+ mkdir -p "$tmp_ws/security-txt/src" \
36
+ "$tmp_ws/query-security-txt/src" \
37
+ "$tmp_ws/example-contract/src"
38
+
39
+ # ---- workspace root manifest -------------------------------------------------
40
+ cat > "$tmp_ws/Cargo.toml" <<'EOF'
41
+ [workspace]
42
+ members = ["security-txt", "query-security-txt", "example-contract"]
43
+ resolver = "2"
44
+ EOF
45
+
46
+ # ---- security-txt crate (library, the core product) -------------------------
47
+ cat > "$tmp_ws/security-txt/Cargo.toml" <<'EOF'
48
+ [package]
49
+ name = "solana-security-txt"
50
+ version = "1.1.3"
51
+ edition = "2021"
52
+
53
+ [features]
54
+ parser = ["thiserror", "memchr"]
55
+
56
+ [dependencies]
57
+ thiserror = { version = "2", optional = true, default-features = false }
58
+ memchr = { version = "2", optional = true, default-features = false }
59
+ EOF
60
+
61
+ # Stub source so cargo resolves the declared [lib] path.
62
+ cat > "$tmp_ws/security-txt/src/lib.rs" <<'EOF'
63
+ #![no_std]
64
+ EOF
65
+
66
+ # ---- query-security-txt crate (the executable tool target) ------------------
67
+ cat > "$tmp_ws/query-security-txt/Cargo.toml" <<'EOF'
68
+ [package]
69
+ name = "query-security-txt"
70
+ version = "1.1.3"
71
+ edition = "2021"
72
+
73
+ [dependencies]
74
+ bincode = "1.3.3"
75
+ clap = { version = "3.1.6", features = ["derive"] }
76
+ color-eyre = "0.6.1"
77
+ solana-security-txt = { version = "1.1.2", path = "../security-txt", features = [
78
+ "parser",
79
+ ] }
80
+ solana-rpc-client = "3.0.10"
81
+ solana-loader-v3-interface = { version = "6.1.0", features = ["serde"] }
82
+ solana-pubkey = "4.0.0"
83
+ solana-sdk-ids = "3.0.0"
84
+ EOF
85
+
86
+ # Stub source so cargo resolves the declared [[bin]] path.
87
+ cat > "$tmp_ws/query-security-txt/src/main.rs" <<'EOF'
88
+ fn main() {}
89
+ EOF
90
+
91
+ # ---- example-contract crate (cdylib demo, kept for workspace parity) --------
92
+ cat > "$tmp_ws/example-contract/Cargo.toml" <<'EOF'
93
+ [package]
94
+ name = "example-contract"
95
+ version = "0.1.0"
96
+ edition = "2021"
97
+
98
+ [lib]
99
+ crate-type = ["cdylib", "lib"]
100
+ name = "example_contract"
101
+
102
+ [features]
103
+ no-entrypoint = []
104
+ no-idl = []
105
+ no-log-ix-name = []
106
+ cpi = ["no-entrypoint"]
107
+ default = []
108
+
109
+ [dependencies]
110
+ pinocchio = "0.9.2"
111
+ solana-security-txt = { path = "../security-txt" }
112
+ EOF
113
+
114
+ # Stub source so cargo resolves the declared [lib] path.
115
+ cat > "$tmp_ws/example-contract/src/lib.rs" <<'EOF'
116
+ EOF
117
+
118
+ # ---- Cargo.lock (exact reproduction of the repository lockfile) -------------
119
+ # The offline build.sh uses --locked against the repository's committed
120
+ # Cargo.lock. To guarantee that exactly the locked versions are prefetched into
121
+ # the CARGO_HOME cache, reproduce the lockfile byte-for-byte here and fetch
122
+ # with --locked. Content is emitted via identifiers chosen to avoid collision
123
+ # with quoted heredoc terminators.
124
+ cat > "$tmp_ws/Cargo.lock" <<'LOCKEOF'
125
+ # This file is automatically @generated by Cargo.
126
+ # It is not intended for manual editing.
127
+ version = 4
128
+
129
+ [[package]]
130
+ name = "addr2line"
131
+ version = "0.17.0"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
134
+ dependencies = [
135
+ "gimli",
136
+ ]
137
+
138
+ [[package]]
139
+ name = "adler"
140
+ version = "1.0.2"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
143
+
144
+ [[package]]
145
+ name = "agave-feature-set"
146
+ version = "3.0.10"
147
+ source = "registry+https://github.com/rust-lang/crates.io-index"
148
+ checksum = "be80c9787c7f30819e2999987cc6208c1ec6f775d7ed2b70f61a00a6e8acc0c8"
149
+ dependencies = [
150
+ "ahash",
151
+ "solana-epoch-schedule",
152
+ "solana-hash 3.1.0",
153
+ "solana-pubkey 3.0.0",
154
+ "solana-sha256-hasher",
155
+ "solana-svm-feature-set",
156
+ ]
157
+
158
+ [[package]]
159
+ name = "ahash"
160
+ version = "0.8.12"
161
+ source = "registry+https://github.com/rust-lang/crates.io-index"
162
+ checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
163
+ dependencies = [
164
+ "cfg-if",
165
+ "getrandom 0.3.4",
166
+ "once_cell",
167
+ "version_check",
168
+ "zerocopy",
169
+ ]
170
+
171
+ [[package]]
172
+ name = "alloc-no-stdlib"
173
+ version = "2.0.4"
174
+ source = "registry+https://github.com/rust-lang/crates.io-index"
175
+ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
176
+
177
+ [[package]]
178
+ name = "alloc-stdlib"
179
+ version = "0.2.2"
180
+ source = "registry+https://github.com/rust-lang/crates.io-index"
181
+ checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
182
+ dependencies = [
183
+ "alloc-no-stdlib",
184
+ ]
185
+
186
+ [[package]]
187
+ name = "anyhow"
188
+ version = "1.0.100"
189
+ source = "registry+https://github.com/rust-lang/crates.io-index"
190
+ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
191
+
192
+ [[package]]
193
+ name = "ascii"
194
+ version = "0.9.3"
195
+ source = "registry+https://github.com/rust-lang/crates.io-index"
196
+ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e"
197
+
198
+ [[package]]
199
+ name = "async-compression"
200
+ version = "0.4.33"
201
+ source = "registry+https://github.com/rust-lang/crates.io-index"
202
+ checksum = "93c1f86859c1af3d514fa19e8323147ff10ea98684e6c7b307912509f50e67b2"
203
+ dependencies = [
204
+ "compression-codecs",
205
+ "compression-core",
206
+ "futures-core",
207
+ "pin-project-lite",
208
+ "tokio",
209
+ ]
210
+
211
+ [[package]]
212
+ name = "async-trait"
213
+ version = "0.1.89"
214
+ source = "registry+https://github.com/rust-lang/crates.io-index"
215
+ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
216
+ dependencies = [
217
+ "proc-macro2",
218
+ "quote",
219
+ "syn 2.0.100",
220
+ ]
221
+
222
+ [[package]]
223
+ name = "atomic-waker"
224
+ version = "1.1.2"
225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
226
+ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
227
+
228
+ [[package]]
229
+ name = "atty"
230
+ version = "0.2.14"
231
+ source = "registry+https://github.com/rust-lang/crates.io-index"
232
+ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
233
+ dependencies = [
234
+ "hermit-abi",
235
+ "libc",
236
+ "winapi",
237
+ ]
238
+
239
+ [[package]]
240
+ name = "autocfg"
241
+ version = "1.1.0"
242
+ source = "registry+https://github.com/rust-lang/crates.io-index"
243
+ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
244
+
245
+ [[package]]
246
+ name = "backtrace"
247
+ version = "0.3.64"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f"
250
+ dependencies = [
251
+ "addr2line",
252
+ "cc",
253
+ "cfg-if",
254
+ "libc",
255
+ "miniz_oxide",
256
+ "object",
257
+ "rustc-demangle",
258
+ ]
259
+
260
+ [[package]]
261
+ name = "base64"
262
+ version = "0.22.1"
263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
264
+ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
265
+
266
+ [[package]]
267
+ name = "bincode"
268
+ version = "1.3.3"
269
+ source = "registry+https://github.com/rust-lang/crates.io-index"
270
+ checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
271
+ dependencies = [
272
+ "serde",
273
+ ]
274
+
275
+ [[package]]
276
+ name = "bitflags"
277
+ version = "1.3.2"
278
+ source = "registry+https://github.com/rust-lang/crates.io-index"
279
+ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
280
+
281
+ [[package]]
282
+ name = "bitflags"
283
+ version = "2.10.0"
284
+ source = "registry+https://github.com/rust-lang/crates.io-index"
285
+ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
286
+
287
+ [[package]]
288
+ name = "block-buffer"
289
+ version = "0.10.2"
290
+ source = "registry+https://github.com/rust-lang/crates.io-index"
291
+ checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
292
+ dependencies = [
293
+ "generic-array",
294
+ ]
295
+
296
+ [[package]]
297
+ name = "borsh"
298
+ version = "1.5.7"
299
+ source = "registry+https://github.com/rust-lang/crates.io-index"
300
+ checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce"
301
+ dependencies = [
302
+ "borsh-derive",
303
+ "cfg_aliases",
304
+ ]
305
+
306
+ [[package]]
307
+ name = "borsh-derive"
308
+ version = "1.5.7"
309
+ source = "registry+https://github.com/rust-lang/crates.io-index"
310
+ checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3"
311
+ dependencies = [
312
+ "once_cell",
313
+ "proc-macro-crate",
314
+ "proc-macro2",
315
+ "quote",
316
+ "syn 2.0.100",
317
+ ]
318
+
319
+ [[package]]
320
+ name = "brotli"
321
+ version = "8.0.2"
322
+ source = "registry+https://github.com/rust-lang/crates.io-index"
323
+ checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560"
324
+ dependencies = [
325
+ "alloc-no-stdlib",
326
+ "alloc-stdlib",
327
+ "brotli-decompressor",
328
+ ]
329
+
330
+ [[package]]
331
+ name = "brotli-decompressor"
332
+ version = "5.0.0"
333
+ source = "registry+https://github.com/rust-lang/crates.io-index"
334
+ checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
335
+ dependencies = [
336
+ "alloc-no-stdlib",
337
+ "alloc-stdlib",
338
+ ]
339
+
340
+ [[package]]
341
+ name = "bs58"
342
+ version = "0.5.1"
343
+ source = "registry+https://github.com/rust-lang/crates.io-index"
344
+ checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"
345
+ dependencies = [
346
+ "tinyvec",
347
+ ]
348
+
349
+ [[package]]
350
+ name = "bumpalo"
351
+ version = "3.9.1"
352
+ source = "registry+https://github.com/rust-lang/crates.io-index"
353
+ checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
354
+
355
+ [[package]]
356
+ name = "bv"
357
+ version = "0.11.1"
358
+ source = "registry+https://github.com/rust-lang/crates.io-index"
359
+ checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340"
360
+ dependencies = [
361
+ "feature-probe",
362
+ "serde",
363
+ ]
364
+
365
+ [[package]]
366
+ name = "bytemuck"
367
+ version = "1.24.0"
368
+ source = "registry+https://github.com/rust-lang/crates.io-index"
369
+ checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4"
370
+
371
+ [[package]]
372
+ name = "bytemuck_derive"
373
+ version = "1.10.2"
374
+ source = "registry+https://github.com/rust-lang/crates.io-index"
375
+ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff"
376
+ dependencies = [
377
+ "proc-macro2",
378
+ "quote",
379
+ "syn 2.0.100",
380
+ ]
381
+
382
+ [[package]]
383
+ name = "byteorder"
384
+ version = "1.4.3"
385
+ source = "registry+https://github.com/rust-lang/crates.io-index"
386
+ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
387
+
388
+ [[package]]
389
+ name = "bytes"
390
+ version = "1.10.1"
391
+ source = "registry+https://github.com/rust-lang/crates.io-index"
392
+ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
393
+
394
+ [[package]]
395
+ name = "cc"
396
+ version = "1.2.45"
397
+ source = "registry+https://github.com/rust-lang/crates.io-index"
398
+ checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe"
399
+ dependencies = [
400
+ "find-msvc-tools",
401
+ "jobserver",
402
+ "libc",
403
+ "shlex",
404
+ ]
405
+
406
+ [[package]]
407
+ name = "cfg-if"
408
+ version = "1.0.0"
409
+ source = "registry+https://github.com/rust-lang/crates.io-index"
410
+ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
411
+
412
+ [[package]]
413
+ name = "cfg_aliases"
414
+ version = "0.2.1"
415
+ source = "registry+https://github.com/rust-lang/crates.io-index"
416
+ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
417
+
418
+ [[package]]
419
+ name = "clap"
420
+ version = "3.1.6"
421
+ source = "registry+https://github.com/rust-lang/crates.io-index"
422
+ checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123"
423
+ dependencies = [
424
+ "atty",
425
+ "bitflags 1.3.2",
426
+ "clap_derive",
427
+ "indexmap 1.8.0",
428
+ "lazy_static",
429
+ "os_str_bytes",
430
+ "strsim",
431
+ "termcolor",
432
+ "textwrap",
433
+ ]
434
+
435
+ [[package]]
436
+ name = "clap_derive"
437
+ version = "3.1.4"
438
+ source = "registry+https://github.com/rust-lang/crates.io-index"
439
+ checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16"
440
+ dependencies = [
441
+ "heck",
442
+ "proc-macro-error",
443
+ "proc-macro2",
444
+ "quote",
445
+ "syn 1.0.86",
446
+ ]
447
+
448
+ [[package]]
449
+ name = "color-eyre"
450
+ version = "0.6.1"
451
+ source = "registry+https://github.com/rust-lang/crates.io-index"
452
+ checksum = "8ebf286c900a6d5867aeff75cfee3192857bb7f24b547d4f0df2ed6baa812c90"
453
+ dependencies = [
454
+ "backtrace",
455
+ "color-spantrace",
456
+ "eyre",
457
+ "indenter",
458
+ "once_cell",
459
+ "owo-colors",
460
+ "tracing-error",
461
+ ]
462
+
463
+ [[package]]
464
+ name = "color-spantrace"
465
+ version = "0.2.0"
466
+ source = "registry+https://github.com/rust-lang/crates.io-index"
467
+ checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce"
468
+ dependencies = [
469
+ "once_cell",
470
+ "owo-colors",
471
+ "tracing-core",
472
+ "tracing-error",
473
+ ]
474
+
475
+ [[package]]
476
+ name = "combine"
477
+ version = "3.8.1"
478
+ source = "registry+https://github.com/rust-lang/crates.io-index"
479
+ checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680"
480
+ dependencies = [
481
+ "ascii",
482
+ "byteorder",
483
+ "either",
484
+ "memchr",
485
+ "unreachable",
486
+ ]
487
+
488
+ [[package]]
489
+ name = "compression-codecs"
490
+ version = "0.4.32"
491
+ source = "registry+https://github.com/rust-lang/crates.io-index"
492
+ checksum = "680dc087785c5230f8e8843e2e57ac7c1c90488b6a91b88caa265410568f441b"
493
+ dependencies = [
494
+ "brotli",
495
+ "compression-core",
496
+ "flate2",
497
+ "memchr",
498
+ ]
499
+
500
+ [[package]]
501
+ name = "compression-core"
502
+ version = "0.4.30"
503
+ source = "registry+https://github.com/rust-lang/crates.io-index"
504
+ checksum = "3a9b614a5787ef0c8802a55766480563cb3a93b435898c422ed2a359cf811582"
505
+
506
+ [[package]]
507
+ name = "console"
508
+ version = "0.16.1"
509
+ source = "registry+https://github.com/rust-lang/crates.io-index"
510
+ checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4"
511
+ dependencies = [
512
+ "encode_unicode",
513
+ "libc",
514
+ "once_cell",
515
+ "unicode-width",
516
+ "windows-sys 0.61.2",
517
+ ]
518
+
519
+ [[package]]
520
+ name = "cpufeatures"
521
+ version = "0.2.17"
522
+ source = "registry+https://github.com/rust-lang/crates.io-index"
523
+ checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
524
+ dependencies = [
525
+ "libc",
526
+ ]
527
+
528
+ [[package]]
529
+ name = "crc32fast"
530
+ version = "1.3.2"
531
+ source = "registry+https://github.com/rust-lang/crates.io-index"
532
+ checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
533
+ dependencies = [
534
+ "cfg-if",
535
+ ]
536
+
537
+ [[package]]
538
+ name = "crypto-common"
539
+ version = "0.1.3"
540
+ source = "registry+https://github.com/rust-lang/crates.io-index"
541
+ checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8"
542
+ dependencies = [
543
+ "generic-array",
544
+ "typenum",
545
+ ]
546
+
547
+ [[package]]
548
+ name = "curve25519-dalek"
549
+ version = "4.1.3"
550
+ source = "registry+https://github.com/rust-lang/crates.io-index"
551
+ checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
552
+ dependencies = [
553
+ "cfg-if",
554
+ "cpufeatures",
555
+ "curve25519-dalek-derive",
556
+ "digest",
557
+ "fiat-crypto",
558
+ "rand_core",
559
+ "rustc_version",
560
+ "subtle",
561
+ "zeroize",
562
+ ]
563
+
564
+ [[package]]
565
+ name = "curve25519-dalek-derive"
566
+ version = "0.1.1"
567
+ source = "registry+https://github.com/rust-lang/crates.io-index"
568
+ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
569
+ dependencies = [
570
+ "proc-macro2",
571
+ "quote",
572
+ "syn 2.0.100",
573
+ ]
574
+
575
+ [[package]]
576
+ name = "digest"
577
+ version = "0.10.7"
578
+ source = "registry+https://github.com/rust-lang/crates.io-index"
579
+ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
580
+ dependencies = [
581
+ "block-buffer",
582
+ "crypto-common",
583
+ ]
584
+
585
+ [[package]]
586
+ name = "displaydoc"
587
+ version = "0.2.5"
588
+ source = "registry+https://github.com/rust-lang/crates.io-index"
589
+ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
590
+ dependencies = [
591
+ "proc-macro2",
592
+ "quote",
593
+ "syn 2.0.100",
594
+ ]
595
+
596
+ [[package]]
597
+ name = "either"
598
+ version = "1.6.1"
599
+ source = "registry+https://github.com/rust-lang/crates.io-index"
600
+ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
601
+
602
+ [[package]]
603
+ name = "encode_unicode"
604
+ version = "1.0.0"
605
+ source = "registry+https://github.com/rust-lang/crates.io-index"
606
+ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
607
+
608
+ [[package]]
609
+ name = "equivalent"
610
+ version = "1.0.2"
611
+ source = "registry+https://github.com/rust-lang/crates.io-index"
612
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
613
+
614
+ [[package]]
615
+ name = "example-contract"
616
+ version = "0.1.0"
617
+ dependencies = [
618
+ "pinocchio",
619
+ "solana-security-txt",
620
+ ]
621
+
622
+ [[package]]
623
+ name = "eyre"
624
+ version = "0.6.7"
625
+ source = "registry+https://github.com/rust-lang/crates.io-index"
626
+ checksum = "9289ed2c0440a6536e65119725cf91fc2c6b5e513bfd2e36e1134d7cca6ca12f"
627
+ dependencies = [
628
+ "indenter",
629
+ "once_cell",
630
+ ]
631
+
632
+ [[package]]
633
+ name = "feature-probe"
634
+ version = "0.1.1"
635
+ source = "registry+https://github.com/rust-lang/crates.io-index"
636
+ checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da"
637
+
638
+ [[package]]
639
+ name = "fiat-crypto"
640
+ version = "0.2.9"
641
+ source = "registry+https://github.com/rust-lang/crates.io-index"
642
+ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
643
+
644
+ [[package]]
645
+ name = "find-msvc-tools"
646
+ version = "0.1.4"
647
+ source = "registry+https://github.com/rust-lang/crates.io-index"
648
+ checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127"
649
+
650
+ [[package]]
651
+ name = "five8"
652
+ version = "0.2.1"
653
+ source = "registry+https://github.com/rust-lang/crates.io-index"
654
+ checksum = "a75b8549488b4715defcb0d8a8a1c1c76a80661b5fa106b4ca0e7fce59d7d875"
655
+ dependencies = [
656
+ "five8_core 0.1.2",
657
+ ]
658
+
659
+ [[package]]
660
+ name = "five8"
661
+ version = "1.0.0"
662
+ source = "registry+https://github.com/rust-lang/crates.io-index"
663
+ checksum = "23f76610e969fa1784327ded240f1e28a3fd9520c9cec93b636fcf62dd37f772"
664
+ dependencies = [
665
+ "five8_core 1.0.0",
666
+ ]
667
+
668
+ [[package]]
669
+ name = "five8_const"
670
+ version = "1.0.0"
671
+ source = "registry+https://github.com/rust-lang/crates.io-index"
672
+ checksum = "1a0f1728185f277989ca573a402716ae0beaaea3f76a8ff87ef9dd8fb19436c5"
673
+ dependencies = [
674
+ "five8_core 1.0.0",
675
+ ]
676
+
677
+ [[package]]
678
+ name = "five8_core"
679
+ version = "0.1.2"
680
+ source = "registry+https://github.com/rust-lang/crates.io-index"
681
+ checksum = "2551bf44bc5f776c15044b9b94153a00198be06743e262afaaa61f11ac7523a5"
682
+
683
+ [[package]]
684
+ name = "five8_core"
685
+ version = "1.0.0"
686
+ source = "registry+https://github.com/rust-lang/crates.io-index"
687
+ checksum = "059c31d7d36c43fe39d89e55711858b4da8be7eb6dabac23c7289b1a19489406"
688
+
689
+ [[package]]
690
+ name = "flate2"
691
+ version = "1.0.22"
692
+ source = "registry+https://github.com/rust-lang/crates.io-index"
693
+ checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f"
694
+ dependencies = [
695
+ "cfg-if",
696
+ "crc32fast",
697
+ "libc",
698
+ "miniz_oxide",
699
+ ]
700
+
701
+ [[package]]
702
+ name = "fnv"
703
+ version = "1.0.7"
704
+ source = "registry+https://github.com/rust-lang/crates.io-index"
705
+ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
706
+
707
+ [[package]]
708
+ name = "form_urlencoded"
709
+ version = "1.2.2"
710
+ source = "registry+https://github.com/rust-lang/crates.io-index"
711
+ checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
712
+ dependencies = [
713
+ "percent-encoding",
714
+ ]
715
+
716
+ [[package]]
717
+ name = "futures"
718
+ version = "0.3.31"
719
+ source = "registry+https://github.com/rust-lang/crates.io-index"
720
+ checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
721
+ dependencies = [
722
+ "futures-channel",
723
+ "futures-core",
724
+ "futures-executor",
725
+ "futures-io",
726
+ "futures-sink",
727
+ "futures-task",
728
+ "futures-util",
729
+ ]
730
+
731
+ [[package]]
732
+ name = "futures-channel"
733
+ version = "0.3.31"
734
+ source = "registry+https://github.com/rust-lang/crates.io-index"
735
+ checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
736
+ dependencies = [
737
+ "futures-core",
738
+ "futures-sink",
739
+ ]
740
+
741
+ [[package]]
742
+ name = "futures-core"
743
+ version = "0.3.31"
744
+ source = "registry+https://github.com/rust-lang/crates.io-index"
745
+ checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
746
+
747
+ [[package]]
748
+ name = "futures-executor"
749
+ version = "0.3.31"
750
+ source = "registry+https://github.com/rust-lang/crates.io-index"
751
+ checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
752
+ dependencies = [
753
+ "futures-core",
754
+ "futures-task",
755
+ "futures-util",
756
+ ]
757
+
758
+ [[package]]
759
+ name = "futures-io"
760
+ version = "0.3.31"
761
+ source = "registry+https://github.com/rust-lang/crates.io-index"
762
+ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
763
+
764
+ [[package]]
765
+ name = "futures-macro"
766
+ version = "0.3.31"
767
+ source = "registry+https://github.com/rust-lang/crates.io-index"
768
+ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
769
+ dependencies = [
770
+ "proc-macro2",
771
+ "quote",
772
+ "syn 2.0.100",
773
+ ]
774
+
775
+ [[package]]
776
+ name = "futures-sink"
777
+ version = "0.3.31"
778
+ source = "registry+https://github.com/rust-lang/crates.io-index"
779
+ checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
780
+
781
+ [[package]]
782
+ name = "futures-task"
783
+ version = "0.3.31"
784
+ source = "registry+https://github.com/rust-lang/crates.io-index"
785
+ checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
786
+
787
+ [[package]]
788
+ name = "futures-util"
789
+ version = "0.3.31"
790
+ source = "registry+https://github.com/rust-lang/crates.io-index"
791
+ checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
792
+ dependencies = [
793
+ "futures-channel",
794
+ "futures-core",
795
+ "futures-io",
796
+ "futures-macro",
797
+ "futures-sink",
798
+ "futures-task",
799
+ "memchr",
800
+ "pin-project-lite",
801
+ "pin-utils",
802
+ "slab",
803
+ ]
804
+
805
+ [[package]]
806
+ name = "generic-array"
807
+ version = "0.14.5"
808
+ source = "registry+https://github.com/rust-lang/crates.io-index"
809
+ checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803"
810
+ dependencies = [
811
+ "typenum",
812
+ "version_check",
813
+ ]
814
+
815
+ [[package]]
816
+ name = "getrandom"
817
+ version = "0.2.16"
818
+ source = "registry+https://github.com/rust-lang/crates.io-index"
819
+ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
820
+ dependencies = [
821
+ "cfg-if",
822
+ "libc",
823
+ "wasi",
824
+ ]
825
+
826
+ [[package]]
827
+ name = "getrandom"
828
+ version = "0.3.4"
829
+ source = "registry+https://github.com/rust-lang/crates.io-index"
830
+ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
831
+ dependencies = [
832
+ "cfg-if",
833
+ "libc",
834
+ "r-efi",
835
+ "wasip2",
836
+ ]
837
+
838
+ [[package]]
839
+ name = "gimli"
840
+ version = "0.26.1"
841
+ source = "registry+https://github.com/rust-lang/crates.io-index"
842
+ checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
843
+
844
+ [[package]]
845
+ name = "hash32"
846
+ version = "0.3.1"
847
+ source = "registry+https://github.com/rust-lang/crates.io-index"
848
+ checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606"
849
+ dependencies = [
850
+ "byteorder",
851
+ ]
852
+
853
+ [[package]]
854
+ name = "hashbrown"
855
+ version = "0.11.2"
856
+ source = "registry+https://github.com/rust-lang/crates.io-index"
857
+ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
858
+
859
+ [[package]]
860
+ name = "hashbrown"
861
+ version = "0.16.0"
862
+ source = "registry+https://github.com/rust-lang/crates.io-index"
863
+ checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
864
+
865
+ [[package]]
866
+ name = "heck"
867
+ version = "0.4.0"
868
+ source = "registry+https://github.com/rust-lang/crates.io-index"
869
+ checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
870
+
871
+ [[package]]
872
+ name = "hermit-abi"
873
+ version = "0.1.19"
874
+ source = "registry+https://github.com/rust-lang/crates.io-index"
875
+ checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
876
+ dependencies = [
877
+ "libc",
878
+ ]
879
+
880
+ [[package]]
881
+ name = "http"
882
+ version = "1.3.1"
883
+ source = "registry+https://github.com/rust-lang/crates.io-index"
884
+ checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
885
+ dependencies = [
886
+ "bytes",
887
+ "fnv",
888
+ "itoa",
889
+ ]
890
+
891
+ [[package]]
892
+ name = "http-body"
893
+ version = "1.0.1"
894
+ source = "registry+https://github.com/rust-lang/crates.io-index"
895
+ checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
896
+ dependencies = [
897
+ "bytes",
898
+ "http",
899
+ ]
900
+
901
+ [[package]]
902
+ name = "http-body-util"
903
+ version = "0.1.3"
904
+ source = "registry+https://github.com/rust-lang/crates.io-index"
905
+ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
906
+ dependencies = [
907
+ "bytes",
908
+ "futures-core",
909
+ "http",
910
+ "http-body",
911
+ "pin-project-lite",
912
+ ]
913
+
914
+ [[package]]
915
+ name = "httparse"
916
+ version = "1.10.1"
917
+ source = "registry+https://github.com/rust-lang/crates.io-index"
918
+ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
919
+
920
+ [[package]]
921
+ name = "hyper"
922
+ version = "1.8.0"
923
+ source = "registry+https://github.com/rust-lang/crates.io-index"
924
+ checksum = "1744436df46f0bde35af3eda22aeaba453aada65d8f1c171cd8a5f59030bd69f"
925
+ dependencies = [
926
+ "atomic-waker",
927
+ "bytes",
928
+ "futures-channel",
929
+ "futures-core",
930
+ "http",
931
+ "http-body",
932
+ "httparse",
933
+ "itoa",
934
+ "pin-project-lite",
935
+ "pin-utils",
936
+ "smallvec",
937
+ "tokio",
938
+ "want",
939
+ ]
940
+
941
+ [[package]]
942
+ name = "hyper-rustls"
943
+ version = "0.27.7"
944
+ source = "registry+https://github.com/rust-lang/crates.io-index"
945
+ checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58"
946
+ dependencies = [
947
+ "http",
948
+ "hyper",
949
+ "hyper-util",
950
+ "rustls",
951
+ "rustls-pki-types",
952
+ "tokio",
953
+ "tokio-rustls",
954
+ "tower-service",
955
+ "webpki-roots",
956
+ ]
957
+
958
+ [[package]]
959
+ name = "hyper-util"
960
+ version = "0.1.17"
961
+ source = "registry+https://github.com/rust-lang/crates.io-index"
962
+ checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8"
963
+ dependencies = [
964
+ "base64",
965
+ "bytes",
966
+ "futures-channel",
967
+ "futures-core",
968
+ "futures-util",
969
+ "http",
970
+ "http-body",
971
+ "hyper",
972
+ "ipnet",
973
+ "libc",
974
+ "percent-encoding",
975
+ "pin-project-lite",
976
+ "socket2 0.6.1",
977
+ "tokio",
978
+ "tower-service",
979
+ "tracing",
980
+ ]
981
+
982
+ [[package]]
983
+ name = "icu_collections"
984
+ version = "2.1.1"
985
+ source = "registry+https://github.com/rust-lang/crates.io-index"
986
+ checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
987
+ dependencies = [
988
+ "displaydoc",
989
+ "potential_utf",
990
+ "yoke",
991
+ "zerofrom",
992
+ "zerovec",
993
+ ]
994
+
995
+ [[package]]
996
+ name = "icu_locale_core"
997
+ version = "2.1.1"
998
+ source = "registry+https://github.com/rust-lang/crates.io-index"
999
+ checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
1000
+ dependencies = [
1001
+ "displaydoc",
1002
+ "litemap",
1003
+ "tinystr",
1004
+ "writeable",
1005
+ "zerovec",
1006
+ ]
1007
+
1008
+ [[package]]
1009
+ name = "icu_normalizer"
1010
+ version = "2.1.1"
1011
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1012
+ checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
1013
+ dependencies = [
1014
+ "icu_collections",
1015
+ "icu_normalizer_data",
1016
+ "icu_properties",
1017
+ "icu_provider",
1018
+ "smallvec",
1019
+ "zerovec",
1020
+ ]
1021
+
1022
+ [[package]]
1023
+ name = "icu_normalizer_data"
1024
+ version = "2.1.1"
1025
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1026
+ checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
1027
+
1028
+ [[package]]
1029
+ name = "icu_properties"
1030
+ version = "2.1.1"
1031
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1032
+ checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99"
1033
+ dependencies = [
1034
+ "icu_collections",
1035
+ "icu_locale_core",
1036
+ "icu_properties_data",
1037
+ "icu_provider",
1038
+ "zerotrie",
1039
+ "zerovec",
1040
+ ]
1041
+
1042
+ [[package]]
1043
+ name = "icu_properties_data"
1044
+ version = "2.1.1"
1045
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1046
+ checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899"
1047
+
1048
+ [[package]]
1049
+ name = "icu_provider"
1050
+ version = "2.1.1"
1051
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1052
+ checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
1053
+ dependencies = [
1054
+ "displaydoc",
1055
+ "icu_locale_core",
1056
+ "writeable",
1057
+ "yoke",
1058
+ "zerofrom",
1059
+ "zerotrie",
1060
+ "zerovec",
1061
+ ]
1062
+
1063
+ [[package]]
1064
+ name = "idna"
1065
+ version = "1.1.0"
1066
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1067
+ checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
1068
+ dependencies = [
1069
+ "idna_adapter",
1070
+ "smallvec",
1071
+ "utf8_iter",
1072
+ ]
1073
+
1074
+ [[package]]
1075
+ name = "idna_adapter"
1076
+ version = "1.2.1"
1077
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1078
+ checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
1079
+ dependencies = [
1080
+ "icu_normalizer",
1081
+ "icu_properties",
1082
+ ]
1083
+
1084
+ [[package]]
1085
+ name = "indenter"
1086
+ version = "0.3.3"
1087
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1088
+ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
1089
+
1090
+ [[package]]
1091
+ name = "indexmap"
1092
+ version = "1.8.0"
1093
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1094
+ checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
1095
+ dependencies = [
1096
+ "autocfg",
1097
+ "hashbrown 0.11.2",
1098
+ ]
1099
+
1100
+ [[package]]
1101
+ name = "indexmap"
1102
+ version = "2.12.0"
1103
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1104
+ checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
1105
+ dependencies = [
1106
+ "equivalent",
1107
+ "hashbrown 0.16.0",
1108
+ ]
1109
+
1110
+ [[package]]
1111
+ name = "indicatif"
1112
+ version = "0.18.3"
1113
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1114
+ checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88"
1115
+ dependencies = [
1116
+ "console",
1117
+ "portable-atomic",
1118
+ "unicode-width",
1119
+ "unit-prefix",
1120
+ "web-time",
1121
+ ]
1122
+
1123
+ [[package]]
1124
+ name = "ipnet"
1125
+ version = "2.11.0"
1126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1127
+ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
1128
+
1129
+ [[package]]
1130
+ name = "iri-string"
1131
+ version = "0.7.9"
1132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1133
+ checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397"
1134
+ dependencies = [
1135
+ "memchr",
1136
+ "serde",
1137
+ ]
1138
+
1139
+ [[package]]
1140
+ name = "itoa"
1141
+ version = "1.0.1"
1142
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1143
+ checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
1144
+
1145
+ [[package]]
1146
+ name = "jobserver"
1147
+ version = "0.1.34"
1148
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1149
+ checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
1150
+ dependencies = [
1151
+ "getrandom 0.3.4",
1152
+ "libc",
1153
+ ]
1154
+
1155
+ [[package]]
1156
+ name = "js-sys"
1157
+ version = "0.3.82"
1158
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1159
+ checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65"
1160
+ dependencies = [
1161
+ "once_cell",
1162
+ "wasm-bindgen",
1163
+ ]
1164
+
1165
+ [[package]]
1166
+ name = "jsonrpc-core"
1167
+ version = "18.0.0"
1168
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1169
+ checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
1170
+ dependencies = [
1171
+ "futures",
1172
+ "futures-executor",
1173
+ "futures-util",
1174
+ "log",
1175
+ "serde",
1176
+ "serde_derive",
1177
+ "serde_json",
1178
+ ]
1179
+
1180
+ [[package]]
1181
+ name = "lazy_static"
1182
+ version = "1.5.0"
1183
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1184
+ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
1185
+
1186
+ [[package]]
1187
+ name = "libc"
1188
+ version = "0.2.177"
1189
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1190
+ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
1191
+
1192
+ [[package]]
1193
+ name = "litemap"
1194
+ version = "0.8.1"
1195
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1196
+ checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
1197
+
1198
+ [[package]]
1199
+ name = "lock_api"
1200
+ version = "0.4.6"
1201
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1202
+ checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
1203
+ dependencies = [
1204
+ "scopeguard",
1205
+ ]
1206
+
1207
+ [[package]]
1208
+ name = "log"
1209
+ version = "0.4.28"
1210
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1211
+ checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
1212
+
1213
+ [[package]]
1214
+ name = "memchr"
1215
+ version = "2.7.6"
1216
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1217
+ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
1218
+
1219
+ [[package]]
1220
+ name = "miniz_oxide"
1221
+ version = "0.4.4"
1222
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1223
+ checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
1224
+ dependencies = [
1225
+ "adler",
1226
+ "autocfg",
1227
+ ]
1228
+
1229
+ [[package]]
1230
+ name = "mio"
1231
+ version = "1.1.0"
1232
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1233
+ checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873"
1234
+ dependencies = [
1235
+ "libc",
1236
+ "wasi",
1237
+ "windows-sys 0.61.2",
1238
+ ]
1239
+
1240
+ [[package]]
1241
+ name = "num-derive"
1242
+ version = "0.4.2"
1243
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1244
+ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
1245
+ dependencies = [
1246
+ "proc-macro2",
1247
+ "quote",
1248
+ "syn 2.0.100",
1249
+ ]
1250
+
1251
+ [[package]]
1252
+ name = "num-traits"
1253
+ version = "0.2.19"
1254
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1255
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
1256
+ dependencies = [
1257
+ "autocfg",
1258
+ ]
1259
+
1260
+ [[package]]
1261
+ name = "object"
1262
+ version = "0.27.1"
1263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1264
+ checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9"
1265
+ dependencies = [
1266
+ "memchr",
1267
+ ]
1268
+
1269
+ [[package]]
1270
+ name = "once_cell"
1271
+ version = "1.21.3"
1272
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1273
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
1274
+
1275
+ [[package]]
1276
+ name = "os_str_bytes"
1277
+ version = "6.0.0"
1278
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1279
+ checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
1280
+ dependencies = [
1281
+ "memchr",
1282
+ ]
1283
+
1284
+ [[package]]
1285
+ name = "owo-colors"
1286
+ version = "3.2.0"
1287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1288
+ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4"
1289
+
1290
+ [[package]]
1291
+ name = "parking_lot"
1292
+ version = "0.12.0"
1293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1294
+ checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
1295
+ dependencies = [
1296
+ "lock_api",
1297
+ "parking_lot_core",
1298
+ ]
1299
+
1300
+ [[package]]
1301
+ name = "parking_lot_core"
1302
+ version = "0.9.1"
1303
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1304
+ checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954"
1305
+ dependencies = [
1306
+ "cfg-if",
1307
+ "libc",
1308
+ "redox_syscall",
1309
+ "smallvec",
1310
+ "windows-sys 0.32.0",
1311
+ ]
1312
+
1313
+ [[package]]
1314
+ name = "percent-encoding"
1315
+ version = "2.3.2"
1316
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1317
+ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
1318
+
1319
+ [[package]]
1320
+ name = "pin-project-lite"
1321
+ version = "0.2.16"
1322
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1323
+ checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
1324
+
1325
+ [[package]]
1326
+ name = "pin-utils"
1327
+ version = "0.1.0"
1328
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1329
+ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
1330
+
1331
+ [[package]]
1332
+ name = "pinocchio"
1333
+ version = "0.9.2"
1334
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1335
+ checksum = "5b971851087bc3699b001954ad02389d50c41405ece3548cbcafc88b3e20017a"
1336
+
1337
+ [[package]]
1338
+ name = "pkg-config"
1339
+ version = "0.3.32"
1340
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1341
+ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
1342
+
1343
+ [[package]]
1344
+ name = "portable-atomic"
1345
+ version = "1.11.1"
1346
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1347
+ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
1348
+
1349
+ [[package]]
1350
+ name = "potential_utf"
1351
+ version = "0.1.4"
1352
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1353
+ checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
1354
+ dependencies = [
1355
+ "zerovec",
1356
+ ]
1357
+
1358
+ [[package]]
1359
+ name = "ppv-lite86"
1360
+ version = "0.2.16"
1361
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1362
+ checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
1363
+
1364
+ [[package]]
1365
+ name = "proc-macro-crate"
1366
+ version = "3.4.0"
1367
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1368
+ checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983"
1369
+ dependencies = [
1370
+ "toml_edit",
1371
+ ]
1372
+
1373
+ [[package]]
1374
+ name = "proc-macro-error"
1375
+ version = "1.0.4"
1376
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1377
+ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
1378
+ dependencies = [
1379
+ "proc-macro-error-attr",
1380
+ "proc-macro2",
1381
+ "quote",
1382
+ "syn 1.0.86",
1383
+ "version_check",
1384
+ ]
1385
+
1386
+ [[package]]
1387
+ name = "proc-macro-error-attr"
1388
+ version = "1.0.4"
1389
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1390
+ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
1391
+ dependencies = [
1392
+ "proc-macro2",
1393
+ "quote",
1394
+ "version_check",
1395
+ ]
1396
+
1397
+ [[package]]
1398
+ name = "proc-macro2"
1399
+ version = "1.0.94"
1400
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1401
+ checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
1402
+ dependencies = [
1403
+ "unicode-ident",
1404
+ ]
1405
+
1406
+ [[package]]
1407
+ name = "query-security-txt"
1408
+ version = "1.1.3"
1409
+ dependencies = [
1410
+ "bincode",
1411
+ "clap",
1412
+ "color-eyre",
1413
+ "solana-loader-v3-interface",
1414
+ "solana-pubkey 4.0.0",
1415
+ "solana-rpc-client",
1416
+ "solana-sdk-ids",
1417
+ "solana-security-txt",
1418
+ ]
1419
+
1420
+ [[package]]
1421
+ name = "quinn"
1422
+ version = "0.11.4"
1423
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1424
+ checksum = "a2d2fb862b7ba45e615c1429def928f2e15f815bdf933b27a2d3824e224c1f46"
1425
+ dependencies = [
1426
+ "bytes",
1427
+ "pin-project-lite",
1428
+ "quinn-proto",
1429
+ "quinn-udp",
1430
+ "rustc-hash",
1431
+ "rustls",
1432
+ "socket2 0.5.10",
1433
+ "thiserror 1.0.30",
1434
+ "tokio",
1435
+ "tracing",
1436
+ ]
1437
+
1438
+ [[package]]
1439
+ name = "quinn-proto"
1440
+ version = "0.11.6"
1441
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1442
+ checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd"
1443
+ dependencies = [
1444
+ "bytes",
1445
+ "rand",
1446
+ "ring",
1447
+ "rustc-hash",
1448
+ "rustls",
1449
+ "slab",
1450
+ "thiserror 1.0.30",
1451
+ "tinyvec",
1452
+ "tracing",
1453
+ ]
1454
+
1455
+ [[package]]
1456
+ name = "quinn-udp"
1457
+ version = "0.5.14"
1458
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1459
+ checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
1460
+ dependencies = [
1461
+ "cfg_aliases",
1462
+ "libc",
1463
+ "once_cell",
1464
+ "socket2 0.6.1",
1465
+ "tracing",
1466
+ "windows-sys 0.60.2",
1467
+ ]
1468
+
1469
+ [[package]]
1470
+ name = "quote"
1471
+ version = "1.0.40"
1472
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1473
+ checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
1474
+ dependencies = [
1475
+ "proc-macro2",
1476
+ ]
1477
+
1478
+ [[package]]
1479
+ name = "r-efi"
1480
+ version = "5.3.0"
1481
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1482
+ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
1483
+
1484
+ [[package]]
1485
+ name = "rand"
1486
+ version = "0.8.5"
1487
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1488
+ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
1489
+ dependencies = [
1490
+ "libc",
1491
+ "rand_chacha",
1492
+ "rand_core",
1493
+ ]
1494
+
1495
+ [[package]]
1496
+ name = "rand_chacha"
1497
+ version = "0.3.1"
1498
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1499
+ checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
1500
+ dependencies = [
1501
+ "ppv-lite86",
1502
+ "rand_core",
1503
+ ]
1504
+
1505
+ [[package]]
1506
+ name = "rand_core"
1507
+ version = "0.6.4"
1508
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1509
+ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
1510
+ dependencies = [
1511
+ "getrandom 0.2.16",
1512
+ ]
1513
+
1514
+ [[package]]
1515
+ name = "redox_syscall"
1516
+ version = "0.2.11"
1517
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1518
+ checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c"
1519
+ dependencies = [
1520
+ "bitflags 1.3.2",
1521
+ ]
1522
+
1523
+ [[package]]
1524
+ name = "reqwest"
1525
+ version = "0.12.24"
1526
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1527
+ checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f"
1528
+ dependencies = [
1529
+ "async-compression",
1530
+ "base64",
1531
+ "bytes",
1532
+ "futures-channel",
1533
+ "futures-core",
1534
+ "futures-util",
1535
+ "http",
1536
+ "http-body",
1537
+ "http-body-util",
1538
+ "hyper",
1539
+ "hyper-rustls",
1540
+ "hyper-util",
1541
+ "js-sys",
1542
+ "log",
1543
+ "percent-encoding",
1544
+ "pin-project-lite",
1545
+ "quinn",
1546
+ "rustls",
1547
+ "rustls-pki-types",
1548
+ "serde",
1549
+ "serde_json",
1550
+ "serde_urlencoded",
1551
+ "sync_wrapper",
1552
+ "tokio",
1553
+ "tokio-rustls",
1554
+ "tokio-util",
1555
+ "tower",
1556
+ "tower-http",
1557
+ "tower-service",
1558
+ "url",
1559
+ "wasm-bindgen",
1560
+ "wasm-bindgen-futures",
1561
+ "web-sys",
1562
+ "webpki-roots",
1563
+ ]
1564
+
1565
+ [[package]]
1566
+ name = "reqwest-middleware"
1567
+ version = "0.4.2"
1568
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1569
+ checksum = "57f17d28a6e6acfe1733fe24bcd30774d13bffa4b8a22535b4c8c98423088d4e"
1570
+ dependencies = [
1571
+ "anyhow",
1572
+ "async-trait",
1573
+ "http",
1574
+ "reqwest",
1575
+ "serde",
1576
+ "thiserror 1.0.30",
1577
+ "tower-service",
1578
+ ]
1579
+
1580
+ [[package]]
1581
+ name = "ring"
1582
+ version = "0.17.14"
1583
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1584
+ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
1585
+ dependencies = [
1586
+ "cc",
1587
+ "cfg-if",
1588
+ "getrandom 0.2.16",
1589
+ "libc",
1590
+ "untrusted",
1591
+ "windows-sys 0.52.0",
1592
+ ]
1593
+
1594
+ [[package]]
1595
+ name = "rustc-demangle"
1596
+ version = "0.1.21"
1597
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1598
+ checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
1599
+
1600
+ [[package]]
1601
+ name = "rustc-hash"
1602
+ version = "2.1.1"
1603
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1604
+ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
1605
+
1606
+ [[package]]
1607
+ name = "rustc_version"
1608
+ version = "0.4.0"
1609
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1610
+ checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
1611
+ dependencies = [
1612
+ "semver",
1613
+ ]
1614
+
1615
+ [[package]]
1616
+ name = "rustls"
1617
+ version = "0.23.35"
1618
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1619
+ checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f"
1620
+ dependencies = [
1621
+ "once_cell",
1622
+ "ring",
1623
+ "rustls-pki-types",
1624
+ "rustls-webpki",
1625
+ "subtle",
1626
+ "zeroize",
1627
+ ]
1628
+
1629
+ [[package]]
1630
+ name = "rustls-pki-types"
1631
+ version = "1.13.0"
1632
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1633
+ checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a"
1634
+ dependencies = [
1635
+ "zeroize",
1636
+ ]
1637
+
1638
+ [[package]]
1639
+ name = "rustls-webpki"
1640
+ version = "0.103.8"
1641
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1642
+ checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52"
1643
+ dependencies = [
1644
+ "ring",
1645
+ "rustls-pki-types",
1646
+ "untrusted",
1647
+ ]
1648
+
1649
+ [[package]]
1650
+ name = "rustversion"
1651
+ version = "1.0.6"
1652
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1653
+ checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
1654
+
1655
+ [[package]]
1656
+ name = "ryu"
1657
+ version = "1.0.9"
1658
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1659
+ checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
1660
+
1661
+ [[package]]
1662
+ name = "scopeguard"
1663
+ version = "1.1.0"
1664
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1665
+ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
1666
+
1667
+ [[package]]
1668
+ name = "semver"
1669
+ version = "1.0.27"
1670
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1671
+ checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
1672
+
1673
+ [[package]]
1674
+ name = "serde"
1675
+ version = "1.0.228"
1676
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1677
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
1678
+ dependencies = [
1679
+ "serde_core",
1680
+ "serde_derive",
1681
+ ]
1682
+
1683
+ [[package]]
1684
+ name = "serde-big-array"
1685
+ version = "0.5.1"
1686
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1687
+ checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f"
1688
+ dependencies = [
1689
+ "serde",
1690
+ ]
1691
+
1692
+ [[package]]
1693
+ name = "serde_bytes"
1694
+ version = "0.11.19"
1695
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1696
+ checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
1697
+ dependencies = [
1698
+ "serde",
1699
+ "serde_core",
1700
+ ]
1701
+
1702
+ [[package]]
1703
+ name = "serde_core"
1704
+ version = "1.0.228"
1705
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1706
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
1707
+ dependencies = [
1708
+ "serde_derive",
1709
+ ]
1710
+
1711
+ [[package]]
1712
+ name = "serde_derive"
1713
+ version = "1.0.228"
1714
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1715
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
1716
+ dependencies = [
1717
+ "proc-macro2",
1718
+ "quote",
1719
+ "syn 2.0.100",
1720
+ ]
1721
+
1722
+ [[package]]
1723
+ name = "serde_json"
1724
+ version = "1.0.145"
1725
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1726
+ checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
1727
+ dependencies = [
1728
+ "itoa",
1729
+ "memchr",
1730
+ "ryu",
1731
+ "serde",
1732
+ "serde_core",
1733
+ ]
1734
+
1735
+ [[package]]
1736
+ name = "serde_urlencoded"
1737
+ version = "0.7.1"
1738
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1739
+ checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
1740
+ dependencies = [
1741
+ "form_urlencoded",
1742
+ "itoa",
1743
+ "ryu",
1744
+ "serde",
1745
+ ]
1746
+
1747
+ [[package]]
1748
+ name = "sha2"
1749
+ version = "0.10.9"
1750
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1751
+ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
1752
+ dependencies = [
1753
+ "cfg-if",
1754
+ "cpufeatures",
1755
+ "digest",
1756
+ ]
1757
+
1758
+ [[package]]
1759
+ name = "sharded-slab"
1760
+ version = "0.1.4"
1761
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1762
+ checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
1763
+ dependencies = [
1764
+ "lazy_static",
1765
+ ]
1766
+
1767
+ [[package]]
1768
+ name = "shlex"
1769
+ version = "1.3.0"
1770
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1771
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
1772
+
1773
+ [[package]]
1774
+ name = "signal-hook-registry"
1775
+ version = "1.4.0"
1776
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1777
+ checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
1778
+ dependencies = [
1779
+ "libc",
1780
+ ]
1781
+
1782
+ [[package]]
1783
+ name = "slab"
1784
+ version = "0.4.5"
1785
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1786
+ checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
1787
+
1788
+ [[package]]
1789
+ name = "smallvec"
1790
+ version = "1.15.1"
1791
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1792
+ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
1793
+
1794
+ [[package]]
1795
+ name = "socket2"
1796
+ version = "0.5.10"
1797
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1798
+ checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
1799
+ dependencies = [
1800
+ "libc",
1801
+ "windows-sys 0.52.0",
1802
+ ]
1803
+
1804
+ [[package]]
1805
+ name = "socket2"
1806
+ version = "0.6.1"
1807
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1808
+ checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881"
1809
+ dependencies = [
1810
+ "libc",
1811
+ "windows-sys 0.60.2",
1812
+ ]
1813
+
1814
+ [[package]]
1815
+ name = "solana-account"
1816
+ version = "3.2.0"
1817
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1818
+ checksum = "014dcb9293341241dd153b35f89ea906e4170914f4a347a95e7fb07ade47cd6f"
1819
+ dependencies = [
1820
+ "bincode",
1821
+ "serde",
1822
+ "serde_bytes",
1823
+ "serde_derive",
1824
+ "solana-account-info",
1825
+ "solana-clock",
1826
+ "solana-instruction-error",
1827
+ "solana-pubkey 3.0.0",
1828
+ "solana-sdk-ids",
1829
+ "solana-sysvar",
1830
+ ]
1831
+
1832
+ [[package]]
1833
+ name = "solana-account-decoder-client-types"
1834
+ version = "3.0.10"
1835
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1836
+ checksum = "a254419b647ca675bd0d55749c24a3383691a00e633e38ae58d070223ac01bf2"
1837
+ dependencies = [
1838
+ "base64",
1839
+ "bs58",
1840
+ "serde",
1841
+ "serde_derive",
1842
+ "serde_json",
1843
+ "solana-account",
1844
+ "solana-pubkey 3.0.0",
1845
+ "zstd",
1846
+ ]
1847
+
1848
+ [[package]]
1849
+ name = "solana-account-info"
1850
+ version = "3.0.0"
1851
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1852
+ checksum = "82f4691b69b172c687d218dd2f1f23fc7ea5e9aa79df9ac26dab3d8dd829ce48"
1853
+ dependencies = [
1854
+ "solana-program-error",
1855
+ "solana-program-memory",
1856
+ "solana-pubkey 3.0.0",
1857
+ ]
1858
+
1859
+ [[package]]
1860
+ name = "solana-address"
1861
+ version = "1.1.0"
1862
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1863
+ checksum = "a2ecac8e1b7f74c2baa9e774c42817e3e75b20787134b76cc4d45e8a604488f5"
1864
+ dependencies = [
1865
+ "solana-address 2.0.0",
1866
+ ]
1867
+
1868
+ [[package]]
1869
+ name = "solana-address"
1870
+ version = "2.0.0"
1871
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1872
+ checksum = "e37320fd2945c5d654b2c6210624a52d66c3f1f73b653ed211ab91a703b35bdd"
1873
+ dependencies = [
1874
+ "borsh",
1875
+ "bytemuck",
1876
+ "bytemuck_derive",
1877
+ "curve25519-dalek",
1878
+ "five8 1.0.0",
1879
+ "five8_const",
1880
+ "serde",
1881
+ "serde_derive",
1882
+ "solana-atomic-u64",
1883
+ "solana-define-syscall 4.0.1",
1884
+ "solana-program-error",
1885
+ "solana-sanitize",
1886
+ "solana-sha256-hasher",
1887
+ ]
1888
+
1889
+ [[package]]
1890
+ name = "solana-atomic-u64"
1891
+ version = "3.0.0"
1892
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1893
+ checksum = "a933ff1e50aff72d02173cfcd7511bd8540b027ee720b75f353f594f834216d0"
1894
+ dependencies = [
1895
+ "parking_lot",
1896
+ ]
1897
+
1898
+ [[package]]
1899
+ name = "solana-clock"
1900
+ version = "3.0.0"
1901
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1902
+ checksum = "fb62e9381182459a4520b5fe7fb22d423cae736239a6427fc398a88743d0ed59"
1903
+ dependencies = [
1904
+ "serde",
1905
+ "serde_derive",
1906
+ "solana-sdk-ids",
1907
+ "solana-sdk-macro",
1908
+ "solana-sysvar-id",
1909
+ ]
1910
+
1911
+ [[package]]
1912
+ name = "solana-commitment-config"
1913
+ version = "3.0.0"
1914
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1915
+ checksum = "5fa5933a62dadb7d3ed35e6329de5cebb0678acc8f9cfdf413269084eeccc63f"
1916
+ dependencies = [
1917
+ "serde",
1918
+ "serde_derive",
1919
+ ]
1920
+
1921
+ [[package]]
1922
+ name = "solana-define-syscall"
1923
+ version = "3.0.0"
1924
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1925
+ checksum = "f9697086a4e102d28a156b8d6b521730335d6951bd39a5e766512bbe09007cee"
1926
+
1927
+ [[package]]
1928
+ name = "solana-define-syscall"
1929
+ version = "4.0.1"
1930
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1931
+ checksum = "57e5b1c0bc1d4a4d10c88a4100499d954c09d3fecfae4912c1a074dff68b1738"
1932
+
1933
+ [[package]]
1934
+ name = "solana-epoch-info"
1935
+ version = "3.0.0"
1936
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1937
+ checksum = "f8a6b69bd71386f61344f2bcf0f527f5fd6dd3b22add5880e2e1bf1dd1fa8059"
1938
+ dependencies = [
1939
+ "serde",
1940
+ "serde_derive",
1941
+ ]
1942
+
1943
+ [[package]]
1944
+ name = "solana-epoch-rewards"
1945
+ version = "3.0.0"
1946
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1947
+ checksum = "b319a4ed70390af911090c020571f0ff1f4ec432522d05ab89f5c08080381995"
1948
+ dependencies = [
1949
+ "serde",
1950
+ "serde_derive",
1951
+ "solana-hash 3.1.0",
1952
+ "solana-sdk-ids",
1953
+ "solana-sdk-macro",
1954
+ "solana-sysvar-id",
1955
+ ]
1956
+
1957
+ [[package]]
1958
+ name = "solana-epoch-schedule"
1959
+ version = "3.0.0"
1960
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1961
+ checksum = "6e5481e72cc4d52c169db73e4c0cd16de8bc943078aac587ec4817a75cc6388f"
1962
+ dependencies = [
1963
+ "serde",
1964
+ "serde_derive",
1965
+ "solana-sdk-ids",
1966
+ "solana-sdk-macro",
1967
+ "solana-sysvar-id",
1968
+ ]
1969
+
1970
+ [[package]]
1971
+ name = "solana-feature-gate-interface"
1972
+ version = "3.0.0"
1973
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1974
+ checksum = "7347ab62e6d47a82e340c865133795b394feea7c2b2771d293f57691c6544c3f"
1975
+ dependencies = [
1976
+ "serde",
1977
+ "serde_derive",
1978
+ "solana-program-error",
1979
+ "solana-pubkey 3.0.0",
1980
+ "solana-sdk-ids",
1981
+ ]
1982
+
1983
+ [[package]]
1984
+ name = "solana-fee-calculator"
1985
+ version = "3.0.0"
1986
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1987
+ checksum = "2a73cc03ca4bed871ca174558108835f8323e85917bb38b9c81c7af2ab853efe"
1988
+ dependencies = [
1989
+ "log",
1990
+ "serde",
1991
+ "serde_derive",
1992
+ ]
1993
+
1994
+ [[package]]
1995
+ name = "solana-hash"
1996
+ version = "3.1.0"
1997
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1998
+ checksum = "337c246447142f660f778cf6cb582beba8e28deb05b3b24bfb9ffd7c562e5f41"
1999
+ dependencies = [
2000
+ "solana-hash 4.0.1",
2001
+ ]
2002
+
2003
+ [[package]]
2004
+ name = "solana-hash"
2005
+ version = "4.0.1"
2006
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2007
+ checksum = "6a5d48a6ee7b91fc7b998944ab026ed7b3e2fc8ee3bc58452644a86c2648152f"
2008
+ dependencies = [
2009
+ "borsh",
2010
+ "bytemuck",
2011
+ "bytemuck_derive",
2012
+ "five8 1.0.0",
2013
+ "serde",
2014
+ "serde_derive",
2015
+ "solana-atomic-u64",
2016
+ "solana-sanitize",
2017
+ ]
2018
+
2019
+ [[package]]
2020
+ name = "solana-inflation"
2021
+ version = "3.0.0"
2022
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2023
+ checksum = "e92f37a14e7c660628752833250dd3dcd8e95309876aee751d7f8769a27947c6"
2024
+
2025
+ [[package]]
2026
+ name = "solana-instruction"
2027
+ version = "3.1.0"
2028
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2029
+ checksum = "ee1b699a2c1518028a9982e255e0eca10c44d90006542d9d7f9f40dbce3f7c78"
2030
+ dependencies = [
2031
+ "borsh",
2032
+ "serde",
2033
+ "solana-define-syscall 4.0.1",
2034
+ "solana-instruction-error",
2035
+ "solana-pubkey 4.0.0",
2036
+ ]
2037
+
2038
+ [[package]]
2039
+ name = "solana-instruction-error"
2040
+ version = "2.1.0"
2041
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2042
+ checksum = "b04259e03c05faf38a8c24217b5cfe4c90572ae6184ab49cddb1584fdd756d3f"
2043
+ dependencies = [
2044
+ "num-traits",
2045
+ "serde",
2046
+ "serde_derive",
2047
+ "solana-program-error",
2048
+ ]
2049
+
2050
+ [[package]]
2051
+ name = "solana-instructions-sysvar"
2052
+ version = "3.0.0"
2053
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2054
+ checksum = "7ddf67876c541aa1e21ee1acae35c95c6fbc61119814bfef70579317a5e26955"
2055
+ dependencies = [
2056
+ "bitflags 2.10.0",
2057
+ "solana-account-info",
2058
+ "solana-instruction",
2059
+ "solana-instruction-error",
2060
+ "solana-program-error",
2061
+ "solana-pubkey 3.0.0",
2062
+ "solana-sanitize",
2063
+ "solana-sdk-ids",
2064
+ "solana-serialize-utils",
2065
+ "solana-sysvar-id",
2066
+ ]
2067
+
2068
+ [[package]]
2069
+ name = "solana-last-restart-slot"
2070
+ version = "3.0.0"
2071
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2072
+ checksum = "dcda154ec827f5fc1e4da0af3417951b7e9b8157540f81f936c4a8b1156134d0"
2073
+ dependencies = [
2074
+ "serde",
2075
+ "serde_derive",
2076
+ "solana-sdk-ids",
2077
+ "solana-sdk-macro",
2078
+ "solana-sysvar-id",
2079
+ ]
2080
+
2081
+ [[package]]
2082
+ name = "solana-loader-v3-interface"
2083
+ version = "6.1.0"
2084
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2085
+ checksum = "dee44c9b1328c5c712c68966fb8de07b47f3e7bac006e74ddd1bb053d3e46e5d"
2086
+ dependencies = [
2087
+ "serde",
2088
+ "serde_bytes",
2089
+ "serde_derive",
2090
+ "solana-instruction",
2091
+ "solana-pubkey 3.0.0",
2092
+ "solana-sdk-ids",
2093
+ ]
2094
+
2095
+ [[package]]
2096
+ name = "solana-message"
2097
+ version = "3.0.1"
2098
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2099
+ checksum = "85666605c9fd727f865ed381665db0a8fc29f984a030ecc1e40f43bfb2541623"
2100
+ dependencies = [
2101
+ "bincode",
2102
+ "lazy_static",
2103
+ "serde",
2104
+ "serde_derive",
2105
+ "solana-address 1.1.0",
2106
+ "solana-hash 3.1.0",
2107
+ "solana-instruction",
2108
+ "solana-sanitize",
2109
+ "solana-sdk-ids",
2110
+ "solana-short-vec",
2111
+ "solana-transaction-error",
2112
+ ]
2113
+
2114
+ [[package]]
2115
+ name = "solana-program-entrypoint"
2116
+ version = "3.1.1"
2117
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2118
+ checksum = "84c9b0a1ff494e05f503a08b3d51150b73aa639544631e510279d6375f290997"
2119
+ dependencies = [
2120
+ "solana-account-info",
2121
+ "solana-define-syscall 4.0.1",
2122
+ "solana-program-error",
2123
+ "solana-pubkey 4.0.0",
2124
+ ]
2125
+
2126
+ [[package]]
2127
+ name = "solana-program-error"
2128
+ version = "3.0.0"
2129
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2130
+ checksum = "a1af32c995a7b692a915bb7414d5f8e838450cf7c70414e763d8abcae7b51f28"
2131
+
2132
+ [[package]]
2133
+ name = "solana-program-memory"
2134
+ version = "3.1.0"
2135
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2136
+ checksum = "4068648649653c2c50546e9a7fb761791b5ab0cda054c771bb5808d3a4b9eb52"
2137
+ dependencies = [
2138
+ "solana-define-syscall 4.0.1",
2139
+ ]
2140
+
2141
+ [[package]]
2142
+ name = "solana-pubkey"
2143
+ version = "3.0.0"
2144
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2145
+ checksum = "8909d399deb0851aa524420beeb5646b115fd253ef446e35fe4504c904da3941"
2146
+ dependencies = [
2147
+ "solana-address 1.1.0",
2148
+ ]
2149
+
2150
+ [[package]]
2151
+ name = "solana-pubkey"
2152
+ version = "4.0.0"
2153
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2154
+ checksum = "a6f7104d456b58e1418c21a8581e89810278d1190f70f27ece7fc0b2c9282a57"
2155
+ dependencies = [
2156
+ "solana-address 2.0.0",
2157
+ ]
2158
+
2159
+ [[package]]
2160
+ name = "solana-rent"
2161
+ version = "3.0.0"
2162
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2163
+ checksum = "b702d8c43711e3c8a9284a4f1bbc6a3de2553deb25b0c8142f9a44ef0ce5ddc1"
2164
+ dependencies = [
2165
+ "serde",
2166
+ "serde_derive",
2167
+ "solana-sdk-ids",
2168
+ "solana-sdk-macro",
2169
+ "solana-sysvar-id",
2170
+ ]
2171
+
2172
+ [[package]]
2173
+ name = "solana-reward-info"
2174
+ version = "3.0.0"
2175
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2176
+ checksum = "82be7946105c2ee6be9f9ee7bd18a068b558389221d29efa92b906476102bfcc"
2177
+ dependencies = [
2178
+ "serde",
2179
+ "serde_derive",
2180
+ ]
2181
+
2182
+ [[package]]
2183
+ name = "solana-rpc-client"
2184
+ version = "3.0.10"
2185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2186
+ checksum = "2cc97cd8bbbe8fb74a76b2812629dae284e6f5446f7e84a98c3f854e4dc2621b"
2187
+ dependencies = [
2188
+ "async-trait",
2189
+ "base64",
2190
+ "bincode",
2191
+ "bs58",
2192
+ "futures",
2193
+ "indicatif",
2194
+ "log",
2195
+ "reqwest",
2196
+ "reqwest-middleware",
2197
+ "semver",
2198
+ "serde",
2199
+ "serde_derive",
2200
+ "serde_json",
2201
+ "solana-account",
2202
+ "solana-account-decoder-client-types",
2203
+ "solana-clock",
2204
+ "solana-commitment-config",
2205
+ "solana-epoch-info",
2206
+ "solana-epoch-schedule",
2207
+ "solana-feature-gate-interface",
2208
+ "solana-hash 3.1.0",
2209
+ "solana-instruction",
2210
+ "solana-message",
2211
+ "solana-pubkey 3.0.0",
2212
+ "solana-rpc-client-api",
2213
+ "solana-signature",
2214
+ "solana-transaction",
2215
+ "solana-transaction-error",
2216
+ "solana-transaction-status-client-types",
2217
+ "solana-version",
2218
+ "solana-vote-interface",
2219
+ "tokio",
2220
+ ]
2221
+
2222
+ [[package]]
2223
+ name = "solana-rpc-client-api"
2224
+ version = "3.0.10"
2225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2226
+ checksum = "26e5f5a813f457dff5a66dfe83eaa7e0e766be5251fc99922e9f2e48a2ebca2e"
2227
+ dependencies = [
2228
+ "anyhow",
2229
+ "jsonrpc-core",
2230
+ "reqwest",
2231
+ "reqwest-middleware",
2232
+ "serde",
2233
+ "serde_derive",
2234
+ "serde_json",
2235
+ "solana-account-decoder-client-types",
2236
+ "solana-clock",
2237
+ "solana-rpc-client-types",
2238
+ "solana-signer",
2239
+ "solana-transaction-error",
2240
+ "solana-transaction-status-client-types",
2241
+ "thiserror 2.0.18",
2242
+ ]
2243
+
2244
+ [[package]]
2245
+ name = "solana-rpc-client-types"
2246
+ version = "3.0.10"
2247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2248
+ checksum = "1a6d3a5969b7ccd2863012fa06daa35e152e264181d24b5153b974351faa9c40"
2249
+ dependencies = [
2250
+ "base64",
2251
+ "bs58",
2252
+ "semver",
2253
+ "serde",
2254
+ "serde_derive",
2255
+ "serde_json",
2256
+ "solana-account",
2257
+ "solana-account-decoder-client-types",
2258
+ "solana-clock",
2259
+ "solana-commitment-config",
2260
+ "solana-fee-calculator",
2261
+ "solana-inflation",
2262
+ "solana-pubkey 3.0.0",
2263
+ "solana-transaction-error",
2264
+ "solana-transaction-status-client-types",
2265
+ "solana-version",
2266
+ "spl-generic-token",
2267
+ "thiserror 2.0.18",
2268
+ ]
2269
+
2270
+ [[package]]
2271
+ name = "solana-sanitize"
2272
+ version = "3.0.1"
2273
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2274
+ checksum = "dcf09694a0fc14e5ffb18f9b7b7c0f15ecb6eac5b5610bf76a1853459d19daf9"
2275
+
2276
+ [[package]]
2277
+ name = "solana-sbpf"
2278
+ version = "0.12.2"
2279
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2280
+ checksum = "0f224d906c14efc7ed7f42bc5fe9588f3f09db8cabe7f6023adda62a69678e1a"
2281
+ dependencies = [
2282
+ "byteorder",
2283
+ "combine",
2284
+ "hash32",
2285
+ "log",
2286
+ "rustc-demangle",
2287
+ "thiserror 2.0.18",
2288
+ ]
2289
+
2290
+ [[package]]
2291
+ name = "solana-sdk-ids"
2292
+ version = "3.0.0"
2293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2294
+ checksum = "b1b6d6aaf60669c592838d382266b173881c65fb1cdec83b37cb8ce7cb89f9ad"
2295
+ dependencies = [
2296
+ "solana-pubkey 3.0.0",
2297
+ ]
2298
+
2299
+ [[package]]
2300
+ name = "solana-sdk-macro"
2301
+ version = "3.0.0"
2302
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2303
+ checksum = "d6430000e97083460b71d9fbadc52a2ab2f88f53b3a4c5e58c5ae3640a0e8c00"
2304
+ dependencies = [
2305
+ "bs58",
2306
+ "proc-macro2",
2307
+ "quote",
2308
+ "syn 2.0.100",
2309
+ ]
2310
+
2311
+ [[package]]
2312
+ name = "solana-security-txt"
2313
+ version = "1.1.3"
2314
+ dependencies = [
2315
+ "memchr",
2316
+ "thiserror 2.0.18",
2317
+ ]
2318
+
2319
+ [[package]]
2320
+ name = "solana-serde-varint"
2321
+ version = "3.0.0"
2322
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2323
+ checksum = "3e5174c57d5ff3c1995f274d17156964664566e2cde18a07bba1586d35a70d3b"
2324
+ dependencies = [
2325
+ "serde",
2326
+ ]
2327
+
2328
+ [[package]]
2329
+ name = "solana-serialize-utils"
2330
+ version = "3.1.0"
2331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2332
+ checksum = "56e41dd8feea239516c623a02f0a81c2367f4b604d7965237fed0751aeec33ed"
2333
+ dependencies = [
2334
+ "solana-instruction-error",
2335
+ "solana-pubkey 3.0.0",
2336
+ "solana-sanitize",
2337
+ ]
2338
+
2339
+ [[package]]
2340
+ name = "solana-sha256-hasher"
2341
+ version = "3.1.0"
2342
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2343
+ checksum = "db7dc3011ea4c0334aaaa7e7128cb390ecf546b28d412e9bf2064680f57f588f"
2344
+ dependencies = [
2345
+ "sha2",
2346
+ "solana-define-syscall 4.0.1",
2347
+ "solana-hash 4.0.1",
2348
+ ]
2349
+
2350
+ [[package]]
2351
+ name = "solana-short-vec"
2352
+ version = "3.1.0"
2353
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2354
+ checksum = "79fb1809a32cfcf7d9c47b7070a92fa17cdb620ab5829e9a8a9ff9d138a7a175"
2355
+ dependencies = [
2356
+ "serde_core",
2357
+ ]
2358
+
2359
+ [[package]]
2360
+ name = "solana-signature"
2361
+ version = "3.1.0"
2362
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2363
+ checksum = "4bb8057cc0e9f7b5e89883d49de6f407df655bb6f3a71d0b7baf9986a2218fd9"
2364
+ dependencies = [
2365
+ "five8 0.2.1",
2366
+ "serde",
2367
+ "serde-big-array",
2368
+ "serde_derive",
2369
+ "solana-sanitize",
2370
+ ]
2371
+
2372
+ [[package]]
2373
+ name = "solana-signer"
2374
+ version = "3.0.0"
2375
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2376
+ checksum = "5bfea97951fee8bae0d6038f39a5efcb6230ecdfe33425ac75196d1a1e3e3235"
2377
+ dependencies = [
2378
+ "solana-pubkey 3.0.0",
2379
+ "solana-signature",
2380
+ "solana-transaction-error",
2381
+ ]
2382
+
2383
+ [[package]]
2384
+ name = "solana-slot-hashes"
2385
+ version = "3.0.0"
2386
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2387
+ checksum = "80a293f952293281443c04f4d96afd9d547721923d596e92b4377ed2360f1746"
2388
+ dependencies = [
2389
+ "serde",
2390
+ "serde_derive",
2391
+ "solana-hash 3.1.0",
2392
+ "solana-sdk-ids",
2393
+ "solana-sysvar-id",
2394
+ ]
2395
+
2396
+ [[package]]
2397
+ name = "solana-slot-history"
2398
+ version = "3.0.0"
2399
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2400
+ checksum = "f914f6b108f5bba14a280b458d023e3621c9973f27f015a4d755b50e88d89e97"
2401
+ dependencies = [
2402
+ "bv",
2403
+ "serde",
2404
+ "serde_derive",
2405
+ "solana-sdk-ids",
2406
+ "solana-sysvar-id",
2407
+ ]
2408
+
2409
+ [[package]]
2410
+ name = "solana-svm-feature-set"
2411
+ version = "3.0.10"
2412
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2413
+ checksum = "6a35cded5bc9e32d84c98d81bb9811239d3aea03d0f5ef09aa2f1e8cdaf2d0ff"
2414
+
2415
+ [[package]]
2416
+ name = "solana-sysvar"
2417
+ version = "3.0.0"
2418
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2419
+ checksum = "63205e68d680bcc315337dec311b616ab32fea0a612db3b883ce4de02e0953f9"
2420
+ dependencies = [
2421
+ "base64",
2422
+ "bincode",
2423
+ "lazy_static",
2424
+ "serde",
2425
+ "serde_derive",
2426
+ "solana-account-info",
2427
+ "solana-clock",
2428
+ "solana-define-syscall 3.0.0",
2429
+ "solana-epoch-rewards",
2430
+ "solana-epoch-schedule",
2431
+ "solana-fee-calculator",
2432
+ "solana-hash 3.1.0",
2433
+ "solana-instruction",
2434
+ "solana-last-restart-slot",
2435
+ "solana-program-entrypoint",
2436
+ "solana-program-error",
2437
+ "solana-program-memory",
2438
+ "solana-pubkey 3.0.0",
2439
+ "solana-rent",
2440
+ "solana-sdk-ids",
2441
+ "solana-sdk-macro",
2442
+ "solana-slot-hashes",
2443
+ "solana-slot-history",
2444
+ "solana-sysvar-id",
2445
+ ]
2446
+
2447
+ [[package]]
2448
+ name = "solana-sysvar-id"
2449
+ version = "3.0.0"
2450
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2451
+ checksum = "5051bc1a16d5d96a96bc33b5b2ec707495c48fe978097bdaba68d3c47987eb32"
2452
+ dependencies = [
2453
+ "solana-pubkey 3.0.0",
2454
+ "solana-sdk-ids",
2455
+ ]
2456
+
2457
+ [[package]]
2458
+ name = "solana-transaction"
2459
+ version = "3.0.2"
2460
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2461
+ checksum = "2ceb2efbf427a91b884709ffac4dac29117752ce1e37e9ae04977e450aa0bb76"
2462
+ dependencies = [
2463
+ "bincode",
2464
+ "serde",
2465
+ "serde_derive",
2466
+ "solana-address 2.0.0",
2467
+ "solana-hash 4.0.1",
2468
+ "solana-instruction",
2469
+ "solana-instruction-error",
2470
+ "solana-message",
2471
+ "solana-sanitize",
2472
+ "solana-sdk-ids",
2473
+ "solana-short-vec",
2474
+ "solana-signature",
2475
+ "solana-signer",
2476
+ "solana-transaction-error",
2477
+ ]
2478
+
2479
+ [[package]]
2480
+ name = "solana-transaction-context"
2481
+ version = "3.0.10"
2482
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2483
+ checksum = "f9c6820c3a14bd07b2256640bd64af4a44ac49f505dca93cc11f77bc79cfd44a"
2484
+ dependencies = [
2485
+ "bincode",
2486
+ "serde",
2487
+ "serde_derive",
2488
+ "solana-account",
2489
+ "solana-instruction",
2490
+ "solana-instructions-sysvar",
2491
+ "solana-pubkey 3.0.0",
2492
+ "solana-rent",
2493
+ "solana-sbpf",
2494
+ "solana-sdk-ids",
2495
+ ]
2496
+
2497
+ [[package]]
2498
+ name = "solana-transaction-error"
2499
+ version = "3.0.0"
2500
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2501
+ checksum = "4222065402340d7e6aec9dc3e54d22992ddcf923d91edcd815443c2bfca3144a"
2502
+ dependencies = [
2503
+ "serde",
2504
+ "serde_derive",
2505
+ "solana-instruction-error",
2506
+ "solana-sanitize",
2507
+ ]
2508
+
2509
+ [[package]]
2510
+ name = "solana-transaction-status-client-types"
2511
+ version = "3.0.10"
2512
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2513
+ checksum = "42333c56ebbbaab0a354c0a5ad621c0640b136e4ba0db3ba56d12b0500b27071"
2514
+ dependencies = [
2515
+ "base64",
2516
+ "bincode",
2517
+ "bs58",
2518
+ "serde",
2519
+ "serde_derive",
2520
+ "serde_json",
2521
+ "solana-account-decoder-client-types",
2522
+ "solana-commitment-config",
2523
+ "solana-instruction",
2524
+ "solana-message",
2525
+ "solana-pubkey 3.0.0",
2526
+ "solana-reward-info",
2527
+ "solana-signature",
2528
+ "solana-transaction",
2529
+ "solana-transaction-context",
2530
+ "solana-transaction-error",
2531
+ "thiserror 2.0.18",
2532
+ ]
2533
+
2534
+ [[package]]
2535
+ name = "solana-version"
2536
+ version = "3.0.10"
2537
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2538
+ checksum = "44177fea32b10c8b9f3c19ba13ea21c5abc163d1cfb7a134fe16449f13f7c5b2"
2539
+ dependencies = [
2540
+ "agave-feature-set",
2541
+ "rand",
2542
+ "semver",
2543
+ "serde",
2544
+ "serde_derive",
2545
+ "solana-sanitize",
2546
+ "solana-serde-varint",
2547
+ ]
2548
+
2549
+ [[package]]
2550
+ name = "solana-vote-interface"
2551
+ version = "3.0.0"
2552
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2553
+ checksum = "66631ddbe889dab5ec663294648cd1df395ec9df7a4476e7b3e095604cfdb539"
2554
+ dependencies = [
2555
+ "num-derive",
2556
+ "num-traits",
2557
+ "solana-clock",
2558
+ "solana-hash 3.1.0",
2559
+ "solana-instruction",
2560
+ "solana-instruction-error",
2561
+ "solana-pubkey 3.0.0",
2562
+ "solana-rent",
2563
+ "solana-sdk-ids",
2564
+ "solana-serialize-utils",
2565
+ ]
2566
+
2567
+ [[package]]
2568
+ name = "spl-generic-token"
2569
+ version = "2.0.1"
2570
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2571
+ checksum = "233df81b75ab99b42f002b5cdd6e65a7505ffa930624f7096a7580a56765e9cf"
2572
+ dependencies = [
2573
+ "bytemuck",
2574
+ "solana-pubkey 3.0.0",
2575
+ ]
2576
+
2577
+ [[package]]
2578
+ name = "stable_deref_trait"
2579
+ version = "1.2.0"
2580
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2581
+ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
2582
+
2583
+ [[package]]
2584
+ name = "strsim"
2585
+ version = "0.10.0"
2586
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2587
+ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
2588
+
2589
+ [[package]]
2590
+ name = "subtle"
2591
+ version = "2.6.1"
2592
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2593
+ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
2594
+
2595
+ [[package]]
2596
+ name = "syn"
2597
+ version = "1.0.86"
2598
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2599
+ checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
2600
+ dependencies = [
2601
+ "proc-macro2",
2602
+ "quote",
2603
+ "unicode-xid",
2604
+ ]
2605
+
2606
+ [[package]]
2607
+ name = "syn"
2608
+ version = "2.0.100"
2609
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2610
+ checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
2611
+ dependencies = [
2612
+ "proc-macro2",
2613
+ "quote",
2614
+ "unicode-ident",
2615
+ ]
2616
+
2617
+ [[package]]
2618
+ name = "sync_wrapper"
2619
+ version = "1.0.2"
2620
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2621
+ checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
2622
+ dependencies = [
2623
+ "futures-core",
2624
+ ]
2625
+
2626
+ [[package]]
2627
+ name = "synstructure"
2628
+ version = "0.13.2"
2629
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2630
+ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
2631
+ dependencies = [
2632
+ "proc-macro2",
2633
+ "quote",
2634
+ "syn 2.0.100",
2635
+ ]
2636
+
2637
+ [[package]]
2638
+ name = "termcolor"
2639
+ version = "1.1.3"
2640
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2641
+ checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
2642
+ dependencies = [
2643
+ "winapi-util",
2644
+ ]
2645
+
2646
+ [[package]]
2647
+ name = "textwrap"
2648
+ version = "0.15.0"
2649
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2650
+ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
2651
+
2652
+ [[package]]
2653
+ name = "thiserror"
2654
+ version = "1.0.30"
2655
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2656
+ checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
2657
+ dependencies = [
2658
+ "thiserror-impl 1.0.30",
2659
+ ]
2660
+
2661
+ [[package]]
2662
+ name = "thiserror"
2663
+ version = "2.0.18"
2664
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2665
+ checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
2666
+ dependencies = [
2667
+ "thiserror-impl 2.0.18",
2668
+ ]
2669
+
2670
+ [[package]]
2671
+ name = "thiserror-impl"
2672
+ version = "1.0.30"
2673
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2674
+ checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
2675
+ dependencies = [
2676
+ "proc-macro2",
2677
+ "quote",
2678
+ "syn 1.0.86",
2679
+ ]
2680
+
2681
+ [[package]]
2682
+ name = "thiserror-impl"
2683
+ version = "2.0.18"
2684
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2685
+ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
2686
+ dependencies = [
2687
+ "proc-macro2",
2688
+ "quote",
2689
+ "syn 2.0.100",
2690
+ ]
2691
+
2692
+ [[package]]
2693
+ name = "thread_local"
2694
+ version = "1.1.4"
2695
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2696
+ checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
2697
+ dependencies = [
2698
+ "once_cell",
2699
+ ]
2700
+
2701
+ [[package]]
2702
+ name = "tinystr"
2703
+ version = "0.8.2"
2704
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2705
+ checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
2706
+ dependencies = [
2707
+ "displaydoc",
2708
+ "zerovec",
2709
+ ]
2710
+
2711
+ [[package]]
2712
+ name = "tinyvec"
2713
+ version = "1.10.0"
2714
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2715
+ checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa"
2716
+ dependencies = [
2717
+ "tinyvec_macros",
2718
+ ]
2719
+
2720
+ [[package]]
2721
+ name = "tinyvec_macros"
2722
+ version = "0.1.0"
2723
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2724
+ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
2725
+
2726
+ [[package]]
2727
+ name = "tokio"
2728
+ version = "1.48.0"
2729
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2730
+ checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408"
2731
+ dependencies = [
2732
+ "bytes",
2733
+ "libc",
2734
+ "mio",
2735
+ "parking_lot",
2736
+ "pin-project-lite",
2737
+ "signal-hook-registry",
2738
+ "socket2 0.6.1",
2739
+ "tokio-macros",
2740
+ "windows-sys 0.61.2",
2741
+ ]
2742
+
2743
+ [[package]]
2744
+ name = "tokio-macros"
2745
+ version = "2.6.0"
2746
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2747
+ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
2748
+ dependencies = [
2749
+ "proc-macro2",
2750
+ "quote",
2751
+ "syn 2.0.100",
2752
+ ]
2753
+
2754
+ [[package]]
2755
+ name = "tokio-rustls"
2756
+ version = "0.26.4"
2757
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2758
+ checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61"
2759
+ dependencies = [
2760
+ "rustls",
2761
+ "tokio",
2762
+ ]
2763
+
2764
+ [[package]]
2765
+ name = "tokio-util"
2766
+ version = "0.7.17"
2767
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2768
+ checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594"
2769
+ dependencies = [
2770
+ "bytes",
2771
+ "futures-core",
2772
+ "futures-sink",
2773
+ "pin-project-lite",
2774
+ "tokio",
2775
+ ]
2776
+
2777
+ [[package]]
2778
+ name = "toml_datetime"
2779
+ version = "0.7.3"
2780
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2781
+ checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533"
2782
+ dependencies = [
2783
+ "serde_core",
2784
+ ]
2785
+
2786
+ [[package]]
2787
+ name = "toml_edit"
2788
+ version = "0.23.7"
2789
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2790
+ checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d"
2791
+ dependencies = [
2792
+ "indexmap 2.12.0",
2793
+ "toml_datetime",
2794
+ "toml_parser",
2795
+ "winnow",
2796
+ ]
2797
+
2798
+ [[package]]
2799
+ name = "toml_parser"
2800
+ version = "1.0.4"
2801
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2802
+ checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e"
2803
+ dependencies = [
2804
+ "winnow",
2805
+ ]
2806
+
2807
+ [[package]]
2808
+ name = "tower"
2809
+ version = "0.5.2"
2810
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2811
+ checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
2812
+ dependencies = [
2813
+ "futures-core",
2814
+ "futures-util",
2815
+ "pin-project-lite",
2816
+ "sync_wrapper",
2817
+ "tokio",
2818
+ "tower-layer",
2819
+ "tower-service",
2820
+ ]
2821
+
2822
+ [[package]]
2823
+ name = "tower-http"
2824
+ version = "0.6.6"
2825
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2826
+ checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
2827
+ dependencies = [
2828
+ "bitflags 2.10.0",
2829
+ "bytes",
2830
+ "futures-util",
2831
+ "http",
2832
+ "http-body",
2833
+ "iri-string",
2834
+ "pin-project-lite",
2835
+ "tower",
2836
+ "tower-layer",
2837
+ "tower-service",
2838
+ ]
2839
+
2840
+ [[package]]
2841
+ name = "tower-layer"
2842
+ version = "0.3.3"
2843
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2844
+ checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
2845
+
2846
+ [[package]]
2847
+ name = "tower-service"
2848
+ version = "0.3.3"
2849
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2850
+ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
2851
+
2852
+ [[package]]
2853
+ name = "tracing"
2854
+ version = "0.1.32"
2855
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2856
+ checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f"
2857
+ dependencies = [
2858
+ "cfg-if",
2859
+ "pin-project-lite",
2860
+ "tracing-core",
2861
+ ]
2862
+
2863
+ [[package]]
2864
+ name = "tracing-core"
2865
+ version = "0.1.23"
2866
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2867
+ checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c"
2868
+ dependencies = [
2869
+ "lazy_static",
2870
+ "valuable",
2871
+ ]
2872
+
2873
+ [[package]]
2874
+ name = "tracing-error"
2875
+ version = "0.2.0"
2876
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2877
+ checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
2878
+ dependencies = [
2879
+ "tracing",
2880
+ "tracing-subscriber",
2881
+ ]
2882
+
2883
+ [[package]]
2884
+ name = "tracing-subscriber"
2885
+ version = "0.3.9"
2886
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2887
+ checksum = "9e0ab7bdc962035a87fba73f3acca9b8a8d0034c2e6f60b84aeaaddddc155dce"
2888
+ dependencies = [
2889
+ "sharded-slab",
2890
+ "thread_local",
2891
+ "tracing-core",
2892
+ ]
2893
+
2894
+ [[package]]
2895
+ name = "try-lock"
2896
+ version = "0.2.3"
2897
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2898
+ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
2899
+
2900
+ [[package]]
2901
+ name = "typenum"
2902
+ version = "1.15.0"
2903
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2904
+ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
2905
+
2906
+ [[package]]
2907
+ name = "unicode-ident"
2908
+ version = "1.0.18"
2909
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2910
+ checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
2911
+
2912
+ [[package]]
2913
+ name = "unicode-width"
2914
+ version = "0.2.2"
2915
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2916
+ checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
2917
+
2918
+ [[package]]
2919
+ name = "unicode-xid"
2920
+ version = "0.2.2"
2921
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2922
+ checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
2923
+
2924
+ [[package]]
2925
+ name = "unit-prefix"
2926
+ version = "0.5.1"
2927
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2928
+ checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817"
2929
+
2930
+ [[package]]
2931
+ name = "unreachable"
2932
+ version = "1.0.0"
2933
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2934
+ checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
2935
+ dependencies = [
2936
+ "void",
2937
+ ]
2938
+
2939
+ [[package]]
2940
+ name = "untrusted"
2941
+ version = "0.9.0"
2942
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2943
+ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
2944
+
2945
+ [[package]]
2946
+ name = "url"
2947
+ version = "2.5.7"
2948
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2949
+ checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b"
2950
+ dependencies = [
2951
+ "form_urlencoded",
2952
+ "idna",
2953
+ "percent-encoding",
2954
+ "serde",
2955
+ ]
2956
+
2957
+ [[package]]
2958
+ name = "utf8_iter"
2959
+ version = "1.0.4"
2960
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2961
+ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
2962
+
2963
+ [[package]]
2964
+ name = "valuable"
2965
+ version = "0.1.0"
2966
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2967
+ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
2968
+
2969
+ [[package]]
2970
+ name = "version_check"
2971
+ version = "0.9.4"
2972
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2973
+ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
2974
+
2975
+ [[package]]
2976
+ name = "void"
2977
+ version = "1.0.2"
2978
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2979
+ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
2980
+
2981
+ [[package]]
2982
+ name = "want"
2983
+ version = "0.3.0"
2984
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2985
+ checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
2986
+ dependencies = [
2987
+ "log",
2988
+ "try-lock",
2989
+ ]
2990
+
2991
+ [[package]]
2992
+ name = "wasi"
2993
+ version = "0.11.1+wasi-snapshot-preview1"
2994
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2995
+ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
2996
+
2997
+ [[package]]
2998
+ name = "wasip2"
2999
+ version = "1.0.1+wasi-0.2.4"
3000
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3001
+ checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
3002
+ dependencies = [
3003
+ "wit-bindgen",
3004
+ ]
3005
+
3006
+ [[package]]
3007
+ name = "wasm-bindgen"
3008
+ version = "0.2.105"
3009
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3010
+ checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60"
3011
+ dependencies = [
3012
+ "cfg-if",
3013
+ "once_cell",
3014
+ "rustversion",
3015
+ "wasm-bindgen-macro",
3016
+ "wasm-bindgen-shared",
3017
+ ]
3018
+
3019
+ [[package]]
3020
+ name = "wasm-bindgen-futures"
3021
+ version = "0.4.29"
3022
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3023
+ checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395"
3024
+ dependencies = [
3025
+ "cfg-if",
3026
+ "js-sys",
3027
+ "wasm-bindgen",
3028
+ "web-sys",
3029
+ ]
3030
+
3031
+ [[package]]
3032
+ name = "wasm-bindgen-macro"
3033
+ version = "0.2.105"
3034
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3035
+ checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2"
3036
+ dependencies = [
3037
+ "quote",
3038
+ "wasm-bindgen-macro-support",
3039
+ ]
3040
+
3041
+ [[package]]
3042
+ name = "wasm-bindgen-macro-support"
3043
+ version = "0.2.105"
3044
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3045
+ checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc"
3046
+ dependencies = [
3047
+ "bumpalo",
3048
+ "proc-macro2",
3049
+ "quote",
3050
+ "syn 2.0.100",
3051
+ "wasm-bindgen-shared",
3052
+ ]
3053
+
3054
+ [[package]]
3055
+ name = "wasm-bindgen-shared"
3056
+ version = "0.2.105"
3057
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3058
+ checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76"
3059
+ dependencies = [
3060
+ "unicode-ident",
3061
+ ]
3062
+
3063
+ [[package]]
3064
+ name = "web-sys"
3065
+ version = "0.3.56"
3066
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3067
+ checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb"
3068
+ dependencies = [
3069
+ "js-sys",
3070
+ "wasm-bindgen",
3071
+ ]
3072
+
3073
+ [[package]]
3074
+ name = "web-time"
3075
+ version = "1.1.0"
3076
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3077
+ checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
3078
+ dependencies = [
3079
+ "js-sys",
3080
+ "wasm-bindgen",
3081
+ ]
3082
+
3083
+ [[package]]
3084
+ name = "webpki-roots"
3085
+ version = "1.0.4"
3086
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3087
+ checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e"
3088
+ dependencies = [
3089
+ "rustls-pki-types",
3090
+ ]
3091
+
3092
+ [[package]]
3093
+ name = "winapi"
3094
+ version = "0.3.9"
3095
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3096
+ checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
3097
+ dependencies = [
3098
+ "winapi-i686-pc-windows-gnu",
3099
+ "winapi-x86_64-pc-windows-gnu",
3100
+ ]
3101
+
3102
+ [[package]]
3103
+ name = "winapi-i686-pc-windows-gnu"
3104
+ version = "0.4.0"
3105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3106
+ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
3107
+
3108
+ [[package]]
3109
+ name = "winapi-util"
3110
+ version = "0.1.5"
3111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3112
+ checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
3113
+ dependencies = [
3114
+ "winapi",
3115
+ ]
3116
+
3117
+ [[package]]
3118
+ name = "winapi-x86_64-pc-windows-gnu"
3119
+ version = "0.4.0"
3120
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3121
+ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
3122
+
3123
+ [[package]]
3124
+ name = "windows-link"
3125
+ version = "0.2.1"
3126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3127
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
3128
+
3129
+ [[package]]
3130
+ name = "windows-sys"
3131
+ version = "0.32.0"
3132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3133
+ checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"
3134
+ dependencies = [
3135
+ "windows_aarch64_msvc 0.32.0",
3136
+ "windows_i686_gnu 0.32.0",
3137
+ "windows_i686_msvc 0.32.0",
3138
+ "windows_x86_64_gnu 0.32.0",
3139
+ "windows_x86_64_msvc 0.32.0",
3140
+ ]
3141
+
3142
+ [[package]]
3143
+ name = "windows-sys"
3144
+ version = "0.52.0"
3145
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3146
+ checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
3147
+ dependencies = [
3148
+ "windows-targets 0.52.6",
3149
+ ]
3150
+
3151
+ [[package]]
3152
+ name = "windows-sys"
3153
+ version = "0.60.2"
3154
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3155
+ checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
3156
+ dependencies = [
3157
+ "windows-targets 0.53.5",
3158
+ ]
3159
+
3160
+ [[package]]
3161
+ name = "windows-sys"
3162
+ version = "0.61.2"
3163
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3164
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
3165
+ dependencies = [
3166
+ "windows-link",
3167
+ ]
3168
+
3169
+ [[package]]
3170
+ name = "windows-targets"
3171
+ version = "0.52.6"
3172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3173
+ checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
3174
+ dependencies = [
3175
+ "windows_aarch64_gnullvm 0.52.6",
3176
+ "windows_aarch64_msvc 0.52.6",
3177
+ "windows_i686_gnu 0.52.6",
3178
+ "windows_i686_gnullvm 0.52.6",
3179
+ "windows_i686_msvc 0.52.6",
3180
+ "windows_x86_64_gnu 0.52.6",
3181
+ "windows_x86_64_gnullvm 0.52.6",
3182
+ "windows_x86_64_msvc 0.52.6",
3183
+ ]
3184
+
3185
+ [[package]]
3186
+ name = "windows-targets"
3187
+ version = "0.53.5"
3188
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3189
+ checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
3190
+ dependencies = [
3191
+ "windows-link",
3192
+ "windows_aarch64_gnullvm 0.53.1",
3193
+ "windows_aarch64_msvc 0.53.1",
3194
+ "windows_i686_gnu 0.53.1",
3195
+ "windows_i686_gnullvm 0.53.1",
3196
+ "windows_i686_msvc 0.53.1",
3197
+ "windows_x86_64_gnu 0.53.1",
3198
+ "windows_x86_64_gnullvm 0.53.1",
3199
+ "windows_x86_64_msvc 0.53.1",
3200
+ ]
3201
+
3202
+ [[package]]
3203
+ name = "windows_aarch64_gnullvm"
3204
+ version = "0.52.6"
3205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3206
+ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
3207
+
3208
+ [[package]]
3209
+ name = "windows_aarch64_gnullvm"
3210
+ version = "0.53.1"
3211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3212
+ checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
3213
+
3214
+ [[package]]
3215
+ name = "windows_aarch64_msvc"
3216
+ version = "0.32.0"
3217
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3218
+ checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
3219
+
3220
+ [[package]]
3221
+ name = "windows_aarch64_msvc"
3222
+ version = "0.52.6"
3223
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3224
+ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
3225
+
3226
+ [[package]]
3227
+ name = "windows_aarch64_msvc"
3228
+ version = "0.53.1"
3229
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3230
+ checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
3231
+
3232
+ [[package]]
3233
+ name = "windows_i686_gnu"
3234
+ version = "0.32.0"
3235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3236
+ checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
3237
+
3238
+ [[package]]
3239
+ name = "windows_i686_gnu"
3240
+ version = "0.52.6"
3241
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3242
+ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
3243
+
3244
+ [[package]]
3245
+ name = "windows_i686_gnu"
3246
+ version = "0.53.1"
3247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3248
+ checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
3249
+
3250
+ [[package]]
3251
+ name = "windows_i686_gnullvm"
3252
+ version = "0.52.6"
3253
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3254
+ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
3255
+
3256
+ [[package]]
3257
+ name = "windows_i686_gnullvm"
3258
+ version = "0.53.1"
3259
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3260
+ checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
3261
+
3262
+ [[package]]
3263
+ name = "windows_i686_msvc"
3264
+ version = "0.32.0"
3265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3266
+ checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
3267
+
3268
+ [[package]]
3269
+ name = "windows_i686_msvc"
3270
+ version = "0.52.6"
3271
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3272
+ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
3273
+
3274
+ [[package]]
3275
+ name = "windows_i686_msvc"
3276
+ version = "0.53.1"
3277
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3278
+ checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
3279
+
3280
+ [[package]]
3281
+ name = "windows_x86_64_gnu"
3282
+ version = "0.32.0"
3283
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3284
+ checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
3285
+
3286
+ [[package]]
3287
+ name = "windows_x86_64_gnu"
3288
+ version = "0.52.6"
3289
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3290
+ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
3291
+
3292
+ [[package]]
3293
+ name = "windows_x86_64_gnu"
3294
+ version = "0.53.1"
3295
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3296
+ checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
3297
+
3298
+ [[package]]
3299
+ name = "windows_x86_64_gnullvm"
3300
+ version = "0.52.6"
3301
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3302
+ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
3303
+
3304
+ [[package]]
3305
+ name = "windows_x86_64_gnullvm"
3306
+ version = "0.53.1"
3307
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3308
+ checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
3309
+
3310
+ [[package]]
3311
+ name = "windows_x86_64_msvc"
3312
+ version = "0.32.0"
3313
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3314
+ checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
3315
+
3316
+ [[package]]
3317
+ name = "windows_x86_64_msvc"
3318
+ version = "0.52.6"
3319
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3320
+ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
3321
+
3322
+ [[package]]
3323
+ name = "windows_x86_64_msvc"
3324
+ version = "0.53.1"
3325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3326
+ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
3327
+
3328
+ [[package]]
3329
+ name = "winnow"
3330
+ version = "0.7.13"
3331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3332
+ checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf"
3333
+ dependencies = [
3334
+ "memchr",
3335
+ ]
3336
+
3337
+ [[package]]
3338
+ name = "wit-bindgen"
3339
+ version = "0.46.0"
3340
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3341
+ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
3342
+
3343
+ [[package]]
3344
+ name = "writeable"
3345
+ version = "0.6.2"
3346
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3347
+ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
3348
+
3349
+ [[package]]
3350
+ name = "yoke"
3351
+ version = "0.8.1"
3352
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3353
+ checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
3354
+ dependencies = [
3355
+ "stable_deref_trait",
3356
+ "yoke-derive",
3357
+ "zerofrom",
3358
+ ]
3359
+
3360
+ [[package]]
3361
+ name = "yoke-derive"
3362
+ version = "0.8.1"
3363
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3364
+ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
3365
+ dependencies = [
3366
+ "proc-macro2",
3367
+ "quote",
3368
+ "syn 2.0.100",
3369
+ "synstructure",
3370
+ ]
3371
+
3372
+ [[package]]
3373
+ name = "zerocopy"
3374
+ version = "0.8.27"
3375
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3376
+ checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
3377
+ dependencies = [
3378
+ "zerocopy-derive",
3379
+ ]
3380
+
3381
+ [[package]]
3382
+ name = "zerocopy-derive"
3383
+ version = "0.8.27"
3384
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3385
+ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
3386
+ dependencies = [
3387
+ "proc-macro2",
3388
+ "quote",
3389
+ "syn 2.0.100",
3390
+ ]
3391
+
3392
+ [[package]]
3393
+ name = "zerofrom"
3394
+ version = "0.1.6"
3395
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3396
+ checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
3397
+ dependencies = [
3398
+ "zerofrom-derive",
3399
+ ]
3400
+
3401
+ [[package]]
3402
+ name = "zerofrom-derive"
3403
+ version = "0.1.6"
3404
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3405
+ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
3406
+ dependencies = [
3407
+ "proc-macro2",
3408
+ "quote",
3409
+ "syn 2.0.100",
3410
+ "synstructure",
3411
+ ]
3412
+
3413
+ [[package]]
3414
+ name = "zeroize"
3415
+ version = "1.8.2"
3416
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3417
+ checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
3418
+
3419
+ [[package]]
3420
+ name = "zerotrie"
3421
+ version = "0.2.3"
3422
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3423
+ checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
3424
+ dependencies = [
3425
+ "displaydoc",
3426
+ "yoke",
3427
+ "zerofrom",
3428
+ ]
3429
+
3430
+ [[package]]
3431
+ name = "zerovec"
3432
+ version = "0.11.5"
3433
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3434
+ checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
3435
+ dependencies = [
3436
+ "yoke",
3437
+ "zerofrom",
3438
+ "zerovec-derive",
3439
+ ]
3440
+
3441
+ [[package]]
3442
+ name = "zerovec-derive"
3443
+ version = "0.11.2"
3444
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3445
+ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
3446
+ dependencies = [
3447
+ "proc-macro2",
3448
+ "quote",
3449
+ "syn 2.0.100",
3450
+ ]
3451
+
3452
+ [[package]]
3453
+ name = "zstd"
3454
+ version = "0.13.3"
3455
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3456
+ checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
3457
+ dependencies = [
3458
+ "zstd-safe",
3459
+ ]
3460
+
3461
+ [[package]]
3462
+ name = "zstd-safe"
3463
+ version = "7.2.4"
3464
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3465
+ checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
3466
+ dependencies = [
3467
+ "zstd-sys",
3468
+ ]
3469
+
3470
+ [[package]]
3471
+ name = "zstd-sys"
3472
+ version = "2.0.16+zstd.1.5.7"
3473
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3474
+ checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
3475
+ dependencies = [
3476
+ "cc",
3477
+ "pkg-config",
3478
+ ]
3479
+ LOCKEOF
3480
+
3481
+ # ---- prefetch every dependency for the workspace, offline later ------------
3482
+ # Run from within the temp mirror, never from /source_ro or the repo root.
3483
+ # --locked ensures the fetched graph matches the locked versions build.sh needs.
3484
+ if (cd "$tmp_ws" && cargo fetch --locked --manifest-path "$tmp_ws/Cargo.toml"); then
3485
+ echo "cargo fetch completed successfully"
3486
+ else
3487
+ echo "cargo fetch failed" >&2
3488
+ rm -rf "$tmp_ws"
3489
+ _download_fail
3490
+ fi
3491
+
3492
+ rm -rf "$tmp_ws"
3493
+
3494
+ unset _download_is_sourced
neodyme-labs--solana-security-txt.ef36a4b/environment/executable ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97e91508de71771d00878f19eea55856bf14401e7230379f9110675022d0ea58
3
+ size 8601360
neodyme-labs--solana-security-txt.ef36a4b/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
neodyme-labs--solana-security-txt.ef36a4b/environment/workspace.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14c4b46e9715a7dc9c628b90d8b201fafa5798671d28f4a1f5da86bb39872208
3
+ size 6008
neodyme-labs--solana-security-txt.ef36a4b/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
neodyme-labs--solana-security-txt.ef36a4b/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
neodyme-labs--solana-security-txt.ef36a4b/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/neodyme-labs--solana-security-txt.ef36a4b"
25
+ description = "Synthetic ProgramGym cleanroom reconstruction task for neodyme-labs/solana-security-txt"
26
+ authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
27
+ keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "rust"]
28
+
29
+ [metadata]
30
+ source = "ProgramGym"
31
+ instance_id = "neodyme-labs__solana-security-txt.ef36a4b"
32
+ repository = "neodyme-labs/solana-security-txt"
33
+ commit = "ef36a4b7afce9e37c26b2e5b98efdd306497d902"
34
+ language = "rust"
35
+ difficulty = "easy"
36
+ difficulty_score = 0.6273658565927325
37
+ test_branches = 3
38
+ test_count = 493
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"
neodyme-labs--solana-security-txt.ef36a4b/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"]
neodyme-labs--solana-security-txt.ef36a4b/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:6a486b8c06ab36d11d6452a7081a037c64f2177666a56f263d98f57896bae6c3
3
+ size 23126