Datasets:
Upload folder using huggingface_hub (part 36)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +48 -0
- ordinals-wallet--ordinals-collec/tests/harbor_prepare_download_env.sh +37 -0
- ordinals-wallet--ordinals-collec/tests/programgym_evaluator.py +1201 -0
- ordinals-wallet--ordinals-collec/tests/programgym_task.json +0 -0
- ordinals-wallet--ordinals-collec/tests/test.sh +82 -0
- ordinals-wallet--ordinals-collec/tests/workspace.tar.gz +3 -0
- orhnk--rascii.8d33a36/environment/Dockerfile +59 -0
- orhnk--rascii.8d33a36/environment/download.sh +1315 -0
- orhnk--rascii.8d33a36/environment/executable +3 -0
- orhnk--rascii.8d33a36/environment/harbor_prepare_download_env.sh +37 -0
- orhnk--rascii.8d33a36/environment/workspace.tar.gz +3 -0
- orhnk--rascii.8d33a36/instruction.md +98 -0
- orhnk--rascii.8d33a36/solution/solve.sh +33 -0
- orhnk--rascii.8d33a36/task.toml +69 -0
- orhnk--rascii.8d33a36/tests/Dockerfile +68 -0
- orhnk--rascii.8d33a36/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- orhnk--rascii.8d33a36/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- orhnk--rascii.8d33a36/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- orhnk--rascii.8d33a36/tests/blobs/tests/generated_module_04.tar.gz +3 -0
- orhnk--rascii.8d33a36/tests/download.sh +1315 -0
- orhnk--rascii.8d33a36/tests/executable +3 -0
- orhnk--rascii.8d33a36/tests/harbor_prepare_download_env.sh +37 -0
- orhnk--rascii.8d33a36/tests/programgym_evaluator.py +1201 -0
- orhnk--rascii.8d33a36/tests/programgym_task.json +0 -0
- orhnk--rascii.8d33a36/tests/test.sh +82 -0
- orhnk--rascii.8d33a36/tests/workspace.tar.gz +3 -0
- orhun--pkgtop.c41e785/environment/Dockerfile +60 -0
- orhun--pkgtop.c41e785/environment/download.sh +64 -0
- orhun--pkgtop.c41e785/environment/executable +3 -0
- orhun--pkgtop.c41e785/environment/programgym-go.tar.gz +3 -0
- orhun--pkgtop.c41e785/environment/workspace.tar.gz +3 -0
- orhun--pkgtop.c41e785/instruction.md +98 -0
- orhun--pkgtop.c41e785/solution/solve.sh +33 -0
- orhun--pkgtop.c41e785/task.toml +69 -0
- orhun--pkgtop.c41e785/tests/Dockerfile +68 -0
- orhun--pkgtop.c41e785/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- orhun--pkgtop.c41e785/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- orhun--pkgtop.c41e785/tests/download.sh +64 -0
- orhun--pkgtop.c41e785/tests/executable +3 -0
- orhun--pkgtop.c41e785/tests/programgym-go.tar.gz +3 -0
- orhun--pkgtop.c41e785/tests/programgym_evaluator.py +1201 -0
- orhun--pkgtop.c41e785/tests/programgym_task.json +359 -0
- orhun--pkgtop.c41e785/tests/test.sh +82 -0
- orhun--pkgtop.c41e785/tests/workspace.tar.gz +3 -0
- orhun--systeroid.810348e/environment/Dockerfile +59 -0
- orhun--systeroid.810348e/environment/download.sh +1936 -0
- orhun--systeroid.810348e/environment/executable +3 -0
- orhun--systeroid.810348e/environment/harbor_prepare_download_env.sh +37 -0
- orhun--systeroid.810348e/environment/workspace.tar.gz +3 -0
- orhun--systeroid.810348e/instruction.md +98 -0
.gitattributes
CHANGED
|
@@ -1956,3 +1956,51 @@ orangekame3--paclear.250b706/environment/executable filter=lfs diff=lfs merge=lf
|
|
| 1956 |
orangekame3--paclear.250b706/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1957 |
ordinals-wallet--ordinals-collec/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1958 |
ordinals-wallet--ordinals-collec/tests/executable filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1956 |
orangekame3--paclear.250b706/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1957 |
ordinals-wallet--ordinals-collec/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1958 |
ordinals-wallet--ordinals-collec/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1959 |
+
orhnk--rascii.8d33a36/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1960 |
+
orhnk--rascii.8d33a36/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1961 |
+
orhun--pkgtop.c41e785/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1962 |
+
orhun--pkgtop.c41e785/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1963 |
+
orhun--systeroid.810348e/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1964 |
+
orhun--systeroid.810348e/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1965 |
+
orijtech--structslop.0696445/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1966 |
+
orijtech--structslop.0696445/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1967 |
+
orkunkaraduman--go-httpproxy.848/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1968 |
+
orkunkaraduman--go-httpproxy.848/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1969 |
+
osmcode--libosmium.97dccf1/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1970 |
+
osmcode--libosmium.97dccf1/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1971 |
+
ossia--libossia.b335062/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1972 |
+
ossia--libossia.b335062/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1973 |
+
otakuto--crazydiskinfo.803a585/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1974 |
+
otakuto--crazydiskinfo.803a585/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1975 |
+
otoolep--go-httpd.36d450d/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1976 |
+
otoolep--go-httpd.36d450d/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1977 |
+
owenthereal--ccat.27844a7/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1978 |
+
owenthereal--ccat.27844a7/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1979 |
+
owenthereal--spotctl.6f44a3f/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1980 |
+
owenthereal--spotctl.6f44a3f/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1981 |
+
oxidecomputer--progenitor.18a0fd/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1982 |
+
oxidecomputer--progenitor.18a0fd/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1983 |
+
p-e-w--savage.24e25a6/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1984 |
+
p-e-w--savage.24e25a6/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1985 |
+
p-e-w--shin.a081ee0/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1986 |
+
p-e-w--shin.a081ee0/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1987 |
+
p-ranav--argparse.d924b84/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1988 |
+
p-ranav--argparse.d924b84/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1989 |
+
pablode--gatling.538bf53/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1990 |
+
pablode--gatling.538bf53/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1991 |
+
pablofdezalc--akaze.25d5897/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1992 |
+
pablofdezalc--akaze.25d5897/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1993 |
+
pablojorge--brainfuck.1539247/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1994 |
+
pablojorge--brainfuck.1539247/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1995 |
+
packtpublishing--asynchronous-pr/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1996 |
+
packtpublishing--asynchronous-pr/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1997 |
+
packtpublishing--hands-on-machin/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1998 |
+
packtpublishing--hands-on-machin/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1999 |
+
packtpublishing--practical-syste/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 2000 |
+
packtpublishing--practical-syste/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 2001 |
+
packyme--privacy-filter.64b8de3/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 2002 |
+
packyme--privacy-filter.64b8de3/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 2003 |
+
padok-team--yatas.10ffdfe/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 2004 |
+
padok-team--yatas.10ffdfe/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 2005 |
+
patrikhuber--eos.ce98420/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 2006 |
+
patrikhuber--eos.ce98420/tests/executable filter=lfs diff=lfs merge=lfs -text
|
ordinals-wallet--ordinals-collec/tests/harbor_prepare_download_env.sh
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
command -v cargo
|
| 4 |
+
command -v rustc
|
| 5 |
+
command -v rustup
|
| 6 |
+
cd /workspace
|
| 7 |
+
set -a
|
| 8 |
+
source /tmp/programgym-download.sh
|
| 9 |
+
set +a
|
| 10 |
+
python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
|
| 11 |
+
import os
|
| 12 |
+
import shlex
|
| 13 |
+
|
| 14 |
+
ignored = {
|
| 15 |
+
"ALL_PROXY",
|
| 16 |
+
"HTTP_PROXY",
|
| 17 |
+
"HTTPS_PROXY",
|
| 18 |
+
"NO_PROXY",
|
| 19 |
+
"OLDPWD",
|
| 20 |
+
"PIP_PROXY",
|
| 21 |
+
"PWD",
|
| 22 |
+
"SHLVL",
|
| 23 |
+
"_",
|
| 24 |
+
"all_proxy",
|
| 25 |
+
"http_proxy",
|
| 26 |
+
"https_proxy",
|
| 27 |
+
"no_proxy",
|
| 28 |
+
"pip_proxy",
|
| 29 |
+
}
|
| 30 |
+
for key in sorted(os.environ):
|
| 31 |
+
if key in ignored or key.startswith("BASH_FUNC_"):
|
| 32 |
+
continue
|
| 33 |
+
value = os.environ[key]
|
| 34 |
+
if "\n" in value:
|
| 35 |
+
continue
|
| 36 |
+
print(f"export {key}={shlex.quote(value)}")
|
| 37 |
+
PY
|
ordinals-wallet--ordinals-collec/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""In-place ProgramGym evaluator.
|
| 3 |
+
|
| 4 |
+
Mirrors ProgramGym's ``Evaluator`` pipeline as closely as a single-container,
|
| 5 |
+
no-Docker-in-Docker host allows. Run from ``tests/test.sh`` inside the agent's
|
| 6 |
+
cleanroom container after Harbor flips the verifier-phase network policy.
|
| 7 |
+
|
| 8 |
+
Differences from ``programgym.eval.eval.Evaluator`` that are structural to
|
| 9 |
+
running in one container:
|
| 10 |
+
|
| 11 |
+
* No fresh container per branch. ``snapshot_workspace`` / ``restore_workspace``
|
| 12 |
+
copy a post-compile workspace snapshot to a temp directory and restore it
|
| 13 |
+
before each branch; ``cleanup_lingering_processes`` kills leftover branch
|
| 14 |
+
processes between attempts to approximate the fresh-container boundary.
|
| 15 |
+
* No ``docker commit``. The post-compile workspace snapshot serves the same
|
| 16 |
+
role as the committed image upstream.
|
| 17 |
+
* Hidden test blobs are fetched on demand from HuggingFace via
|
| 18 |
+
``huggingface_hub.snapshot_download`` (matching ``programgym.utils.blob_store``)
|
| 19 |
+
rather than being pre-staged into ``/tests/blobs/``. Override with
|
| 20 |
+
``PROGRAMGYM_BLOB_DIR`` for offline reruns.
|
| 21 |
+
|
| 22 |
+
Everything else (eval_clean_hashes scrub, deterministic synthetic git seed,
|
| 23 |
+
``compile.sh`` then stash + hash the executable, best-effort
|
| 24 |
+
``pytest-rerunfailures``, per-branch test-tar overlay, executable hash
|
| 25 |
+
``--max-worker-restart=4``, xdist worker-crash retry with serial fallback,
|
| 26 |
+
best-of-N attempt selection, active vs ignored test bookkeeping, scoring) is
|
| 27 |
+
preserved.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import re
|
| 36 |
+
import shlex
|
| 37 |
+
import shutil
|
| 38 |
+
import signal
|
| 39 |
+
import subprocess
|
| 40 |
+
import tempfile
|
| 41 |
+
import time
|
| 42 |
+
import traceback
|
| 43 |
+
import xml.etree.ElementTree as ET
|
| 44 |
+
from pathlib import Path
|
| 45 |
+
from typing import Any
|
| 46 |
+
|
| 47 |
+
WORKSPACE = Path(os.environ.get("PROGRAMGYM_WORKSPACE", "/workspace"))
|
| 48 |
+
STASHED_EXECUTABLE = Path("/opt/programgym-stashed-executable-do-not-modify")
|
| 49 |
+
METADATA_PATH = Path(
|
| 50 |
+
os.environ.get("PROGRAMGYM_METADATA", "/tests/programgym_task.json")
|
| 51 |
+
)
|
| 52 |
+
LOG_DIR = Path(os.environ.get("PROGRAMGYM_LOG_DIR", "/logs/verifier"))
|
| 53 |
+
WORKER_CRASH_PHRASE = "worker '"
|
| 54 |
+
XDIST_COLLAPSE_MARKERS = (
|
| 55 |
+
"maximum crashed workers reached",
|
| 56 |
+
"xdist: maximum crashed",
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
DEFAULT_HF_REPO_ID = "programgym/ProgramGym-Tests"
|
| 60 |
+
DEFAULT_HF_REVISION = "main"
|
| 61 |
+
|
| 62 |
+
# Oracle agent handoff files (see solution/solve.sh). Must not appear in the
|
| 63 |
+
# post-compile workspace snapshot or they pollute tree-scanning tests (dutree).
|
| 64 |
+
_ORACLE_HANDOFF_NAMES = (".programgym_oracle_reference",)
|
| 65 |
+
|
| 66 |
+
_TOOLCHAIN_BIN_DIR_CANDIDATES = (
|
| 67 |
+
"/usr/local/go/bin",
|
| 68 |
+
"/go/bin",
|
| 69 |
+
"/usr/local/cargo/bin",
|
| 70 |
+
"/root/.cargo/bin",
|
| 71 |
+
"/root/.ghcup/bin",
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def toolchain_bin_dirs() -> list[str]:
|
| 76 |
+
"""Return toolchain bin directories that exist on this image."""
|
| 77 |
+
candidates = list(_TOOLCHAIN_BIN_DIR_CANDIDATES)
|
| 78 |
+
candidates.extend(
|
| 79 |
+
str(path)
|
| 80 |
+
for path in sorted(Path("/usr/lib").glob("go-*/bin"))
|
| 81 |
+
if _is_accessible_dir(path)
|
| 82 |
+
)
|
| 83 |
+
seen: set[str] = set()
|
| 84 |
+
present: list[str] = []
|
| 85 |
+
for path in candidates:
|
| 86 |
+
if path in seen:
|
| 87 |
+
continue
|
| 88 |
+
seen.add(path)
|
| 89 |
+
if _is_accessible_dir(path):
|
| 90 |
+
present.append(path)
|
| 91 |
+
return present
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _is_accessible_dir(path: str | Path) -> bool:
|
| 95 |
+
"""Return whether path is a directory without failing on protected homes."""
|
| 96 |
+
try:
|
| 97 |
+
return Path(path).is_dir()
|
| 98 |
+
except OSError:
|
| 99 |
+
return False
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def bootstrap_toolchain_path() -> str:
|
| 103 |
+
"""Prepend discovered toolchain dirs to PATH (idempotent)."""
|
| 104 |
+
prepend = toolchain_bin_dirs()
|
| 105 |
+
current_parts = [part for part in os.environ.get("PATH", "").split(":") if part]
|
| 106 |
+
merged: list[str] = []
|
| 107 |
+
for path in prepend + current_parts:
|
| 108 |
+
if path not in merged:
|
| 109 |
+
merged.append(path)
|
| 110 |
+
new_path = ":".join(merged)
|
| 111 |
+
os.environ["PATH"] = new_path
|
| 112 |
+
return new_path
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _bash_login_command(command: str) -> str:
|
| 116 |
+
"""Run ``command`` under bash -lc with an explicit PATH export."""
|
| 117 |
+
path = bootstrap_toolchain_path()
|
| 118 |
+
return f"export PATH={shlex.quote(path)}; {command}"
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def sha256(path: Path) -> str:
|
| 122 |
+
h = hashlib.sha256()
|
| 123 |
+
with path.open("rb") as f:
|
| 124 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 125 |
+
h.update(chunk)
|
| 126 |
+
return h.hexdigest()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def write_json(path: Path, data: dict[str, Any]) -> None:
|
| 130 |
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
| 131 |
+
tmp.write_text(json.dumps(data, indent=2, sort_keys=True))
|
| 132 |
+
tmp.replace(path)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def _read_log_tail(path: Path | None, max_bytes: int = 65536) -> str:
|
| 136 |
+
if path is None or not path.exists():
|
| 137 |
+
return ""
|
| 138 |
+
data = path.read_bytes()
|
| 139 |
+
if len(data) <= max_bytes:
|
| 140 |
+
return data.decode(errors="replace")
|
| 141 |
+
return data[-max_bytes:].decode(errors="replace")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def _close_pipes(proc: subprocess.Popen[Any]) -> None:
|
| 145 |
+
for stream in (proc.stdout, proc.stderr):
|
| 146 |
+
if stream is not None:
|
| 147 |
+
try:
|
| 148 |
+
stream.close()
|
| 149 |
+
except OSError:
|
| 150 |
+
pass
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _terminate_process_tree(proc: subprocess.Popen[Any]) -> None:
|
| 154 |
+
try:
|
| 155 |
+
os.killpg(proc.pid, signal.SIGKILL)
|
| 156 |
+
except ProcessLookupError:
|
| 157 |
+
pass
|
| 158 |
+
try:
|
| 159 |
+
proc.kill()
|
| 160 |
+
except ProcessLookupError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
_PKILL_PATTERNS = (
|
| 165 |
+
f"{WORKSPACE}/eval/",
|
| 166 |
+
f"{WORKSPACE}/tests/",
|
| 167 |
+
"tail -f",
|
| 168 |
+
"development.log",
|
| 169 |
+
" less ",
|
| 170 |
+
" less$",
|
| 171 |
+
"/less ",
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def _pkill_aggressive() -> str:
|
| 176 |
+
"""Best-effort kill of branch pytest/subprocess trees (Modal gVisor fallback)."""
|
| 177 |
+
notes: list[str] = []
|
| 178 |
+
workspace = str(WORKSPACE)
|
| 179 |
+
patterns = list(_PKILL_PATTERNS) + [
|
| 180 |
+
f"pytest.*{workspace}",
|
| 181 |
+
f"xdist.*{workspace}",
|
| 182 |
+
]
|
| 183 |
+
for pattern in patterns:
|
| 184 |
+
result = subprocess.run(
|
| 185 |
+
["pkill", "-9", "-f", pattern],
|
| 186 |
+
capture_output=True,
|
| 187 |
+
text=True,
|
| 188 |
+
)
|
| 189 |
+
notes.append(f"pkill -9 -f {pattern!r}: rc={result.returncode}")
|
| 190 |
+
return "\n".join(notes)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def run_step(
|
| 194 |
+
command: str,
|
| 195 |
+
cwd: Path,
|
| 196 |
+
*,
|
| 197 |
+
timeout: int,
|
| 198 |
+
env: dict[str, str] | None = None,
|
| 199 |
+
step: str,
|
| 200 |
+
accept_failure: bool = False,
|
| 201 |
+
log_output: bool | None = None,
|
| 202 |
+
max_output_bytes: int = 65536,
|
| 203 |
+
) -> dict[str, Any]:
|
| 204 |
+
if log_output is None:
|
| 205 |
+
log_output = step == "run_tests" or timeout >= 60
|
| 206 |
+
|
| 207 |
+
started = time.monotonic()
|
| 208 |
+
stdout_path: Path | None = None
|
| 209 |
+
stderr_path: Path | None = None
|
| 210 |
+
stdout_f = None
|
| 211 |
+
stderr_f = None
|
| 212 |
+
|
| 213 |
+
if log_output:
|
| 214 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 215 |
+
log_id = f"{step}-{int(started * 1000)}"
|
| 216 |
+
stdout_path = LOG_DIR / f"run-step-{log_id}.stdout.log"
|
| 217 |
+
stderr_path = LOG_DIR / f"run-step-{log_id}.stderr.log"
|
| 218 |
+
stdout_f = stdout_path.open("w", encoding="utf-8")
|
| 219 |
+
stderr_f = stderr_path.open("w", encoding="utf-8")
|
| 220 |
+
popen_stdout: Any = stdout_f
|
| 221 |
+
popen_stderr: Any = stderr_f
|
| 222 |
+
else:
|
| 223 |
+
popen_stdout = subprocess.PIPE
|
| 224 |
+
popen_stderr = subprocess.PIPE
|
| 225 |
+
|
| 226 |
+
proc = subprocess.Popen(
|
| 227 |
+
["bash", "-lc", _bash_login_command(command)],
|
| 228 |
+
cwd=cwd,
|
| 229 |
+
env={**os.environ, **(env or {})},
|
| 230 |
+
stdout=popen_stdout,
|
| 231 |
+
stderr=popen_stderr,
|
| 232 |
+
start_new_session=True,
|
| 233 |
+
text=True,
|
| 234 |
+
)
|
| 235 |
+
timed_out = False
|
| 236 |
+
stdout = ""
|
| 237 |
+
stderr = ""
|
| 238 |
+
try:
|
| 239 |
+
if log_output:
|
| 240 |
+
proc.wait(timeout=timeout)
|
| 241 |
+
else:
|
| 242 |
+
stdout, stderr = proc.communicate(timeout=timeout)
|
| 243 |
+
except subprocess.TimeoutExpired:
|
| 244 |
+
timed_out = True
|
| 245 |
+
_terminate_process_tree(proc)
|
| 246 |
+
cleanup_lingering_processes(aggressive=True)
|
| 247 |
+
try:
|
| 248 |
+
proc.wait(timeout=5)
|
| 249 |
+
except subprocess.TimeoutExpired:
|
| 250 |
+
proc.kill()
|
| 251 |
+
if not log_output:
|
| 252 |
+
_close_pipes(proc)
|
| 253 |
+
finally:
|
| 254 |
+
if stdout_f is not None:
|
| 255 |
+
stdout_f.close()
|
| 256 |
+
if stderr_f is not None:
|
| 257 |
+
stderr_f.close()
|
| 258 |
+
|
| 259 |
+
if timed_out:
|
| 260 |
+
if log_output:
|
| 261 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 262 |
+
stderr_path, max_output_bytes
|
| 263 |
+
)
|
| 264 |
+
else:
|
| 265 |
+
output = ""
|
| 266 |
+
entry = {
|
| 267 |
+
"step": step,
|
| 268 |
+
"command": command,
|
| 269 |
+
"wall_time": time.monotonic() - started,
|
| 270 |
+
"output": output,
|
| 271 |
+
"returncode": 124,
|
| 272 |
+
"exception_info": f"timed out after {timeout}s",
|
| 273 |
+
}
|
| 274 |
+
else:
|
| 275 |
+
if log_output:
|
| 276 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 277 |
+
stderr_path, max_output_bytes
|
| 278 |
+
)
|
| 279 |
+
else:
|
| 280 |
+
output = stdout + stderr
|
| 281 |
+
entry = {
|
| 282 |
+
"step": step,
|
| 283 |
+
"command": command,
|
| 284 |
+
"wall_time": time.monotonic() - started,
|
| 285 |
+
"output": output,
|
| 286 |
+
"returncode": proc.returncode,
|
| 287 |
+
"exception_info": "",
|
| 288 |
+
}
|
| 289 |
+
if entry["returncode"] and not accept_failure:
|
| 290 |
+
raise RuntimeError(
|
| 291 |
+
f"{step} failed: {entry['exception_info'] or entry['output']}"
|
| 292 |
+
)
|
| 293 |
+
return entry
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def cleanup_lingering_processes(*, aggressive: bool = False) -> dict[str, Any]:
|
| 297 |
+
started = time.monotonic()
|
| 298 |
+
patterns = [
|
| 299 |
+
str(WORKSPACE / "executable"),
|
| 300 |
+
f"{WORKSPACE}/eval/",
|
| 301 |
+
f"{WORKSPACE}/tests/",
|
| 302 |
+
# lazygit --logs/-l tests spawn `tail -f` outside /workspace/.
|
| 303 |
+
"tail -f",
|
| 304 |
+
"development.log",
|
| 305 |
+
]
|
| 306 |
+
killed: list[int] = []
|
| 307 |
+
proc_root = Path("/proc")
|
| 308 |
+
proc_available = proc_root.exists()
|
| 309 |
+
if proc_available:
|
| 310 |
+
for proc_dir in proc_root.iterdir():
|
| 311 |
+
if not proc_dir.name.isdigit():
|
| 312 |
+
continue
|
| 313 |
+
pid = int(proc_dir.name)
|
| 314 |
+
if pid in {os.getpid(), os.getppid()}:
|
| 315 |
+
continue
|
| 316 |
+
try:
|
| 317 |
+
raw = (proc_dir / "cmdline").read_bytes()
|
| 318 |
+
except (FileNotFoundError, PermissionError, ProcessLookupError):
|
| 319 |
+
continue
|
| 320 |
+
cmdline = raw.replace(b"\0", b" ").decode(errors="replace")
|
| 321 |
+
if not any(pattern in cmdline for pattern in patterns):
|
| 322 |
+
continue
|
| 323 |
+
try:
|
| 324 |
+
os.kill(pid, signal.SIGKILL)
|
| 325 |
+
except (PermissionError, ProcessLookupError):
|
| 326 |
+
continue
|
| 327 |
+
killed.append(pid)
|
| 328 |
+
pkill_output = ""
|
| 329 |
+
if aggressive or not proc_available:
|
| 330 |
+
pkill_output = _pkill_aggressive()
|
| 331 |
+
output_parts = []
|
| 332 |
+
if killed:
|
| 333 |
+
output_parts.append("\n".join(str(pid) for pid in killed))
|
| 334 |
+
if pkill_output:
|
| 335 |
+
output_parts.append(pkill_output)
|
| 336 |
+
return {
|
| 337 |
+
"step": "cleanup_lingering_processes",
|
| 338 |
+
"command": "kill leftover branch processes referencing the workspace",
|
| 339 |
+
"wall_time": time.monotonic() - started,
|
| 340 |
+
"output": "\n".join(output_parts),
|
| 341 |
+
"returncode": 0,
|
| 342 |
+
"exception_info": "",
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
def extract_trusted_blob(tar_path: Path, dest: Path) -> None:
|
| 347 |
+
import tarfile
|
| 348 |
+
|
| 349 |
+
with tarfile.open(tar_path, "r:gz") as tf:
|
| 350 |
+
try:
|
| 351 |
+
tf.extractall(dest, filter="fully_trusted")
|
| 352 |
+
except TypeError:
|
| 353 |
+
tf.extractall(dest)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def find_results_xml() -> Path | None:
|
| 357 |
+
"""Return the junit xml path if pytest wrote one."""
|
| 358 |
+
for candidate in (WORKSPACE / "eval" / "results.xml", WORKSPACE / "results.xml"):
|
| 359 |
+
if candidate.exists():
|
| 360 |
+
return candidate
|
| 361 |
+
return None
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def remove_oracle_handoff_artifacts() -> list[str]:
|
| 365 |
+
"""Drop oracle-agent handoff files from /workspace before snapshot/restore."""
|
| 366 |
+
removed: list[str] = []
|
| 367 |
+
for name in _ORACLE_HANDOFF_NAMES:
|
| 368 |
+
path = WORKSPACE / name
|
| 369 |
+
if path.exists():
|
| 370 |
+
if path.is_dir():
|
| 371 |
+
shutil.rmtree(path)
|
| 372 |
+
else:
|
| 373 |
+
path.unlink()
|
| 374 |
+
removed.append(name)
|
| 375 |
+
return removed
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def _remove_tree(path: Path) -> None:
|
| 379 |
+
"""Remove a file or directory tree, with a shell fallback for overlay races."""
|
| 380 |
+
if path.is_symlink() or path.is_file():
|
| 381 |
+
path.unlink(missing_ok=True)
|
| 382 |
+
return
|
| 383 |
+
if not path.is_dir():
|
| 384 |
+
path.unlink(missing_ok=True)
|
| 385 |
+
return
|
| 386 |
+
for attempt in range(3):
|
| 387 |
+
try:
|
| 388 |
+
shutil.rmtree(path)
|
| 389 |
+
if not path.exists():
|
| 390 |
+
return
|
| 391 |
+
except OSError:
|
| 392 |
+
if attempt == 2:
|
| 393 |
+
run_step(
|
| 394 |
+
f"rm -rf {shlex.quote(str(path))}",
|
| 395 |
+
path.parent,
|
| 396 |
+
timeout=120,
|
| 397 |
+
step="clear_workspace_fallback",
|
| 398 |
+
accept_failure=True,
|
| 399 |
+
)
|
| 400 |
+
if not path.exists():
|
| 401 |
+
return
|
| 402 |
+
raise
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
def ensure_workspace_dir() -> None:
|
| 406 |
+
"""Guarantee WORKSPACE exists as a writable directory (not a symlink/file)."""
|
| 407 |
+
if WORKSPACE.exists() and not WORKSPACE.is_dir():
|
| 408 |
+
if WORKSPACE.is_symlink() or WORKSPACE.is_file():
|
| 409 |
+
WORKSPACE.unlink()
|
| 410 |
+
else:
|
| 411 |
+
shutil.rmtree(WORKSPACE)
|
| 412 |
+
WORKSPACE.mkdir(parents=True, exist_ok=True)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def clear_workspace() -> None:
|
| 416 |
+
ensure_workspace_dir()
|
| 417 |
+
for path in list(WORKSPACE.iterdir()):
|
| 418 |
+
_remove_tree(path)
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
def restore_reference_executable() -> None:
|
| 422 |
+
"""Write the stashed reference binary into /workspace after a branch overlay.
|
| 423 |
+
|
| 424 |
+
Branch blobs may ship ``executable`` as a dangling symlink into
|
| 425 |
+
``target/release/...``; ``shutil.copy2`` would follow it and raise
|
| 426 |
+
``FileNotFoundError``. Drop whatever the blob left and copy the stashed
|
| 427 |
+
reference as a regular file.
|
| 428 |
+
"""
|
| 429 |
+
ensure_workspace_dir()
|
| 430 |
+
if not STASHED_EXECUTABLE.is_file():
|
| 431 |
+
raise FileNotFoundError(
|
| 432 |
+
f"missing stashed reference executable at {STASHED_EXECUTABLE}"
|
| 433 |
+
)
|
| 434 |
+
dest = WORKSPACE / "executable"
|
| 435 |
+
if dest.exists() or dest.is_symlink():
|
| 436 |
+
if dest.is_dir():
|
| 437 |
+
shutil.rmtree(dest)
|
| 438 |
+
else:
|
| 439 |
+
dest.unlink(missing_ok=True)
|
| 440 |
+
shutil.copy2(STASHED_EXECUTABLE, dest)
|
| 441 |
+
dest.chmod(0o755)
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
def snapshot_workspace(dest: Path) -> None:
|
| 445 |
+
if dest.exists():
|
| 446 |
+
shutil.rmtree(dest)
|
| 447 |
+
shutil.copytree(WORKSPACE, dest, symlinks=True)
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def restore_workspace(source: Path) -> None:
|
| 451 |
+
clear_workspace()
|
| 452 |
+
shutil.copytree(source, WORKSPACE, dirs_exist_ok=True, symlinks=True)
|
| 453 |
+
ensure_workspace_dir()
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def remove_hashed_files(root: Path, hashes: set[str]) -> list[str]:
|
| 457 |
+
removed: list[str] = []
|
| 458 |
+
for path in root.rglob("*"):
|
| 459 |
+
if path.is_file() and not path.is_symlink():
|
| 460 |
+
try:
|
| 461 |
+
if sha256(path) in hashes:
|
| 462 |
+
path.unlink()
|
| 463 |
+
removed.append(str(path.relative_to(root)))
|
| 464 |
+
except OSError:
|
| 465 |
+
continue
|
| 466 |
+
return removed
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
def branch_tests(branch_info: dict[str, Any]) -> list[str]:
|
| 470 |
+
ignored = {
|
| 471 |
+
item["name"] for item in branch_info.get("ignored_tests", []) if "name" in item
|
| 472 |
+
}
|
| 473 |
+
return [name for name in branch_info.get("tests", []) if name not in ignored]
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
def ignored_tests(metadata: dict[str, Any]) -> set[str]:
|
| 477 |
+
result: set[str] = set()
|
| 478 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 479 |
+
result.update(
|
| 480 |
+
f"{branch}/{item['name']}"
|
| 481 |
+
for item in info.get("ignored_tests", [])
|
| 482 |
+
if "name" in item
|
| 483 |
+
)
|
| 484 |
+
return result
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def active_tests(metadata: dict[str, Any]) -> set[str]:
|
| 488 |
+
active: set[str] = set()
|
| 489 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 490 |
+
if info.get("ignored"):
|
| 491 |
+
continue
|
| 492 |
+
ignored = {
|
| 493 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 494 |
+
}
|
| 495 |
+
active.update(
|
| 496 |
+
f"{branch}/{name}" for name in info.get("tests", []) if name not in ignored
|
| 497 |
+
)
|
| 498 |
+
return active
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def inject_not_run(
|
| 502 |
+
result: dict[str, Any], branch: str, tests: list[str], error_code: str
|
| 503 |
+
) -> None:
|
| 504 |
+
result["test_results"].extend(
|
| 505 |
+
{
|
| 506 |
+
"name": name,
|
| 507 |
+
"branch": branch,
|
| 508 |
+
"status": "not_run",
|
| 509 |
+
"extra": {"error_code": error_code},
|
| 510 |
+
}
|
| 511 |
+
for name in tests
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def testcase_name(case: ET.Element) -> str:
|
| 516 |
+
classname = case.attrib.get("classname", "")
|
| 517 |
+
name = case.attrib.get("name", "")
|
| 518 |
+
return f"{classname}.{name}" if classname else name
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
# Only these tags under <testcase> represent a result. <system-out> /
|
| 522 |
+
# <system-err> are stdout/stderr captures and must not be treated as results
|
| 523 |
+
# (a leading <system-out> followed by <failure> would otherwise be classified
|
| 524 |
+
# as a stdout-only "passed").
|
| 525 |
+
JUNIT_RESULT_TAGS = {"skipped", "failure", "error"}
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def parse_junit(
|
| 529 |
+
raw_xml: str, branch: str, expected: list[str], ignored: set[str]
|
| 530 |
+
) -> tuple[list[dict[str, Any]], list[str]]:
|
| 531 |
+
root = ET.fromstring(raw_xml)
|
| 532 |
+
got: set[str] = set()
|
| 533 |
+
results: list[dict[str, Any]] = []
|
| 534 |
+
for case in root.iter("testcase"):
|
| 535 |
+
name = testcase_name(case)
|
| 536 |
+
got.add(name)
|
| 537 |
+
extra: dict[str, Any] = {}
|
| 538 |
+
if "time" in case.attrib:
|
| 539 |
+
try:
|
| 540 |
+
extra["time"] = float(case.attrib["time"])
|
| 541 |
+
except ValueError:
|
| 542 |
+
extra["time"] = case.attrib["time"]
|
| 543 |
+
result_children = [c for c in case if c.tag in JUNIT_RESULT_TAGS]
|
| 544 |
+
# Collapse duplicate same-tag result children. Pytest's
|
| 545 |
+
# "pytest.internal" pseudo-test sometimes emits two identical <error>
|
| 546 |
+
# entries; treating that as a system_error would over-flag a real
|
| 547 |
+
# single failure. Mirrors upstream eval.py:816-820.
|
| 548 |
+
if len(result_children) > 1 and len({c.tag for c in result_children}) == 1:
|
| 549 |
+
result_children = [result_children[0]]
|
| 550 |
+
if not result_children:
|
| 551 |
+
status = "passed"
|
| 552 |
+
elif len(result_children) != 1:
|
| 553 |
+
status = "system_error"
|
| 554 |
+
extra["error_details"] = (
|
| 555 |
+
f"Expected 1 result for {name}, got {len(result_children)}: "
|
| 556 |
+
f"{[c.tag for c in result_children]}"
|
| 557 |
+
)
|
| 558 |
+
else:
|
| 559 |
+
first = result_children[0]
|
| 560 |
+
status = first.tag # "skipped" | "failure" | "error"
|
| 561 |
+
extra["message"] = first.attrib.get("message") or ""
|
| 562 |
+
if first.text:
|
| 563 |
+
extra["text"] = first.text
|
| 564 |
+
results.append(
|
| 565 |
+
{"name": name, "branch": branch, "status": status, "extra": extra}
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
active_expected = [name for name in expected if name not in ignored]
|
| 569 |
+
missing = [name for name in active_expected if name not in got]
|
| 570 |
+
results.extend(
|
| 571 |
+
{
|
| 572 |
+
"name": name,
|
| 573 |
+
"branch": branch,
|
| 574 |
+
"status": "not_run",
|
| 575 |
+
"extra": {"error_code": "missing_from_junit_xml"},
|
| 576 |
+
}
|
| 577 |
+
for name in missing
|
| 578 |
+
)
|
| 579 |
+
unexpected = got - set(expected) - ignored
|
| 580 |
+
warnings = (
|
| 581 |
+
[f"Branch {branch}: {len(unexpected)} test(s) in JUnit XML not in tests.json"]
|
| 582 |
+
if unexpected
|
| 583 |
+
else []
|
| 584 |
+
)
|
| 585 |
+
return results, warnings
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
def count_worker_crashes(raw_xml: str) -> int:
|
| 589 |
+
if WORKER_CRASH_PHRASE not in raw_xml:
|
| 590 |
+
return 0
|
| 591 |
+
try:
|
| 592 |
+
root = ET.fromstring(raw_xml)
|
| 593 |
+
except ET.ParseError:
|
| 594 |
+
return 0
|
| 595 |
+
crashes = 0
|
| 596 |
+
for case in root.iter("testcase"):
|
| 597 |
+
for child in case:
|
| 598 |
+
text = (child.get("message") or "") + " " + (child.text or "")
|
| 599 |
+
if (
|
| 600 |
+
child.tag in {"error", "failure"}
|
| 601 |
+
and WORKER_CRASH_PHRASE in text
|
| 602 |
+
and "crashed" in text
|
| 603 |
+
):
|
| 604 |
+
crashes += 1
|
| 605 |
+
break
|
| 606 |
+
return crashes
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def run_output_indicates_xdist_collapse(output: str) -> bool:
|
| 610 |
+
lower = output.lower()
|
| 611 |
+
return any(marker in lower for marker in XDIST_COLLAPSE_MARKERS)
|
| 612 |
+
|
| 613 |
+
|
| 614 |
+
def count_junit_failures(raw_xml: str) -> int:
|
| 615 |
+
try:
|
| 616 |
+
root = ET.fromstring(raw_xml)
|
| 617 |
+
except ET.ParseError:
|
| 618 |
+
return 0
|
| 619 |
+
failures = 0
|
| 620 |
+
for case in root.iter("testcase"):
|
| 621 |
+
for child in case:
|
| 622 |
+
if child.tag in {"failure", "error"}:
|
| 623 |
+
failures += 1
|
| 624 |
+
break
|
| 625 |
+
return failures
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
def count_junit_passed(raw_xml: str) -> int:
|
| 629 |
+
try:
|
| 630 |
+
root = ET.fromstring(raw_xml)
|
| 631 |
+
except ET.ParseError:
|
| 632 |
+
return 0
|
| 633 |
+
passed = 0
|
| 634 |
+
for case in root.iter("testcase"):
|
| 635 |
+
if not any(child.tag in JUNIT_RESULT_TAGS for child in case):
|
| 636 |
+
passed += 1
|
| 637 |
+
return passed
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def branch_attempt_metrics(
|
| 641 |
+
raw_xml: str, *, run_output: str, expected_tests: int
|
| 642 |
+
) -> tuple[int, int, int, int]:
|
| 643 |
+
"""Return (crashes, n_testcases, failures, missing_from_xml)."""
|
| 644 |
+
crashes = count_worker_crashes(raw_xml)
|
| 645 |
+
if run_output_indicates_xdist_collapse(run_output):
|
| 646 |
+
crashes = max(crashes, 1)
|
| 647 |
+
n_tests = count_testcases(raw_xml)
|
| 648 |
+
failures = count_junit_failures(raw_xml)
|
| 649 |
+
missing = max(0, expected_tests - n_tests)
|
| 650 |
+
return crashes, n_tests, failures, missing
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def needs_serial_retry(
|
| 654 |
+
*,
|
| 655 |
+
serial: bool,
|
| 656 |
+
crashes: int,
|
| 657 |
+
missing: int,
|
| 658 |
+
failures: int,
|
| 659 |
+
n_tests: int,
|
| 660 |
+
expected_tests: int,
|
| 661 |
+
run_output: str,
|
| 662 |
+
) -> bool:
|
| 663 |
+
if serial:
|
| 664 |
+
return False
|
| 665 |
+
high_failure_rate = (
|
| 666 |
+
expected_tests > 0 and n_tests >= expected_tests and failures / n_tests >= 0.8
|
| 667 |
+
)
|
| 668 |
+
return (
|
| 669 |
+
crashes > 0
|
| 670 |
+
or missing > 0
|
| 671 |
+
or high_failure_rate
|
| 672 |
+
or run_output_indicates_xdist_collapse(run_output)
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def count_testcases(raw_xml: str) -> int:
|
| 677 |
+
try:
|
| 678 |
+
return sum(1 for _ in ET.fromstring(raw_xml).iter("testcase"))
|
| 679 |
+
except ET.ParseError:
|
| 680 |
+
return 0
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def scored_results(
|
| 684 |
+
result: dict[str, Any], metadata: dict[str, Any]
|
| 685 |
+
) -> list[dict[str, Any]]:
|
| 686 |
+
active = active_tests(metadata)
|
| 687 |
+
by_key = {
|
| 688 |
+
f"{test['branch']}/{test['name']}": test
|
| 689 |
+
for test in result["test_results"]
|
| 690 |
+
if f"{test['branch']}/{test['name']}" in active
|
| 691 |
+
}
|
| 692 |
+
return [
|
| 693 |
+
by_key.get(
|
| 694 |
+
key,
|
| 695 |
+
{
|
| 696 |
+
"branch": key.split("/", 1)[0],
|
| 697 |
+
"name": key.split("/", 1)[1],
|
| 698 |
+
"status": "not_run",
|
| 699 |
+
"extra": {"error_code": "missing_from_results"},
|
| 700 |
+
},
|
| 701 |
+
)
|
| 702 |
+
for key in sorted(active)
|
| 703 |
+
]
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def summarize(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 707 |
+
scored = scored_results(result, metadata)
|
| 708 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 709 |
+
n_tests = len(scored)
|
| 710 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 711 |
+
# Multi-key reward: Harbor's default Mean aggregates each key independently
|
| 712 |
+
# (see harbor.metrics.base.aggregate_reward_dicts), so mean("resolved") is
|
| 713 |
+
# the proportion of tasks scoring a perfect pass-rate and mean of
|
| 714 |
+
# "almost_resolved" is the proportion scoring >= 0.95. "reward" stays the
|
| 715 |
+
# per-task pass-rate whose mean is the overall mean reward.
|
| 716 |
+
return {
|
| 717 |
+
"reward": pass_rate,
|
| 718 |
+
"resolved": 1.0 if pass_rate >= 1.0 else 0.0,
|
| 719 |
+
"almost_resolved": 1.0 if pass_rate >= 0.95 else 0.0,
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
def diagnostics(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 724 |
+
scored = scored_results(result, metadata)
|
| 725 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 726 |
+
n_tests = len(scored)
|
| 727 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 728 |
+
return {
|
| 729 |
+
"pass_rate": pass_rate,
|
| 730 |
+
"resolved": int(
|
| 731 |
+
bool(
|
| 732 |
+
n_tests
|
| 733 |
+
and n_passed == n_tests
|
| 734 |
+
and not result["test_branch_errors"]
|
| 735 |
+
and not result["error_code"]
|
| 736 |
+
)
|
| 737 |
+
),
|
| 738 |
+
"n_passed": n_passed,
|
| 739 |
+
"n_tests": n_tests,
|
| 740 |
+
"n_branch_errors": len(result["test_branch_errors"]),
|
| 741 |
+
"infra_error": int(bool(result["error_code"] or result["test_branch_errors"])),
|
| 742 |
+
"executable_hash_present": int(bool(result.get("executable_hash"))),
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def use_script_pty() -> bool:
|
| 747 |
+
return os.environ.get("PROGRAMGYM_SCRIPT_PTY", "").strip() == "1"
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def script_pty_available() -> bool:
|
| 751 |
+
return shutil.which("script") is not None
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
def branch_env(
|
| 755 |
+
*,
|
| 756 |
+
serial: bool,
|
| 757 |
+
has_rerunfailures: bool,
|
| 758 |
+
extras: dict[str, str] | None = None,
|
| 759 |
+
) -> dict[str, str]:
|
| 760 |
+
addopts = ["--max-worker-restart=4"]
|
| 761 |
+
# A serial fallback is already a complete second execution. Re-running each
|
| 762 |
+
# failing test two more times makes large, failure-heavy suites prohibitively
|
| 763 |
+
# slow and adds little signal.
|
| 764 |
+
if has_rerunfailures and not serial:
|
| 765 |
+
addopts.extend(["--reruns=2", "--reruns-delay=1"])
|
| 766 |
+
env = {
|
| 767 |
+
"PYTEST_ADDOPTS": " ".join(addopts),
|
| 768 |
+
# Match upstream non-TTY regression environments (dirble log format, etc.).
|
| 769 |
+
"NO_COLOR": "1",
|
| 770 |
+
"TERM": "dumb",
|
| 771 |
+
"CLICOLOR": "0",
|
| 772 |
+
"CLICOLOR_FORCE": "0",
|
| 773 |
+
"COLORTERM": "",
|
| 774 |
+
}
|
| 775 |
+
if extras:
|
| 776 |
+
env.update(extras)
|
| 777 |
+
xdist_workers = os.environ.get("PROGRAMGYM_XDIST_WORKERS")
|
| 778 |
+
if serial:
|
| 779 |
+
xdist_workers = "1"
|
| 780 |
+
if xdist_workers:
|
| 781 |
+
env["PYTEST_XDIST_AUTO_NUM_WORKERS"] = xdist_workers
|
| 782 |
+
return env
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
_SERIAL_RUN_SH = ".programgym_run_serial.sh"
|
| 786 |
+
# ``eval/run.sh`` usually passes ``-n auto`` on the command line, which overrides
|
| 787 |
+
# ``PYTEST_ADDOPTS``. Rewrite to ``-n 0`` in a verifier-local copy for retries.
|
| 788 |
+
_RUN_SH_XDIST_RE = re.compile(r"-n\s*(?:auto|\d+)")
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
def prepare_serial_run_sh(run_sh: Path) -> Path:
|
| 792 |
+
"""Write a serial-only copy of ``eval/run.sh`` with xdist disabled."""
|
| 793 |
+
serial_sh = run_sh.with_name(_SERIAL_RUN_SH)
|
| 794 |
+
patched = _RUN_SH_XDIST_RE.sub("-n 0", run_sh.read_text())
|
| 795 |
+
serial_sh.write_text(patched)
|
| 796 |
+
serial_sh.chmod(0o755)
|
| 797 |
+
return serial_sh
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
def run_tests_command(*, serial: bool) -> str:
|
| 801 |
+
if serial:
|
| 802 |
+
inner = f"chmod +x ./eval/{_SERIAL_RUN_SH} && ./eval/{_SERIAL_RUN_SH}"
|
| 803 |
+
else:
|
| 804 |
+
inner = "chmod +x ./eval/run.sh && ./eval/run.sh"
|
| 805 |
+
if use_script_pty() and script_pty_available():
|
| 806 |
+
return f"script -q -c {shlex.quote(inner)} /dev/null"
|
| 807 |
+
return inner
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
BAKED_BLOB_DIR = Path(os.environ.get("PROGRAMGYM_BAKED_BLOB_DIR", "/tests/blobs"))
|
| 811 |
+
|
| 812 |
+
|
| 813 |
+
def resolve_blob_dir(instance_id: str, metadata: dict[str, Any]) -> Path:
|
| 814 |
+
"""Locate the per-instance blob directory.
|
| 815 |
+
|
| 816 |
+
Resolution order:
|
| 817 |
+
|
| 818 |
+
1. ``/tests/blobs/`` if pre-fetched into the task at generation time
|
| 819 |
+
(``programgym-adapter --download-blobs``). Verifier-only mount, so
|
| 820 |
+
agent never sees these.
|
| 821 |
+
2. ``PROGRAMGYM_BLOB_DIR`` env override pointing at an HF-cache-shaped
|
| 822 |
+
tree on disk (``<dir>/<instance_id>/tests/<branch>.tar.gz``). Useful
|
| 823 |
+
for offline reruns sharing a cache across many tasks.
|
| 824 |
+
3. ``huggingface_hub.snapshot_download`` from
|
| 825 |
+
``programgym/ProgramGym-Tests`` (default repo, ``main`` revision).
|
| 826 |
+
|
| 827 |
+
The returned directory contains ``tests/<branch>.tar.gz`` per active
|
| 828 |
+
branch — same shape as ``programgym/ProgramGym-Tests/<instance_id>/``
|
| 829 |
+
on HF.
|
| 830 |
+
"""
|
| 831 |
+
if BAKED_BLOB_DIR.exists() and (BAKED_BLOB_DIR / "tests").exists():
|
| 832 |
+
return BAKED_BLOB_DIR
|
| 833 |
+
|
| 834 |
+
local = os.environ.get("PROGRAMGYM_BLOB_DIR", "").strip()
|
| 835 |
+
if local:
|
| 836 |
+
candidate = Path(local) / instance_id
|
| 837 |
+
if candidate.exists():
|
| 838 |
+
return candidate
|
| 839 |
+
raise FileNotFoundError(
|
| 840 |
+
f"PROGRAMGYM_BLOB_DIR set but {candidate} does not exist"
|
| 841 |
+
)
|
| 842 |
+
|
| 843 |
+
repo_id = os.environ.get("PROGRAMGYM_HF_REPO") or metadata.get(
|
| 844 |
+
"hf_repo_id", DEFAULT_HF_REPO_ID
|
| 845 |
+
)
|
| 846 |
+
revision = os.environ.get("PROGRAMGYM_HF_REVISION") or metadata.get(
|
| 847 |
+
"hf_revision", DEFAULT_HF_REVISION
|
| 848 |
+
)
|
| 849 |
+
|
| 850 |
+
from huggingface_hub import snapshot_download
|
| 851 |
+
|
| 852 |
+
cache_root = Path(
|
| 853 |
+
snapshot_download(
|
| 854 |
+
repo_id,
|
| 855 |
+
repo_type="dataset",
|
| 856 |
+
revision=revision,
|
| 857 |
+
allow_patterns=f"{instance_id}/**",
|
| 858 |
+
)
|
| 859 |
+
)
|
| 860 |
+
blob_dir = cache_root / instance_id
|
| 861 |
+
if not blob_dir.exists():
|
| 862 |
+
raise FileNotFoundError(
|
| 863 |
+
f"HF blob directory missing for {instance_id} at {blob_dir}"
|
| 864 |
+
)
|
| 865 |
+
return blob_dir
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
def evaluate(metadata: dict[str, Any]) -> dict[str, Any]:
|
| 869 |
+
bootstrap_toolchain_path()
|
| 870 |
+
branches = metadata.get("branches", {})
|
| 871 |
+
active_branch_items = [
|
| 872 |
+
(name, info) for name, info in branches.items() if not info.get("ignored")
|
| 873 |
+
]
|
| 874 |
+
result: dict[str, Any] = {
|
| 875 |
+
"test_results": [],
|
| 876 |
+
"error_code": None,
|
| 877 |
+
"error_details": None,
|
| 878 |
+
"log": [],
|
| 879 |
+
"solution_branch": "submission",
|
| 880 |
+
"test_branches": [name for name, _ in active_branch_items],
|
| 881 |
+
"test_branch_errors": {},
|
| 882 |
+
"executable_hash": None,
|
| 883 |
+
"warnings": [],
|
| 884 |
+
}
|
| 885 |
+
|
| 886 |
+
instance_id = metadata["instance_id"]
|
| 887 |
+
|
| 888 |
+
compile_timeout = int(os.environ.get("PROGRAMGYM_COMPILE_TIMEOUT", "900"))
|
| 889 |
+
branch_timeout = int(os.environ.get("PROGRAMGYM_BRANCH_TIMEOUT", "3600"))
|
| 890 |
+
|
| 891 |
+
def fail_all(error_code: str, details: str) -> dict[str, Any]:
|
| 892 |
+
result["error_code"] = error_code
|
| 893 |
+
result["error_details"] = details
|
| 894 |
+
for branch, info in active_branch_items:
|
| 895 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 896 |
+
return result
|
| 897 |
+
|
| 898 |
+
with tempfile.TemporaryDirectory(prefix="programgym-eval-") as tmp:
|
| 899 |
+
compiled_snapshot = Path(tmp) / "compiled"
|
| 900 |
+
|
| 901 |
+
started = time.monotonic()
|
| 902 |
+
removed = remove_hashed_files(
|
| 903 |
+
WORKSPACE, set(metadata.get("eval_clean_hashes", []))
|
| 904 |
+
)
|
| 905 |
+
result["log"].append(
|
| 906 |
+
{
|
| 907 |
+
"step": "remove_hashed_files",
|
| 908 |
+
"command": "remove files matching eval_clean_hashes",
|
| 909 |
+
"wall_time": time.monotonic() - started,
|
| 910 |
+
"output": "".join(f"removed '{path}'\n" for path in removed),
|
| 911 |
+
"returncode": 0,
|
| 912 |
+
"exception_info": "",
|
| 913 |
+
}
|
| 914 |
+
)
|
| 915 |
+
|
| 916 |
+
compile_sh = WORKSPACE / "compile.sh"
|
| 917 |
+
if not compile_sh.exists():
|
| 918 |
+
return fail_all(
|
| 919 |
+
"missing_compile_sh", "submission did not contain compile.sh"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
seed = (
|
| 923 |
+
"if [ ! -d .git ]; then "
|
| 924 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 925 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 926 |
+
"git -c init.defaultBranch=gold init -q && "
|
| 927 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false add -A && "
|
| 928 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 929 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 930 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false commit -q --allow-empty -m gold; "
|
| 931 |
+
"fi"
|
| 932 |
+
)
|
| 933 |
+
try:
|
| 934 |
+
result["log"].append(
|
| 935 |
+
run_step(seed, WORKSPACE, timeout=300, step="seed_git")
|
| 936 |
+
)
|
| 937 |
+
compile_log = run_step(
|
| 938 |
+
"chmod +x ./compile.sh && ./compile.sh",
|
| 939 |
+
WORKSPACE,
|
| 940 |
+
timeout=compile_timeout,
|
| 941 |
+
step="compile",
|
| 942 |
+
accept_failure=True,
|
| 943 |
+
)
|
| 944 |
+
result["log"].append(compile_log)
|
| 945 |
+
if compile_log["returncode"]:
|
| 946 |
+
return fail_all("compile_failed", compile_log["output"])
|
| 947 |
+
executable = WORKSPACE / "executable"
|
| 948 |
+
if not executable.exists():
|
| 949 |
+
return fail_all(
|
| 950 |
+
"missing_executable",
|
| 951 |
+
"compile.sh completed but did not create ./executable",
|
| 952 |
+
)
|
| 953 |
+
STASHED_EXECUTABLE.parent.mkdir(parents=True, exist_ok=True)
|
| 954 |
+
# `move` (not copy) so /workspace doesn't keep a parallel copy of
|
| 955 |
+
# the agent's executable during the stash→restore window. Mirrors
|
| 956 |
+
# upstream `mv ./executable {STASHED}` (eval.py:472).
|
| 957 |
+
shutil.move(str(executable), STASHED_EXECUTABLE)
|
| 958 |
+
result["executable_hash"] = sha256(STASHED_EXECUTABLE)
|
| 959 |
+
result["log"].append(
|
| 960 |
+
run_step(
|
| 961 |
+
"pip3 install -q --disable-pip-version-check pytest-rerunfailures",
|
| 962 |
+
WORKSPACE,
|
| 963 |
+
timeout=120,
|
| 964 |
+
step="install_rerunfailures",
|
| 965 |
+
accept_failure=True,
|
| 966 |
+
)
|
| 967 |
+
)
|
| 968 |
+
has_rerunfailures = result["log"][-1]["returncode"] == 0
|
| 969 |
+
handoff_removed = remove_oracle_handoff_artifacts()
|
| 970 |
+
if handoff_removed:
|
| 971 |
+
result["log"].append(
|
| 972 |
+
{
|
| 973 |
+
"step": "remove_oracle_handoff",
|
| 974 |
+
"command": "remove oracle handoff artifacts from workspace",
|
| 975 |
+
"wall_time": 0.0,
|
| 976 |
+
"output": "".join(
|
| 977 |
+
f"removed '{name}'\n" for name in handoff_removed
|
| 978 |
+
),
|
| 979 |
+
"returncode": 0,
|
| 980 |
+
"exception_info": "",
|
| 981 |
+
}
|
| 982 |
+
)
|
| 983 |
+
snapshot_workspace(compiled_snapshot)
|
| 984 |
+
except Exception as exc:
|
| 985 |
+
return fail_all(type(exc).__name__, str(exc))
|
| 986 |
+
|
| 987 |
+
try:
|
| 988 |
+
blob_dir = resolve_blob_dir(instance_id, metadata)
|
| 989 |
+
except Exception as exc:
|
| 990 |
+
details = f"{type(exc).__name__}: {exc}"
|
| 991 |
+
for branch, info in active_branch_items:
|
| 992 |
+
result["test_branch_errors"][branch] = [
|
| 993 |
+
{
|
| 994 |
+
"error_code": "blob_resolution_failed",
|
| 995 |
+
"error_details": details,
|
| 996 |
+
}
|
| 997 |
+
]
|
| 998 |
+
inject_not_run(
|
| 999 |
+
result, branch, branch_tests(info), "blob_resolution_failed"
|
| 1000 |
+
)
|
| 1001 |
+
return result
|
| 1002 |
+
|
| 1003 |
+
for branch, info in active_branch_items:
|
| 1004 |
+
tests = branch_tests(info)
|
| 1005 |
+
blob = blob_dir / "tests" / f"{branch}.tar.gz"
|
| 1006 |
+
if not blob.exists():
|
| 1007 |
+
result["test_branch_errors"][branch] = [
|
| 1008 |
+
{"error_code": "missing_test_blob", "error_details": blob.name}
|
| 1009 |
+
]
|
| 1010 |
+
inject_not_run(result, branch, tests, "missing_test_blob")
|
| 1011 |
+
continue
|
| 1012 |
+
|
| 1013 |
+
best_xml = ""
|
| 1014 |
+
# Prefer a complete, clean XML result, then the result covering the
|
| 1015 |
+
# most expected tests, and only then the one with the most passes.
|
| 1016 |
+
# Pass-count-only ranking can retain a partial xdist result over a
|
| 1017 |
+
# complete serial result.
|
| 1018 |
+
best_quality = (-1, -1, -1)
|
| 1019 |
+
serial = bool(metadata.get("force_serial_branches"))
|
| 1020 |
+
branch_log: list[dict[str, Any]] = []
|
| 1021 |
+
branch_ignored = {
|
| 1022 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 1023 |
+
}
|
| 1024 |
+
n_expected = len([name for name in tests if name not in branch_ignored])
|
| 1025 |
+
|
| 1026 |
+
def merge_best_xml(raw_xml: str) -> None:
|
| 1027 |
+
try:
|
| 1028 |
+
parsed, warnings = parse_junit(
|
| 1029 |
+
raw_xml, branch, list(info.get("tests", [])), branch_ignored
|
| 1030 |
+
)
|
| 1031 |
+
except Exception as exc:
|
| 1032 |
+
result["test_branch_errors"][branch] = [
|
| 1033 |
+
{"error_code": "xml_parse_error", "error_details": str(exc)}
|
| 1034 |
+
]
|
| 1035 |
+
inject_not_run(result, branch, tests, "xml_parse_error")
|
| 1036 |
+
else:
|
| 1037 |
+
result["test_results"].extend(parsed)
|
| 1038 |
+
result["warnings"].extend(warnings)
|
| 1039 |
+
|
| 1040 |
+
while True:
|
| 1041 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1042 |
+
restore_workspace(compiled_snapshot)
|
| 1043 |
+
extract_trusted_blob(blob, WORKSPACE)
|
| 1044 |
+
restore_reference_executable()
|
| 1045 |
+
actual_hash = sha256(WORKSPACE / "executable")
|
| 1046 |
+
if actual_hash != result["executable_hash"]:
|
| 1047 |
+
result["test_branch_errors"][branch] = [
|
| 1048 |
+
{
|
| 1049 |
+
"error_code": "executable_hash_mismatch",
|
| 1050 |
+
"error_details": (
|
| 1051 |
+
f"expected {result['executable_hash']}, got {actual_hash}"
|
| 1052 |
+
),
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
inject_not_run(result, branch, tests, "executable_hash_mismatch")
|
| 1056 |
+
break
|
| 1057 |
+
run_sh = WORKSPACE / "eval" / "run.sh"
|
| 1058 |
+
if not run_sh.exists():
|
| 1059 |
+
result["test_branch_errors"][branch] = [
|
| 1060 |
+
{
|
| 1061 |
+
"error_code": "missing_run_sh",
|
| 1062 |
+
"error_details": "eval/run.sh missing",
|
| 1063 |
+
}
|
| 1064 |
+
]
|
| 1065 |
+
inject_not_run(result, branch, tests, "missing_run_sh")
|
| 1066 |
+
break
|
| 1067 |
+
# Upstream rewrites thread→signal so xdist workers fail cleanly
|
| 1068 |
+
# instead of os._exit(1) on timeout. That works in fresh
|
| 1069 |
+
# containers per branch; here we reuse one container and
|
| 1070 |
+
# signal timeouts leave TUI/log-watcher subprocesses alive
|
| 1071 |
+
# (e.g. lazygit --logs + tail -f), wedging pytest for up to
|
| 1072 |
+
# branch_timeout. Keep the blob's thread method and rely on
|
| 1073 |
+
# cleanup_lingering_processes + serial fallback after crashes.
|
| 1074 |
+
env = branch_env(
|
| 1075 |
+
serial=serial,
|
| 1076 |
+
has_rerunfailures=has_rerunfailures,
|
| 1077 |
+
extras=metadata.get("branch_env"),
|
| 1078 |
+
)
|
| 1079 |
+
branch_log.append(
|
| 1080 |
+
run_step(
|
| 1081 |
+
"rm -f eval/results.xml results.xml",
|
| 1082 |
+
WORKSPACE,
|
| 1083 |
+
timeout=120,
|
| 1084 |
+
step="clean_stale_results",
|
| 1085 |
+
accept_failure=True,
|
| 1086 |
+
)
|
| 1087 |
+
)
|
| 1088 |
+
if serial:
|
| 1089 |
+
prepare_serial_run_sh(run_sh)
|
| 1090 |
+
run_entry = run_step(
|
| 1091 |
+
run_tests_command(serial=serial),
|
| 1092 |
+
WORKSPACE,
|
| 1093 |
+
timeout=branch_timeout,
|
| 1094 |
+
env=env,
|
| 1095 |
+
step="run_tests",
|
| 1096 |
+
accept_failure=True,
|
| 1097 |
+
)
|
| 1098 |
+
branch_log.append(run_entry)
|
| 1099 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1100 |
+
xml_path = find_results_xml()
|
| 1101 |
+
if xml_path is None:
|
| 1102 |
+
if best_xml:
|
| 1103 |
+
merge_best_xml(best_xml)
|
| 1104 |
+
break
|
| 1105 |
+
if serial:
|
| 1106 |
+
result["test_branch_errors"][branch] = [
|
| 1107 |
+
{
|
| 1108 |
+
"error_code": "missing_results_xml",
|
| 1109 |
+
"error_details": "eval/results.xml was not produced",
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
inject_not_run(result, branch, tests, "missing_results_xml")
|
| 1113 |
+
break
|
| 1114 |
+
serial = True
|
| 1115 |
+
continue
|
| 1116 |
+
raw_xml = xml_path.read_text(errors="replace")
|
| 1117 |
+
crashes, n_tests, failures, missing = branch_attempt_metrics(
|
| 1118 |
+
raw_xml,
|
| 1119 |
+
run_output=run_entry.get("output", ""),
|
| 1120 |
+
expected_tests=n_expected,
|
| 1121 |
+
)
|
| 1122 |
+
useful = count_junit_passed(raw_xml)
|
| 1123 |
+
quality = (
|
| 1124 |
+
int(crashes == 0 and missing == 0),
|
| 1125 |
+
n_tests,
|
| 1126 |
+
useful,
|
| 1127 |
+
)
|
| 1128 |
+
if quality > best_quality:
|
| 1129 |
+
best_xml = raw_xml
|
| 1130 |
+
best_quality = quality
|
| 1131 |
+
retry = needs_serial_retry(
|
| 1132 |
+
serial=serial,
|
| 1133 |
+
crashes=crashes,
|
| 1134 |
+
missing=missing,
|
| 1135 |
+
failures=failures,
|
| 1136 |
+
n_tests=n_tests,
|
| 1137 |
+
expected_tests=n_expected,
|
| 1138 |
+
run_output=run_entry.get("output", ""),
|
| 1139 |
+
)
|
| 1140 |
+
if not retry:
|
| 1141 |
+
merge_best_xml(best_xml)
|
| 1142 |
+
break
|
| 1143 |
+
serial = True
|
| 1144 |
+
for entry in branch_log:
|
| 1145 |
+
entry["branch"] = branch
|
| 1146 |
+
result["log"].extend(branch_log)
|
| 1147 |
+
|
| 1148 |
+
return result
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
def write_outputs(result: dict[str, Any], metadata: dict[str, Any]) -> None:
|
| 1152 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1153 |
+
write_json(LOG_DIR / "programgym_eval.json", result)
|
| 1154 |
+
write_json(LOG_DIR / "harbor_diagnostics.json", diagnostics(result, metadata))
|
| 1155 |
+
rewards = summarize(result, metadata)
|
| 1156 |
+
write_json(LOG_DIR / "reward.json", rewards)
|
| 1157 |
+
(LOG_DIR / "reward.txt").write_text(str(rewards["reward"]))
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
def main() -> None:
|
| 1161 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1162 |
+
log_path = LOG_DIR / "programgym_eval.log"
|
| 1163 |
+
metadata = json.loads(METADATA_PATH.read_text())
|
| 1164 |
+
branches = metadata.get("branches", {})
|
| 1165 |
+
try:
|
| 1166 |
+
result = evaluate(metadata)
|
| 1167 |
+
except Exception as exc:
|
| 1168 |
+
error_code = type(exc).__name__
|
| 1169 |
+
result = {
|
| 1170 |
+
"test_results": [],
|
| 1171 |
+
"error_code": error_code,
|
| 1172 |
+
"error_details": str(exc),
|
| 1173 |
+
"log": [
|
| 1174 |
+
{
|
| 1175 |
+
"step": "evaluator_exception",
|
| 1176 |
+
"exception_info": traceback.format_exc(),
|
| 1177 |
+
"returncode": 1,
|
| 1178 |
+
}
|
| 1179 |
+
],
|
| 1180 |
+
"solution_branch": "submission",
|
| 1181 |
+
"test_branches": [
|
| 1182 |
+
name for name, info in branches.items() if not info.get("ignored")
|
| 1183 |
+
],
|
| 1184 |
+
"test_branch_errors": {
|
| 1185 |
+
"__evaluator__": [{"error_code": error_code, "error_details": str(exc)}]
|
| 1186 |
+
},
|
| 1187 |
+
"executable_hash": None,
|
| 1188 |
+
"warnings": [],
|
| 1189 |
+
}
|
| 1190 |
+
for branch, info in branches.items():
|
| 1191 |
+
if info.get("ignored"):
|
| 1192 |
+
continue
|
| 1193 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 1194 |
+
log_path.write_text(traceback.format_exc())
|
| 1195 |
+
else:
|
| 1196 |
+
log_path.write_text("")
|
| 1197 |
+
write_outputs(result, metadata)
|
| 1198 |
+
|
| 1199 |
+
|
| 1200 |
+
if __name__ == "__main__":
|
| 1201 |
+
main()
|
ordinals-wallet--ordinals-collec/tests/programgym_task.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ordinals-wallet--ordinals-collec/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
|
ordinals-wallet--ordinals-collec/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07f95174eb902ebf8c58600987f9464b00ca084ff4298c46dfb6fe2cec040f6c
|
| 3 |
+
size 901
|
orhnk--rascii.8d33a36/environment/Dockerfile
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM rust:1.97.1-bookworm
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV CARGO_HOME=/usr/local/cargo
|
| 24 |
+
ENV RUSTUP_HOME=/usr/local/rustup
|
| 25 |
+
ENV RUSTUP_TOOLCHAIN=1.97.1
|
| 26 |
+
ENV PROGRAMGYM_RUST_TOOLCHAIN=1.97.1
|
| 27 |
+
ENV PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 28 |
+
ENV PAGER=cat
|
| 29 |
+
ENV MANPAGER=cat
|
| 30 |
+
ENV LESS=-R
|
| 31 |
+
ENV TQDM_DISABLE=1
|
| 32 |
+
RUN apt-get update && apt-get install -y --no-install-recommends apt=2.6.1 bash=5.2.15-2+b13 build-essential=12.9 ca-certificates=20250419~deb12u1 cmake=3.25.1-1 git=1:2.39.5-0+deb12u3 make=4.3-4.1 pkg-config=1.8.1-1 python3=3.11.2-1+b1 python3-pip=23.0.1+dfsg-1 python3-dev=3.11.2-1+b1 autoconf=2.71-3 automake=1:1.16.5-1.3 gettext=0.21-12 file=1:5.44-3 binutils=2.40-2 libtool=2.4.7-7~deb12u1 libncurses-dev=6.4-4 meson=1.0.1-5 ninja-build=1.11.1-2~deb12u1 curl=7.88.1-10+deb12u15 wget=1.21.3-1+deb12u1 xz-utils=5.4.1-1+deb12u1 zstd=1.5.4+dfsg2-5 bzip2=1.0.8-5+b1 zip=3.0-13 unzip=6.0-28+deb12u1 patch=2.7.6-7 grep=3.8-5 python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 33 |
+
RUN rustup component add llvm-tools-preview --toolchain 1.97.1
|
| 34 |
+
RUN RUST_SYSROOT="$(rustc --print sysroot)"; RUST_HOST="$(rustc -vV | sed -n 's/^host: //p')"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-profdata"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-cov"
|
| 35 |
+
RUN rustc --version && cargo --version && rustup show active-toolchain
|
| 36 |
+
WORKDIR /workspace
|
| 37 |
+
ADD workspace.tar.gz /workspace/
|
| 38 |
+
COPY executable /workspace/executable
|
| 39 |
+
COPY download.sh /tmp/programgym-download.sh
|
| 40 |
+
RUN chmod 755 /tmp/programgym-download.sh
|
| 41 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 42 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 43 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 44 |
+
&& rm -f /tmp/programgym-download.sh \
|
| 45 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 46 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 47 |
+
RUN chmod 111 /workspace/executable
|
| 48 |
+
WORKDIR /workspace
|
| 49 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 50 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 51 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 52 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 53 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 54 |
+
RUN mkdir -p /home/agent \
|
| 55 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 56 |
+
&& chown agent:agent /workspace/executable \
|
| 57 |
+
&& chmod 111 /workspace/executable
|
| 58 |
+
ENV HOME=/home/agent
|
| 59 |
+
WORKDIR /workspace
|
orhnk--rascii.8d33a36/environment/download.sh
ADDED
|
@@ -0,0 +1,1315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# download.sh - ProgramGym dependency prefetch stage for RASCII (rascii_art)
|
| 3 |
+
#
|
| 4 |
+
# Sourced by the validator in a read-only mount with network access. It only
|
| 5 |
+
# fetches the Cargo dependency closure needed for an offline build of the
|
| 6 |
+
# `rascii` binary. It must be standalone (does not read any repository file)
|
| 7 |
+
# and safe to run in source mode. It performs NO compilation.
|
| 8 |
+
#
|
| 9 |
+
# The real crate declares a lib (rascii_art) and bin (rascii). To make the
|
| 10 |
+
# fetched dependency closure EXACTLY match what build.sh compiles offline, we
|
| 11 |
+
# embed the repository's committed Cargo.toml and Cargo.lock inline (the rules
|
| 12 |
+
# forbid reading repository files at runtime, but allow embedding them), write
|
| 13 |
+
# matching stub source files in a scratch dir, and run `cargo fetch --locked`.
|
| 14 |
+
|
| 15 |
+
set -u
|
| 16 |
+
|
| 17 |
+
# --- Isolated scratch dir (repo root is read-only here). ----------------------
|
| 18 |
+
SCRATCH_DIR="${TMPDIR:-/tmp}/rascii_download_prefetch"
|
| 19 |
+
rm -rf "$SCRATCH_DIR"
|
| 20 |
+
mkdir -p "$SCRATCH_DIR/src"
|
| 21 |
+
|
| 22 |
+
# --- Embedded Cargo.toml (byte-identical to the repository's). ----------------
|
| 23 |
+
cat > "$SCRATCH_DIR/Cargo.toml" <<'SCRIPT_CARGO'
|
| 24 |
+
[package]
|
| 25 |
+
name = "rascii_art"
|
| 26 |
+
version = "0.4.5"
|
| 27 |
+
authors = [ "UTFeight", "RGBCube" ]
|
| 28 |
+
description = "Advanced ASCII Art Generator"
|
| 29 |
+
repository = "https://github.com/UTFeight/RASCII"
|
| 30 |
+
keywords = [ "ascii" ]
|
| 31 |
+
license = "MIT"
|
| 32 |
+
edition = "2021"
|
| 33 |
+
|
| 34 |
+
[dependencies]
|
| 35 |
+
ansi_term = "0.12.1"
|
| 36 |
+
clap = { version = "4.5.31", features = ["derive"] }
|
| 37 |
+
image = "0.25.5"
|
| 38 |
+
unicode-segmentation = "1.12.0"
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
[[bin]]
|
| 42 |
+
name = "rascii"
|
| 43 |
+
path = "src/main.rs"
|
| 44 |
+
|
| 45 |
+
[profile.release]
|
| 46 |
+
strip = true
|
| 47 |
+
|
| 48 |
+
SCRIPT_CARGO
|
| 49 |
+
|
| 50 |
+
# --- Embedded Cargo.lock (byte-identical to the repository's). ----------------
|
| 51 |
+
cat > "$SCRATCH_DIR/Cargo.lock" <<'SCRIPT_LOCK'
|
| 52 |
+
# This file is automatically @generated by Cargo.
|
| 53 |
+
# It is not intended for manual editing.
|
| 54 |
+
version = 4
|
| 55 |
+
|
| 56 |
+
[[package]]
|
| 57 |
+
name = "adler2"
|
| 58 |
+
version = "2.0.0"
|
| 59 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 60 |
+
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
| 61 |
+
|
| 62 |
+
[[package]]
|
| 63 |
+
name = "aligned-vec"
|
| 64 |
+
version = "0.5.0"
|
| 65 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 66 |
+
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
|
| 67 |
+
|
| 68 |
+
[[package]]
|
| 69 |
+
name = "ansi_term"
|
| 70 |
+
version = "0.12.1"
|
| 71 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 72 |
+
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
| 73 |
+
dependencies = [
|
| 74 |
+
"winapi",
|
| 75 |
+
]
|
| 76 |
+
|
| 77 |
+
[[package]]
|
| 78 |
+
name = "anstream"
|
| 79 |
+
version = "0.6.18"
|
| 80 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 81 |
+
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
|
| 82 |
+
dependencies = [
|
| 83 |
+
"anstyle",
|
| 84 |
+
"anstyle-parse",
|
| 85 |
+
"anstyle-query",
|
| 86 |
+
"anstyle-wincon",
|
| 87 |
+
"colorchoice",
|
| 88 |
+
"is_terminal_polyfill",
|
| 89 |
+
"utf8parse",
|
| 90 |
+
]
|
| 91 |
+
|
| 92 |
+
[[package]]
|
| 93 |
+
name = "anstyle"
|
| 94 |
+
version = "1.0.10"
|
| 95 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 96 |
+
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
| 97 |
+
|
| 98 |
+
[[package]]
|
| 99 |
+
name = "anstyle-parse"
|
| 100 |
+
version = "0.2.6"
|
| 101 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 102 |
+
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
|
| 103 |
+
dependencies = [
|
| 104 |
+
"utf8parse",
|
| 105 |
+
]
|
| 106 |
+
|
| 107 |
+
[[package]]
|
| 108 |
+
name = "anstyle-query"
|
| 109 |
+
version = "1.1.2"
|
| 110 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 111 |
+
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
|
| 112 |
+
dependencies = [
|
| 113 |
+
"windows-sys",
|
| 114 |
+
]
|
| 115 |
+
|
| 116 |
+
[[package]]
|
| 117 |
+
name = "anstyle-wincon"
|
| 118 |
+
version = "3.0.7"
|
| 119 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 120 |
+
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
|
| 121 |
+
dependencies = [
|
| 122 |
+
"anstyle",
|
| 123 |
+
"once_cell",
|
| 124 |
+
"windows-sys",
|
| 125 |
+
]
|
| 126 |
+
|
| 127 |
+
[[package]]
|
| 128 |
+
name = "anyhow"
|
| 129 |
+
version = "1.0.96"
|
| 130 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 131 |
+
checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4"
|
| 132 |
+
|
| 133 |
+
[[package]]
|
| 134 |
+
name = "arbitrary"
|
| 135 |
+
version = "1.4.1"
|
| 136 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 137 |
+
checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
|
| 138 |
+
|
| 139 |
+
[[package]]
|
| 140 |
+
name = "arg_enum_proc_macro"
|
| 141 |
+
version = "0.3.4"
|
| 142 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 143 |
+
checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
|
| 144 |
+
dependencies = [
|
| 145 |
+
"proc-macro2",
|
| 146 |
+
"quote",
|
| 147 |
+
"syn",
|
| 148 |
+
]
|
| 149 |
+
|
| 150 |
+
[[package]]
|
| 151 |
+
name = "arrayvec"
|
| 152 |
+
version = "0.7.6"
|
| 153 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 154 |
+
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
|
| 155 |
+
|
| 156 |
+
[[package]]
|
| 157 |
+
name = "autocfg"
|
| 158 |
+
version = "1.4.0"
|
| 159 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 160 |
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
| 161 |
+
|
| 162 |
+
[[package]]
|
| 163 |
+
name = "av1-grain"
|
| 164 |
+
version = "0.2.3"
|
| 165 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 166 |
+
checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
|
| 167 |
+
dependencies = [
|
| 168 |
+
"anyhow",
|
| 169 |
+
"arrayvec",
|
| 170 |
+
"log",
|
| 171 |
+
"nom",
|
| 172 |
+
"num-rational",
|
| 173 |
+
"v_frame",
|
| 174 |
+
]
|
| 175 |
+
|
| 176 |
+
[[package]]
|
| 177 |
+
name = "avif-serialize"
|
| 178 |
+
version = "0.8.3"
|
| 179 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 180 |
+
checksum = "98922d6a4cfbcb08820c69d8eeccc05bb1f29bfa06b4f5b1dbfe9a868bd7608e"
|
| 181 |
+
dependencies = [
|
| 182 |
+
"arrayvec",
|
| 183 |
+
]
|
| 184 |
+
|
| 185 |
+
[[package]]
|
| 186 |
+
name = "bit_field"
|
| 187 |
+
version = "0.10.2"
|
| 188 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 189 |
+
checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
|
| 190 |
+
|
| 191 |
+
[[package]]
|
| 192 |
+
name = "bitflags"
|
| 193 |
+
version = "1.3.2"
|
| 194 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 195 |
+
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
| 196 |
+
|
| 197 |
+
[[package]]
|
| 198 |
+
name = "bitstream-io"
|
| 199 |
+
version = "2.6.0"
|
| 200 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 201 |
+
checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2"
|
| 202 |
+
|
| 203 |
+
[[package]]
|
| 204 |
+
name = "built"
|
| 205 |
+
version = "0.7.7"
|
| 206 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 207 |
+
checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b"
|
| 208 |
+
|
| 209 |
+
[[package]]
|
| 210 |
+
name = "bumpalo"
|
| 211 |
+
version = "3.17.0"
|
| 212 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 213 |
+
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
|
| 214 |
+
|
| 215 |
+
[[package]]
|
| 216 |
+
name = "bytemuck"
|
| 217 |
+
version = "1.21.0"
|
| 218 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 219 |
+
checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
|
| 220 |
+
|
| 221 |
+
[[package]]
|
| 222 |
+
name = "byteorder"
|
| 223 |
+
version = "1.5.0"
|
| 224 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 225 |
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
| 226 |
+
|
| 227 |
+
[[package]]
|
| 228 |
+
name = "byteorder-lite"
|
| 229 |
+
version = "0.1.0"
|
| 230 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 231 |
+
checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
|
| 232 |
+
|
| 233 |
+
[[package]]
|
| 234 |
+
name = "cc"
|
| 235 |
+
version = "1.2.15"
|
| 236 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 237 |
+
checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af"
|
| 238 |
+
dependencies = [
|
| 239 |
+
"jobserver",
|
| 240 |
+
"libc",
|
| 241 |
+
"shlex",
|
| 242 |
+
]
|
| 243 |
+
|
| 244 |
+
[[package]]
|
| 245 |
+
name = "cfg-expr"
|
| 246 |
+
version = "0.15.8"
|
| 247 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 248 |
+
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
|
| 249 |
+
dependencies = [
|
| 250 |
+
"smallvec",
|
| 251 |
+
"target-lexicon",
|
| 252 |
+
]
|
| 253 |
+
|
| 254 |
+
[[package]]
|
| 255 |
+
name = "cfg-if"
|
| 256 |
+
version = "1.0.0"
|
| 257 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 258 |
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
| 259 |
+
|
| 260 |
+
[[package]]
|
| 261 |
+
name = "clap"
|
| 262 |
+
version = "4.5.31"
|
| 263 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 264 |
+
checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767"
|
| 265 |
+
dependencies = [
|
| 266 |
+
"clap_builder",
|
| 267 |
+
"clap_derive",
|
| 268 |
+
]
|
| 269 |
+
|
| 270 |
+
[[package]]
|
| 271 |
+
name = "clap_builder"
|
| 272 |
+
version = "4.5.31"
|
| 273 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 274 |
+
checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863"
|
| 275 |
+
dependencies = [
|
| 276 |
+
"anstream",
|
| 277 |
+
"anstyle",
|
| 278 |
+
"clap_lex",
|
| 279 |
+
"strsim",
|
| 280 |
+
]
|
| 281 |
+
|
| 282 |
+
[[package]]
|
| 283 |
+
name = "clap_derive"
|
| 284 |
+
version = "4.5.28"
|
| 285 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 286 |
+
checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed"
|
| 287 |
+
dependencies = [
|
| 288 |
+
"heck",
|
| 289 |
+
"proc-macro2",
|
| 290 |
+
"quote",
|
| 291 |
+
"syn",
|
| 292 |
+
]
|
| 293 |
+
|
| 294 |
+
[[package]]
|
| 295 |
+
name = "clap_lex"
|
| 296 |
+
version = "0.7.4"
|
| 297 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 298 |
+
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
| 299 |
+
|
| 300 |
+
[[package]]
|
| 301 |
+
name = "color_quant"
|
| 302 |
+
version = "1.1.0"
|
| 303 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 304 |
+
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
|
| 305 |
+
|
| 306 |
+
[[package]]
|
| 307 |
+
name = "colorchoice"
|
| 308 |
+
version = "1.0.3"
|
| 309 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 310 |
+
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
| 311 |
+
|
| 312 |
+
[[package]]
|
| 313 |
+
name = "crc32fast"
|
| 314 |
+
version = "1.4.2"
|
| 315 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 316 |
+
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
|
| 317 |
+
dependencies = [
|
| 318 |
+
"cfg-if",
|
| 319 |
+
]
|
| 320 |
+
|
| 321 |
+
[[package]]
|
| 322 |
+
name = "crossbeam-deque"
|
| 323 |
+
version = "0.8.6"
|
| 324 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 325 |
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
| 326 |
+
dependencies = [
|
| 327 |
+
"crossbeam-epoch",
|
| 328 |
+
"crossbeam-utils",
|
| 329 |
+
]
|
| 330 |
+
|
| 331 |
+
[[package]]
|
| 332 |
+
name = "crossbeam-epoch"
|
| 333 |
+
version = "0.9.18"
|
| 334 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 335 |
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
| 336 |
+
dependencies = [
|
| 337 |
+
"crossbeam-utils",
|
| 338 |
+
]
|
| 339 |
+
|
| 340 |
+
[[package]]
|
| 341 |
+
name = "crossbeam-utils"
|
| 342 |
+
version = "0.8.21"
|
| 343 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 344 |
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
| 345 |
+
|
| 346 |
+
[[package]]
|
| 347 |
+
name = "crunchy"
|
| 348 |
+
version = "0.2.3"
|
| 349 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 350 |
+
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
|
| 351 |
+
|
| 352 |
+
[[package]]
|
| 353 |
+
name = "either"
|
| 354 |
+
version = "1.14.0"
|
| 355 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 356 |
+
checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
|
| 357 |
+
|
| 358 |
+
[[package]]
|
| 359 |
+
name = "equivalent"
|
| 360 |
+
version = "1.0.2"
|
| 361 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 362 |
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
| 363 |
+
|
| 364 |
+
[[package]]
|
| 365 |
+
name = "exr"
|
| 366 |
+
version = "1.73.0"
|
| 367 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 368 |
+
checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0"
|
| 369 |
+
dependencies = [
|
| 370 |
+
"bit_field",
|
| 371 |
+
"half",
|
| 372 |
+
"lebe",
|
| 373 |
+
"miniz_oxide",
|
| 374 |
+
"rayon-core",
|
| 375 |
+
"smallvec",
|
| 376 |
+
"zune-inflate",
|
| 377 |
+
]
|
| 378 |
+
|
| 379 |
+
[[package]]
|
| 380 |
+
name = "fdeflate"
|
| 381 |
+
version = "0.3.7"
|
| 382 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 383 |
+
checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
|
| 384 |
+
dependencies = [
|
| 385 |
+
"simd-adler32",
|
| 386 |
+
]
|
| 387 |
+
|
| 388 |
+
[[package]]
|
| 389 |
+
name = "flate2"
|
| 390 |
+
version = "1.1.0"
|
| 391 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 392 |
+
checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
|
| 393 |
+
dependencies = [
|
| 394 |
+
"crc32fast",
|
| 395 |
+
"miniz_oxide",
|
| 396 |
+
]
|
| 397 |
+
|
| 398 |
+
[[package]]
|
| 399 |
+
name = "getrandom"
|
| 400 |
+
version = "0.2.15"
|
| 401 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 402 |
+
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
| 403 |
+
dependencies = [
|
| 404 |
+
"cfg-if",
|
| 405 |
+
"libc",
|
| 406 |
+
"wasi",
|
| 407 |
+
]
|
| 408 |
+
|
| 409 |
+
[[package]]
|
| 410 |
+
name = "gif"
|
| 411 |
+
version = "0.13.1"
|
| 412 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 413 |
+
checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2"
|
| 414 |
+
dependencies = [
|
| 415 |
+
"color_quant",
|
| 416 |
+
"weezl",
|
| 417 |
+
]
|
| 418 |
+
|
| 419 |
+
[[package]]
|
| 420 |
+
name = "half"
|
| 421 |
+
version = "2.4.1"
|
| 422 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 423 |
+
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
|
| 424 |
+
dependencies = [
|
| 425 |
+
"cfg-if",
|
| 426 |
+
"crunchy",
|
| 427 |
+
]
|
| 428 |
+
|
| 429 |
+
[[package]]
|
| 430 |
+
name = "hashbrown"
|
| 431 |
+
version = "0.15.2"
|
| 432 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 433 |
+
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
|
| 434 |
+
|
| 435 |
+
[[package]]
|
| 436 |
+
name = "heck"
|
| 437 |
+
version = "0.5.0"
|
| 438 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 439 |
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
| 440 |
+
|
| 441 |
+
[[package]]
|
| 442 |
+
name = "image"
|
| 443 |
+
version = "0.25.5"
|
| 444 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 445 |
+
checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b"
|
| 446 |
+
dependencies = [
|
| 447 |
+
"bytemuck",
|
| 448 |
+
"byteorder-lite",
|
| 449 |
+
"color_quant",
|
| 450 |
+
"exr",
|
| 451 |
+
"gif",
|
| 452 |
+
"image-webp",
|
| 453 |
+
"num-traits",
|
| 454 |
+
"png",
|
| 455 |
+
"qoi",
|
| 456 |
+
"ravif",
|
| 457 |
+
"rayon",
|
| 458 |
+
"rgb",
|
| 459 |
+
"tiff",
|
| 460 |
+
"zune-core",
|
| 461 |
+
"zune-jpeg",
|
| 462 |
+
]
|
| 463 |
+
|
| 464 |
+
[[package]]
|
| 465 |
+
name = "image-webp"
|
| 466 |
+
version = "0.2.1"
|
| 467 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 468 |
+
checksum = "b77d01e822461baa8409e156015a1d91735549f0f2c17691bd2d996bef238f7f"
|
| 469 |
+
dependencies = [
|
| 470 |
+
"byteorder-lite",
|
| 471 |
+
"quick-error",
|
| 472 |
+
]
|
| 473 |
+
|
| 474 |
+
[[package]]
|
| 475 |
+
name = "imgref"
|
| 476 |
+
version = "1.11.0"
|
| 477 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 478 |
+
checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
|
| 479 |
+
|
| 480 |
+
[[package]]
|
| 481 |
+
name = "indexmap"
|
| 482 |
+
version = "2.7.1"
|
| 483 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 484 |
+
checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
|
| 485 |
+
dependencies = [
|
| 486 |
+
"equivalent",
|
| 487 |
+
"hashbrown",
|
| 488 |
+
]
|
| 489 |
+
|
| 490 |
+
[[package]]
|
| 491 |
+
name = "interpolate_name"
|
| 492 |
+
version = "0.2.4"
|
| 493 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 494 |
+
checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
|
| 495 |
+
dependencies = [
|
| 496 |
+
"proc-macro2",
|
| 497 |
+
"quote",
|
| 498 |
+
"syn",
|
| 499 |
+
]
|
| 500 |
+
|
| 501 |
+
[[package]]
|
| 502 |
+
name = "is_terminal_polyfill"
|
| 503 |
+
version = "1.70.1"
|
| 504 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 505 |
+
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
| 506 |
+
|
| 507 |
+
[[package]]
|
| 508 |
+
name = "itertools"
|
| 509 |
+
version = "0.12.1"
|
| 510 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 511 |
+
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
|
| 512 |
+
dependencies = [
|
| 513 |
+
"either",
|
| 514 |
+
]
|
| 515 |
+
|
| 516 |
+
[[package]]
|
| 517 |
+
name = "jobserver"
|
| 518 |
+
version = "0.1.32"
|
| 519 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 520 |
+
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
|
| 521 |
+
dependencies = [
|
| 522 |
+
"libc",
|
| 523 |
+
]
|
| 524 |
+
|
| 525 |
+
[[package]]
|
| 526 |
+
name = "jpeg-decoder"
|
| 527 |
+
version = "0.3.1"
|
| 528 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 529 |
+
checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
|
| 530 |
+
|
| 531 |
+
[[package]]
|
| 532 |
+
name = "lebe"
|
| 533 |
+
version = "0.5.2"
|
| 534 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 535 |
+
checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
|
| 536 |
+
|
| 537 |
+
[[package]]
|
| 538 |
+
name = "libc"
|
| 539 |
+
version = "0.2.170"
|
| 540 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 541 |
+
checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
|
| 542 |
+
|
| 543 |
+
[[package]]
|
| 544 |
+
name = "libfuzzer-sys"
|
| 545 |
+
version = "0.4.9"
|
| 546 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 547 |
+
checksum = "cf78f52d400cf2d84a3a973a78a592b4adc535739e0a5597a0da6f0c357adc75"
|
| 548 |
+
dependencies = [
|
| 549 |
+
"arbitrary",
|
| 550 |
+
"cc",
|
| 551 |
+
]
|
| 552 |
+
|
| 553 |
+
[[package]]
|
| 554 |
+
name = "log"
|
| 555 |
+
version = "0.4.26"
|
| 556 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 557 |
+
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
|
| 558 |
+
|
| 559 |
+
[[package]]
|
| 560 |
+
name = "loop9"
|
| 561 |
+
version = "0.1.5"
|
| 562 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 563 |
+
checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
|
| 564 |
+
dependencies = [
|
| 565 |
+
"imgref",
|
| 566 |
+
]
|
| 567 |
+
|
| 568 |
+
[[package]]
|
| 569 |
+
name = "maybe-rayon"
|
| 570 |
+
version = "0.1.1"
|
| 571 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 572 |
+
checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
|
| 573 |
+
dependencies = [
|
| 574 |
+
"cfg-if",
|
| 575 |
+
"rayon",
|
| 576 |
+
]
|
| 577 |
+
|
| 578 |
+
[[package]]
|
| 579 |
+
name = "memchr"
|
| 580 |
+
version = "2.7.4"
|
| 581 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 582 |
+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
| 583 |
+
|
| 584 |
+
[[package]]
|
| 585 |
+
name = "minimal-lexical"
|
| 586 |
+
version = "0.2.1"
|
| 587 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 588 |
+
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
| 589 |
+
|
| 590 |
+
[[package]]
|
| 591 |
+
name = "miniz_oxide"
|
| 592 |
+
version = "0.8.5"
|
| 593 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 594 |
+
checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
|
| 595 |
+
dependencies = [
|
| 596 |
+
"adler2",
|
| 597 |
+
"simd-adler32",
|
| 598 |
+
]
|
| 599 |
+
|
| 600 |
+
[[package]]
|
| 601 |
+
name = "new_debug_unreachable"
|
| 602 |
+
version = "1.0.6"
|
| 603 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 604 |
+
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
|
| 605 |
+
|
| 606 |
+
[[package]]
|
| 607 |
+
name = "nom"
|
| 608 |
+
version = "7.1.3"
|
| 609 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 610 |
+
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
| 611 |
+
dependencies = [
|
| 612 |
+
"memchr",
|
| 613 |
+
"minimal-lexical",
|
| 614 |
+
]
|
| 615 |
+
|
| 616 |
+
[[package]]
|
| 617 |
+
name = "noop_proc_macro"
|
| 618 |
+
version = "0.3.0"
|
| 619 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 620 |
+
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
|
| 621 |
+
|
| 622 |
+
[[package]]
|
| 623 |
+
name = "num-bigint"
|
| 624 |
+
version = "0.4.6"
|
| 625 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 626 |
+
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
|
| 627 |
+
dependencies = [
|
| 628 |
+
"num-integer",
|
| 629 |
+
"num-traits",
|
| 630 |
+
]
|
| 631 |
+
|
| 632 |
+
[[package]]
|
| 633 |
+
name = "num-derive"
|
| 634 |
+
version = "0.4.2"
|
| 635 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 636 |
+
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
| 637 |
+
dependencies = [
|
| 638 |
+
"proc-macro2",
|
| 639 |
+
"quote",
|
| 640 |
+
"syn",
|
| 641 |
+
]
|
| 642 |
+
|
| 643 |
+
[[package]]
|
| 644 |
+
name = "num-integer"
|
| 645 |
+
version = "0.1.46"
|
| 646 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 647 |
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
| 648 |
+
dependencies = [
|
| 649 |
+
"num-traits",
|
| 650 |
+
]
|
| 651 |
+
|
| 652 |
+
[[package]]
|
| 653 |
+
name = "num-rational"
|
| 654 |
+
version = "0.4.2"
|
| 655 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 656 |
+
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
| 657 |
+
dependencies = [
|
| 658 |
+
"num-bigint",
|
| 659 |
+
"num-integer",
|
| 660 |
+
"num-traits",
|
| 661 |
+
]
|
| 662 |
+
|
| 663 |
+
[[package]]
|
| 664 |
+
name = "num-traits"
|
| 665 |
+
version = "0.2.19"
|
| 666 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 667 |
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
| 668 |
+
dependencies = [
|
| 669 |
+
"autocfg",
|
| 670 |
+
]
|
| 671 |
+
|
| 672 |
+
[[package]]
|
| 673 |
+
name = "once_cell"
|
| 674 |
+
version = "1.20.3"
|
| 675 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 676 |
+
checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
|
| 677 |
+
|
| 678 |
+
[[package]]
|
| 679 |
+
name = "paste"
|
| 680 |
+
version = "1.0.15"
|
| 681 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 682 |
+
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
| 683 |
+
|
| 684 |
+
[[package]]
|
| 685 |
+
name = "pkg-config"
|
| 686 |
+
version = "0.3.31"
|
| 687 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 688 |
+
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
|
| 689 |
+
|
| 690 |
+
[[package]]
|
| 691 |
+
name = "png"
|
| 692 |
+
version = "0.17.16"
|
| 693 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 694 |
+
checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
|
| 695 |
+
dependencies = [
|
| 696 |
+
"bitflags",
|
| 697 |
+
"crc32fast",
|
| 698 |
+
"fdeflate",
|
| 699 |
+
"flate2",
|
| 700 |
+
"miniz_oxide",
|
| 701 |
+
]
|
| 702 |
+
|
| 703 |
+
[[package]]
|
| 704 |
+
name = "ppv-lite86"
|
| 705 |
+
version = "0.2.20"
|
| 706 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 707 |
+
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
|
| 708 |
+
dependencies = [
|
| 709 |
+
"zerocopy",
|
| 710 |
+
]
|
| 711 |
+
|
| 712 |
+
[[package]]
|
| 713 |
+
name = "proc-macro2"
|
| 714 |
+
version = "1.0.93"
|
| 715 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 716 |
+
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
| 717 |
+
dependencies = [
|
| 718 |
+
"unicode-ident",
|
| 719 |
+
]
|
| 720 |
+
|
| 721 |
+
[[package]]
|
| 722 |
+
name = "profiling"
|
| 723 |
+
version = "1.0.16"
|
| 724 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 725 |
+
checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d"
|
| 726 |
+
dependencies = [
|
| 727 |
+
"profiling-procmacros",
|
| 728 |
+
]
|
| 729 |
+
|
| 730 |
+
[[package]]
|
| 731 |
+
name = "profiling-procmacros"
|
| 732 |
+
version = "1.0.16"
|
| 733 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 734 |
+
checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30"
|
| 735 |
+
dependencies = [
|
| 736 |
+
"quote",
|
| 737 |
+
"syn",
|
| 738 |
+
]
|
| 739 |
+
|
| 740 |
+
[[package]]
|
| 741 |
+
name = "qoi"
|
| 742 |
+
version = "0.4.1"
|
| 743 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 744 |
+
checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
|
| 745 |
+
dependencies = [
|
| 746 |
+
"bytemuck",
|
| 747 |
+
]
|
| 748 |
+
|
| 749 |
+
[[package]]
|
| 750 |
+
name = "quick-error"
|
| 751 |
+
version = "2.0.1"
|
| 752 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 753 |
+
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
| 754 |
+
|
| 755 |
+
[[package]]
|
| 756 |
+
name = "quote"
|
| 757 |
+
version = "1.0.38"
|
| 758 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 759 |
+
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
| 760 |
+
dependencies = [
|
| 761 |
+
"proc-macro2",
|
| 762 |
+
]
|
| 763 |
+
|
| 764 |
+
[[package]]
|
| 765 |
+
name = "rand"
|
| 766 |
+
version = "0.8.5"
|
| 767 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 768 |
+
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
| 769 |
+
dependencies = [
|
| 770 |
+
"libc",
|
| 771 |
+
"rand_chacha",
|
| 772 |
+
"rand_core",
|
| 773 |
+
]
|
| 774 |
+
|
| 775 |
+
[[package]]
|
| 776 |
+
name = "rand_chacha"
|
| 777 |
+
version = "0.3.1"
|
| 778 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 779 |
+
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
| 780 |
+
dependencies = [
|
| 781 |
+
"ppv-lite86",
|
| 782 |
+
"rand_core",
|
| 783 |
+
]
|
| 784 |
+
|
| 785 |
+
[[package]]
|
| 786 |
+
name = "rand_core"
|
| 787 |
+
version = "0.6.4"
|
| 788 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 789 |
+
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
| 790 |
+
dependencies = [
|
| 791 |
+
"getrandom",
|
| 792 |
+
]
|
| 793 |
+
|
| 794 |
+
[[package]]
|
| 795 |
+
name = "rascii_art"
|
| 796 |
+
version = "0.4.5"
|
| 797 |
+
dependencies = [
|
| 798 |
+
"ansi_term",
|
| 799 |
+
"clap",
|
| 800 |
+
"image",
|
| 801 |
+
"unicode-segmentation",
|
| 802 |
+
]
|
| 803 |
+
|
| 804 |
+
[[package]]
|
| 805 |
+
name = "rav1e"
|
| 806 |
+
version = "0.7.1"
|
| 807 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 808 |
+
checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
|
| 809 |
+
dependencies = [
|
| 810 |
+
"arbitrary",
|
| 811 |
+
"arg_enum_proc_macro",
|
| 812 |
+
"arrayvec",
|
| 813 |
+
"av1-grain",
|
| 814 |
+
"bitstream-io",
|
| 815 |
+
"built",
|
| 816 |
+
"cfg-if",
|
| 817 |
+
"interpolate_name",
|
| 818 |
+
"itertools",
|
| 819 |
+
"libc",
|
| 820 |
+
"libfuzzer-sys",
|
| 821 |
+
"log",
|
| 822 |
+
"maybe-rayon",
|
| 823 |
+
"new_debug_unreachable",
|
| 824 |
+
"noop_proc_macro",
|
| 825 |
+
"num-derive",
|
| 826 |
+
"num-traits",
|
| 827 |
+
"once_cell",
|
| 828 |
+
"paste",
|
| 829 |
+
"profiling",
|
| 830 |
+
"rand",
|
| 831 |
+
"rand_chacha",
|
| 832 |
+
"simd_helpers",
|
| 833 |
+
"system-deps",
|
| 834 |
+
"thiserror",
|
| 835 |
+
"v_frame",
|
| 836 |
+
"wasm-bindgen",
|
| 837 |
+
]
|
| 838 |
+
|
| 839 |
+
[[package]]
|
| 840 |
+
name = "ravif"
|
| 841 |
+
version = "0.11.11"
|
| 842 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 843 |
+
checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6"
|
| 844 |
+
dependencies = [
|
| 845 |
+
"avif-serialize",
|
| 846 |
+
"imgref",
|
| 847 |
+
"loop9",
|
| 848 |
+
"quick-error",
|
| 849 |
+
"rav1e",
|
| 850 |
+
"rayon",
|
| 851 |
+
"rgb",
|
| 852 |
+
]
|
| 853 |
+
|
| 854 |
+
[[package]]
|
| 855 |
+
name = "rayon"
|
| 856 |
+
version = "1.10.0"
|
| 857 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 858 |
+
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
|
| 859 |
+
dependencies = [
|
| 860 |
+
"either",
|
| 861 |
+
"rayon-core",
|
| 862 |
+
]
|
| 863 |
+
|
| 864 |
+
[[package]]
|
| 865 |
+
name = "rayon-core"
|
| 866 |
+
version = "1.12.1"
|
| 867 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 868 |
+
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
| 869 |
+
dependencies = [
|
| 870 |
+
"crossbeam-deque",
|
| 871 |
+
"crossbeam-utils",
|
| 872 |
+
]
|
| 873 |
+
|
| 874 |
+
[[package]]
|
| 875 |
+
name = "rgb"
|
| 876 |
+
version = "0.8.50"
|
| 877 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 878 |
+
checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
|
| 879 |
+
|
| 880 |
+
[[package]]
|
| 881 |
+
name = "rustversion"
|
| 882 |
+
version = "1.0.19"
|
| 883 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 884 |
+
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
|
| 885 |
+
|
| 886 |
+
[[package]]
|
| 887 |
+
name = "serde"
|
| 888 |
+
version = "1.0.218"
|
| 889 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 890 |
+
checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
|
| 891 |
+
dependencies = [
|
| 892 |
+
"serde_derive",
|
| 893 |
+
]
|
| 894 |
+
|
| 895 |
+
[[package]]
|
| 896 |
+
name = "serde_derive"
|
| 897 |
+
version = "1.0.218"
|
| 898 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 899 |
+
checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
|
| 900 |
+
dependencies = [
|
| 901 |
+
"proc-macro2",
|
| 902 |
+
"quote",
|
| 903 |
+
"syn",
|
| 904 |
+
]
|
| 905 |
+
|
| 906 |
+
[[package]]
|
| 907 |
+
name = "serde_spanned"
|
| 908 |
+
version = "0.6.8"
|
| 909 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 910 |
+
checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
|
| 911 |
+
dependencies = [
|
| 912 |
+
"serde",
|
| 913 |
+
]
|
| 914 |
+
|
| 915 |
+
[[package]]
|
| 916 |
+
name = "shlex"
|
| 917 |
+
version = "1.3.0"
|
| 918 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 919 |
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
| 920 |
+
|
| 921 |
+
[[package]]
|
| 922 |
+
name = "simd-adler32"
|
| 923 |
+
version = "0.3.7"
|
| 924 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 925 |
+
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
| 926 |
+
|
| 927 |
+
[[package]]
|
| 928 |
+
name = "simd_helpers"
|
| 929 |
+
version = "0.1.0"
|
| 930 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 931 |
+
checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
|
| 932 |
+
dependencies = [
|
| 933 |
+
"quote",
|
| 934 |
+
]
|
| 935 |
+
|
| 936 |
+
[[package]]
|
| 937 |
+
name = "smallvec"
|
| 938 |
+
version = "1.14.0"
|
| 939 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 940 |
+
checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
|
| 941 |
+
|
| 942 |
+
[[package]]
|
| 943 |
+
name = "strsim"
|
| 944 |
+
version = "0.11.1"
|
| 945 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 946 |
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
| 947 |
+
|
| 948 |
+
[[package]]
|
| 949 |
+
name = "syn"
|
| 950 |
+
version = "2.0.98"
|
| 951 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 952 |
+
checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
|
| 953 |
+
dependencies = [
|
| 954 |
+
"proc-macro2",
|
| 955 |
+
"quote",
|
| 956 |
+
"unicode-ident",
|
| 957 |
+
]
|
| 958 |
+
|
| 959 |
+
[[package]]
|
| 960 |
+
name = "system-deps"
|
| 961 |
+
version = "6.2.2"
|
| 962 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 963 |
+
checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
|
| 964 |
+
dependencies = [
|
| 965 |
+
"cfg-expr",
|
| 966 |
+
"heck",
|
| 967 |
+
"pkg-config",
|
| 968 |
+
"toml",
|
| 969 |
+
"version-compare",
|
| 970 |
+
]
|
| 971 |
+
|
| 972 |
+
[[package]]
|
| 973 |
+
name = "target-lexicon"
|
| 974 |
+
version = "0.12.16"
|
| 975 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 976 |
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
| 977 |
+
|
| 978 |
+
[[package]]
|
| 979 |
+
name = "thiserror"
|
| 980 |
+
version = "1.0.69"
|
| 981 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 982 |
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
| 983 |
+
dependencies = [
|
| 984 |
+
"thiserror-impl",
|
| 985 |
+
]
|
| 986 |
+
|
| 987 |
+
[[package]]
|
| 988 |
+
name = "thiserror-impl"
|
| 989 |
+
version = "1.0.69"
|
| 990 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 991 |
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
| 992 |
+
dependencies = [
|
| 993 |
+
"proc-macro2",
|
| 994 |
+
"quote",
|
| 995 |
+
"syn",
|
| 996 |
+
]
|
| 997 |
+
|
| 998 |
+
[[package]]
|
| 999 |
+
name = "tiff"
|
| 1000 |
+
version = "0.9.1"
|
| 1001 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1002 |
+
checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e"
|
| 1003 |
+
dependencies = [
|
| 1004 |
+
"flate2",
|
| 1005 |
+
"jpeg-decoder",
|
| 1006 |
+
"weezl",
|
| 1007 |
+
]
|
| 1008 |
+
|
| 1009 |
+
[[package]]
|
| 1010 |
+
name = "toml"
|
| 1011 |
+
version = "0.8.20"
|
| 1012 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1013 |
+
checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
|
| 1014 |
+
dependencies = [
|
| 1015 |
+
"serde",
|
| 1016 |
+
"serde_spanned",
|
| 1017 |
+
"toml_datetime",
|
| 1018 |
+
"toml_edit",
|
| 1019 |
+
]
|
| 1020 |
+
|
| 1021 |
+
[[package]]
|
| 1022 |
+
name = "toml_datetime"
|
| 1023 |
+
version = "0.6.8"
|
| 1024 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1025 |
+
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
|
| 1026 |
+
dependencies = [
|
| 1027 |
+
"serde",
|
| 1028 |
+
]
|
| 1029 |
+
|
| 1030 |
+
[[package]]
|
| 1031 |
+
name = "toml_edit"
|
| 1032 |
+
version = "0.22.24"
|
| 1033 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1034 |
+
checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
|
| 1035 |
+
dependencies = [
|
| 1036 |
+
"indexmap",
|
| 1037 |
+
"serde",
|
| 1038 |
+
"serde_spanned",
|
| 1039 |
+
"toml_datetime",
|
| 1040 |
+
"winnow",
|
| 1041 |
+
]
|
| 1042 |
+
|
| 1043 |
+
[[package]]
|
| 1044 |
+
name = "unicode-ident"
|
| 1045 |
+
version = "1.0.17"
|
| 1046 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1047 |
+
checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
|
| 1048 |
+
|
| 1049 |
+
[[package]]
|
| 1050 |
+
name = "unicode-segmentation"
|
| 1051 |
+
version = "1.12.0"
|
| 1052 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1053 |
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
| 1054 |
+
|
| 1055 |
+
[[package]]
|
| 1056 |
+
name = "utf8parse"
|
| 1057 |
+
version = "0.2.2"
|
| 1058 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1059 |
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
| 1060 |
+
|
| 1061 |
+
[[package]]
|
| 1062 |
+
name = "v_frame"
|
| 1063 |
+
version = "0.3.8"
|
| 1064 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1065 |
+
checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
|
| 1066 |
+
dependencies = [
|
| 1067 |
+
"aligned-vec",
|
| 1068 |
+
"num-traits",
|
| 1069 |
+
"wasm-bindgen",
|
| 1070 |
+
]
|
| 1071 |
+
|
| 1072 |
+
[[package]]
|
| 1073 |
+
name = "version-compare"
|
| 1074 |
+
version = "0.2.0"
|
| 1075 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1076 |
+
checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
|
| 1077 |
+
|
| 1078 |
+
[[package]]
|
| 1079 |
+
name = "wasi"
|
| 1080 |
+
version = "0.11.0+wasi-snapshot-preview1"
|
| 1081 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1082 |
+
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
| 1083 |
+
|
| 1084 |
+
[[package]]
|
| 1085 |
+
name = "wasm-bindgen"
|
| 1086 |
+
version = "0.2.100"
|
| 1087 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1088 |
+
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
| 1089 |
+
dependencies = [
|
| 1090 |
+
"cfg-if",
|
| 1091 |
+
"once_cell",
|
| 1092 |
+
"rustversion",
|
| 1093 |
+
"wasm-bindgen-macro",
|
| 1094 |
+
]
|
| 1095 |
+
|
| 1096 |
+
[[package]]
|
| 1097 |
+
name = "wasm-bindgen-backend"
|
| 1098 |
+
version = "0.2.100"
|
| 1099 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1100 |
+
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
| 1101 |
+
dependencies = [
|
| 1102 |
+
"bumpalo",
|
| 1103 |
+
"log",
|
| 1104 |
+
"proc-macro2",
|
| 1105 |
+
"quote",
|
| 1106 |
+
"syn",
|
| 1107 |
+
"wasm-bindgen-shared",
|
| 1108 |
+
]
|
| 1109 |
+
|
| 1110 |
+
[[package]]
|
| 1111 |
+
name = "wasm-bindgen-macro"
|
| 1112 |
+
version = "0.2.100"
|
| 1113 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1114 |
+
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
| 1115 |
+
dependencies = [
|
| 1116 |
+
"quote",
|
| 1117 |
+
"wasm-bindgen-macro-support",
|
| 1118 |
+
]
|
| 1119 |
+
|
| 1120 |
+
[[package]]
|
| 1121 |
+
name = "wasm-bindgen-macro-support"
|
| 1122 |
+
version = "0.2.100"
|
| 1123 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1124 |
+
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
| 1125 |
+
dependencies = [
|
| 1126 |
+
"proc-macro2",
|
| 1127 |
+
"quote",
|
| 1128 |
+
"syn",
|
| 1129 |
+
"wasm-bindgen-backend",
|
| 1130 |
+
"wasm-bindgen-shared",
|
| 1131 |
+
]
|
| 1132 |
+
|
| 1133 |
+
[[package]]
|
| 1134 |
+
name = "wasm-bindgen-shared"
|
| 1135 |
+
version = "0.2.100"
|
| 1136 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1137 |
+
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
| 1138 |
+
dependencies = [
|
| 1139 |
+
"unicode-ident",
|
| 1140 |
+
]
|
| 1141 |
+
|
| 1142 |
+
[[package]]
|
| 1143 |
+
name = "weezl"
|
| 1144 |
+
version = "0.1.8"
|
| 1145 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1146 |
+
checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
|
| 1147 |
+
|
| 1148 |
+
[[package]]
|
| 1149 |
+
name = "winapi"
|
| 1150 |
+
version = "0.3.9"
|
| 1151 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1152 |
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
| 1153 |
+
dependencies = [
|
| 1154 |
+
"winapi-i686-pc-windows-gnu",
|
| 1155 |
+
"winapi-x86_64-pc-windows-gnu",
|
| 1156 |
+
]
|
| 1157 |
+
|
| 1158 |
+
[[package]]
|
| 1159 |
+
name = "winapi-i686-pc-windows-gnu"
|
| 1160 |
+
version = "0.4.0"
|
| 1161 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1162 |
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
| 1163 |
+
|
| 1164 |
+
[[package]]
|
| 1165 |
+
name = "winapi-x86_64-pc-windows-gnu"
|
| 1166 |
+
version = "0.4.0"
|
| 1167 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1168 |
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
| 1169 |
+
|
| 1170 |
+
[[package]]
|
| 1171 |
+
name = "windows-sys"
|
| 1172 |
+
version = "0.59.0"
|
| 1173 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1174 |
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
| 1175 |
+
dependencies = [
|
| 1176 |
+
"windows-targets",
|
| 1177 |
+
]
|
| 1178 |
+
|
| 1179 |
+
[[package]]
|
| 1180 |
+
name = "windows-targets"
|
| 1181 |
+
version = "0.52.6"
|
| 1182 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1183 |
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
| 1184 |
+
dependencies = [
|
| 1185 |
+
"windows_aarch64_gnullvm",
|
| 1186 |
+
"windows_aarch64_msvc",
|
| 1187 |
+
"windows_i686_gnu",
|
| 1188 |
+
"windows_i686_gnullvm",
|
| 1189 |
+
"windows_i686_msvc",
|
| 1190 |
+
"windows_x86_64_gnu",
|
| 1191 |
+
"windows_x86_64_gnullvm",
|
| 1192 |
+
"windows_x86_64_msvc",
|
| 1193 |
+
]
|
| 1194 |
+
|
| 1195 |
+
[[package]]
|
| 1196 |
+
name = "windows_aarch64_gnullvm"
|
| 1197 |
+
version = "0.52.6"
|
| 1198 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1199 |
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
| 1200 |
+
|
| 1201 |
+
[[package]]
|
| 1202 |
+
name = "windows_aarch64_msvc"
|
| 1203 |
+
version = "0.52.6"
|
| 1204 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1205 |
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
| 1206 |
+
|
| 1207 |
+
[[package]]
|
| 1208 |
+
name = "windows_i686_gnu"
|
| 1209 |
+
version = "0.52.6"
|
| 1210 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1211 |
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
| 1212 |
+
|
| 1213 |
+
[[package]]
|
| 1214 |
+
name = "windows_i686_gnullvm"
|
| 1215 |
+
version = "0.52.6"
|
| 1216 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1217 |
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
| 1218 |
+
|
| 1219 |
+
[[package]]
|
| 1220 |
+
name = "windows_i686_msvc"
|
| 1221 |
+
version = "0.52.6"
|
| 1222 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1223 |
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
| 1224 |
+
|
| 1225 |
+
[[package]]
|
| 1226 |
+
name = "windows_x86_64_gnu"
|
| 1227 |
+
version = "0.52.6"
|
| 1228 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1229 |
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
| 1230 |
+
|
| 1231 |
+
[[package]]
|
| 1232 |
+
name = "windows_x86_64_gnullvm"
|
| 1233 |
+
version = "0.52.6"
|
| 1234 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1235 |
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
| 1236 |
+
|
| 1237 |
+
[[package]]
|
| 1238 |
+
name = "windows_x86_64_msvc"
|
| 1239 |
+
version = "0.52.6"
|
| 1240 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1241 |
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
| 1242 |
+
|
| 1243 |
+
[[package]]
|
| 1244 |
+
name = "winnow"
|
| 1245 |
+
version = "0.7.3"
|
| 1246 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1247 |
+
checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
|
| 1248 |
+
dependencies = [
|
| 1249 |
+
"memchr",
|
| 1250 |
+
]
|
| 1251 |
+
|
| 1252 |
+
[[package]]
|
| 1253 |
+
name = "zerocopy"
|
| 1254 |
+
version = "0.7.35"
|
| 1255 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1256 |
+
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
|
| 1257 |
+
dependencies = [
|
| 1258 |
+
"byteorder",
|
| 1259 |
+
"zerocopy-derive",
|
| 1260 |
+
]
|
| 1261 |
+
|
| 1262 |
+
[[package]]
|
| 1263 |
+
name = "zerocopy-derive"
|
| 1264 |
+
version = "0.7.35"
|
| 1265 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1266 |
+
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
| 1267 |
+
dependencies = [
|
| 1268 |
+
"proc-macro2",
|
| 1269 |
+
"quote",
|
| 1270 |
+
"syn",
|
| 1271 |
+
]
|
| 1272 |
+
|
| 1273 |
+
[[package]]
|
| 1274 |
+
name = "zune-core"
|
| 1275 |
+
version = "0.4.12"
|
| 1276 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1277 |
+
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
|
| 1278 |
+
|
| 1279 |
+
[[package]]
|
| 1280 |
+
name = "zune-inflate"
|
| 1281 |
+
version = "0.2.54"
|
| 1282 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1283 |
+
checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
|
| 1284 |
+
dependencies = [
|
| 1285 |
+
"simd-adler32",
|
| 1286 |
+
]
|
| 1287 |
+
|
| 1288 |
+
[[package]]
|
| 1289 |
+
name = "zune-jpeg"
|
| 1290 |
+
version = "0.4.14"
|
| 1291 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1292 |
+
checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028"
|
| 1293 |
+
dependencies = [
|
| 1294 |
+
"zune-core",
|
| 1295 |
+
]
|
| 1296 |
+
|
| 1297 |
+
SCRIPT_LOCK
|
| 1298 |
+
|
| 1299 |
+
# --- Write minimal stub source files so cargo can validate target paths. ------
|
| 1300 |
+
# The real crate sources are compiled by build.sh; these stubs only let cargo
|
| 1301 |
+
# resolve the [lib]/[[bin]] paths at fetch time.
|
| 1302 |
+
cat > "$SCRATCH_DIR/src/lib.rs" <<'RASCII_LIB_STUB'
|
| 1303 |
+
pub fn _dummy_lib() {}
|
| 1304 |
+
RASCII_LIB_STUB
|
| 1305 |
+
|
| 1306 |
+
cat > "$SCRATCH_DIR/src/main.rs" <<'RASCII_BIN_STUB'
|
| 1307 |
+
fn main() {}
|
| 1308 |
+
RASCII_BIN_STUB
|
| 1309 |
+
|
| 1310 |
+
# --- Fetch the exact locked dependency closure (no compilation). ---------------
|
| 1311 |
+
export CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}"
|
| 1312 |
+
cargo fetch --locked --manifest-path "$SCRATCH_DIR/Cargo.toml"
|
| 1313 |
+
|
| 1314 |
+
echo "download.sh: dependency prefetch complete."
|
| 1315 |
+
unset SCRATCH_DIR
|
orhnk--rascii.8d33a36/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f69847ade7cbb718498fa26a8343058002246f493b4b2cf42ebd9b757c5125f7
|
| 3 |
+
size 2702384
|
orhnk--rascii.8d33a36/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
|
orhnk--rascii.8d33a36/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb045bc449d6243ef84ebef1a9390572bb73736e0d1d75eb0994f36c39a4df5d
|
| 3 |
+
size 3950
|
orhnk--rascii.8d33a36/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
|
orhnk--rascii.8d33a36/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
|
orhnk--rascii.8d33a36/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/orhnk--rascii.8d33a36"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for orhnk/RASCII"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "rust"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "orhnk__RASCII.8d33a36"
|
| 32 |
+
repository = "orhnk/RASCII"
|
| 33 |
+
commit = "8d33a3670e51298d530ab202090b212501310cdd"
|
| 34 |
+
language = "rust"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.3765769570565118
|
| 37 |
+
test_branches = 4
|
| 38 |
+
test_count = 1278
|
| 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"
|
orhnk--rascii.8d33a36/tests/Dockerfile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM rust:1.97.1-bookworm
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV CARGO_HOME=/usr/local/cargo
|
| 24 |
+
ENV RUSTUP_HOME=/usr/local/rustup
|
| 25 |
+
ENV RUSTUP_TOOLCHAIN=1.97.1
|
| 26 |
+
ENV PROGRAMGYM_RUST_TOOLCHAIN=1.97.1
|
| 27 |
+
ENV PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 28 |
+
ENV PAGER=cat
|
| 29 |
+
ENV MANPAGER=cat
|
| 30 |
+
ENV LESS=-R
|
| 31 |
+
ENV TQDM_DISABLE=1
|
| 32 |
+
RUN apt-get update && apt-get install -y --no-install-recommends apt=2.6.1 bash=5.2.15-2+b13 build-essential=12.9 ca-certificates=20250419~deb12u1 cmake=3.25.1-1 git=1:2.39.5-0+deb12u3 make=4.3-4.1 pkg-config=1.8.1-1 python3=3.11.2-1+b1 python3-pip=23.0.1+dfsg-1 python3-dev=3.11.2-1+b1 autoconf=2.71-3 automake=1:1.16.5-1.3 gettext=0.21-12 file=1:5.44-3 binutils=2.40-2 libtool=2.4.7-7~deb12u1 libncurses-dev=6.4-4 meson=1.0.1-5 ninja-build=1.11.1-2~deb12u1 curl=7.88.1-10+deb12u15 wget=1.21.3-1+deb12u1 xz-utils=5.4.1-1+deb12u1 zstd=1.5.4+dfsg2-5 bzip2=1.0.8-5+b1 zip=3.0-13 unzip=6.0-28+deb12u1 patch=2.7.6-7 grep=3.8-5 python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 33 |
+
RUN rustup component add llvm-tools-preview --toolchain 1.97.1
|
| 34 |
+
RUN RUST_SYSROOT="$(rustc --print sysroot)"; RUST_HOST="$(rustc -vV | sed -n 's/^host: //p')"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-profdata"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-cov"
|
| 35 |
+
RUN rustc --version && cargo --version && rustup show active-toolchain
|
| 36 |
+
WORKDIR /workspace
|
| 37 |
+
ADD workspace.tar.gz /workspace/
|
| 38 |
+
COPY executable /workspace/executable
|
| 39 |
+
COPY download.sh /tmp/programgym-download.sh
|
| 40 |
+
RUN chmod 755 /tmp/programgym-download.sh
|
| 41 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 42 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 43 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 44 |
+
&& rm -f /tmp/programgym-download.sh \
|
| 45 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 46 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 47 |
+
RUN chmod 111 /workspace/executable
|
| 48 |
+
WORKDIR /workspace
|
| 49 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 50 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 51 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 52 |
+
&& mkdir -p /workspace /tests
|
| 53 |
+
|
| 54 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 55 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 56 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 57 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 58 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 59 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 60 |
+
RUN python3 -m pip install --break-system-packages \
|
| 61 |
+
--no-cache-dir --disable-pip-version-check \
|
| 62 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 63 |
+
|
| 64 |
+
COPY test.sh /tests/test.sh
|
| 65 |
+
COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
| 66 |
+
COPY programgym_task.json /tests/programgym_task.json
|
| 67 |
+
COPY blobs/ /tests/blobs/
|
| 68 |
+
RUN chmod +x /tests/test.sh
|
orhnk--rascii.8d33a36/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:b856be5811f1a26dc153dac30408818296319456bbdca6e6cb2b5d264cfefcf6
|
| 3 |
+
size 26523
|
orhnk--rascii.8d33a36/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:887012f880eec5ac3f772cd748e4b5dc9639bcd188b4d83527185c44991f829a
|
| 3 |
+
size 28893
|
orhnk--rascii.8d33a36/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:f03125035aac6e4ab0e2e7b1c87728e1ecaace8f78ea0797c6e2d195ef5f2aa6
|
| 3 |
+
size 29091
|
orhnk--rascii.8d33a36/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:d6ce3c98fe431a87f07c19f16777d9a855fd252f68480f046a4ede5eb40b0bde
|
| 3 |
+
size 30056
|
orhnk--rascii.8d33a36/tests/download.sh
ADDED
|
@@ -0,0 +1,1315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# download.sh - ProgramGym dependency prefetch stage for RASCII (rascii_art)
|
| 3 |
+
#
|
| 4 |
+
# Sourced by the validator in a read-only mount with network access. It only
|
| 5 |
+
# fetches the Cargo dependency closure needed for an offline build of the
|
| 6 |
+
# `rascii` binary. It must be standalone (does not read any repository file)
|
| 7 |
+
# and safe to run in source mode. It performs NO compilation.
|
| 8 |
+
#
|
| 9 |
+
# The real crate declares a lib (rascii_art) and bin (rascii). To make the
|
| 10 |
+
# fetched dependency closure EXACTLY match what build.sh compiles offline, we
|
| 11 |
+
# embed the repository's committed Cargo.toml and Cargo.lock inline (the rules
|
| 12 |
+
# forbid reading repository files at runtime, but allow embedding them), write
|
| 13 |
+
# matching stub source files in a scratch dir, and run `cargo fetch --locked`.
|
| 14 |
+
|
| 15 |
+
set -u
|
| 16 |
+
|
| 17 |
+
# --- Isolated scratch dir (repo root is read-only here). ----------------------
|
| 18 |
+
SCRATCH_DIR="${TMPDIR:-/tmp}/rascii_download_prefetch"
|
| 19 |
+
rm -rf "$SCRATCH_DIR"
|
| 20 |
+
mkdir -p "$SCRATCH_DIR/src"
|
| 21 |
+
|
| 22 |
+
# --- Embedded Cargo.toml (byte-identical to the repository's). ----------------
|
| 23 |
+
cat > "$SCRATCH_DIR/Cargo.toml" <<'SCRIPT_CARGO'
|
| 24 |
+
[package]
|
| 25 |
+
name = "rascii_art"
|
| 26 |
+
version = "0.4.5"
|
| 27 |
+
authors = [ "UTFeight", "RGBCube" ]
|
| 28 |
+
description = "Advanced ASCII Art Generator"
|
| 29 |
+
repository = "https://github.com/UTFeight/RASCII"
|
| 30 |
+
keywords = [ "ascii" ]
|
| 31 |
+
license = "MIT"
|
| 32 |
+
edition = "2021"
|
| 33 |
+
|
| 34 |
+
[dependencies]
|
| 35 |
+
ansi_term = "0.12.1"
|
| 36 |
+
clap = { version = "4.5.31", features = ["derive"] }
|
| 37 |
+
image = "0.25.5"
|
| 38 |
+
unicode-segmentation = "1.12.0"
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
[[bin]]
|
| 42 |
+
name = "rascii"
|
| 43 |
+
path = "src/main.rs"
|
| 44 |
+
|
| 45 |
+
[profile.release]
|
| 46 |
+
strip = true
|
| 47 |
+
|
| 48 |
+
SCRIPT_CARGO
|
| 49 |
+
|
| 50 |
+
# --- Embedded Cargo.lock (byte-identical to the repository's). ----------------
|
| 51 |
+
cat > "$SCRATCH_DIR/Cargo.lock" <<'SCRIPT_LOCK'
|
| 52 |
+
# This file is automatically @generated by Cargo.
|
| 53 |
+
# It is not intended for manual editing.
|
| 54 |
+
version = 4
|
| 55 |
+
|
| 56 |
+
[[package]]
|
| 57 |
+
name = "adler2"
|
| 58 |
+
version = "2.0.0"
|
| 59 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 60 |
+
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
| 61 |
+
|
| 62 |
+
[[package]]
|
| 63 |
+
name = "aligned-vec"
|
| 64 |
+
version = "0.5.0"
|
| 65 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 66 |
+
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
|
| 67 |
+
|
| 68 |
+
[[package]]
|
| 69 |
+
name = "ansi_term"
|
| 70 |
+
version = "0.12.1"
|
| 71 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 72 |
+
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
| 73 |
+
dependencies = [
|
| 74 |
+
"winapi",
|
| 75 |
+
]
|
| 76 |
+
|
| 77 |
+
[[package]]
|
| 78 |
+
name = "anstream"
|
| 79 |
+
version = "0.6.18"
|
| 80 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 81 |
+
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
|
| 82 |
+
dependencies = [
|
| 83 |
+
"anstyle",
|
| 84 |
+
"anstyle-parse",
|
| 85 |
+
"anstyle-query",
|
| 86 |
+
"anstyle-wincon",
|
| 87 |
+
"colorchoice",
|
| 88 |
+
"is_terminal_polyfill",
|
| 89 |
+
"utf8parse",
|
| 90 |
+
]
|
| 91 |
+
|
| 92 |
+
[[package]]
|
| 93 |
+
name = "anstyle"
|
| 94 |
+
version = "1.0.10"
|
| 95 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 96 |
+
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
| 97 |
+
|
| 98 |
+
[[package]]
|
| 99 |
+
name = "anstyle-parse"
|
| 100 |
+
version = "0.2.6"
|
| 101 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 102 |
+
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
|
| 103 |
+
dependencies = [
|
| 104 |
+
"utf8parse",
|
| 105 |
+
]
|
| 106 |
+
|
| 107 |
+
[[package]]
|
| 108 |
+
name = "anstyle-query"
|
| 109 |
+
version = "1.1.2"
|
| 110 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 111 |
+
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
|
| 112 |
+
dependencies = [
|
| 113 |
+
"windows-sys",
|
| 114 |
+
]
|
| 115 |
+
|
| 116 |
+
[[package]]
|
| 117 |
+
name = "anstyle-wincon"
|
| 118 |
+
version = "3.0.7"
|
| 119 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 120 |
+
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
|
| 121 |
+
dependencies = [
|
| 122 |
+
"anstyle",
|
| 123 |
+
"once_cell",
|
| 124 |
+
"windows-sys",
|
| 125 |
+
]
|
| 126 |
+
|
| 127 |
+
[[package]]
|
| 128 |
+
name = "anyhow"
|
| 129 |
+
version = "1.0.96"
|
| 130 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 131 |
+
checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4"
|
| 132 |
+
|
| 133 |
+
[[package]]
|
| 134 |
+
name = "arbitrary"
|
| 135 |
+
version = "1.4.1"
|
| 136 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 137 |
+
checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
|
| 138 |
+
|
| 139 |
+
[[package]]
|
| 140 |
+
name = "arg_enum_proc_macro"
|
| 141 |
+
version = "0.3.4"
|
| 142 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 143 |
+
checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
|
| 144 |
+
dependencies = [
|
| 145 |
+
"proc-macro2",
|
| 146 |
+
"quote",
|
| 147 |
+
"syn",
|
| 148 |
+
]
|
| 149 |
+
|
| 150 |
+
[[package]]
|
| 151 |
+
name = "arrayvec"
|
| 152 |
+
version = "0.7.6"
|
| 153 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 154 |
+
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
|
| 155 |
+
|
| 156 |
+
[[package]]
|
| 157 |
+
name = "autocfg"
|
| 158 |
+
version = "1.4.0"
|
| 159 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 160 |
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
| 161 |
+
|
| 162 |
+
[[package]]
|
| 163 |
+
name = "av1-grain"
|
| 164 |
+
version = "0.2.3"
|
| 165 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 166 |
+
checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
|
| 167 |
+
dependencies = [
|
| 168 |
+
"anyhow",
|
| 169 |
+
"arrayvec",
|
| 170 |
+
"log",
|
| 171 |
+
"nom",
|
| 172 |
+
"num-rational",
|
| 173 |
+
"v_frame",
|
| 174 |
+
]
|
| 175 |
+
|
| 176 |
+
[[package]]
|
| 177 |
+
name = "avif-serialize"
|
| 178 |
+
version = "0.8.3"
|
| 179 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 180 |
+
checksum = "98922d6a4cfbcb08820c69d8eeccc05bb1f29bfa06b4f5b1dbfe9a868bd7608e"
|
| 181 |
+
dependencies = [
|
| 182 |
+
"arrayvec",
|
| 183 |
+
]
|
| 184 |
+
|
| 185 |
+
[[package]]
|
| 186 |
+
name = "bit_field"
|
| 187 |
+
version = "0.10.2"
|
| 188 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 189 |
+
checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
|
| 190 |
+
|
| 191 |
+
[[package]]
|
| 192 |
+
name = "bitflags"
|
| 193 |
+
version = "1.3.2"
|
| 194 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 195 |
+
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
| 196 |
+
|
| 197 |
+
[[package]]
|
| 198 |
+
name = "bitstream-io"
|
| 199 |
+
version = "2.6.0"
|
| 200 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 201 |
+
checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2"
|
| 202 |
+
|
| 203 |
+
[[package]]
|
| 204 |
+
name = "built"
|
| 205 |
+
version = "0.7.7"
|
| 206 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 207 |
+
checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b"
|
| 208 |
+
|
| 209 |
+
[[package]]
|
| 210 |
+
name = "bumpalo"
|
| 211 |
+
version = "3.17.0"
|
| 212 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 213 |
+
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
|
| 214 |
+
|
| 215 |
+
[[package]]
|
| 216 |
+
name = "bytemuck"
|
| 217 |
+
version = "1.21.0"
|
| 218 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 219 |
+
checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
|
| 220 |
+
|
| 221 |
+
[[package]]
|
| 222 |
+
name = "byteorder"
|
| 223 |
+
version = "1.5.0"
|
| 224 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 225 |
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
| 226 |
+
|
| 227 |
+
[[package]]
|
| 228 |
+
name = "byteorder-lite"
|
| 229 |
+
version = "0.1.0"
|
| 230 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 231 |
+
checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
|
| 232 |
+
|
| 233 |
+
[[package]]
|
| 234 |
+
name = "cc"
|
| 235 |
+
version = "1.2.15"
|
| 236 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 237 |
+
checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af"
|
| 238 |
+
dependencies = [
|
| 239 |
+
"jobserver",
|
| 240 |
+
"libc",
|
| 241 |
+
"shlex",
|
| 242 |
+
]
|
| 243 |
+
|
| 244 |
+
[[package]]
|
| 245 |
+
name = "cfg-expr"
|
| 246 |
+
version = "0.15.8"
|
| 247 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 248 |
+
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
|
| 249 |
+
dependencies = [
|
| 250 |
+
"smallvec",
|
| 251 |
+
"target-lexicon",
|
| 252 |
+
]
|
| 253 |
+
|
| 254 |
+
[[package]]
|
| 255 |
+
name = "cfg-if"
|
| 256 |
+
version = "1.0.0"
|
| 257 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 258 |
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
| 259 |
+
|
| 260 |
+
[[package]]
|
| 261 |
+
name = "clap"
|
| 262 |
+
version = "4.5.31"
|
| 263 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 264 |
+
checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767"
|
| 265 |
+
dependencies = [
|
| 266 |
+
"clap_builder",
|
| 267 |
+
"clap_derive",
|
| 268 |
+
]
|
| 269 |
+
|
| 270 |
+
[[package]]
|
| 271 |
+
name = "clap_builder"
|
| 272 |
+
version = "4.5.31"
|
| 273 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 274 |
+
checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863"
|
| 275 |
+
dependencies = [
|
| 276 |
+
"anstream",
|
| 277 |
+
"anstyle",
|
| 278 |
+
"clap_lex",
|
| 279 |
+
"strsim",
|
| 280 |
+
]
|
| 281 |
+
|
| 282 |
+
[[package]]
|
| 283 |
+
name = "clap_derive"
|
| 284 |
+
version = "4.5.28"
|
| 285 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 286 |
+
checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed"
|
| 287 |
+
dependencies = [
|
| 288 |
+
"heck",
|
| 289 |
+
"proc-macro2",
|
| 290 |
+
"quote",
|
| 291 |
+
"syn",
|
| 292 |
+
]
|
| 293 |
+
|
| 294 |
+
[[package]]
|
| 295 |
+
name = "clap_lex"
|
| 296 |
+
version = "0.7.4"
|
| 297 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 298 |
+
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
| 299 |
+
|
| 300 |
+
[[package]]
|
| 301 |
+
name = "color_quant"
|
| 302 |
+
version = "1.1.0"
|
| 303 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 304 |
+
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
|
| 305 |
+
|
| 306 |
+
[[package]]
|
| 307 |
+
name = "colorchoice"
|
| 308 |
+
version = "1.0.3"
|
| 309 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 310 |
+
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
| 311 |
+
|
| 312 |
+
[[package]]
|
| 313 |
+
name = "crc32fast"
|
| 314 |
+
version = "1.4.2"
|
| 315 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 316 |
+
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
|
| 317 |
+
dependencies = [
|
| 318 |
+
"cfg-if",
|
| 319 |
+
]
|
| 320 |
+
|
| 321 |
+
[[package]]
|
| 322 |
+
name = "crossbeam-deque"
|
| 323 |
+
version = "0.8.6"
|
| 324 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 325 |
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
| 326 |
+
dependencies = [
|
| 327 |
+
"crossbeam-epoch",
|
| 328 |
+
"crossbeam-utils",
|
| 329 |
+
]
|
| 330 |
+
|
| 331 |
+
[[package]]
|
| 332 |
+
name = "crossbeam-epoch"
|
| 333 |
+
version = "0.9.18"
|
| 334 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 335 |
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
| 336 |
+
dependencies = [
|
| 337 |
+
"crossbeam-utils",
|
| 338 |
+
]
|
| 339 |
+
|
| 340 |
+
[[package]]
|
| 341 |
+
name = "crossbeam-utils"
|
| 342 |
+
version = "0.8.21"
|
| 343 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 344 |
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
| 345 |
+
|
| 346 |
+
[[package]]
|
| 347 |
+
name = "crunchy"
|
| 348 |
+
version = "0.2.3"
|
| 349 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 350 |
+
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
|
| 351 |
+
|
| 352 |
+
[[package]]
|
| 353 |
+
name = "either"
|
| 354 |
+
version = "1.14.0"
|
| 355 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 356 |
+
checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
|
| 357 |
+
|
| 358 |
+
[[package]]
|
| 359 |
+
name = "equivalent"
|
| 360 |
+
version = "1.0.2"
|
| 361 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 362 |
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
| 363 |
+
|
| 364 |
+
[[package]]
|
| 365 |
+
name = "exr"
|
| 366 |
+
version = "1.73.0"
|
| 367 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 368 |
+
checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0"
|
| 369 |
+
dependencies = [
|
| 370 |
+
"bit_field",
|
| 371 |
+
"half",
|
| 372 |
+
"lebe",
|
| 373 |
+
"miniz_oxide",
|
| 374 |
+
"rayon-core",
|
| 375 |
+
"smallvec",
|
| 376 |
+
"zune-inflate",
|
| 377 |
+
]
|
| 378 |
+
|
| 379 |
+
[[package]]
|
| 380 |
+
name = "fdeflate"
|
| 381 |
+
version = "0.3.7"
|
| 382 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 383 |
+
checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
|
| 384 |
+
dependencies = [
|
| 385 |
+
"simd-adler32",
|
| 386 |
+
]
|
| 387 |
+
|
| 388 |
+
[[package]]
|
| 389 |
+
name = "flate2"
|
| 390 |
+
version = "1.1.0"
|
| 391 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 392 |
+
checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
|
| 393 |
+
dependencies = [
|
| 394 |
+
"crc32fast",
|
| 395 |
+
"miniz_oxide",
|
| 396 |
+
]
|
| 397 |
+
|
| 398 |
+
[[package]]
|
| 399 |
+
name = "getrandom"
|
| 400 |
+
version = "0.2.15"
|
| 401 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 402 |
+
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
| 403 |
+
dependencies = [
|
| 404 |
+
"cfg-if",
|
| 405 |
+
"libc",
|
| 406 |
+
"wasi",
|
| 407 |
+
]
|
| 408 |
+
|
| 409 |
+
[[package]]
|
| 410 |
+
name = "gif"
|
| 411 |
+
version = "0.13.1"
|
| 412 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 413 |
+
checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2"
|
| 414 |
+
dependencies = [
|
| 415 |
+
"color_quant",
|
| 416 |
+
"weezl",
|
| 417 |
+
]
|
| 418 |
+
|
| 419 |
+
[[package]]
|
| 420 |
+
name = "half"
|
| 421 |
+
version = "2.4.1"
|
| 422 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 423 |
+
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
|
| 424 |
+
dependencies = [
|
| 425 |
+
"cfg-if",
|
| 426 |
+
"crunchy",
|
| 427 |
+
]
|
| 428 |
+
|
| 429 |
+
[[package]]
|
| 430 |
+
name = "hashbrown"
|
| 431 |
+
version = "0.15.2"
|
| 432 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 433 |
+
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
|
| 434 |
+
|
| 435 |
+
[[package]]
|
| 436 |
+
name = "heck"
|
| 437 |
+
version = "0.5.0"
|
| 438 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 439 |
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
| 440 |
+
|
| 441 |
+
[[package]]
|
| 442 |
+
name = "image"
|
| 443 |
+
version = "0.25.5"
|
| 444 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 445 |
+
checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b"
|
| 446 |
+
dependencies = [
|
| 447 |
+
"bytemuck",
|
| 448 |
+
"byteorder-lite",
|
| 449 |
+
"color_quant",
|
| 450 |
+
"exr",
|
| 451 |
+
"gif",
|
| 452 |
+
"image-webp",
|
| 453 |
+
"num-traits",
|
| 454 |
+
"png",
|
| 455 |
+
"qoi",
|
| 456 |
+
"ravif",
|
| 457 |
+
"rayon",
|
| 458 |
+
"rgb",
|
| 459 |
+
"tiff",
|
| 460 |
+
"zune-core",
|
| 461 |
+
"zune-jpeg",
|
| 462 |
+
]
|
| 463 |
+
|
| 464 |
+
[[package]]
|
| 465 |
+
name = "image-webp"
|
| 466 |
+
version = "0.2.1"
|
| 467 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 468 |
+
checksum = "b77d01e822461baa8409e156015a1d91735549f0f2c17691bd2d996bef238f7f"
|
| 469 |
+
dependencies = [
|
| 470 |
+
"byteorder-lite",
|
| 471 |
+
"quick-error",
|
| 472 |
+
]
|
| 473 |
+
|
| 474 |
+
[[package]]
|
| 475 |
+
name = "imgref"
|
| 476 |
+
version = "1.11.0"
|
| 477 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 478 |
+
checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
|
| 479 |
+
|
| 480 |
+
[[package]]
|
| 481 |
+
name = "indexmap"
|
| 482 |
+
version = "2.7.1"
|
| 483 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 484 |
+
checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
|
| 485 |
+
dependencies = [
|
| 486 |
+
"equivalent",
|
| 487 |
+
"hashbrown",
|
| 488 |
+
]
|
| 489 |
+
|
| 490 |
+
[[package]]
|
| 491 |
+
name = "interpolate_name"
|
| 492 |
+
version = "0.2.4"
|
| 493 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 494 |
+
checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
|
| 495 |
+
dependencies = [
|
| 496 |
+
"proc-macro2",
|
| 497 |
+
"quote",
|
| 498 |
+
"syn",
|
| 499 |
+
]
|
| 500 |
+
|
| 501 |
+
[[package]]
|
| 502 |
+
name = "is_terminal_polyfill"
|
| 503 |
+
version = "1.70.1"
|
| 504 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 505 |
+
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
| 506 |
+
|
| 507 |
+
[[package]]
|
| 508 |
+
name = "itertools"
|
| 509 |
+
version = "0.12.1"
|
| 510 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 511 |
+
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
|
| 512 |
+
dependencies = [
|
| 513 |
+
"either",
|
| 514 |
+
]
|
| 515 |
+
|
| 516 |
+
[[package]]
|
| 517 |
+
name = "jobserver"
|
| 518 |
+
version = "0.1.32"
|
| 519 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 520 |
+
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
|
| 521 |
+
dependencies = [
|
| 522 |
+
"libc",
|
| 523 |
+
]
|
| 524 |
+
|
| 525 |
+
[[package]]
|
| 526 |
+
name = "jpeg-decoder"
|
| 527 |
+
version = "0.3.1"
|
| 528 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 529 |
+
checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
|
| 530 |
+
|
| 531 |
+
[[package]]
|
| 532 |
+
name = "lebe"
|
| 533 |
+
version = "0.5.2"
|
| 534 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 535 |
+
checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
|
| 536 |
+
|
| 537 |
+
[[package]]
|
| 538 |
+
name = "libc"
|
| 539 |
+
version = "0.2.170"
|
| 540 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 541 |
+
checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
|
| 542 |
+
|
| 543 |
+
[[package]]
|
| 544 |
+
name = "libfuzzer-sys"
|
| 545 |
+
version = "0.4.9"
|
| 546 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 547 |
+
checksum = "cf78f52d400cf2d84a3a973a78a592b4adc535739e0a5597a0da6f0c357adc75"
|
| 548 |
+
dependencies = [
|
| 549 |
+
"arbitrary",
|
| 550 |
+
"cc",
|
| 551 |
+
]
|
| 552 |
+
|
| 553 |
+
[[package]]
|
| 554 |
+
name = "log"
|
| 555 |
+
version = "0.4.26"
|
| 556 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 557 |
+
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
|
| 558 |
+
|
| 559 |
+
[[package]]
|
| 560 |
+
name = "loop9"
|
| 561 |
+
version = "0.1.5"
|
| 562 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 563 |
+
checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
|
| 564 |
+
dependencies = [
|
| 565 |
+
"imgref",
|
| 566 |
+
]
|
| 567 |
+
|
| 568 |
+
[[package]]
|
| 569 |
+
name = "maybe-rayon"
|
| 570 |
+
version = "0.1.1"
|
| 571 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 572 |
+
checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
|
| 573 |
+
dependencies = [
|
| 574 |
+
"cfg-if",
|
| 575 |
+
"rayon",
|
| 576 |
+
]
|
| 577 |
+
|
| 578 |
+
[[package]]
|
| 579 |
+
name = "memchr"
|
| 580 |
+
version = "2.7.4"
|
| 581 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 582 |
+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
| 583 |
+
|
| 584 |
+
[[package]]
|
| 585 |
+
name = "minimal-lexical"
|
| 586 |
+
version = "0.2.1"
|
| 587 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 588 |
+
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
| 589 |
+
|
| 590 |
+
[[package]]
|
| 591 |
+
name = "miniz_oxide"
|
| 592 |
+
version = "0.8.5"
|
| 593 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 594 |
+
checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
|
| 595 |
+
dependencies = [
|
| 596 |
+
"adler2",
|
| 597 |
+
"simd-adler32",
|
| 598 |
+
]
|
| 599 |
+
|
| 600 |
+
[[package]]
|
| 601 |
+
name = "new_debug_unreachable"
|
| 602 |
+
version = "1.0.6"
|
| 603 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 604 |
+
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
|
| 605 |
+
|
| 606 |
+
[[package]]
|
| 607 |
+
name = "nom"
|
| 608 |
+
version = "7.1.3"
|
| 609 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 610 |
+
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
| 611 |
+
dependencies = [
|
| 612 |
+
"memchr",
|
| 613 |
+
"minimal-lexical",
|
| 614 |
+
]
|
| 615 |
+
|
| 616 |
+
[[package]]
|
| 617 |
+
name = "noop_proc_macro"
|
| 618 |
+
version = "0.3.0"
|
| 619 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 620 |
+
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
|
| 621 |
+
|
| 622 |
+
[[package]]
|
| 623 |
+
name = "num-bigint"
|
| 624 |
+
version = "0.4.6"
|
| 625 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 626 |
+
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
|
| 627 |
+
dependencies = [
|
| 628 |
+
"num-integer",
|
| 629 |
+
"num-traits",
|
| 630 |
+
]
|
| 631 |
+
|
| 632 |
+
[[package]]
|
| 633 |
+
name = "num-derive"
|
| 634 |
+
version = "0.4.2"
|
| 635 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 636 |
+
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
| 637 |
+
dependencies = [
|
| 638 |
+
"proc-macro2",
|
| 639 |
+
"quote",
|
| 640 |
+
"syn",
|
| 641 |
+
]
|
| 642 |
+
|
| 643 |
+
[[package]]
|
| 644 |
+
name = "num-integer"
|
| 645 |
+
version = "0.1.46"
|
| 646 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 647 |
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
| 648 |
+
dependencies = [
|
| 649 |
+
"num-traits",
|
| 650 |
+
]
|
| 651 |
+
|
| 652 |
+
[[package]]
|
| 653 |
+
name = "num-rational"
|
| 654 |
+
version = "0.4.2"
|
| 655 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 656 |
+
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
| 657 |
+
dependencies = [
|
| 658 |
+
"num-bigint",
|
| 659 |
+
"num-integer",
|
| 660 |
+
"num-traits",
|
| 661 |
+
]
|
| 662 |
+
|
| 663 |
+
[[package]]
|
| 664 |
+
name = "num-traits"
|
| 665 |
+
version = "0.2.19"
|
| 666 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 667 |
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
| 668 |
+
dependencies = [
|
| 669 |
+
"autocfg",
|
| 670 |
+
]
|
| 671 |
+
|
| 672 |
+
[[package]]
|
| 673 |
+
name = "once_cell"
|
| 674 |
+
version = "1.20.3"
|
| 675 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 676 |
+
checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
|
| 677 |
+
|
| 678 |
+
[[package]]
|
| 679 |
+
name = "paste"
|
| 680 |
+
version = "1.0.15"
|
| 681 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 682 |
+
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
| 683 |
+
|
| 684 |
+
[[package]]
|
| 685 |
+
name = "pkg-config"
|
| 686 |
+
version = "0.3.31"
|
| 687 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 688 |
+
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
|
| 689 |
+
|
| 690 |
+
[[package]]
|
| 691 |
+
name = "png"
|
| 692 |
+
version = "0.17.16"
|
| 693 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 694 |
+
checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
|
| 695 |
+
dependencies = [
|
| 696 |
+
"bitflags",
|
| 697 |
+
"crc32fast",
|
| 698 |
+
"fdeflate",
|
| 699 |
+
"flate2",
|
| 700 |
+
"miniz_oxide",
|
| 701 |
+
]
|
| 702 |
+
|
| 703 |
+
[[package]]
|
| 704 |
+
name = "ppv-lite86"
|
| 705 |
+
version = "0.2.20"
|
| 706 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 707 |
+
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
|
| 708 |
+
dependencies = [
|
| 709 |
+
"zerocopy",
|
| 710 |
+
]
|
| 711 |
+
|
| 712 |
+
[[package]]
|
| 713 |
+
name = "proc-macro2"
|
| 714 |
+
version = "1.0.93"
|
| 715 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 716 |
+
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
| 717 |
+
dependencies = [
|
| 718 |
+
"unicode-ident",
|
| 719 |
+
]
|
| 720 |
+
|
| 721 |
+
[[package]]
|
| 722 |
+
name = "profiling"
|
| 723 |
+
version = "1.0.16"
|
| 724 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 725 |
+
checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d"
|
| 726 |
+
dependencies = [
|
| 727 |
+
"profiling-procmacros",
|
| 728 |
+
]
|
| 729 |
+
|
| 730 |
+
[[package]]
|
| 731 |
+
name = "profiling-procmacros"
|
| 732 |
+
version = "1.0.16"
|
| 733 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 734 |
+
checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30"
|
| 735 |
+
dependencies = [
|
| 736 |
+
"quote",
|
| 737 |
+
"syn",
|
| 738 |
+
]
|
| 739 |
+
|
| 740 |
+
[[package]]
|
| 741 |
+
name = "qoi"
|
| 742 |
+
version = "0.4.1"
|
| 743 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 744 |
+
checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
|
| 745 |
+
dependencies = [
|
| 746 |
+
"bytemuck",
|
| 747 |
+
]
|
| 748 |
+
|
| 749 |
+
[[package]]
|
| 750 |
+
name = "quick-error"
|
| 751 |
+
version = "2.0.1"
|
| 752 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 753 |
+
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
| 754 |
+
|
| 755 |
+
[[package]]
|
| 756 |
+
name = "quote"
|
| 757 |
+
version = "1.0.38"
|
| 758 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 759 |
+
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
| 760 |
+
dependencies = [
|
| 761 |
+
"proc-macro2",
|
| 762 |
+
]
|
| 763 |
+
|
| 764 |
+
[[package]]
|
| 765 |
+
name = "rand"
|
| 766 |
+
version = "0.8.5"
|
| 767 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 768 |
+
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
| 769 |
+
dependencies = [
|
| 770 |
+
"libc",
|
| 771 |
+
"rand_chacha",
|
| 772 |
+
"rand_core",
|
| 773 |
+
]
|
| 774 |
+
|
| 775 |
+
[[package]]
|
| 776 |
+
name = "rand_chacha"
|
| 777 |
+
version = "0.3.1"
|
| 778 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 779 |
+
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
| 780 |
+
dependencies = [
|
| 781 |
+
"ppv-lite86",
|
| 782 |
+
"rand_core",
|
| 783 |
+
]
|
| 784 |
+
|
| 785 |
+
[[package]]
|
| 786 |
+
name = "rand_core"
|
| 787 |
+
version = "0.6.4"
|
| 788 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 789 |
+
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
| 790 |
+
dependencies = [
|
| 791 |
+
"getrandom",
|
| 792 |
+
]
|
| 793 |
+
|
| 794 |
+
[[package]]
|
| 795 |
+
name = "rascii_art"
|
| 796 |
+
version = "0.4.5"
|
| 797 |
+
dependencies = [
|
| 798 |
+
"ansi_term",
|
| 799 |
+
"clap",
|
| 800 |
+
"image",
|
| 801 |
+
"unicode-segmentation",
|
| 802 |
+
]
|
| 803 |
+
|
| 804 |
+
[[package]]
|
| 805 |
+
name = "rav1e"
|
| 806 |
+
version = "0.7.1"
|
| 807 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 808 |
+
checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
|
| 809 |
+
dependencies = [
|
| 810 |
+
"arbitrary",
|
| 811 |
+
"arg_enum_proc_macro",
|
| 812 |
+
"arrayvec",
|
| 813 |
+
"av1-grain",
|
| 814 |
+
"bitstream-io",
|
| 815 |
+
"built",
|
| 816 |
+
"cfg-if",
|
| 817 |
+
"interpolate_name",
|
| 818 |
+
"itertools",
|
| 819 |
+
"libc",
|
| 820 |
+
"libfuzzer-sys",
|
| 821 |
+
"log",
|
| 822 |
+
"maybe-rayon",
|
| 823 |
+
"new_debug_unreachable",
|
| 824 |
+
"noop_proc_macro",
|
| 825 |
+
"num-derive",
|
| 826 |
+
"num-traits",
|
| 827 |
+
"once_cell",
|
| 828 |
+
"paste",
|
| 829 |
+
"profiling",
|
| 830 |
+
"rand",
|
| 831 |
+
"rand_chacha",
|
| 832 |
+
"simd_helpers",
|
| 833 |
+
"system-deps",
|
| 834 |
+
"thiserror",
|
| 835 |
+
"v_frame",
|
| 836 |
+
"wasm-bindgen",
|
| 837 |
+
]
|
| 838 |
+
|
| 839 |
+
[[package]]
|
| 840 |
+
name = "ravif"
|
| 841 |
+
version = "0.11.11"
|
| 842 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 843 |
+
checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6"
|
| 844 |
+
dependencies = [
|
| 845 |
+
"avif-serialize",
|
| 846 |
+
"imgref",
|
| 847 |
+
"loop9",
|
| 848 |
+
"quick-error",
|
| 849 |
+
"rav1e",
|
| 850 |
+
"rayon",
|
| 851 |
+
"rgb",
|
| 852 |
+
]
|
| 853 |
+
|
| 854 |
+
[[package]]
|
| 855 |
+
name = "rayon"
|
| 856 |
+
version = "1.10.0"
|
| 857 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 858 |
+
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
|
| 859 |
+
dependencies = [
|
| 860 |
+
"either",
|
| 861 |
+
"rayon-core",
|
| 862 |
+
]
|
| 863 |
+
|
| 864 |
+
[[package]]
|
| 865 |
+
name = "rayon-core"
|
| 866 |
+
version = "1.12.1"
|
| 867 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 868 |
+
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
| 869 |
+
dependencies = [
|
| 870 |
+
"crossbeam-deque",
|
| 871 |
+
"crossbeam-utils",
|
| 872 |
+
]
|
| 873 |
+
|
| 874 |
+
[[package]]
|
| 875 |
+
name = "rgb"
|
| 876 |
+
version = "0.8.50"
|
| 877 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 878 |
+
checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
|
| 879 |
+
|
| 880 |
+
[[package]]
|
| 881 |
+
name = "rustversion"
|
| 882 |
+
version = "1.0.19"
|
| 883 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 884 |
+
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
|
| 885 |
+
|
| 886 |
+
[[package]]
|
| 887 |
+
name = "serde"
|
| 888 |
+
version = "1.0.218"
|
| 889 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 890 |
+
checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
|
| 891 |
+
dependencies = [
|
| 892 |
+
"serde_derive",
|
| 893 |
+
]
|
| 894 |
+
|
| 895 |
+
[[package]]
|
| 896 |
+
name = "serde_derive"
|
| 897 |
+
version = "1.0.218"
|
| 898 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 899 |
+
checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
|
| 900 |
+
dependencies = [
|
| 901 |
+
"proc-macro2",
|
| 902 |
+
"quote",
|
| 903 |
+
"syn",
|
| 904 |
+
]
|
| 905 |
+
|
| 906 |
+
[[package]]
|
| 907 |
+
name = "serde_spanned"
|
| 908 |
+
version = "0.6.8"
|
| 909 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 910 |
+
checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
|
| 911 |
+
dependencies = [
|
| 912 |
+
"serde",
|
| 913 |
+
]
|
| 914 |
+
|
| 915 |
+
[[package]]
|
| 916 |
+
name = "shlex"
|
| 917 |
+
version = "1.3.0"
|
| 918 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 919 |
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
| 920 |
+
|
| 921 |
+
[[package]]
|
| 922 |
+
name = "simd-adler32"
|
| 923 |
+
version = "0.3.7"
|
| 924 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 925 |
+
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
| 926 |
+
|
| 927 |
+
[[package]]
|
| 928 |
+
name = "simd_helpers"
|
| 929 |
+
version = "0.1.0"
|
| 930 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 931 |
+
checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
|
| 932 |
+
dependencies = [
|
| 933 |
+
"quote",
|
| 934 |
+
]
|
| 935 |
+
|
| 936 |
+
[[package]]
|
| 937 |
+
name = "smallvec"
|
| 938 |
+
version = "1.14.0"
|
| 939 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 940 |
+
checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
|
| 941 |
+
|
| 942 |
+
[[package]]
|
| 943 |
+
name = "strsim"
|
| 944 |
+
version = "0.11.1"
|
| 945 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 946 |
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
| 947 |
+
|
| 948 |
+
[[package]]
|
| 949 |
+
name = "syn"
|
| 950 |
+
version = "2.0.98"
|
| 951 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 952 |
+
checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
|
| 953 |
+
dependencies = [
|
| 954 |
+
"proc-macro2",
|
| 955 |
+
"quote",
|
| 956 |
+
"unicode-ident",
|
| 957 |
+
]
|
| 958 |
+
|
| 959 |
+
[[package]]
|
| 960 |
+
name = "system-deps"
|
| 961 |
+
version = "6.2.2"
|
| 962 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 963 |
+
checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
|
| 964 |
+
dependencies = [
|
| 965 |
+
"cfg-expr",
|
| 966 |
+
"heck",
|
| 967 |
+
"pkg-config",
|
| 968 |
+
"toml",
|
| 969 |
+
"version-compare",
|
| 970 |
+
]
|
| 971 |
+
|
| 972 |
+
[[package]]
|
| 973 |
+
name = "target-lexicon"
|
| 974 |
+
version = "0.12.16"
|
| 975 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 976 |
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
| 977 |
+
|
| 978 |
+
[[package]]
|
| 979 |
+
name = "thiserror"
|
| 980 |
+
version = "1.0.69"
|
| 981 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 982 |
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
| 983 |
+
dependencies = [
|
| 984 |
+
"thiserror-impl",
|
| 985 |
+
]
|
| 986 |
+
|
| 987 |
+
[[package]]
|
| 988 |
+
name = "thiserror-impl"
|
| 989 |
+
version = "1.0.69"
|
| 990 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 991 |
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
| 992 |
+
dependencies = [
|
| 993 |
+
"proc-macro2",
|
| 994 |
+
"quote",
|
| 995 |
+
"syn",
|
| 996 |
+
]
|
| 997 |
+
|
| 998 |
+
[[package]]
|
| 999 |
+
name = "tiff"
|
| 1000 |
+
version = "0.9.1"
|
| 1001 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1002 |
+
checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e"
|
| 1003 |
+
dependencies = [
|
| 1004 |
+
"flate2",
|
| 1005 |
+
"jpeg-decoder",
|
| 1006 |
+
"weezl",
|
| 1007 |
+
]
|
| 1008 |
+
|
| 1009 |
+
[[package]]
|
| 1010 |
+
name = "toml"
|
| 1011 |
+
version = "0.8.20"
|
| 1012 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1013 |
+
checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
|
| 1014 |
+
dependencies = [
|
| 1015 |
+
"serde",
|
| 1016 |
+
"serde_spanned",
|
| 1017 |
+
"toml_datetime",
|
| 1018 |
+
"toml_edit",
|
| 1019 |
+
]
|
| 1020 |
+
|
| 1021 |
+
[[package]]
|
| 1022 |
+
name = "toml_datetime"
|
| 1023 |
+
version = "0.6.8"
|
| 1024 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1025 |
+
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
|
| 1026 |
+
dependencies = [
|
| 1027 |
+
"serde",
|
| 1028 |
+
]
|
| 1029 |
+
|
| 1030 |
+
[[package]]
|
| 1031 |
+
name = "toml_edit"
|
| 1032 |
+
version = "0.22.24"
|
| 1033 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1034 |
+
checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
|
| 1035 |
+
dependencies = [
|
| 1036 |
+
"indexmap",
|
| 1037 |
+
"serde",
|
| 1038 |
+
"serde_spanned",
|
| 1039 |
+
"toml_datetime",
|
| 1040 |
+
"winnow",
|
| 1041 |
+
]
|
| 1042 |
+
|
| 1043 |
+
[[package]]
|
| 1044 |
+
name = "unicode-ident"
|
| 1045 |
+
version = "1.0.17"
|
| 1046 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1047 |
+
checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
|
| 1048 |
+
|
| 1049 |
+
[[package]]
|
| 1050 |
+
name = "unicode-segmentation"
|
| 1051 |
+
version = "1.12.0"
|
| 1052 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1053 |
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
| 1054 |
+
|
| 1055 |
+
[[package]]
|
| 1056 |
+
name = "utf8parse"
|
| 1057 |
+
version = "0.2.2"
|
| 1058 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1059 |
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
| 1060 |
+
|
| 1061 |
+
[[package]]
|
| 1062 |
+
name = "v_frame"
|
| 1063 |
+
version = "0.3.8"
|
| 1064 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1065 |
+
checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
|
| 1066 |
+
dependencies = [
|
| 1067 |
+
"aligned-vec",
|
| 1068 |
+
"num-traits",
|
| 1069 |
+
"wasm-bindgen",
|
| 1070 |
+
]
|
| 1071 |
+
|
| 1072 |
+
[[package]]
|
| 1073 |
+
name = "version-compare"
|
| 1074 |
+
version = "0.2.0"
|
| 1075 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1076 |
+
checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
|
| 1077 |
+
|
| 1078 |
+
[[package]]
|
| 1079 |
+
name = "wasi"
|
| 1080 |
+
version = "0.11.0+wasi-snapshot-preview1"
|
| 1081 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1082 |
+
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
| 1083 |
+
|
| 1084 |
+
[[package]]
|
| 1085 |
+
name = "wasm-bindgen"
|
| 1086 |
+
version = "0.2.100"
|
| 1087 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1088 |
+
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
| 1089 |
+
dependencies = [
|
| 1090 |
+
"cfg-if",
|
| 1091 |
+
"once_cell",
|
| 1092 |
+
"rustversion",
|
| 1093 |
+
"wasm-bindgen-macro",
|
| 1094 |
+
]
|
| 1095 |
+
|
| 1096 |
+
[[package]]
|
| 1097 |
+
name = "wasm-bindgen-backend"
|
| 1098 |
+
version = "0.2.100"
|
| 1099 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1100 |
+
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
| 1101 |
+
dependencies = [
|
| 1102 |
+
"bumpalo",
|
| 1103 |
+
"log",
|
| 1104 |
+
"proc-macro2",
|
| 1105 |
+
"quote",
|
| 1106 |
+
"syn",
|
| 1107 |
+
"wasm-bindgen-shared",
|
| 1108 |
+
]
|
| 1109 |
+
|
| 1110 |
+
[[package]]
|
| 1111 |
+
name = "wasm-bindgen-macro"
|
| 1112 |
+
version = "0.2.100"
|
| 1113 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1114 |
+
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
| 1115 |
+
dependencies = [
|
| 1116 |
+
"quote",
|
| 1117 |
+
"wasm-bindgen-macro-support",
|
| 1118 |
+
]
|
| 1119 |
+
|
| 1120 |
+
[[package]]
|
| 1121 |
+
name = "wasm-bindgen-macro-support"
|
| 1122 |
+
version = "0.2.100"
|
| 1123 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1124 |
+
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
| 1125 |
+
dependencies = [
|
| 1126 |
+
"proc-macro2",
|
| 1127 |
+
"quote",
|
| 1128 |
+
"syn",
|
| 1129 |
+
"wasm-bindgen-backend",
|
| 1130 |
+
"wasm-bindgen-shared",
|
| 1131 |
+
]
|
| 1132 |
+
|
| 1133 |
+
[[package]]
|
| 1134 |
+
name = "wasm-bindgen-shared"
|
| 1135 |
+
version = "0.2.100"
|
| 1136 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1137 |
+
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
| 1138 |
+
dependencies = [
|
| 1139 |
+
"unicode-ident",
|
| 1140 |
+
]
|
| 1141 |
+
|
| 1142 |
+
[[package]]
|
| 1143 |
+
name = "weezl"
|
| 1144 |
+
version = "0.1.8"
|
| 1145 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1146 |
+
checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
|
| 1147 |
+
|
| 1148 |
+
[[package]]
|
| 1149 |
+
name = "winapi"
|
| 1150 |
+
version = "0.3.9"
|
| 1151 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1152 |
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
| 1153 |
+
dependencies = [
|
| 1154 |
+
"winapi-i686-pc-windows-gnu",
|
| 1155 |
+
"winapi-x86_64-pc-windows-gnu",
|
| 1156 |
+
]
|
| 1157 |
+
|
| 1158 |
+
[[package]]
|
| 1159 |
+
name = "winapi-i686-pc-windows-gnu"
|
| 1160 |
+
version = "0.4.0"
|
| 1161 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1162 |
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
| 1163 |
+
|
| 1164 |
+
[[package]]
|
| 1165 |
+
name = "winapi-x86_64-pc-windows-gnu"
|
| 1166 |
+
version = "0.4.0"
|
| 1167 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1168 |
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
| 1169 |
+
|
| 1170 |
+
[[package]]
|
| 1171 |
+
name = "windows-sys"
|
| 1172 |
+
version = "0.59.0"
|
| 1173 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1174 |
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
| 1175 |
+
dependencies = [
|
| 1176 |
+
"windows-targets",
|
| 1177 |
+
]
|
| 1178 |
+
|
| 1179 |
+
[[package]]
|
| 1180 |
+
name = "windows-targets"
|
| 1181 |
+
version = "0.52.6"
|
| 1182 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1183 |
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
| 1184 |
+
dependencies = [
|
| 1185 |
+
"windows_aarch64_gnullvm",
|
| 1186 |
+
"windows_aarch64_msvc",
|
| 1187 |
+
"windows_i686_gnu",
|
| 1188 |
+
"windows_i686_gnullvm",
|
| 1189 |
+
"windows_i686_msvc",
|
| 1190 |
+
"windows_x86_64_gnu",
|
| 1191 |
+
"windows_x86_64_gnullvm",
|
| 1192 |
+
"windows_x86_64_msvc",
|
| 1193 |
+
]
|
| 1194 |
+
|
| 1195 |
+
[[package]]
|
| 1196 |
+
name = "windows_aarch64_gnullvm"
|
| 1197 |
+
version = "0.52.6"
|
| 1198 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1199 |
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
| 1200 |
+
|
| 1201 |
+
[[package]]
|
| 1202 |
+
name = "windows_aarch64_msvc"
|
| 1203 |
+
version = "0.52.6"
|
| 1204 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1205 |
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
| 1206 |
+
|
| 1207 |
+
[[package]]
|
| 1208 |
+
name = "windows_i686_gnu"
|
| 1209 |
+
version = "0.52.6"
|
| 1210 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1211 |
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
| 1212 |
+
|
| 1213 |
+
[[package]]
|
| 1214 |
+
name = "windows_i686_gnullvm"
|
| 1215 |
+
version = "0.52.6"
|
| 1216 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1217 |
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
| 1218 |
+
|
| 1219 |
+
[[package]]
|
| 1220 |
+
name = "windows_i686_msvc"
|
| 1221 |
+
version = "0.52.6"
|
| 1222 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1223 |
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
| 1224 |
+
|
| 1225 |
+
[[package]]
|
| 1226 |
+
name = "windows_x86_64_gnu"
|
| 1227 |
+
version = "0.52.6"
|
| 1228 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1229 |
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
| 1230 |
+
|
| 1231 |
+
[[package]]
|
| 1232 |
+
name = "windows_x86_64_gnullvm"
|
| 1233 |
+
version = "0.52.6"
|
| 1234 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1235 |
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
| 1236 |
+
|
| 1237 |
+
[[package]]
|
| 1238 |
+
name = "windows_x86_64_msvc"
|
| 1239 |
+
version = "0.52.6"
|
| 1240 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1241 |
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
| 1242 |
+
|
| 1243 |
+
[[package]]
|
| 1244 |
+
name = "winnow"
|
| 1245 |
+
version = "0.7.3"
|
| 1246 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1247 |
+
checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
|
| 1248 |
+
dependencies = [
|
| 1249 |
+
"memchr",
|
| 1250 |
+
]
|
| 1251 |
+
|
| 1252 |
+
[[package]]
|
| 1253 |
+
name = "zerocopy"
|
| 1254 |
+
version = "0.7.35"
|
| 1255 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1256 |
+
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
|
| 1257 |
+
dependencies = [
|
| 1258 |
+
"byteorder",
|
| 1259 |
+
"zerocopy-derive",
|
| 1260 |
+
]
|
| 1261 |
+
|
| 1262 |
+
[[package]]
|
| 1263 |
+
name = "zerocopy-derive"
|
| 1264 |
+
version = "0.7.35"
|
| 1265 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1266 |
+
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
| 1267 |
+
dependencies = [
|
| 1268 |
+
"proc-macro2",
|
| 1269 |
+
"quote",
|
| 1270 |
+
"syn",
|
| 1271 |
+
]
|
| 1272 |
+
|
| 1273 |
+
[[package]]
|
| 1274 |
+
name = "zune-core"
|
| 1275 |
+
version = "0.4.12"
|
| 1276 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1277 |
+
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
|
| 1278 |
+
|
| 1279 |
+
[[package]]
|
| 1280 |
+
name = "zune-inflate"
|
| 1281 |
+
version = "0.2.54"
|
| 1282 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1283 |
+
checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
|
| 1284 |
+
dependencies = [
|
| 1285 |
+
"simd-adler32",
|
| 1286 |
+
]
|
| 1287 |
+
|
| 1288 |
+
[[package]]
|
| 1289 |
+
name = "zune-jpeg"
|
| 1290 |
+
version = "0.4.14"
|
| 1291 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1292 |
+
checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028"
|
| 1293 |
+
dependencies = [
|
| 1294 |
+
"zune-core",
|
| 1295 |
+
]
|
| 1296 |
+
|
| 1297 |
+
SCRIPT_LOCK
|
| 1298 |
+
|
| 1299 |
+
# --- Write minimal stub source files so cargo can validate target paths. ------
|
| 1300 |
+
# The real crate sources are compiled by build.sh; these stubs only let cargo
|
| 1301 |
+
# resolve the [lib]/[[bin]] paths at fetch time.
|
| 1302 |
+
cat > "$SCRATCH_DIR/src/lib.rs" <<'RASCII_LIB_STUB'
|
| 1303 |
+
pub fn _dummy_lib() {}
|
| 1304 |
+
RASCII_LIB_STUB
|
| 1305 |
+
|
| 1306 |
+
cat > "$SCRATCH_DIR/src/main.rs" <<'RASCII_BIN_STUB'
|
| 1307 |
+
fn main() {}
|
| 1308 |
+
RASCII_BIN_STUB
|
| 1309 |
+
|
| 1310 |
+
# --- Fetch the exact locked dependency closure (no compilation). ---------------
|
| 1311 |
+
export CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}"
|
| 1312 |
+
cargo fetch --locked --manifest-path "$SCRATCH_DIR/Cargo.toml"
|
| 1313 |
+
|
| 1314 |
+
echo "download.sh: dependency prefetch complete."
|
| 1315 |
+
unset SCRATCH_DIR
|
orhnk--rascii.8d33a36/tests/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f69847ade7cbb718498fa26a8343058002246f493b4b2cf42ebd9b757c5125f7
|
| 3 |
+
size 2702384
|
orhnk--rascii.8d33a36/tests/harbor_prepare_download_env.sh
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
command -v cargo
|
| 4 |
+
command -v rustc
|
| 5 |
+
command -v rustup
|
| 6 |
+
cd /workspace
|
| 7 |
+
set -a
|
| 8 |
+
source /tmp/programgym-download.sh
|
| 9 |
+
set +a
|
| 10 |
+
python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
|
| 11 |
+
import os
|
| 12 |
+
import shlex
|
| 13 |
+
|
| 14 |
+
ignored = {
|
| 15 |
+
"ALL_PROXY",
|
| 16 |
+
"HTTP_PROXY",
|
| 17 |
+
"HTTPS_PROXY",
|
| 18 |
+
"NO_PROXY",
|
| 19 |
+
"OLDPWD",
|
| 20 |
+
"PIP_PROXY",
|
| 21 |
+
"PWD",
|
| 22 |
+
"SHLVL",
|
| 23 |
+
"_",
|
| 24 |
+
"all_proxy",
|
| 25 |
+
"http_proxy",
|
| 26 |
+
"https_proxy",
|
| 27 |
+
"no_proxy",
|
| 28 |
+
"pip_proxy",
|
| 29 |
+
}
|
| 30 |
+
for key in sorted(os.environ):
|
| 31 |
+
if key in ignored or key.startswith("BASH_FUNC_"):
|
| 32 |
+
continue
|
| 33 |
+
value = os.environ[key]
|
| 34 |
+
if "\n" in value:
|
| 35 |
+
continue
|
| 36 |
+
print(f"export {key}={shlex.quote(value)}")
|
| 37 |
+
PY
|
orhnk--rascii.8d33a36/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""In-place ProgramGym evaluator.
|
| 3 |
+
|
| 4 |
+
Mirrors ProgramGym's ``Evaluator`` pipeline as closely as a single-container,
|
| 5 |
+
no-Docker-in-Docker host allows. Run from ``tests/test.sh`` inside the agent's
|
| 6 |
+
cleanroom container after Harbor flips the verifier-phase network policy.
|
| 7 |
+
|
| 8 |
+
Differences from ``programgym.eval.eval.Evaluator`` that are structural to
|
| 9 |
+
running in one container:
|
| 10 |
+
|
| 11 |
+
* No fresh container per branch. ``snapshot_workspace`` / ``restore_workspace``
|
| 12 |
+
copy a post-compile workspace snapshot to a temp directory and restore it
|
| 13 |
+
before each branch; ``cleanup_lingering_processes`` kills leftover branch
|
| 14 |
+
processes between attempts to approximate the fresh-container boundary.
|
| 15 |
+
* No ``docker commit``. The post-compile workspace snapshot serves the same
|
| 16 |
+
role as the committed image upstream.
|
| 17 |
+
* Hidden test blobs are fetched on demand from HuggingFace via
|
| 18 |
+
``huggingface_hub.snapshot_download`` (matching ``programgym.utils.blob_store``)
|
| 19 |
+
rather than being pre-staged into ``/tests/blobs/``. Override with
|
| 20 |
+
``PROGRAMGYM_BLOB_DIR`` for offline reruns.
|
| 21 |
+
|
| 22 |
+
Everything else (eval_clean_hashes scrub, deterministic synthetic git seed,
|
| 23 |
+
``compile.sh`` then stash + hash the executable, best-effort
|
| 24 |
+
``pytest-rerunfailures``, per-branch test-tar overlay, executable hash
|
| 25 |
+
``--max-worker-restart=4``, xdist worker-crash retry with serial fallback,
|
| 26 |
+
best-of-N attempt selection, active vs ignored test bookkeeping, scoring) is
|
| 27 |
+
preserved.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import re
|
| 36 |
+
import shlex
|
| 37 |
+
import shutil
|
| 38 |
+
import signal
|
| 39 |
+
import subprocess
|
| 40 |
+
import tempfile
|
| 41 |
+
import time
|
| 42 |
+
import traceback
|
| 43 |
+
import xml.etree.ElementTree as ET
|
| 44 |
+
from pathlib import Path
|
| 45 |
+
from typing import Any
|
| 46 |
+
|
| 47 |
+
WORKSPACE = Path(os.environ.get("PROGRAMGYM_WORKSPACE", "/workspace"))
|
| 48 |
+
STASHED_EXECUTABLE = Path("/opt/programgym-stashed-executable-do-not-modify")
|
| 49 |
+
METADATA_PATH = Path(
|
| 50 |
+
os.environ.get("PROGRAMGYM_METADATA", "/tests/programgym_task.json")
|
| 51 |
+
)
|
| 52 |
+
LOG_DIR = Path(os.environ.get("PROGRAMGYM_LOG_DIR", "/logs/verifier"))
|
| 53 |
+
WORKER_CRASH_PHRASE = "worker '"
|
| 54 |
+
XDIST_COLLAPSE_MARKERS = (
|
| 55 |
+
"maximum crashed workers reached",
|
| 56 |
+
"xdist: maximum crashed",
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
DEFAULT_HF_REPO_ID = "programgym/ProgramGym-Tests"
|
| 60 |
+
DEFAULT_HF_REVISION = "main"
|
| 61 |
+
|
| 62 |
+
# Oracle agent handoff files (see solution/solve.sh). Must not appear in the
|
| 63 |
+
# post-compile workspace snapshot or they pollute tree-scanning tests (dutree).
|
| 64 |
+
_ORACLE_HANDOFF_NAMES = (".programgym_oracle_reference",)
|
| 65 |
+
|
| 66 |
+
_TOOLCHAIN_BIN_DIR_CANDIDATES = (
|
| 67 |
+
"/usr/local/go/bin",
|
| 68 |
+
"/go/bin",
|
| 69 |
+
"/usr/local/cargo/bin",
|
| 70 |
+
"/root/.cargo/bin",
|
| 71 |
+
"/root/.ghcup/bin",
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def toolchain_bin_dirs() -> list[str]:
|
| 76 |
+
"""Return toolchain bin directories that exist on this image."""
|
| 77 |
+
candidates = list(_TOOLCHAIN_BIN_DIR_CANDIDATES)
|
| 78 |
+
candidates.extend(
|
| 79 |
+
str(path)
|
| 80 |
+
for path in sorted(Path("/usr/lib").glob("go-*/bin"))
|
| 81 |
+
if _is_accessible_dir(path)
|
| 82 |
+
)
|
| 83 |
+
seen: set[str] = set()
|
| 84 |
+
present: list[str] = []
|
| 85 |
+
for path in candidates:
|
| 86 |
+
if path in seen:
|
| 87 |
+
continue
|
| 88 |
+
seen.add(path)
|
| 89 |
+
if _is_accessible_dir(path):
|
| 90 |
+
present.append(path)
|
| 91 |
+
return present
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _is_accessible_dir(path: str | Path) -> bool:
|
| 95 |
+
"""Return whether path is a directory without failing on protected homes."""
|
| 96 |
+
try:
|
| 97 |
+
return Path(path).is_dir()
|
| 98 |
+
except OSError:
|
| 99 |
+
return False
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def bootstrap_toolchain_path() -> str:
|
| 103 |
+
"""Prepend discovered toolchain dirs to PATH (idempotent)."""
|
| 104 |
+
prepend = toolchain_bin_dirs()
|
| 105 |
+
current_parts = [part for part in os.environ.get("PATH", "").split(":") if part]
|
| 106 |
+
merged: list[str] = []
|
| 107 |
+
for path in prepend + current_parts:
|
| 108 |
+
if path not in merged:
|
| 109 |
+
merged.append(path)
|
| 110 |
+
new_path = ":".join(merged)
|
| 111 |
+
os.environ["PATH"] = new_path
|
| 112 |
+
return new_path
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _bash_login_command(command: str) -> str:
|
| 116 |
+
"""Run ``command`` under bash -lc with an explicit PATH export."""
|
| 117 |
+
path = bootstrap_toolchain_path()
|
| 118 |
+
return f"export PATH={shlex.quote(path)}; {command}"
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def sha256(path: Path) -> str:
|
| 122 |
+
h = hashlib.sha256()
|
| 123 |
+
with path.open("rb") as f:
|
| 124 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 125 |
+
h.update(chunk)
|
| 126 |
+
return h.hexdigest()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def write_json(path: Path, data: dict[str, Any]) -> None:
|
| 130 |
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
| 131 |
+
tmp.write_text(json.dumps(data, indent=2, sort_keys=True))
|
| 132 |
+
tmp.replace(path)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def _read_log_tail(path: Path | None, max_bytes: int = 65536) -> str:
|
| 136 |
+
if path is None or not path.exists():
|
| 137 |
+
return ""
|
| 138 |
+
data = path.read_bytes()
|
| 139 |
+
if len(data) <= max_bytes:
|
| 140 |
+
return data.decode(errors="replace")
|
| 141 |
+
return data[-max_bytes:].decode(errors="replace")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def _close_pipes(proc: subprocess.Popen[Any]) -> None:
|
| 145 |
+
for stream in (proc.stdout, proc.stderr):
|
| 146 |
+
if stream is not None:
|
| 147 |
+
try:
|
| 148 |
+
stream.close()
|
| 149 |
+
except OSError:
|
| 150 |
+
pass
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _terminate_process_tree(proc: subprocess.Popen[Any]) -> None:
|
| 154 |
+
try:
|
| 155 |
+
os.killpg(proc.pid, signal.SIGKILL)
|
| 156 |
+
except ProcessLookupError:
|
| 157 |
+
pass
|
| 158 |
+
try:
|
| 159 |
+
proc.kill()
|
| 160 |
+
except ProcessLookupError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
_PKILL_PATTERNS = (
|
| 165 |
+
f"{WORKSPACE}/eval/",
|
| 166 |
+
f"{WORKSPACE}/tests/",
|
| 167 |
+
"tail -f",
|
| 168 |
+
"development.log",
|
| 169 |
+
" less ",
|
| 170 |
+
" less$",
|
| 171 |
+
"/less ",
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def _pkill_aggressive() -> str:
|
| 176 |
+
"""Best-effort kill of branch pytest/subprocess trees (Modal gVisor fallback)."""
|
| 177 |
+
notes: list[str] = []
|
| 178 |
+
workspace = str(WORKSPACE)
|
| 179 |
+
patterns = list(_PKILL_PATTERNS) + [
|
| 180 |
+
f"pytest.*{workspace}",
|
| 181 |
+
f"xdist.*{workspace}",
|
| 182 |
+
]
|
| 183 |
+
for pattern in patterns:
|
| 184 |
+
result = subprocess.run(
|
| 185 |
+
["pkill", "-9", "-f", pattern],
|
| 186 |
+
capture_output=True,
|
| 187 |
+
text=True,
|
| 188 |
+
)
|
| 189 |
+
notes.append(f"pkill -9 -f {pattern!r}: rc={result.returncode}")
|
| 190 |
+
return "\n".join(notes)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def run_step(
|
| 194 |
+
command: str,
|
| 195 |
+
cwd: Path,
|
| 196 |
+
*,
|
| 197 |
+
timeout: int,
|
| 198 |
+
env: dict[str, str] | None = None,
|
| 199 |
+
step: str,
|
| 200 |
+
accept_failure: bool = False,
|
| 201 |
+
log_output: bool | None = None,
|
| 202 |
+
max_output_bytes: int = 65536,
|
| 203 |
+
) -> dict[str, Any]:
|
| 204 |
+
if log_output is None:
|
| 205 |
+
log_output = step == "run_tests" or timeout >= 60
|
| 206 |
+
|
| 207 |
+
started = time.monotonic()
|
| 208 |
+
stdout_path: Path | None = None
|
| 209 |
+
stderr_path: Path | None = None
|
| 210 |
+
stdout_f = None
|
| 211 |
+
stderr_f = None
|
| 212 |
+
|
| 213 |
+
if log_output:
|
| 214 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 215 |
+
log_id = f"{step}-{int(started * 1000)}"
|
| 216 |
+
stdout_path = LOG_DIR / f"run-step-{log_id}.stdout.log"
|
| 217 |
+
stderr_path = LOG_DIR / f"run-step-{log_id}.stderr.log"
|
| 218 |
+
stdout_f = stdout_path.open("w", encoding="utf-8")
|
| 219 |
+
stderr_f = stderr_path.open("w", encoding="utf-8")
|
| 220 |
+
popen_stdout: Any = stdout_f
|
| 221 |
+
popen_stderr: Any = stderr_f
|
| 222 |
+
else:
|
| 223 |
+
popen_stdout = subprocess.PIPE
|
| 224 |
+
popen_stderr = subprocess.PIPE
|
| 225 |
+
|
| 226 |
+
proc = subprocess.Popen(
|
| 227 |
+
["bash", "-lc", _bash_login_command(command)],
|
| 228 |
+
cwd=cwd,
|
| 229 |
+
env={**os.environ, **(env or {})},
|
| 230 |
+
stdout=popen_stdout,
|
| 231 |
+
stderr=popen_stderr,
|
| 232 |
+
start_new_session=True,
|
| 233 |
+
text=True,
|
| 234 |
+
)
|
| 235 |
+
timed_out = False
|
| 236 |
+
stdout = ""
|
| 237 |
+
stderr = ""
|
| 238 |
+
try:
|
| 239 |
+
if log_output:
|
| 240 |
+
proc.wait(timeout=timeout)
|
| 241 |
+
else:
|
| 242 |
+
stdout, stderr = proc.communicate(timeout=timeout)
|
| 243 |
+
except subprocess.TimeoutExpired:
|
| 244 |
+
timed_out = True
|
| 245 |
+
_terminate_process_tree(proc)
|
| 246 |
+
cleanup_lingering_processes(aggressive=True)
|
| 247 |
+
try:
|
| 248 |
+
proc.wait(timeout=5)
|
| 249 |
+
except subprocess.TimeoutExpired:
|
| 250 |
+
proc.kill()
|
| 251 |
+
if not log_output:
|
| 252 |
+
_close_pipes(proc)
|
| 253 |
+
finally:
|
| 254 |
+
if stdout_f is not None:
|
| 255 |
+
stdout_f.close()
|
| 256 |
+
if stderr_f is not None:
|
| 257 |
+
stderr_f.close()
|
| 258 |
+
|
| 259 |
+
if timed_out:
|
| 260 |
+
if log_output:
|
| 261 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 262 |
+
stderr_path, max_output_bytes
|
| 263 |
+
)
|
| 264 |
+
else:
|
| 265 |
+
output = ""
|
| 266 |
+
entry = {
|
| 267 |
+
"step": step,
|
| 268 |
+
"command": command,
|
| 269 |
+
"wall_time": time.monotonic() - started,
|
| 270 |
+
"output": output,
|
| 271 |
+
"returncode": 124,
|
| 272 |
+
"exception_info": f"timed out after {timeout}s",
|
| 273 |
+
}
|
| 274 |
+
else:
|
| 275 |
+
if log_output:
|
| 276 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 277 |
+
stderr_path, max_output_bytes
|
| 278 |
+
)
|
| 279 |
+
else:
|
| 280 |
+
output = stdout + stderr
|
| 281 |
+
entry = {
|
| 282 |
+
"step": step,
|
| 283 |
+
"command": command,
|
| 284 |
+
"wall_time": time.monotonic() - started,
|
| 285 |
+
"output": output,
|
| 286 |
+
"returncode": proc.returncode,
|
| 287 |
+
"exception_info": "",
|
| 288 |
+
}
|
| 289 |
+
if entry["returncode"] and not accept_failure:
|
| 290 |
+
raise RuntimeError(
|
| 291 |
+
f"{step} failed: {entry['exception_info'] or entry['output']}"
|
| 292 |
+
)
|
| 293 |
+
return entry
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def cleanup_lingering_processes(*, aggressive: bool = False) -> dict[str, Any]:
|
| 297 |
+
started = time.monotonic()
|
| 298 |
+
patterns = [
|
| 299 |
+
str(WORKSPACE / "executable"),
|
| 300 |
+
f"{WORKSPACE}/eval/",
|
| 301 |
+
f"{WORKSPACE}/tests/",
|
| 302 |
+
# lazygit --logs/-l tests spawn `tail -f` outside /workspace/.
|
| 303 |
+
"tail -f",
|
| 304 |
+
"development.log",
|
| 305 |
+
]
|
| 306 |
+
killed: list[int] = []
|
| 307 |
+
proc_root = Path("/proc")
|
| 308 |
+
proc_available = proc_root.exists()
|
| 309 |
+
if proc_available:
|
| 310 |
+
for proc_dir in proc_root.iterdir():
|
| 311 |
+
if not proc_dir.name.isdigit():
|
| 312 |
+
continue
|
| 313 |
+
pid = int(proc_dir.name)
|
| 314 |
+
if pid in {os.getpid(), os.getppid()}:
|
| 315 |
+
continue
|
| 316 |
+
try:
|
| 317 |
+
raw = (proc_dir / "cmdline").read_bytes()
|
| 318 |
+
except (FileNotFoundError, PermissionError, ProcessLookupError):
|
| 319 |
+
continue
|
| 320 |
+
cmdline = raw.replace(b"\0", b" ").decode(errors="replace")
|
| 321 |
+
if not any(pattern in cmdline for pattern in patterns):
|
| 322 |
+
continue
|
| 323 |
+
try:
|
| 324 |
+
os.kill(pid, signal.SIGKILL)
|
| 325 |
+
except (PermissionError, ProcessLookupError):
|
| 326 |
+
continue
|
| 327 |
+
killed.append(pid)
|
| 328 |
+
pkill_output = ""
|
| 329 |
+
if aggressive or not proc_available:
|
| 330 |
+
pkill_output = _pkill_aggressive()
|
| 331 |
+
output_parts = []
|
| 332 |
+
if killed:
|
| 333 |
+
output_parts.append("\n".join(str(pid) for pid in killed))
|
| 334 |
+
if pkill_output:
|
| 335 |
+
output_parts.append(pkill_output)
|
| 336 |
+
return {
|
| 337 |
+
"step": "cleanup_lingering_processes",
|
| 338 |
+
"command": "kill leftover branch processes referencing the workspace",
|
| 339 |
+
"wall_time": time.monotonic() - started,
|
| 340 |
+
"output": "\n".join(output_parts),
|
| 341 |
+
"returncode": 0,
|
| 342 |
+
"exception_info": "",
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
def extract_trusted_blob(tar_path: Path, dest: Path) -> None:
|
| 347 |
+
import tarfile
|
| 348 |
+
|
| 349 |
+
with tarfile.open(tar_path, "r:gz") as tf:
|
| 350 |
+
try:
|
| 351 |
+
tf.extractall(dest, filter="fully_trusted")
|
| 352 |
+
except TypeError:
|
| 353 |
+
tf.extractall(dest)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def find_results_xml() -> Path | None:
|
| 357 |
+
"""Return the junit xml path if pytest wrote one."""
|
| 358 |
+
for candidate in (WORKSPACE / "eval" / "results.xml", WORKSPACE / "results.xml"):
|
| 359 |
+
if candidate.exists():
|
| 360 |
+
return candidate
|
| 361 |
+
return None
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def remove_oracle_handoff_artifacts() -> list[str]:
|
| 365 |
+
"""Drop oracle-agent handoff files from /workspace before snapshot/restore."""
|
| 366 |
+
removed: list[str] = []
|
| 367 |
+
for name in _ORACLE_HANDOFF_NAMES:
|
| 368 |
+
path = WORKSPACE / name
|
| 369 |
+
if path.exists():
|
| 370 |
+
if path.is_dir():
|
| 371 |
+
shutil.rmtree(path)
|
| 372 |
+
else:
|
| 373 |
+
path.unlink()
|
| 374 |
+
removed.append(name)
|
| 375 |
+
return removed
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def _remove_tree(path: Path) -> None:
|
| 379 |
+
"""Remove a file or directory tree, with a shell fallback for overlay races."""
|
| 380 |
+
if path.is_symlink() or path.is_file():
|
| 381 |
+
path.unlink(missing_ok=True)
|
| 382 |
+
return
|
| 383 |
+
if not path.is_dir():
|
| 384 |
+
path.unlink(missing_ok=True)
|
| 385 |
+
return
|
| 386 |
+
for attempt in range(3):
|
| 387 |
+
try:
|
| 388 |
+
shutil.rmtree(path)
|
| 389 |
+
if not path.exists():
|
| 390 |
+
return
|
| 391 |
+
except OSError:
|
| 392 |
+
if attempt == 2:
|
| 393 |
+
run_step(
|
| 394 |
+
f"rm -rf {shlex.quote(str(path))}",
|
| 395 |
+
path.parent,
|
| 396 |
+
timeout=120,
|
| 397 |
+
step="clear_workspace_fallback",
|
| 398 |
+
accept_failure=True,
|
| 399 |
+
)
|
| 400 |
+
if not path.exists():
|
| 401 |
+
return
|
| 402 |
+
raise
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
def ensure_workspace_dir() -> None:
|
| 406 |
+
"""Guarantee WORKSPACE exists as a writable directory (not a symlink/file)."""
|
| 407 |
+
if WORKSPACE.exists() and not WORKSPACE.is_dir():
|
| 408 |
+
if WORKSPACE.is_symlink() or WORKSPACE.is_file():
|
| 409 |
+
WORKSPACE.unlink()
|
| 410 |
+
else:
|
| 411 |
+
shutil.rmtree(WORKSPACE)
|
| 412 |
+
WORKSPACE.mkdir(parents=True, exist_ok=True)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def clear_workspace() -> None:
|
| 416 |
+
ensure_workspace_dir()
|
| 417 |
+
for path in list(WORKSPACE.iterdir()):
|
| 418 |
+
_remove_tree(path)
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
def restore_reference_executable() -> None:
|
| 422 |
+
"""Write the stashed reference binary into /workspace after a branch overlay.
|
| 423 |
+
|
| 424 |
+
Branch blobs may ship ``executable`` as a dangling symlink into
|
| 425 |
+
``target/release/...``; ``shutil.copy2`` would follow it and raise
|
| 426 |
+
``FileNotFoundError``. Drop whatever the blob left and copy the stashed
|
| 427 |
+
reference as a regular file.
|
| 428 |
+
"""
|
| 429 |
+
ensure_workspace_dir()
|
| 430 |
+
if not STASHED_EXECUTABLE.is_file():
|
| 431 |
+
raise FileNotFoundError(
|
| 432 |
+
f"missing stashed reference executable at {STASHED_EXECUTABLE}"
|
| 433 |
+
)
|
| 434 |
+
dest = WORKSPACE / "executable"
|
| 435 |
+
if dest.exists() or dest.is_symlink():
|
| 436 |
+
if dest.is_dir():
|
| 437 |
+
shutil.rmtree(dest)
|
| 438 |
+
else:
|
| 439 |
+
dest.unlink(missing_ok=True)
|
| 440 |
+
shutil.copy2(STASHED_EXECUTABLE, dest)
|
| 441 |
+
dest.chmod(0o755)
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
def snapshot_workspace(dest: Path) -> None:
|
| 445 |
+
if dest.exists():
|
| 446 |
+
shutil.rmtree(dest)
|
| 447 |
+
shutil.copytree(WORKSPACE, dest, symlinks=True)
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def restore_workspace(source: Path) -> None:
|
| 451 |
+
clear_workspace()
|
| 452 |
+
shutil.copytree(source, WORKSPACE, dirs_exist_ok=True, symlinks=True)
|
| 453 |
+
ensure_workspace_dir()
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def remove_hashed_files(root: Path, hashes: set[str]) -> list[str]:
|
| 457 |
+
removed: list[str] = []
|
| 458 |
+
for path in root.rglob("*"):
|
| 459 |
+
if path.is_file() and not path.is_symlink():
|
| 460 |
+
try:
|
| 461 |
+
if sha256(path) in hashes:
|
| 462 |
+
path.unlink()
|
| 463 |
+
removed.append(str(path.relative_to(root)))
|
| 464 |
+
except OSError:
|
| 465 |
+
continue
|
| 466 |
+
return removed
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
def branch_tests(branch_info: dict[str, Any]) -> list[str]:
|
| 470 |
+
ignored = {
|
| 471 |
+
item["name"] for item in branch_info.get("ignored_tests", []) if "name" in item
|
| 472 |
+
}
|
| 473 |
+
return [name for name in branch_info.get("tests", []) if name not in ignored]
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
def ignored_tests(metadata: dict[str, Any]) -> set[str]:
|
| 477 |
+
result: set[str] = set()
|
| 478 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 479 |
+
result.update(
|
| 480 |
+
f"{branch}/{item['name']}"
|
| 481 |
+
for item in info.get("ignored_tests", [])
|
| 482 |
+
if "name" in item
|
| 483 |
+
)
|
| 484 |
+
return result
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def active_tests(metadata: dict[str, Any]) -> set[str]:
|
| 488 |
+
active: set[str] = set()
|
| 489 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 490 |
+
if info.get("ignored"):
|
| 491 |
+
continue
|
| 492 |
+
ignored = {
|
| 493 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 494 |
+
}
|
| 495 |
+
active.update(
|
| 496 |
+
f"{branch}/{name}" for name in info.get("tests", []) if name not in ignored
|
| 497 |
+
)
|
| 498 |
+
return active
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def inject_not_run(
|
| 502 |
+
result: dict[str, Any], branch: str, tests: list[str], error_code: str
|
| 503 |
+
) -> None:
|
| 504 |
+
result["test_results"].extend(
|
| 505 |
+
{
|
| 506 |
+
"name": name,
|
| 507 |
+
"branch": branch,
|
| 508 |
+
"status": "not_run",
|
| 509 |
+
"extra": {"error_code": error_code},
|
| 510 |
+
}
|
| 511 |
+
for name in tests
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def testcase_name(case: ET.Element) -> str:
|
| 516 |
+
classname = case.attrib.get("classname", "")
|
| 517 |
+
name = case.attrib.get("name", "")
|
| 518 |
+
return f"{classname}.{name}" if classname else name
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
# Only these tags under <testcase> represent a result. <system-out> /
|
| 522 |
+
# <system-err> are stdout/stderr captures and must not be treated as results
|
| 523 |
+
# (a leading <system-out> followed by <failure> would otherwise be classified
|
| 524 |
+
# as a stdout-only "passed").
|
| 525 |
+
JUNIT_RESULT_TAGS = {"skipped", "failure", "error"}
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def parse_junit(
|
| 529 |
+
raw_xml: str, branch: str, expected: list[str], ignored: set[str]
|
| 530 |
+
) -> tuple[list[dict[str, Any]], list[str]]:
|
| 531 |
+
root = ET.fromstring(raw_xml)
|
| 532 |
+
got: set[str] = set()
|
| 533 |
+
results: list[dict[str, Any]] = []
|
| 534 |
+
for case in root.iter("testcase"):
|
| 535 |
+
name = testcase_name(case)
|
| 536 |
+
got.add(name)
|
| 537 |
+
extra: dict[str, Any] = {}
|
| 538 |
+
if "time" in case.attrib:
|
| 539 |
+
try:
|
| 540 |
+
extra["time"] = float(case.attrib["time"])
|
| 541 |
+
except ValueError:
|
| 542 |
+
extra["time"] = case.attrib["time"]
|
| 543 |
+
result_children = [c for c in case if c.tag in JUNIT_RESULT_TAGS]
|
| 544 |
+
# Collapse duplicate same-tag result children. Pytest's
|
| 545 |
+
# "pytest.internal" pseudo-test sometimes emits two identical <error>
|
| 546 |
+
# entries; treating that as a system_error would over-flag a real
|
| 547 |
+
# single failure. Mirrors upstream eval.py:816-820.
|
| 548 |
+
if len(result_children) > 1 and len({c.tag for c in result_children}) == 1:
|
| 549 |
+
result_children = [result_children[0]]
|
| 550 |
+
if not result_children:
|
| 551 |
+
status = "passed"
|
| 552 |
+
elif len(result_children) != 1:
|
| 553 |
+
status = "system_error"
|
| 554 |
+
extra["error_details"] = (
|
| 555 |
+
f"Expected 1 result for {name}, got {len(result_children)}: "
|
| 556 |
+
f"{[c.tag for c in result_children]}"
|
| 557 |
+
)
|
| 558 |
+
else:
|
| 559 |
+
first = result_children[0]
|
| 560 |
+
status = first.tag # "skipped" | "failure" | "error"
|
| 561 |
+
extra["message"] = first.attrib.get("message") or ""
|
| 562 |
+
if first.text:
|
| 563 |
+
extra["text"] = first.text
|
| 564 |
+
results.append(
|
| 565 |
+
{"name": name, "branch": branch, "status": status, "extra": extra}
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
active_expected = [name for name in expected if name not in ignored]
|
| 569 |
+
missing = [name for name in active_expected if name not in got]
|
| 570 |
+
results.extend(
|
| 571 |
+
{
|
| 572 |
+
"name": name,
|
| 573 |
+
"branch": branch,
|
| 574 |
+
"status": "not_run",
|
| 575 |
+
"extra": {"error_code": "missing_from_junit_xml"},
|
| 576 |
+
}
|
| 577 |
+
for name in missing
|
| 578 |
+
)
|
| 579 |
+
unexpected = got - set(expected) - ignored
|
| 580 |
+
warnings = (
|
| 581 |
+
[f"Branch {branch}: {len(unexpected)} test(s) in JUnit XML not in tests.json"]
|
| 582 |
+
if unexpected
|
| 583 |
+
else []
|
| 584 |
+
)
|
| 585 |
+
return results, warnings
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
def count_worker_crashes(raw_xml: str) -> int:
|
| 589 |
+
if WORKER_CRASH_PHRASE not in raw_xml:
|
| 590 |
+
return 0
|
| 591 |
+
try:
|
| 592 |
+
root = ET.fromstring(raw_xml)
|
| 593 |
+
except ET.ParseError:
|
| 594 |
+
return 0
|
| 595 |
+
crashes = 0
|
| 596 |
+
for case in root.iter("testcase"):
|
| 597 |
+
for child in case:
|
| 598 |
+
text = (child.get("message") or "") + " " + (child.text or "")
|
| 599 |
+
if (
|
| 600 |
+
child.tag in {"error", "failure"}
|
| 601 |
+
and WORKER_CRASH_PHRASE in text
|
| 602 |
+
and "crashed" in text
|
| 603 |
+
):
|
| 604 |
+
crashes += 1
|
| 605 |
+
break
|
| 606 |
+
return crashes
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def run_output_indicates_xdist_collapse(output: str) -> bool:
|
| 610 |
+
lower = output.lower()
|
| 611 |
+
return any(marker in lower for marker in XDIST_COLLAPSE_MARKERS)
|
| 612 |
+
|
| 613 |
+
|
| 614 |
+
def count_junit_failures(raw_xml: str) -> int:
|
| 615 |
+
try:
|
| 616 |
+
root = ET.fromstring(raw_xml)
|
| 617 |
+
except ET.ParseError:
|
| 618 |
+
return 0
|
| 619 |
+
failures = 0
|
| 620 |
+
for case in root.iter("testcase"):
|
| 621 |
+
for child in case:
|
| 622 |
+
if child.tag in {"failure", "error"}:
|
| 623 |
+
failures += 1
|
| 624 |
+
break
|
| 625 |
+
return failures
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
def count_junit_passed(raw_xml: str) -> int:
|
| 629 |
+
try:
|
| 630 |
+
root = ET.fromstring(raw_xml)
|
| 631 |
+
except ET.ParseError:
|
| 632 |
+
return 0
|
| 633 |
+
passed = 0
|
| 634 |
+
for case in root.iter("testcase"):
|
| 635 |
+
if not any(child.tag in JUNIT_RESULT_TAGS for child in case):
|
| 636 |
+
passed += 1
|
| 637 |
+
return passed
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def branch_attempt_metrics(
|
| 641 |
+
raw_xml: str, *, run_output: str, expected_tests: int
|
| 642 |
+
) -> tuple[int, int, int, int]:
|
| 643 |
+
"""Return (crashes, n_testcases, failures, missing_from_xml)."""
|
| 644 |
+
crashes = count_worker_crashes(raw_xml)
|
| 645 |
+
if run_output_indicates_xdist_collapse(run_output):
|
| 646 |
+
crashes = max(crashes, 1)
|
| 647 |
+
n_tests = count_testcases(raw_xml)
|
| 648 |
+
failures = count_junit_failures(raw_xml)
|
| 649 |
+
missing = max(0, expected_tests - n_tests)
|
| 650 |
+
return crashes, n_tests, failures, missing
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def needs_serial_retry(
|
| 654 |
+
*,
|
| 655 |
+
serial: bool,
|
| 656 |
+
crashes: int,
|
| 657 |
+
missing: int,
|
| 658 |
+
failures: int,
|
| 659 |
+
n_tests: int,
|
| 660 |
+
expected_tests: int,
|
| 661 |
+
run_output: str,
|
| 662 |
+
) -> bool:
|
| 663 |
+
if serial:
|
| 664 |
+
return False
|
| 665 |
+
high_failure_rate = (
|
| 666 |
+
expected_tests > 0 and n_tests >= expected_tests and failures / n_tests >= 0.8
|
| 667 |
+
)
|
| 668 |
+
return (
|
| 669 |
+
crashes > 0
|
| 670 |
+
or missing > 0
|
| 671 |
+
or high_failure_rate
|
| 672 |
+
or run_output_indicates_xdist_collapse(run_output)
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def count_testcases(raw_xml: str) -> int:
|
| 677 |
+
try:
|
| 678 |
+
return sum(1 for _ in ET.fromstring(raw_xml).iter("testcase"))
|
| 679 |
+
except ET.ParseError:
|
| 680 |
+
return 0
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def scored_results(
|
| 684 |
+
result: dict[str, Any], metadata: dict[str, Any]
|
| 685 |
+
) -> list[dict[str, Any]]:
|
| 686 |
+
active = active_tests(metadata)
|
| 687 |
+
by_key = {
|
| 688 |
+
f"{test['branch']}/{test['name']}": test
|
| 689 |
+
for test in result["test_results"]
|
| 690 |
+
if f"{test['branch']}/{test['name']}" in active
|
| 691 |
+
}
|
| 692 |
+
return [
|
| 693 |
+
by_key.get(
|
| 694 |
+
key,
|
| 695 |
+
{
|
| 696 |
+
"branch": key.split("/", 1)[0],
|
| 697 |
+
"name": key.split("/", 1)[1],
|
| 698 |
+
"status": "not_run",
|
| 699 |
+
"extra": {"error_code": "missing_from_results"},
|
| 700 |
+
},
|
| 701 |
+
)
|
| 702 |
+
for key in sorted(active)
|
| 703 |
+
]
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def summarize(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 707 |
+
scored = scored_results(result, metadata)
|
| 708 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 709 |
+
n_tests = len(scored)
|
| 710 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 711 |
+
# Multi-key reward: Harbor's default Mean aggregates each key independently
|
| 712 |
+
# (see harbor.metrics.base.aggregate_reward_dicts), so mean("resolved") is
|
| 713 |
+
# the proportion of tasks scoring a perfect pass-rate and mean of
|
| 714 |
+
# "almost_resolved" is the proportion scoring >= 0.95. "reward" stays the
|
| 715 |
+
# per-task pass-rate whose mean is the overall mean reward.
|
| 716 |
+
return {
|
| 717 |
+
"reward": pass_rate,
|
| 718 |
+
"resolved": 1.0 if pass_rate >= 1.0 else 0.0,
|
| 719 |
+
"almost_resolved": 1.0 if pass_rate >= 0.95 else 0.0,
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
def diagnostics(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 724 |
+
scored = scored_results(result, metadata)
|
| 725 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 726 |
+
n_tests = len(scored)
|
| 727 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 728 |
+
return {
|
| 729 |
+
"pass_rate": pass_rate,
|
| 730 |
+
"resolved": int(
|
| 731 |
+
bool(
|
| 732 |
+
n_tests
|
| 733 |
+
and n_passed == n_tests
|
| 734 |
+
and not result["test_branch_errors"]
|
| 735 |
+
and not result["error_code"]
|
| 736 |
+
)
|
| 737 |
+
),
|
| 738 |
+
"n_passed": n_passed,
|
| 739 |
+
"n_tests": n_tests,
|
| 740 |
+
"n_branch_errors": len(result["test_branch_errors"]),
|
| 741 |
+
"infra_error": int(bool(result["error_code"] or result["test_branch_errors"])),
|
| 742 |
+
"executable_hash_present": int(bool(result.get("executable_hash"))),
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def use_script_pty() -> bool:
|
| 747 |
+
return os.environ.get("PROGRAMGYM_SCRIPT_PTY", "").strip() == "1"
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def script_pty_available() -> bool:
|
| 751 |
+
return shutil.which("script") is not None
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
def branch_env(
|
| 755 |
+
*,
|
| 756 |
+
serial: bool,
|
| 757 |
+
has_rerunfailures: bool,
|
| 758 |
+
extras: dict[str, str] | None = None,
|
| 759 |
+
) -> dict[str, str]:
|
| 760 |
+
addopts = ["--max-worker-restart=4"]
|
| 761 |
+
# A serial fallback is already a complete second execution. Re-running each
|
| 762 |
+
# failing test two more times makes large, failure-heavy suites prohibitively
|
| 763 |
+
# slow and adds little signal.
|
| 764 |
+
if has_rerunfailures and not serial:
|
| 765 |
+
addopts.extend(["--reruns=2", "--reruns-delay=1"])
|
| 766 |
+
env = {
|
| 767 |
+
"PYTEST_ADDOPTS": " ".join(addopts),
|
| 768 |
+
# Match upstream non-TTY regression environments (dirble log format, etc.).
|
| 769 |
+
"NO_COLOR": "1",
|
| 770 |
+
"TERM": "dumb",
|
| 771 |
+
"CLICOLOR": "0",
|
| 772 |
+
"CLICOLOR_FORCE": "0",
|
| 773 |
+
"COLORTERM": "",
|
| 774 |
+
}
|
| 775 |
+
if extras:
|
| 776 |
+
env.update(extras)
|
| 777 |
+
xdist_workers = os.environ.get("PROGRAMGYM_XDIST_WORKERS")
|
| 778 |
+
if serial:
|
| 779 |
+
xdist_workers = "1"
|
| 780 |
+
if xdist_workers:
|
| 781 |
+
env["PYTEST_XDIST_AUTO_NUM_WORKERS"] = xdist_workers
|
| 782 |
+
return env
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
_SERIAL_RUN_SH = ".programgym_run_serial.sh"
|
| 786 |
+
# ``eval/run.sh`` usually passes ``-n auto`` on the command line, which overrides
|
| 787 |
+
# ``PYTEST_ADDOPTS``. Rewrite to ``-n 0`` in a verifier-local copy for retries.
|
| 788 |
+
_RUN_SH_XDIST_RE = re.compile(r"-n\s*(?:auto|\d+)")
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
def prepare_serial_run_sh(run_sh: Path) -> Path:
|
| 792 |
+
"""Write a serial-only copy of ``eval/run.sh`` with xdist disabled."""
|
| 793 |
+
serial_sh = run_sh.with_name(_SERIAL_RUN_SH)
|
| 794 |
+
patched = _RUN_SH_XDIST_RE.sub("-n 0", run_sh.read_text())
|
| 795 |
+
serial_sh.write_text(patched)
|
| 796 |
+
serial_sh.chmod(0o755)
|
| 797 |
+
return serial_sh
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
def run_tests_command(*, serial: bool) -> str:
|
| 801 |
+
if serial:
|
| 802 |
+
inner = f"chmod +x ./eval/{_SERIAL_RUN_SH} && ./eval/{_SERIAL_RUN_SH}"
|
| 803 |
+
else:
|
| 804 |
+
inner = "chmod +x ./eval/run.sh && ./eval/run.sh"
|
| 805 |
+
if use_script_pty() and script_pty_available():
|
| 806 |
+
return f"script -q -c {shlex.quote(inner)} /dev/null"
|
| 807 |
+
return inner
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
BAKED_BLOB_DIR = Path(os.environ.get("PROGRAMGYM_BAKED_BLOB_DIR", "/tests/blobs"))
|
| 811 |
+
|
| 812 |
+
|
| 813 |
+
def resolve_blob_dir(instance_id: str, metadata: dict[str, Any]) -> Path:
|
| 814 |
+
"""Locate the per-instance blob directory.
|
| 815 |
+
|
| 816 |
+
Resolution order:
|
| 817 |
+
|
| 818 |
+
1. ``/tests/blobs/`` if pre-fetched into the task at generation time
|
| 819 |
+
(``programgym-adapter --download-blobs``). Verifier-only mount, so
|
| 820 |
+
agent never sees these.
|
| 821 |
+
2. ``PROGRAMGYM_BLOB_DIR`` env override pointing at an HF-cache-shaped
|
| 822 |
+
tree on disk (``<dir>/<instance_id>/tests/<branch>.tar.gz``). Useful
|
| 823 |
+
for offline reruns sharing a cache across many tasks.
|
| 824 |
+
3. ``huggingface_hub.snapshot_download`` from
|
| 825 |
+
``programgym/ProgramGym-Tests`` (default repo, ``main`` revision).
|
| 826 |
+
|
| 827 |
+
The returned directory contains ``tests/<branch>.tar.gz`` per active
|
| 828 |
+
branch — same shape as ``programgym/ProgramGym-Tests/<instance_id>/``
|
| 829 |
+
on HF.
|
| 830 |
+
"""
|
| 831 |
+
if BAKED_BLOB_DIR.exists() and (BAKED_BLOB_DIR / "tests").exists():
|
| 832 |
+
return BAKED_BLOB_DIR
|
| 833 |
+
|
| 834 |
+
local = os.environ.get("PROGRAMGYM_BLOB_DIR", "").strip()
|
| 835 |
+
if local:
|
| 836 |
+
candidate = Path(local) / instance_id
|
| 837 |
+
if candidate.exists():
|
| 838 |
+
return candidate
|
| 839 |
+
raise FileNotFoundError(
|
| 840 |
+
f"PROGRAMGYM_BLOB_DIR set but {candidate} does not exist"
|
| 841 |
+
)
|
| 842 |
+
|
| 843 |
+
repo_id = os.environ.get("PROGRAMGYM_HF_REPO") or metadata.get(
|
| 844 |
+
"hf_repo_id", DEFAULT_HF_REPO_ID
|
| 845 |
+
)
|
| 846 |
+
revision = os.environ.get("PROGRAMGYM_HF_REVISION") or metadata.get(
|
| 847 |
+
"hf_revision", DEFAULT_HF_REVISION
|
| 848 |
+
)
|
| 849 |
+
|
| 850 |
+
from huggingface_hub import snapshot_download
|
| 851 |
+
|
| 852 |
+
cache_root = Path(
|
| 853 |
+
snapshot_download(
|
| 854 |
+
repo_id,
|
| 855 |
+
repo_type="dataset",
|
| 856 |
+
revision=revision,
|
| 857 |
+
allow_patterns=f"{instance_id}/**",
|
| 858 |
+
)
|
| 859 |
+
)
|
| 860 |
+
blob_dir = cache_root / instance_id
|
| 861 |
+
if not blob_dir.exists():
|
| 862 |
+
raise FileNotFoundError(
|
| 863 |
+
f"HF blob directory missing for {instance_id} at {blob_dir}"
|
| 864 |
+
)
|
| 865 |
+
return blob_dir
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
def evaluate(metadata: dict[str, Any]) -> dict[str, Any]:
|
| 869 |
+
bootstrap_toolchain_path()
|
| 870 |
+
branches = metadata.get("branches", {})
|
| 871 |
+
active_branch_items = [
|
| 872 |
+
(name, info) for name, info in branches.items() if not info.get("ignored")
|
| 873 |
+
]
|
| 874 |
+
result: dict[str, Any] = {
|
| 875 |
+
"test_results": [],
|
| 876 |
+
"error_code": None,
|
| 877 |
+
"error_details": None,
|
| 878 |
+
"log": [],
|
| 879 |
+
"solution_branch": "submission",
|
| 880 |
+
"test_branches": [name for name, _ in active_branch_items],
|
| 881 |
+
"test_branch_errors": {},
|
| 882 |
+
"executable_hash": None,
|
| 883 |
+
"warnings": [],
|
| 884 |
+
}
|
| 885 |
+
|
| 886 |
+
instance_id = metadata["instance_id"]
|
| 887 |
+
|
| 888 |
+
compile_timeout = int(os.environ.get("PROGRAMGYM_COMPILE_TIMEOUT", "900"))
|
| 889 |
+
branch_timeout = int(os.environ.get("PROGRAMGYM_BRANCH_TIMEOUT", "3600"))
|
| 890 |
+
|
| 891 |
+
def fail_all(error_code: str, details: str) -> dict[str, Any]:
|
| 892 |
+
result["error_code"] = error_code
|
| 893 |
+
result["error_details"] = details
|
| 894 |
+
for branch, info in active_branch_items:
|
| 895 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 896 |
+
return result
|
| 897 |
+
|
| 898 |
+
with tempfile.TemporaryDirectory(prefix="programgym-eval-") as tmp:
|
| 899 |
+
compiled_snapshot = Path(tmp) / "compiled"
|
| 900 |
+
|
| 901 |
+
started = time.monotonic()
|
| 902 |
+
removed = remove_hashed_files(
|
| 903 |
+
WORKSPACE, set(metadata.get("eval_clean_hashes", []))
|
| 904 |
+
)
|
| 905 |
+
result["log"].append(
|
| 906 |
+
{
|
| 907 |
+
"step": "remove_hashed_files",
|
| 908 |
+
"command": "remove files matching eval_clean_hashes",
|
| 909 |
+
"wall_time": time.monotonic() - started,
|
| 910 |
+
"output": "".join(f"removed '{path}'\n" for path in removed),
|
| 911 |
+
"returncode": 0,
|
| 912 |
+
"exception_info": "",
|
| 913 |
+
}
|
| 914 |
+
)
|
| 915 |
+
|
| 916 |
+
compile_sh = WORKSPACE / "compile.sh"
|
| 917 |
+
if not compile_sh.exists():
|
| 918 |
+
return fail_all(
|
| 919 |
+
"missing_compile_sh", "submission did not contain compile.sh"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
seed = (
|
| 923 |
+
"if [ ! -d .git ]; then "
|
| 924 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 925 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 926 |
+
"git -c init.defaultBranch=gold init -q && "
|
| 927 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false add -A && "
|
| 928 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 929 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 930 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false commit -q --allow-empty -m gold; "
|
| 931 |
+
"fi"
|
| 932 |
+
)
|
| 933 |
+
try:
|
| 934 |
+
result["log"].append(
|
| 935 |
+
run_step(seed, WORKSPACE, timeout=300, step="seed_git")
|
| 936 |
+
)
|
| 937 |
+
compile_log = run_step(
|
| 938 |
+
"chmod +x ./compile.sh && ./compile.sh",
|
| 939 |
+
WORKSPACE,
|
| 940 |
+
timeout=compile_timeout,
|
| 941 |
+
step="compile",
|
| 942 |
+
accept_failure=True,
|
| 943 |
+
)
|
| 944 |
+
result["log"].append(compile_log)
|
| 945 |
+
if compile_log["returncode"]:
|
| 946 |
+
return fail_all("compile_failed", compile_log["output"])
|
| 947 |
+
executable = WORKSPACE / "executable"
|
| 948 |
+
if not executable.exists():
|
| 949 |
+
return fail_all(
|
| 950 |
+
"missing_executable",
|
| 951 |
+
"compile.sh completed but did not create ./executable",
|
| 952 |
+
)
|
| 953 |
+
STASHED_EXECUTABLE.parent.mkdir(parents=True, exist_ok=True)
|
| 954 |
+
# `move` (not copy) so /workspace doesn't keep a parallel copy of
|
| 955 |
+
# the agent's executable during the stash→restore window. Mirrors
|
| 956 |
+
# upstream `mv ./executable {STASHED}` (eval.py:472).
|
| 957 |
+
shutil.move(str(executable), STASHED_EXECUTABLE)
|
| 958 |
+
result["executable_hash"] = sha256(STASHED_EXECUTABLE)
|
| 959 |
+
result["log"].append(
|
| 960 |
+
run_step(
|
| 961 |
+
"pip3 install -q --disable-pip-version-check pytest-rerunfailures",
|
| 962 |
+
WORKSPACE,
|
| 963 |
+
timeout=120,
|
| 964 |
+
step="install_rerunfailures",
|
| 965 |
+
accept_failure=True,
|
| 966 |
+
)
|
| 967 |
+
)
|
| 968 |
+
has_rerunfailures = result["log"][-1]["returncode"] == 0
|
| 969 |
+
handoff_removed = remove_oracle_handoff_artifacts()
|
| 970 |
+
if handoff_removed:
|
| 971 |
+
result["log"].append(
|
| 972 |
+
{
|
| 973 |
+
"step": "remove_oracle_handoff",
|
| 974 |
+
"command": "remove oracle handoff artifacts from workspace",
|
| 975 |
+
"wall_time": 0.0,
|
| 976 |
+
"output": "".join(
|
| 977 |
+
f"removed '{name}'\n" for name in handoff_removed
|
| 978 |
+
),
|
| 979 |
+
"returncode": 0,
|
| 980 |
+
"exception_info": "",
|
| 981 |
+
}
|
| 982 |
+
)
|
| 983 |
+
snapshot_workspace(compiled_snapshot)
|
| 984 |
+
except Exception as exc:
|
| 985 |
+
return fail_all(type(exc).__name__, str(exc))
|
| 986 |
+
|
| 987 |
+
try:
|
| 988 |
+
blob_dir = resolve_blob_dir(instance_id, metadata)
|
| 989 |
+
except Exception as exc:
|
| 990 |
+
details = f"{type(exc).__name__}: {exc}"
|
| 991 |
+
for branch, info in active_branch_items:
|
| 992 |
+
result["test_branch_errors"][branch] = [
|
| 993 |
+
{
|
| 994 |
+
"error_code": "blob_resolution_failed",
|
| 995 |
+
"error_details": details,
|
| 996 |
+
}
|
| 997 |
+
]
|
| 998 |
+
inject_not_run(
|
| 999 |
+
result, branch, branch_tests(info), "blob_resolution_failed"
|
| 1000 |
+
)
|
| 1001 |
+
return result
|
| 1002 |
+
|
| 1003 |
+
for branch, info in active_branch_items:
|
| 1004 |
+
tests = branch_tests(info)
|
| 1005 |
+
blob = blob_dir / "tests" / f"{branch}.tar.gz"
|
| 1006 |
+
if not blob.exists():
|
| 1007 |
+
result["test_branch_errors"][branch] = [
|
| 1008 |
+
{"error_code": "missing_test_blob", "error_details": blob.name}
|
| 1009 |
+
]
|
| 1010 |
+
inject_not_run(result, branch, tests, "missing_test_blob")
|
| 1011 |
+
continue
|
| 1012 |
+
|
| 1013 |
+
best_xml = ""
|
| 1014 |
+
# Prefer a complete, clean XML result, then the result covering the
|
| 1015 |
+
# most expected tests, and only then the one with the most passes.
|
| 1016 |
+
# Pass-count-only ranking can retain a partial xdist result over a
|
| 1017 |
+
# complete serial result.
|
| 1018 |
+
best_quality = (-1, -1, -1)
|
| 1019 |
+
serial = bool(metadata.get("force_serial_branches"))
|
| 1020 |
+
branch_log: list[dict[str, Any]] = []
|
| 1021 |
+
branch_ignored = {
|
| 1022 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 1023 |
+
}
|
| 1024 |
+
n_expected = len([name for name in tests if name not in branch_ignored])
|
| 1025 |
+
|
| 1026 |
+
def merge_best_xml(raw_xml: str) -> None:
|
| 1027 |
+
try:
|
| 1028 |
+
parsed, warnings = parse_junit(
|
| 1029 |
+
raw_xml, branch, list(info.get("tests", [])), branch_ignored
|
| 1030 |
+
)
|
| 1031 |
+
except Exception as exc:
|
| 1032 |
+
result["test_branch_errors"][branch] = [
|
| 1033 |
+
{"error_code": "xml_parse_error", "error_details": str(exc)}
|
| 1034 |
+
]
|
| 1035 |
+
inject_not_run(result, branch, tests, "xml_parse_error")
|
| 1036 |
+
else:
|
| 1037 |
+
result["test_results"].extend(parsed)
|
| 1038 |
+
result["warnings"].extend(warnings)
|
| 1039 |
+
|
| 1040 |
+
while True:
|
| 1041 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1042 |
+
restore_workspace(compiled_snapshot)
|
| 1043 |
+
extract_trusted_blob(blob, WORKSPACE)
|
| 1044 |
+
restore_reference_executable()
|
| 1045 |
+
actual_hash = sha256(WORKSPACE / "executable")
|
| 1046 |
+
if actual_hash != result["executable_hash"]:
|
| 1047 |
+
result["test_branch_errors"][branch] = [
|
| 1048 |
+
{
|
| 1049 |
+
"error_code": "executable_hash_mismatch",
|
| 1050 |
+
"error_details": (
|
| 1051 |
+
f"expected {result['executable_hash']}, got {actual_hash}"
|
| 1052 |
+
),
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
inject_not_run(result, branch, tests, "executable_hash_mismatch")
|
| 1056 |
+
break
|
| 1057 |
+
run_sh = WORKSPACE / "eval" / "run.sh"
|
| 1058 |
+
if not run_sh.exists():
|
| 1059 |
+
result["test_branch_errors"][branch] = [
|
| 1060 |
+
{
|
| 1061 |
+
"error_code": "missing_run_sh",
|
| 1062 |
+
"error_details": "eval/run.sh missing",
|
| 1063 |
+
}
|
| 1064 |
+
]
|
| 1065 |
+
inject_not_run(result, branch, tests, "missing_run_sh")
|
| 1066 |
+
break
|
| 1067 |
+
# Upstream rewrites thread→signal so xdist workers fail cleanly
|
| 1068 |
+
# instead of os._exit(1) on timeout. That works in fresh
|
| 1069 |
+
# containers per branch; here we reuse one container and
|
| 1070 |
+
# signal timeouts leave TUI/log-watcher subprocesses alive
|
| 1071 |
+
# (e.g. lazygit --logs + tail -f), wedging pytest for up to
|
| 1072 |
+
# branch_timeout. Keep the blob's thread method and rely on
|
| 1073 |
+
# cleanup_lingering_processes + serial fallback after crashes.
|
| 1074 |
+
env = branch_env(
|
| 1075 |
+
serial=serial,
|
| 1076 |
+
has_rerunfailures=has_rerunfailures,
|
| 1077 |
+
extras=metadata.get("branch_env"),
|
| 1078 |
+
)
|
| 1079 |
+
branch_log.append(
|
| 1080 |
+
run_step(
|
| 1081 |
+
"rm -f eval/results.xml results.xml",
|
| 1082 |
+
WORKSPACE,
|
| 1083 |
+
timeout=120,
|
| 1084 |
+
step="clean_stale_results",
|
| 1085 |
+
accept_failure=True,
|
| 1086 |
+
)
|
| 1087 |
+
)
|
| 1088 |
+
if serial:
|
| 1089 |
+
prepare_serial_run_sh(run_sh)
|
| 1090 |
+
run_entry = run_step(
|
| 1091 |
+
run_tests_command(serial=serial),
|
| 1092 |
+
WORKSPACE,
|
| 1093 |
+
timeout=branch_timeout,
|
| 1094 |
+
env=env,
|
| 1095 |
+
step="run_tests",
|
| 1096 |
+
accept_failure=True,
|
| 1097 |
+
)
|
| 1098 |
+
branch_log.append(run_entry)
|
| 1099 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1100 |
+
xml_path = find_results_xml()
|
| 1101 |
+
if xml_path is None:
|
| 1102 |
+
if best_xml:
|
| 1103 |
+
merge_best_xml(best_xml)
|
| 1104 |
+
break
|
| 1105 |
+
if serial:
|
| 1106 |
+
result["test_branch_errors"][branch] = [
|
| 1107 |
+
{
|
| 1108 |
+
"error_code": "missing_results_xml",
|
| 1109 |
+
"error_details": "eval/results.xml was not produced",
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
inject_not_run(result, branch, tests, "missing_results_xml")
|
| 1113 |
+
break
|
| 1114 |
+
serial = True
|
| 1115 |
+
continue
|
| 1116 |
+
raw_xml = xml_path.read_text(errors="replace")
|
| 1117 |
+
crashes, n_tests, failures, missing = branch_attempt_metrics(
|
| 1118 |
+
raw_xml,
|
| 1119 |
+
run_output=run_entry.get("output", ""),
|
| 1120 |
+
expected_tests=n_expected,
|
| 1121 |
+
)
|
| 1122 |
+
useful = count_junit_passed(raw_xml)
|
| 1123 |
+
quality = (
|
| 1124 |
+
int(crashes == 0 and missing == 0),
|
| 1125 |
+
n_tests,
|
| 1126 |
+
useful,
|
| 1127 |
+
)
|
| 1128 |
+
if quality > best_quality:
|
| 1129 |
+
best_xml = raw_xml
|
| 1130 |
+
best_quality = quality
|
| 1131 |
+
retry = needs_serial_retry(
|
| 1132 |
+
serial=serial,
|
| 1133 |
+
crashes=crashes,
|
| 1134 |
+
missing=missing,
|
| 1135 |
+
failures=failures,
|
| 1136 |
+
n_tests=n_tests,
|
| 1137 |
+
expected_tests=n_expected,
|
| 1138 |
+
run_output=run_entry.get("output", ""),
|
| 1139 |
+
)
|
| 1140 |
+
if not retry:
|
| 1141 |
+
merge_best_xml(best_xml)
|
| 1142 |
+
break
|
| 1143 |
+
serial = True
|
| 1144 |
+
for entry in branch_log:
|
| 1145 |
+
entry["branch"] = branch
|
| 1146 |
+
result["log"].extend(branch_log)
|
| 1147 |
+
|
| 1148 |
+
return result
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
def write_outputs(result: dict[str, Any], metadata: dict[str, Any]) -> None:
|
| 1152 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1153 |
+
write_json(LOG_DIR / "programgym_eval.json", result)
|
| 1154 |
+
write_json(LOG_DIR / "harbor_diagnostics.json", diagnostics(result, metadata))
|
| 1155 |
+
rewards = summarize(result, metadata)
|
| 1156 |
+
write_json(LOG_DIR / "reward.json", rewards)
|
| 1157 |
+
(LOG_DIR / "reward.txt").write_text(str(rewards["reward"]))
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
def main() -> None:
|
| 1161 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1162 |
+
log_path = LOG_DIR / "programgym_eval.log"
|
| 1163 |
+
metadata = json.loads(METADATA_PATH.read_text())
|
| 1164 |
+
branches = metadata.get("branches", {})
|
| 1165 |
+
try:
|
| 1166 |
+
result = evaluate(metadata)
|
| 1167 |
+
except Exception as exc:
|
| 1168 |
+
error_code = type(exc).__name__
|
| 1169 |
+
result = {
|
| 1170 |
+
"test_results": [],
|
| 1171 |
+
"error_code": error_code,
|
| 1172 |
+
"error_details": str(exc),
|
| 1173 |
+
"log": [
|
| 1174 |
+
{
|
| 1175 |
+
"step": "evaluator_exception",
|
| 1176 |
+
"exception_info": traceback.format_exc(),
|
| 1177 |
+
"returncode": 1,
|
| 1178 |
+
}
|
| 1179 |
+
],
|
| 1180 |
+
"solution_branch": "submission",
|
| 1181 |
+
"test_branches": [
|
| 1182 |
+
name for name, info in branches.items() if not info.get("ignored")
|
| 1183 |
+
],
|
| 1184 |
+
"test_branch_errors": {
|
| 1185 |
+
"__evaluator__": [{"error_code": error_code, "error_details": str(exc)}]
|
| 1186 |
+
},
|
| 1187 |
+
"executable_hash": None,
|
| 1188 |
+
"warnings": [],
|
| 1189 |
+
}
|
| 1190 |
+
for branch, info in branches.items():
|
| 1191 |
+
if info.get("ignored"):
|
| 1192 |
+
continue
|
| 1193 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 1194 |
+
log_path.write_text(traceback.format_exc())
|
| 1195 |
+
else:
|
| 1196 |
+
log_path.write_text("")
|
| 1197 |
+
write_outputs(result, metadata)
|
| 1198 |
+
|
| 1199 |
+
|
| 1200 |
+
if __name__ == "__main__":
|
| 1201 |
+
main()
|
orhnk--rascii.8d33a36/tests/programgym_task.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
orhnk--rascii.8d33a36/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
|
orhnk--rascii.8d33a36/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb045bc449d6243ef84ebef1a9390572bb73736e0d1d75eb0994f36c39a4df5d
|
| 3 |
+
size 3950
|
orhun--pkgtop.c41e785/environment/Dockerfile
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
|
| 38 |
+
RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# programgym-runtime-workspace-cleanup: v1
|
| 49 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
| 50 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 51 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 52 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 53 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 54 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 55 |
+
RUN mkdir -p /home/agent \
|
| 56 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 57 |
+
&& chown agent:agent /workspace/executable \
|
| 58 |
+
&& chmod 111 /workspace/executable
|
| 59 |
+
ENV HOME=/home/agent
|
| 60 |
+
WORKDIR /workspace
|
orhun--pkgtop.c41e785/environment/download.sh
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# PROGRAMGYM-MANAGED-GO-DOWNLOAD: v1
|
| 3 |
+
# Generated deterministically from repository module metadata; do not edit.
|
| 4 |
+
set -u
|
| 5 |
+
export GOTOOLCHAIN=auto
|
| 6 |
+
mkdir -p /workspace/.programgym_build_env/go-prefetch
|
| 7 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PROGRAMGYM_GO_MOD_EOF'
|
| 8 |
+
module github.com/orhun/pkgtop
|
| 9 |
+
|
| 10 |
+
go 1.19
|
| 11 |
+
|
| 12 |
+
require (
|
| 13 |
+
github.com/atotto/clipboard v0.1.2
|
| 14 |
+
github.com/dustin/go-humanize v1.0.0
|
| 15 |
+
github.com/gizak/termui/v3 v3.1.0
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
require (
|
| 19 |
+
github.com/mattn/go-runewidth v0.0.2 // indirect
|
| 20 |
+
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect
|
| 21 |
+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d // indirect
|
| 22 |
+
)
|
| 23 |
+
PROGRAMGYM_GO_MOD_EOF
|
| 24 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PROGRAMGYM_GO_SUM_EOF'
|
| 25 |
+
github.com/atotto/clipboard v0.1.2 h1:YZCtFu5Ie8qX2VmVTBnrqLSiU9XOWwqNRmdT3gIQzbY=
|
| 26 |
+
github.com/atotto/clipboard v0.1.2/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
|
| 27 |
+
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
| 28 |
+
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
| 29 |
+
github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc=
|
| 30 |
+
github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY=
|
| 31 |
+
github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=
|
| 32 |
+
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
| 33 |
+
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=
|
| 34 |
+
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
| 35 |
+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=
|
| 36 |
+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
|
| 37 |
+
PROGRAMGYM_GO_SUM_EOF
|
| 38 |
+
PROGRAMGYM_GO_BASE_GOROOT="$(GOTOOLCHAIN=local go env GOROOT)"
|
| 39 |
+
if ! PROGRAMGYM_GO_RESOLVED_GOROOT="$(cd /workspace/.programgym_build_env/go-prefetch && GOTOOLCHAIN=auto go env GOROOT)"; then
|
| 40 |
+
printf '%s\n' 'download.sh: Go toolchain resolution failed' >&2
|
| 41 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 42 |
+
return 1
|
| 43 |
+
else
|
| 44 |
+
exit 1
|
| 45 |
+
fi
|
| 46 |
+
fi
|
| 47 |
+
if [ "$PROGRAMGYM_GO_RESOLVED_GOROOT" != "$PROGRAMGYM_GO_BASE_GOROOT" ]; then
|
| 48 |
+
PROGRAMGYM_GO_TOOLCHAIN_ROOT=/opt/programgym-go-toolchain
|
| 49 |
+
mkdir -p "$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 50 |
+
cp -a "$PROGRAMGYM_GO_RESOLVED_GOROOT/." "$PROGRAMGYM_GO_TOOLCHAIN_ROOT/"
|
| 51 |
+
export GOROOT="$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 52 |
+
else
|
| 53 |
+
export GOROOT="$PROGRAMGYM_GO_BASE_GOROOT"
|
| 54 |
+
fi
|
| 55 |
+
export PATH="$GOROOT/bin:$PATH"
|
| 56 |
+
export GOTOOLCHAIN=local
|
| 57 |
+
if ! (cd /workspace/.programgym_build_env/go-prefetch && go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all); then
|
| 58 |
+
printf '%s\n' 'download.sh: Go dependency prefetch failed' >&2
|
| 59 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 60 |
+
return 1
|
| 61 |
+
else
|
| 62 |
+
exit 1
|
| 63 |
+
fi
|
| 64 |
+
fi
|
orhun--pkgtop.c41e785/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e14bd184de80171eee662f197fd3aa816489de4d88ab38c9c50ee7aa032c277a
|
| 3 |
+
size 3697593
|
orhun--pkgtop.c41e785/environment/programgym-go.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
|
| 3 |
+
size 59908810
|
orhun--pkgtop.c41e785/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e9aee18ea771f26967cbe32b954c5fd580d2ae35bad3dc2ba82204a6c588823
|
| 3 |
+
size 4246
|
orhun--pkgtop.c41e785/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
|
orhun--pkgtop.c41e785/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
|
orhun--pkgtop.c41e785/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/orhun--pkgtop.c41e785"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for orhun/pkgtop"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "go"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "orhun__pkgtop.c41e785"
|
| 32 |
+
repository = "orhun/pkgtop"
|
| 33 |
+
commit = "c41e78537542a36b6ab62251d24de15c3793a2a8"
|
| 34 |
+
language = "go"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.673113104238234
|
| 37 |
+
test_branches = 2
|
| 38 |
+
test_count = 143
|
| 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"
|
orhun--pkgtop.c41e785/tests/Dockerfile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
|
| 38 |
+
RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# programgym-runtime-workspace-cleanup: v1
|
| 49 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
| 50 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 51 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 52 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 53 |
+
&& mkdir -p /workspace /tests
|
| 54 |
+
|
| 55 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 56 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 57 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 58 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 59 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 60 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 61 |
+
RUN python3 -m pip install --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
|
orhun--pkgtop.c41e785/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:722b645e8db1449a43b091788344757e7ceceb4eb5faff69cd2160124310271a
|
| 3 |
+
size 6332
|
orhun--pkgtop.c41e785/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:f8c96c4b5daa2f82021421404570528f5fedc535eef1e653b9f9266653d2b5aa
|
| 3 |
+
size 10650
|
orhun--pkgtop.c41e785/tests/download.sh
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# PROGRAMGYM-MANAGED-GO-DOWNLOAD: v1
|
| 3 |
+
# Generated deterministically from repository module metadata; do not edit.
|
| 4 |
+
set -u
|
| 5 |
+
export GOTOOLCHAIN=auto
|
| 6 |
+
mkdir -p /workspace/.programgym_build_env/go-prefetch
|
| 7 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PROGRAMGYM_GO_MOD_EOF'
|
| 8 |
+
module github.com/orhun/pkgtop
|
| 9 |
+
|
| 10 |
+
go 1.19
|
| 11 |
+
|
| 12 |
+
require (
|
| 13 |
+
github.com/atotto/clipboard v0.1.2
|
| 14 |
+
github.com/dustin/go-humanize v1.0.0
|
| 15 |
+
github.com/gizak/termui/v3 v3.1.0
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
require (
|
| 19 |
+
github.com/mattn/go-runewidth v0.0.2 // indirect
|
| 20 |
+
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect
|
| 21 |
+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d // indirect
|
| 22 |
+
)
|
| 23 |
+
PROGRAMGYM_GO_MOD_EOF
|
| 24 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PROGRAMGYM_GO_SUM_EOF'
|
| 25 |
+
github.com/atotto/clipboard v0.1.2 h1:YZCtFu5Ie8qX2VmVTBnrqLSiU9XOWwqNRmdT3gIQzbY=
|
| 26 |
+
github.com/atotto/clipboard v0.1.2/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
|
| 27 |
+
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
| 28 |
+
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
| 29 |
+
github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc=
|
| 30 |
+
github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY=
|
| 31 |
+
github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=
|
| 32 |
+
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
| 33 |
+
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=
|
| 34 |
+
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
| 35 |
+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=
|
| 36 |
+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
|
| 37 |
+
PROGRAMGYM_GO_SUM_EOF
|
| 38 |
+
PROGRAMGYM_GO_BASE_GOROOT="$(GOTOOLCHAIN=local go env GOROOT)"
|
| 39 |
+
if ! PROGRAMGYM_GO_RESOLVED_GOROOT="$(cd /workspace/.programgym_build_env/go-prefetch && GOTOOLCHAIN=auto go env GOROOT)"; then
|
| 40 |
+
printf '%s\n' 'download.sh: Go toolchain resolution failed' >&2
|
| 41 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 42 |
+
return 1
|
| 43 |
+
else
|
| 44 |
+
exit 1
|
| 45 |
+
fi
|
| 46 |
+
fi
|
| 47 |
+
if [ "$PROGRAMGYM_GO_RESOLVED_GOROOT" != "$PROGRAMGYM_GO_BASE_GOROOT" ]; then
|
| 48 |
+
PROGRAMGYM_GO_TOOLCHAIN_ROOT=/opt/programgym-go-toolchain
|
| 49 |
+
mkdir -p "$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 50 |
+
cp -a "$PROGRAMGYM_GO_RESOLVED_GOROOT/." "$PROGRAMGYM_GO_TOOLCHAIN_ROOT/"
|
| 51 |
+
export GOROOT="$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 52 |
+
else
|
| 53 |
+
export GOROOT="$PROGRAMGYM_GO_BASE_GOROOT"
|
| 54 |
+
fi
|
| 55 |
+
export PATH="$GOROOT/bin:$PATH"
|
| 56 |
+
export GOTOOLCHAIN=local
|
| 57 |
+
if ! (cd /workspace/.programgym_build_env/go-prefetch && go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all); then
|
| 58 |
+
printf '%s\n' 'download.sh: Go dependency prefetch failed' >&2
|
| 59 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 60 |
+
return 1
|
| 61 |
+
else
|
| 62 |
+
exit 1
|
| 63 |
+
fi
|
| 64 |
+
fi
|
orhun--pkgtop.c41e785/tests/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e14bd184de80171eee662f197fd3aa816489de4d88ab38c9c50ee7aa032c277a
|
| 3 |
+
size 3697593
|
orhun--pkgtop.c41e785/tests/programgym-go.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
|
| 3 |
+
size 59908810
|
orhun--pkgtop.c41e785/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""In-place ProgramGym evaluator.
|
| 3 |
+
|
| 4 |
+
Mirrors ProgramGym's ``Evaluator`` pipeline as closely as a single-container,
|
| 5 |
+
no-Docker-in-Docker host allows. Run from ``tests/test.sh`` inside the agent's
|
| 6 |
+
cleanroom container after Harbor flips the verifier-phase network policy.
|
| 7 |
+
|
| 8 |
+
Differences from ``programgym.eval.eval.Evaluator`` that are structural to
|
| 9 |
+
running in one container:
|
| 10 |
+
|
| 11 |
+
* No fresh container per branch. ``snapshot_workspace`` / ``restore_workspace``
|
| 12 |
+
copy a post-compile workspace snapshot to a temp directory and restore it
|
| 13 |
+
before each branch; ``cleanup_lingering_processes`` kills leftover branch
|
| 14 |
+
processes between attempts to approximate the fresh-container boundary.
|
| 15 |
+
* No ``docker commit``. The post-compile workspace snapshot serves the same
|
| 16 |
+
role as the committed image upstream.
|
| 17 |
+
* Hidden test blobs are fetched on demand from HuggingFace via
|
| 18 |
+
``huggingface_hub.snapshot_download`` (matching ``programgym.utils.blob_store``)
|
| 19 |
+
rather than being pre-staged into ``/tests/blobs/``. Override with
|
| 20 |
+
``PROGRAMGYM_BLOB_DIR`` for offline reruns.
|
| 21 |
+
|
| 22 |
+
Everything else (eval_clean_hashes scrub, deterministic synthetic git seed,
|
| 23 |
+
``compile.sh`` then stash + hash the executable, best-effort
|
| 24 |
+
``pytest-rerunfailures``, per-branch test-tar overlay, executable hash
|
| 25 |
+
``--max-worker-restart=4``, xdist worker-crash retry with serial fallback,
|
| 26 |
+
best-of-N attempt selection, active vs ignored test bookkeeping, scoring) is
|
| 27 |
+
preserved.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import re
|
| 36 |
+
import shlex
|
| 37 |
+
import shutil
|
| 38 |
+
import signal
|
| 39 |
+
import subprocess
|
| 40 |
+
import tempfile
|
| 41 |
+
import time
|
| 42 |
+
import traceback
|
| 43 |
+
import xml.etree.ElementTree as ET
|
| 44 |
+
from pathlib import Path
|
| 45 |
+
from typing import Any
|
| 46 |
+
|
| 47 |
+
WORKSPACE = Path(os.environ.get("PROGRAMGYM_WORKSPACE", "/workspace"))
|
| 48 |
+
STASHED_EXECUTABLE = Path("/opt/programgym-stashed-executable-do-not-modify")
|
| 49 |
+
METADATA_PATH = Path(
|
| 50 |
+
os.environ.get("PROGRAMGYM_METADATA", "/tests/programgym_task.json")
|
| 51 |
+
)
|
| 52 |
+
LOG_DIR = Path(os.environ.get("PROGRAMGYM_LOG_DIR", "/logs/verifier"))
|
| 53 |
+
WORKER_CRASH_PHRASE = "worker '"
|
| 54 |
+
XDIST_COLLAPSE_MARKERS = (
|
| 55 |
+
"maximum crashed workers reached",
|
| 56 |
+
"xdist: maximum crashed",
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
DEFAULT_HF_REPO_ID = "programgym/ProgramGym-Tests"
|
| 60 |
+
DEFAULT_HF_REVISION = "main"
|
| 61 |
+
|
| 62 |
+
# Oracle agent handoff files (see solution/solve.sh). Must not appear in the
|
| 63 |
+
# post-compile workspace snapshot or they pollute tree-scanning tests (dutree).
|
| 64 |
+
_ORACLE_HANDOFF_NAMES = (".programgym_oracle_reference",)
|
| 65 |
+
|
| 66 |
+
_TOOLCHAIN_BIN_DIR_CANDIDATES = (
|
| 67 |
+
"/usr/local/go/bin",
|
| 68 |
+
"/go/bin",
|
| 69 |
+
"/usr/local/cargo/bin",
|
| 70 |
+
"/root/.cargo/bin",
|
| 71 |
+
"/root/.ghcup/bin",
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def toolchain_bin_dirs() -> list[str]:
|
| 76 |
+
"""Return toolchain bin directories that exist on this image."""
|
| 77 |
+
candidates = list(_TOOLCHAIN_BIN_DIR_CANDIDATES)
|
| 78 |
+
candidates.extend(
|
| 79 |
+
str(path)
|
| 80 |
+
for path in sorted(Path("/usr/lib").glob("go-*/bin"))
|
| 81 |
+
if _is_accessible_dir(path)
|
| 82 |
+
)
|
| 83 |
+
seen: set[str] = set()
|
| 84 |
+
present: list[str] = []
|
| 85 |
+
for path in candidates:
|
| 86 |
+
if path in seen:
|
| 87 |
+
continue
|
| 88 |
+
seen.add(path)
|
| 89 |
+
if _is_accessible_dir(path):
|
| 90 |
+
present.append(path)
|
| 91 |
+
return present
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _is_accessible_dir(path: str | Path) -> bool:
|
| 95 |
+
"""Return whether path is a directory without failing on protected homes."""
|
| 96 |
+
try:
|
| 97 |
+
return Path(path).is_dir()
|
| 98 |
+
except OSError:
|
| 99 |
+
return False
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def bootstrap_toolchain_path() -> str:
|
| 103 |
+
"""Prepend discovered toolchain dirs to PATH (idempotent)."""
|
| 104 |
+
prepend = toolchain_bin_dirs()
|
| 105 |
+
current_parts = [part for part in os.environ.get("PATH", "").split(":") if part]
|
| 106 |
+
merged: list[str] = []
|
| 107 |
+
for path in prepend + current_parts:
|
| 108 |
+
if path not in merged:
|
| 109 |
+
merged.append(path)
|
| 110 |
+
new_path = ":".join(merged)
|
| 111 |
+
os.environ["PATH"] = new_path
|
| 112 |
+
return new_path
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _bash_login_command(command: str) -> str:
|
| 116 |
+
"""Run ``command`` under bash -lc with an explicit PATH export."""
|
| 117 |
+
path = bootstrap_toolchain_path()
|
| 118 |
+
return f"export PATH={shlex.quote(path)}; {command}"
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def sha256(path: Path) -> str:
|
| 122 |
+
h = hashlib.sha256()
|
| 123 |
+
with path.open("rb") as f:
|
| 124 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 125 |
+
h.update(chunk)
|
| 126 |
+
return h.hexdigest()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def write_json(path: Path, data: dict[str, Any]) -> None:
|
| 130 |
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
| 131 |
+
tmp.write_text(json.dumps(data, indent=2, sort_keys=True))
|
| 132 |
+
tmp.replace(path)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def _read_log_tail(path: Path | None, max_bytes: int = 65536) -> str:
|
| 136 |
+
if path is None or not path.exists():
|
| 137 |
+
return ""
|
| 138 |
+
data = path.read_bytes()
|
| 139 |
+
if len(data) <= max_bytes:
|
| 140 |
+
return data.decode(errors="replace")
|
| 141 |
+
return data[-max_bytes:].decode(errors="replace")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def _close_pipes(proc: subprocess.Popen[Any]) -> None:
|
| 145 |
+
for stream in (proc.stdout, proc.stderr):
|
| 146 |
+
if stream is not None:
|
| 147 |
+
try:
|
| 148 |
+
stream.close()
|
| 149 |
+
except OSError:
|
| 150 |
+
pass
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _terminate_process_tree(proc: subprocess.Popen[Any]) -> None:
|
| 154 |
+
try:
|
| 155 |
+
os.killpg(proc.pid, signal.SIGKILL)
|
| 156 |
+
except ProcessLookupError:
|
| 157 |
+
pass
|
| 158 |
+
try:
|
| 159 |
+
proc.kill()
|
| 160 |
+
except ProcessLookupError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
_PKILL_PATTERNS = (
|
| 165 |
+
f"{WORKSPACE}/eval/",
|
| 166 |
+
f"{WORKSPACE}/tests/",
|
| 167 |
+
"tail -f",
|
| 168 |
+
"development.log",
|
| 169 |
+
" less ",
|
| 170 |
+
" less$",
|
| 171 |
+
"/less ",
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def _pkill_aggressive() -> str:
|
| 176 |
+
"""Best-effort kill of branch pytest/subprocess trees (Modal gVisor fallback)."""
|
| 177 |
+
notes: list[str] = []
|
| 178 |
+
workspace = str(WORKSPACE)
|
| 179 |
+
patterns = list(_PKILL_PATTERNS) + [
|
| 180 |
+
f"pytest.*{workspace}",
|
| 181 |
+
f"xdist.*{workspace}",
|
| 182 |
+
]
|
| 183 |
+
for pattern in patterns:
|
| 184 |
+
result = subprocess.run(
|
| 185 |
+
["pkill", "-9", "-f", pattern],
|
| 186 |
+
capture_output=True,
|
| 187 |
+
text=True,
|
| 188 |
+
)
|
| 189 |
+
notes.append(f"pkill -9 -f {pattern!r}: rc={result.returncode}")
|
| 190 |
+
return "\n".join(notes)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def run_step(
|
| 194 |
+
command: str,
|
| 195 |
+
cwd: Path,
|
| 196 |
+
*,
|
| 197 |
+
timeout: int,
|
| 198 |
+
env: dict[str, str] | None = None,
|
| 199 |
+
step: str,
|
| 200 |
+
accept_failure: bool = False,
|
| 201 |
+
log_output: bool | None = None,
|
| 202 |
+
max_output_bytes: int = 65536,
|
| 203 |
+
) -> dict[str, Any]:
|
| 204 |
+
if log_output is None:
|
| 205 |
+
log_output = step == "run_tests" or timeout >= 60
|
| 206 |
+
|
| 207 |
+
started = time.monotonic()
|
| 208 |
+
stdout_path: Path | None = None
|
| 209 |
+
stderr_path: Path | None = None
|
| 210 |
+
stdout_f = None
|
| 211 |
+
stderr_f = None
|
| 212 |
+
|
| 213 |
+
if log_output:
|
| 214 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 215 |
+
log_id = f"{step}-{int(started * 1000)}"
|
| 216 |
+
stdout_path = LOG_DIR / f"run-step-{log_id}.stdout.log"
|
| 217 |
+
stderr_path = LOG_DIR / f"run-step-{log_id}.stderr.log"
|
| 218 |
+
stdout_f = stdout_path.open("w", encoding="utf-8")
|
| 219 |
+
stderr_f = stderr_path.open("w", encoding="utf-8")
|
| 220 |
+
popen_stdout: Any = stdout_f
|
| 221 |
+
popen_stderr: Any = stderr_f
|
| 222 |
+
else:
|
| 223 |
+
popen_stdout = subprocess.PIPE
|
| 224 |
+
popen_stderr = subprocess.PIPE
|
| 225 |
+
|
| 226 |
+
proc = subprocess.Popen(
|
| 227 |
+
["bash", "-lc", _bash_login_command(command)],
|
| 228 |
+
cwd=cwd,
|
| 229 |
+
env={**os.environ, **(env or {})},
|
| 230 |
+
stdout=popen_stdout,
|
| 231 |
+
stderr=popen_stderr,
|
| 232 |
+
start_new_session=True,
|
| 233 |
+
text=True,
|
| 234 |
+
)
|
| 235 |
+
timed_out = False
|
| 236 |
+
stdout = ""
|
| 237 |
+
stderr = ""
|
| 238 |
+
try:
|
| 239 |
+
if log_output:
|
| 240 |
+
proc.wait(timeout=timeout)
|
| 241 |
+
else:
|
| 242 |
+
stdout, stderr = proc.communicate(timeout=timeout)
|
| 243 |
+
except subprocess.TimeoutExpired:
|
| 244 |
+
timed_out = True
|
| 245 |
+
_terminate_process_tree(proc)
|
| 246 |
+
cleanup_lingering_processes(aggressive=True)
|
| 247 |
+
try:
|
| 248 |
+
proc.wait(timeout=5)
|
| 249 |
+
except subprocess.TimeoutExpired:
|
| 250 |
+
proc.kill()
|
| 251 |
+
if not log_output:
|
| 252 |
+
_close_pipes(proc)
|
| 253 |
+
finally:
|
| 254 |
+
if stdout_f is not None:
|
| 255 |
+
stdout_f.close()
|
| 256 |
+
if stderr_f is not None:
|
| 257 |
+
stderr_f.close()
|
| 258 |
+
|
| 259 |
+
if timed_out:
|
| 260 |
+
if log_output:
|
| 261 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 262 |
+
stderr_path, max_output_bytes
|
| 263 |
+
)
|
| 264 |
+
else:
|
| 265 |
+
output = ""
|
| 266 |
+
entry = {
|
| 267 |
+
"step": step,
|
| 268 |
+
"command": command,
|
| 269 |
+
"wall_time": time.monotonic() - started,
|
| 270 |
+
"output": output,
|
| 271 |
+
"returncode": 124,
|
| 272 |
+
"exception_info": f"timed out after {timeout}s",
|
| 273 |
+
}
|
| 274 |
+
else:
|
| 275 |
+
if log_output:
|
| 276 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 277 |
+
stderr_path, max_output_bytes
|
| 278 |
+
)
|
| 279 |
+
else:
|
| 280 |
+
output = stdout + stderr
|
| 281 |
+
entry = {
|
| 282 |
+
"step": step,
|
| 283 |
+
"command": command,
|
| 284 |
+
"wall_time": time.monotonic() - started,
|
| 285 |
+
"output": output,
|
| 286 |
+
"returncode": proc.returncode,
|
| 287 |
+
"exception_info": "",
|
| 288 |
+
}
|
| 289 |
+
if entry["returncode"] and not accept_failure:
|
| 290 |
+
raise RuntimeError(
|
| 291 |
+
f"{step} failed: {entry['exception_info'] or entry['output']}"
|
| 292 |
+
)
|
| 293 |
+
return entry
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def cleanup_lingering_processes(*, aggressive: bool = False) -> dict[str, Any]:
|
| 297 |
+
started = time.monotonic()
|
| 298 |
+
patterns = [
|
| 299 |
+
str(WORKSPACE / "executable"),
|
| 300 |
+
f"{WORKSPACE}/eval/",
|
| 301 |
+
f"{WORKSPACE}/tests/",
|
| 302 |
+
# lazygit --logs/-l tests spawn `tail -f` outside /workspace/.
|
| 303 |
+
"tail -f",
|
| 304 |
+
"development.log",
|
| 305 |
+
]
|
| 306 |
+
killed: list[int] = []
|
| 307 |
+
proc_root = Path("/proc")
|
| 308 |
+
proc_available = proc_root.exists()
|
| 309 |
+
if proc_available:
|
| 310 |
+
for proc_dir in proc_root.iterdir():
|
| 311 |
+
if not proc_dir.name.isdigit():
|
| 312 |
+
continue
|
| 313 |
+
pid = int(proc_dir.name)
|
| 314 |
+
if pid in {os.getpid(), os.getppid()}:
|
| 315 |
+
continue
|
| 316 |
+
try:
|
| 317 |
+
raw = (proc_dir / "cmdline").read_bytes()
|
| 318 |
+
except (FileNotFoundError, PermissionError, ProcessLookupError):
|
| 319 |
+
continue
|
| 320 |
+
cmdline = raw.replace(b"\0", b" ").decode(errors="replace")
|
| 321 |
+
if not any(pattern in cmdline for pattern in patterns):
|
| 322 |
+
continue
|
| 323 |
+
try:
|
| 324 |
+
os.kill(pid, signal.SIGKILL)
|
| 325 |
+
except (PermissionError, ProcessLookupError):
|
| 326 |
+
continue
|
| 327 |
+
killed.append(pid)
|
| 328 |
+
pkill_output = ""
|
| 329 |
+
if aggressive or not proc_available:
|
| 330 |
+
pkill_output = _pkill_aggressive()
|
| 331 |
+
output_parts = []
|
| 332 |
+
if killed:
|
| 333 |
+
output_parts.append("\n".join(str(pid) for pid in killed))
|
| 334 |
+
if pkill_output:
|
| 335 |
+
output_parts.append(pkill_output)
|
| 336 |
+
return {
|
| 337 |
+
"step": "cleanup_lingering_processes",
|
| 338 |
+
"command": "kill leftover branch processes referencing the workspace",
|
| 339 |
+
"wall_time": time.monotonic() - started,
|
| 340 |
+
"output": "\n".join(output_parts),
|
| 341 |
+
"returncode": 0,
|
| 342 |
+
"exception_info": "",
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
def extract_trusted_blob(tar_path: Path, dest: Path) -> None:
|
| 347 |
+
import tarfile
|
| 348 |
+
|
| 349 |
+
with tarfile.open(tar_path, "r:gz") as tf:
|
| 350 |
+
try:
|
| 351 |
+
tf.extractall(dest, filter="fully_trusted")
|
| 352 |
+
except TypeError:
|
| 353 |
+
tf.extractall(dest)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def find_results_xml() -> Path | None:
|
| 357 |
+
"""Return the junit xml path if pytest wrote one."""
|
| 358 |
+
for candidate in (WORKSPACE / "eval" / "results.xml", WORKSPACE / "results.xml"):
|
| 359 |
+
if candidate.exists():
|
| 360 |
+
return candidate
|
| 361 |
+
return None
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def remove_oracle_handoff_artifacts() -> list[str]:
|
| 365 |
+
"""Drop oracle-agent handoff files from /workspace before snapshot/restore."""
|
| 366 |
+
removed: list[str] = []
|
| 367 |
+
for name in _ORACLE_HANDOFF_NAMES:
|
| 368 |
+
path = WORKSPACE / name
|
| 369 |
+
if path.exists():
|
| 370 |
+
if path.is_dir():
|
| 371 |
+
shutil.rmtree(path)
|
| 372 |
+
else:
|
| 373 |
+
path.unlink()
|
| 374 |
+
removed.append(name)
|
| 375 |
+
return removed
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def _remove_tree(path: Path) -> None:
|
| 379 |
+
"""Remove a file or directory tree, with a shell fallback for overlay races."""
|
| 380 |
+
if path.is_symlink() or path.is_file():
|
| 381 |
+
path.unlink(missing_ok=True)
|
| 382 |
+
return
|
| 383 |
+
if not path.is_dir():
|
| 384 |
+
path.unlink(missing_ok=True)
|
| 385 |
+
return
|
| 386 |
+
for attempt in range(3):
|
| 387 |
+
try:
|
| 388 |
+
shutil.rmtree(path)
|
| 389 |
+
if not path.exists():
|
| 390 |
+
return
|
| 391 |
+
except OSError:
|
| 392 |
+
if attempt == 2:
|
| 393 |
+
run_step(
|
| 394 |
+
f"rm -rf {shlex.quote(str(path))}",
|
| 395 |
+
path.parent,
|
| 396 |
+
timeout=120,
|
| 397 |
+
step="clear_workspace_fallback",
|
| 398 |
+
accept_failure=True,
|
| 399 |
+
)
|
| 400 |
+
if not path.exists():
|
| 401 |
+
return
|
| 402 |
+
raise
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
def ensure_workspace_dir() -> None:
|
| 406 |
+
"""Guarantee WORKSPACE exists as a writable directory (not a symlink/file)."""
|
| 407 |
+
if WORKSPACE.exists() and not WORKSPACE.is_dir():
|
| 408 |
+
if WORKSPACE.is_symlink() or WORKSPACE.is_file():
|
| 409 |
+
WORKSPACE.unlink()
|
| 410 |
+
else:
|
| 411 |
+
shutil.rmtree(WORKSPACE)
|
| 412 |
+
WORKSPACE.mkdir(parents=True, exist_ok=True)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def clear_workspace() -> None:
|
| 416 |
+
ensure_workspace_dir()
|
| 417 |
+
for path in list(WORKSPACE.iterdir()):
|
| 418 |
+
_remove_tree(path)
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
def restore_reference_executable() -> None:
|
| 422 |
+
"""Write the stashed reference binary into /workspace after a branch overlay.
|
| 423 |
+
|
| 424 |
+
Branch blobs may ship ``executable`` as a dangling symlink into
|
| 425 |
+
``target/release/...``; ``shutil.copy2`` would follow it and raise
|
| 426 |
+
``FileNotFoundError``. Drop whatever the blob left and copy the stashed
|
| 427 |
+
reference as a regular file.
|
| 428 |
+
"""
|
| 429 |
+
ensure_workspace_dir()
|
| 430 |
+
if not STASHED_EXECUTABLE.is_file():
|
| 431 |
+
raise FileNotFoundError(
|
| 432 |
+
f"missing stashed reference executable at {STASHED_EXECUTABLE}"
|
| 433 |
+
)
|
| 434 |
+
dest = WORKSPACE / "executable"
|
| 435 |
+
if dest.exists() or dest.is_symlink():
|
| 436 |
+
if dest.is_dir():
|
| 437 |
+
shutil.rmtree(dest)
|
| 438 |
+
else:
|
| 439 |
+
dest.unlink(missing_ok=True)
|
| 440 |
+
shutil.copy2(STASHED_EXECUTABLE, dest)
|
| 441 |
+
dest.chmod(0o755)
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
def snapshot_workspace(dest: Path) -> None:
|
| 445 |
+
if dest.exists():
|
| 446 |
+
shutil.rmtree(dest)
|
| 447 |
+
shutil.copytree(WORKSPACE, dest, symlinks=True)
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def restore_workspace(source: Path) -> None:
|
| 451 |
+
clear_workspace()
|
| 452 |
+
shutil.copytree(source, WORKSPACE, dirs_exist_ok=True, symlinks=True)
|
| 453 |
+
ensure_workspace_dir()
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def remove_hashed_files(root: Path, hashes: set[str]) -> list[str]:
|
| 457 |
+
removed: list[str] = []
|
| 458 |
+
for path in root.rglob("*"):
|
| 459 |
+
if path.is_file() and not path.is_symlink():
|
| 460 |
+
try:
|
| 461 |
+
if sha256(path) in hashes:
|
| 462 |
+
path.unlink()
|
| 463 |
+
removed.append(str(path.relative_to(root)))
|
| 464 |
+
except OSError:
|
| 465 |
+
continue
|
| 466 |
+
return removed
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
def branch_tests(branch_info: dict[str, Any]) -> list[str]:
|
| 470 |
+
ignored = {
|
| 471 |
+
item["name"] for item in branch_info.get("ignored_tests", []) if "name" in item
|
| 472 |
+
}
|
| 473 |
+
return [name for name in branch_info.get("tests", []) if name not in ignored]
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
def ignored_tests(metadata: dict[str, Any]) -> set[str]:
|
| 477 |
+
result: set[str] = set()
|
| 478 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 479 |
+
result.update(
|
| 480 |
+
f"{branch}/{item['name']}"
|
| 481 |
+
for item in info.get("ignored_tests", [])
|
| 482 |
+
if "name" in item
|
| 483 |
+
)
|
| 484 |
+
return result
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def active_tests(metadata: dict[str, Any]) -> set[str]:
|
| 488 |
+
active: set[str] = set()
|
| 489 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 490 |
+
if info.get("ignored"):
|
| 491 |
+
continue
|
| 492 |
+
ignored = {
|
| 493 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 494 |
+
}
|
| 495 |
+
active.update(
|
| 496 |
+
f"{branch}/{name}" for name in info.get("tests", []) if name not in ignored
|
| 497 |
+
)
|
| 498 |
+
return active
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def inject_not_run(
|
| 502 |
+
result: dict[str, Any], branch: str, tests: list[str], error_code: str
|
| 503 |
+
) -> None:
|
| 504 |
+
result["test_results"].extend(
|
| 505 |
+
{
|
| 506 |
+
"name": name,
|
| 507 |
+
"branch": branch,
|
| 508 |
+
"status": "not_run",
|
| 509 |
+
"extra": {"error_code": error_code},
|
| 510 |
+
}
|
| 511 |
+
for name in tests
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def testcase_name(case: ET.Element) -> str:
|
| 516 |
+
classname = case.attrib.get("classname", "")
|
| 517 |
+
name = case.attrib.get("name", "")
|
| 518 |
+
return f"{classname}.{name}" if classname else name
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
# Only these tags under <testcase> represent a result. <system-out> /
|
| 522 |
+
# <system-err> are stdout/stderr captures and must not be treated as results
|
| 523 |
+
# (a leading <system-out> followed by <failure> would otherwise be classified
|
| 524 |
+
# as a stdout-only "passed").
|
| 525 |
+
JUNIT_RESULT_TAGS = {"skipped", "failure", "error"}
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def parse_junit(
|
| 529 |
+
raw_xml: str, branch: str, expected: list[str], ignored: set[str]
|
| 530 |
+
) -> tuple[list[dict[str, Any]], list[str]]:
|
| 531 |
+
root = ET.fromstring(raw_xml)
|
| 532 |
+
got: set[str] = set()
|
| 533 |
+
results: list[dict[str, Any]] = []
|
| 534 |
+
for case in root.iter("testcase"):
|
| 535 |
+
name = testcase_name(case)
|
| 536 |
+
got.add(name)
|
| 537 |
+
extra: dict[str, Any] = {}
|
| 538 |
+
if "time" in case.attrib:
|
| 539 |
+
try:
|
| 540 |
+
extra["time"] = float(case.attrib["time"])
|
| 541 |
+
except ValueError:
|
| 542 |
+
extra["time"] = case.attrib["time"]
|
| 543 |
+
result_children = [c for c in case if c.tag in JUNIT_RESULT_TAGS]
|
| 544 |
+
# Collapse duplicate same-tag result children. Pytest's
|
| 545 |
+
# "pytest.internal" pseudo-test sometimes emits two identical <error>
|
| 546 |
+
# entries; treating that as a system_error would over-flag a real
|
| 547 |
+
# single failure. Mirrors upstream eval.py:816-820.
|
| 548 |
+
if len(result_children) > 1 and len({c.tag for c in result_children}) == 1:
|
| 549 |
+
result_children = [result_children[0]]
|
| 550 |
+
if not result_children:
|
| 551 |
+
status = "passed"
|
| 552 |
+
elif len(result_children) != 1:
|
| 553 |
+
status = "system_error"
|
| 554 |
+
extra["error_details"] = (
|
| 555 |
+
f"Expected 1 result for {name}, got {len(result_children)}: "
|
| 556 |
+
f"{[c.tag for c in result_children]}"
|
| 557 |
+
)
|
| 558 |
+
else:
|
| 559 |
+
first = result_children[0]
|
| 560 |
+
status = first.tag # "skipped" | "failure" | "error"
|
| 561 |
+
extra["message"] = first.attrib.get("message") or ""
|
| 562 |
+
if first.text:
|
| 563 |
+
extra["text"] = first.text
|
| 564 |
+
results.append(
|
| 565 |
+
{"name": name, "branch": branch, "status": status, "extra": extra}
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
active_expected = [name for name in expected if name not in ignored]
|
| 569 |
+
missing = [name for name in active_expected if name not in got]
|
| 570 |
+
results.extend(
|
| 571 |
+
{
|
| 572 |
+
"name": name,
|
| 573 |
+
"branch": branch,
|
| 574 |
+
"status": "not_run",
|
| 575 |
+
"extra": {"error_code": "missing_from_junit_xml"},
|
| 576 |
+
}
|
| 577 |
+
for name in missing
|
| 578 |
+
)
|
| 579 |
+
unexpected = got - set(expected) - ignored
|
| 580 |
+
warnings = (
|
| 581 |
+
[f"Branch {branch}: {len(unexpected)} test(s) in JUnit XML not in tests.json"]
|
| 582 |
+
if unexpected
|
| 583 |
+
else []
|
| 584 |
+
)
|
| 585 |
+
return results, warnings
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
def count_worker_crashes(raw_xml: str) -> int:
|
| 589 |
+
if WORKER_CRASH_PHRASE not in raw_xml:
|
| 590 |
+
return 0
|
| 591 |
+
try:
|
| 592 |
+
root = ET.fromstring(raw_xml)
|
| 593 |
+
except ET.ParseError:
|
| 594 |
+
return 0
|
| 595 |
+
crashes = 0
|
| 596 |
+
for case in root.iter("testcase"):
|
| 597 |
+
for child in case:
|
| 598 |
+
text = (child.get("message") or "") + " " + (child.text or "")
|
| 599 |
+
if (
|
| 600 |
+
child.tag in {"error", "failure"}
|
| 601 |
+
and WORKER_CRASH_PHRASE in text
|
| 602 |
+
and "crashed" in text
|
| 603 |
+
):
|
| 604 |
+
crashes += 1
|
| 605 |
+
break
|
| 606 |
+
return crashes
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def run_output_indicates_xdist_collapse(output: str) -> bool:
|
| 610 |
+
lower = output.lower()
|
| 611 |
+
return any(marker in lower for marker in XDIST_COLLAPSE_MARKERS)
|
| 612 |
+
|
| 613 |
+
|
| 614 |
+
def count_junit_failures(raw_xml: str) -> int:
|
| 615 |
+
try:
|
| 616 |
+
root = ET.fromstring(raw_xml)
|
| 617 |
+
except ET.ParseError:
|
| 618 |
+
return 0
|
| 619 |
+
failures = 0
|
| 620 |
+
for case in root.iter("testcase"):
|
| 621 |
+
for child in case:
|
| 622 |
+
if child.tag in {"failure", "error"}:
|
| 623 |
+
failures += 1
|
| 624 |
+
break
|
| 625 |
+
return failures
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
def count_junit_passed(raw_xml: str) -> int:
|
| 629 |
+
try:
|
| 630 |
+
root = ET.fromstring(raw_xml)
|
| 631 |
+
except ET.ParseError:
|
| 632 |
+
return 0
|
| 633 |
+
passed = 0
|
| 634 |
+
for case in root.iter("testcase"):
|
| 635 |
+
if not any(child.tag in JUNIT_RESULT_TAGS for child in case):
|
| 636 |
+
passed += 1
|
| 637 |
+
return passed
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def branch_attempt_metrics(
|
| 641 |
+
raw_xml: str, *, run_output: str, expected_tests: int
|
| 642 |
+
) -> tuple[int, int, int, int]:
|
| 643 |
+
"""Return (crashes, n_testcases, failures, missing_from_xml)."""
|
| 644 |
+
crashes = count_worker_crashes(raw_xml)
|
| 645 |
+
if run_output_indicates_xdist_collapse(run_output):
|
| 646 |
+
crashes = max(crashes, 1)
|
| 647 |
+
n_tests = count_testcases(raw_xml)
|
| 648 |
+
failures = count_junit_failures(raw_xml)
|
| 649 |
+
missing = max(0, expected_tests - n_tests)
|
| 650 |
+
return crashes, n_tests, failures, missing
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def needs_serial_retry(
|
| 654 |
+
*,
|
| 655 |
+
serial: bool,
|
| 656 |
+
crashes: int,
|
| 657 |
+
missing: int,
|
| 658 |
+
failures: int,
|
| 659 |
+
n_tests: int,
|
| 660 |
+
expected_tests: int,
|
| 661 |
+
run_output: str,
|
| 662 |
+
) -> bool:
|
| 663 |
+
if serial:
|
| 664 |
+
return False
|
| 665 |
+
high_failure_rate = (
|
| 666 |
+
expected_tests > 0 and n_tests >= expected_tests and failures / n_tests >= 0.8
|
| 667 |
+
)
|
| 668 |
+
return (
|
| 669 |
+
crashes > 0
|
| 670 |
+
or missing > 0
|
| 671 |
+
or high_failure_rate
|
| 672 |
+
or run_output_indicates_xdist_collapse(run_output)
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def count_testcases(raw_xml: str) -> int:
|
| 677 |
+
try:
|
| 678 |
+
return sum(1 for _ in ET.fromstring(raw_xml).iter("testcase"))
|
| 679 |
+
except ET.ParseError:
|
| 680 |
+
return 0
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def scored_results(
|
| 684 |
+
result: dict[str, Any], metadata: dict[str, Any]
|
| 685 |
+
) -> list[dict[str, Any]]:
|
| 686 |
+
active = active_tests(metadata)
|
| 687 |
+
by_key = {
|
| 688 |
+
f"{test['branch']}/{test['name']}": test
|
| 689 |
+
for test in result["test_results"]
|
| 690 |
+
if f"{test['branch']}/{test['name']}" in active
|
| 691 |
+
}
|
| 692 |
+
return [
|
| 693 |
+
by_key.get(
|
| 694 |
+
key,
|
| 695 |
+
{
|
| 696 |
+
"branch": key.split("/", 1)[0],
|
| 697 |
+
"name": key.split("/", 1)[1],
|
| 698 |
+
"status": "not_run",
|
| 699 |
+
"extra": {"error_code": "missing_from_results"},
|
| 700 |
+
},
|
| 701 |
+
)
|
| 702 |
+
for key in sorted(active)
|
| 703 |
+
]
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def summarize(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 707 |
+
scored = scored_results(result, metadata)
|
| 708 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 709 |
+
n_tests = len(scored)
|
| 710 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 711 |
+
# Multi-key reward: Harbor's default Mean aggregates each key independently
|
| 712 |
+
# (see harbor.metrics.base.aggregate_reward_dicts), so mean("resolved") is
|
| 713 |
+
# the proportion of tasks scoring a perfect pass-rate and mean of
|
| 714 |
+
# "almost_resolved" is the proportion scoring >= 0.95. "reward" stays the
|
| 715 |
+
# per-task pass-rate whose mean is the overall mean reward.
|
| 716 |
+
return {
|
| 717 |
+
"reward": pass_rate,
|
| 718 |
+
"resolved": 1.0 if pass_rate >= 1.0 else 0.0,
|
| 719 |
+
"almost_resolved": 1.0 if pass_rate >= 0.95 else 0.0,
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
def diagnostics(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 724 |
+
scored = scored_results(result, metadata)
|
| 725 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 726 |
+
n_tests = len(scored)
|
| 727 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 728 |
+
return {
|
| 729 |
+
"pass_rate": pass_rate,
|
| 730 |
+
"resolved": int(
|
| 731 |
+
bool(
|
| 732 |
+
n_tests
|
| 733 |
+
and n_passed == n_tests
|
| 734 |
+
and not result["test_branch_errors"]
|
| 735 |
+
and not result["error_code"]
|
| 736 |
+
)
|
| 737 |
+
),
|
| 738 |
+
"n_passed": n_passed,
|
| 739 |
+
"n_tests": n_tests,
|
| 740 |
+
"n_branch_errors": len(result["test_branch_errors"]),
|
| 741 |
+
"infra_error": int(bool(result["error_code"] or result["test_branch_errors"])),
|
| 742 |
+
"executable_hash_present": int(bool(result.get("executable_hash"))),
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def use_script_pty() -> bool:
|
| 747 |
+
return os.environ.get("PROGRAMGYM_SCRIPT_PTY", "").strip() == "1"
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def script_pty_available() -> bool:
|
| 751 |
+
return shutil.which("script") is not None
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
def branch_env(
|
| 755 |
+
*,
|
| 756 |
+
serial: bool,
|
| 757 |
+
has_rerunfailures: bool,
|
| 758 |
+
extras: dict[str, str] | None = None,
|
| 759 |
+
) -> dict[str, str]:
|
| 760 |
+
addopts = ["--max-worker-restart=4"]
|
| 761 |
+
# A serial fallback is already a complete second execution. Re-running each
|
| 762 |
+
# failing test two more times makes large, failure-heavy suites prohibitively
|
| 763 |
+
# slow and adds little signal.
|
| 764 |
+
if has_rerunfailures and not serial:
|
| 765 |
+
addopts.extend(["--reruns=2", "--reruns-delay=1"])
|
| 766 |
+
env = {
|
| 767 |
+
"PYTEST_ADDOPTS": " ".join(addopts),
|
| 768 |
+
# Match upstream non-TTY regression environments (dirble log format, etc.).
|
| 769 |
+
"NO_COLOR": "1",
|
| 770 |
+
"TERM": "dumb",
|
| 771 |
+
"CLICOLOR": "0",
|
| 772 |
+
"CLICOLOR_FORCE": "0",
|
| 773 |
+
"COLORTERM": "",
|
| 774 |
+
}
|
| 775 |
+
if extras:
|
| 776 |
+
env.update(extras)
|
| 777 |
+
xdist_workers = os.environ.get("PROGRAMGYM_XDIST_WORKERS")
|
| 778 |
+
if serial:
|
| 779 |
+
xdist_workers = "1"
|
| 780 |
+
if xdist_workers:
|
| 781 |
+
env["PYTEST_XDIST_AUTO_NUM_WORKERS"] = xdist_workers
|
| 782 |
+
return env
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
_SERIAL_RUN_SH = ".programgym_run_serial.sh"
|
| 786 |
+
# ``eval/run.sh`` usually passes ``-n auto`` on the command line, which overrides
|
| 787 |
+
# ``PYTEST_ADDOPTS``. Rewrite to ``-n 0`` in a verifier-local copy for retries.
|
| 788 |
+
_RUN_SH_XDIST_RE = re.compile(r"-n\s*(?:auto|\d+)")
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
def prepare_serial_run_sh(run_sh: Path) -> Path:
|
| 792 |
+
"""Write a serial-only copy of ``eval/run.sh`` with xdist disabled."""
|
| 793 |
+
serial_sh = run_sh.with_name(_SERIAL_RUN_SH)
|
| 794 |
+
patched = _RUN_SH_XDIST_RE.sub("-n 0", run_sh.read_text())
|
| 795 |
+
serial_sh.write_text(patched)
|
| 796 |
+
serial_sh.chmod(0o755)
|
| 797 |
+
return serial_sh
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
def run_tests_command(*, serial: bool) -> str:
|
| 801 |
+
if serial:
|
| 802 |
+
inner = f"chmod +x ./eval/{_SERIAL_RUN_SH} && ./eval/{_SERIAL_RUN_SH}"
|
| 803 |
+
else:
|
| 804 |
+
inner = "chmod +x ./eval/run.sh && ./eval/run.sh"
|
| 805 |
+
if use_script_pty() and script_pty_available():
|
| 806 |
+
return f"script -q -c {shlex.quote(inner)} /dev/null"
|
| 807 |
+
return inner
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
BAKED_BLOB_DIR = Path(os.environ.get("PROGRAMGYM_BAKED_BLOB_DIR", "/tests/blobs"))
|
| 811 |
+
|
| 812 |
+
|
| 813 |
+
def resolve_blob_dir(instance_id: str, metadata: dict[str, Any]) -> Path:
|
| 814 |
+
"""Locate the per-instance blob directory.
|
| 815 |
+
|
| 816 |
+
Resolution order:
|
| 817 |
+
|
| 818 |
+
1. ``/tests/blobs/`` if pre-fetched into the task at generation time
|
| 819 |
+
(``programgym-adapter --download-blobs``). Verifier-only mount, so
|
| 820 |
+
agent never sees these.
|
| 821 |
+
2. ``PROGRAMGYM_BLOB_DIR`` env override pointing at an HF-cache-shaped
|
| 822 |
+
tree on disk (``<dir>/<instance_id>/tests/<branch>.tar.gz``). Useful
|
| 823 |
+
for offline reruns sharing a cache across many tasks.
|
| 824 |
+
3. ``huggingface_hub.snapshot_download`` from
|
| 825 |
+
``programgym/ProgramGym-Tests`` (default repo, ``main`` revision).
|
| 826 |
+
|
| 827 |
+
The returned directory contains ``tests/<branch>.tar.gz`` per active
|
| 828 |
+
branch — same shape as ``programgym/ProgramGym-Tests/<instance_id>/``
|
| 829 |
+
on HF.
|
| 830 |
+
"""
|
| 831 |
+
if BAKED_BLOB_DIR.exists() and (BAKED_BLOB_DIR / "tests").exists():
|
| 832 |
+
return BAKED_BLOB_DIR
|
| 833 |
+
|
| 834 |
+
local = os.environ.get("PROGRAMGYM_BLOB_DIR", "").strip()
|
| 835 |
+
if local:
|
| 836 |
+
candidate = Path(local) / instance_id
|
| 837 |
+
if candidate.exists():
|
| 838 |
+
return candidate
|
| 839 |
+
raise FileNotFoundError(
|
| 840 |
+
f"PROGRAMGYM_BLOB_DIR set but {candidate} does not exist"
|
| 841 |
+
)
|
| 842 |
+
|
| 843 |
+
repo_id = os.environ.get("PROGRAMGYM_HF_REPO") or metadata.get(
|
| 844 |
+
"hf_repo_id", DEFAULT_HF_REPO_ID
|
| 845 |
+
)
|
| 846 |
+
revision = os.environ.get("PROGRAMGYM_HF_REVISION") or metadata.get(
|
| 847 |
+
"hf_revision", DEFAULT_HF_REVISION
|
| 848 |
+
)
|
| 849 |
+
|
| 850 |
+
from huggingface_hub import snapshot_download
|
| 851 |
+
|
| 852 |
+
cache_root = Path(
|
| 853 |
+
snapshot_download(
|
| 854 |
+
repo_id,
|
| 855 |
+
repo_type="dataset",
|
| 856 |
+
revision=revision,
|
| 857 |
+
allow_patterns=f"{instance_id}/**",
|
| 858 |
+
)
|
| 859 |
+
)
|
| 860 |
+
blob_dir = cache_root / instance_id
|
| 861 |
+
if not blob_dir.exists():
|
| 862 |
+
raise FileNotFoundError(
|
| 863 |
+
f"HF blob directory missing for {instance_id} at {blob_dir}"
|
| 864 |
+
)
|
| 865 |
+
return blob_dir
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
def evaluate(metadata: dict[str, Any]) -> dict[str, Any]:
|
| 869 |
+
bootstrap_toolchain_path()
|
| 870 |
+
branches = metadata.get("branches", {})
|
| 871 |
+
active_branch_items = [
|
| 872 |
+
(name, info) for name, info in branches.items() if not info.get("ignored")
|
| 873 |
+
]
|
| 874 |
+
result: dict[str, Any] = {
|
| 875 |
+
"test_results": [],
|
| 876 |
+
"error_code": None,
|
| 877 |
+
"error_details": None,
|
| 878 |
+
"log": [],
|
| 879 |
+
"solution_branch": "submission",
|
| 880 |
+
"test_branches": [name for name, _ in active_branch_items],
|
| 881 |
+
"test_branch_errors": {},
|
| 882 |
+
"executable_hash": None,
|
| 883 |
+
"warnings": [],
|
| 884 |
+
}
|
| 885 |
+
|
| 886 |
+
instance_id = metadata["instance_id"]
|
| 887 |
+
|
| 888 |
+
compile_timeout = int(os.environ.get("PROGRAMGYM_COMPILE_TIMEOUT", "900"))
|
| 889 |
+
branch_timeout = int(os.environ.get("PROGRAMGYM_BRANCH_TIMEOUT", "3600"))
|
| 890 |
+
|
| 891 |
+
def fail_all(error_code: str, details: str) -> dict[str, Any]:
|
| 892 |
+
result["error_code"] = error_code
|
| 893 |
+
result["error_details"] = details
|
| 894 |
+
for branch, info in active_branch_items:
|
| 895 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 896 |
+
return result
|
| 897 |
+
|
| 898 |
+
with tempfile.TemporaryDirectory(prefix="programgym-eval-") as tmp:
|
| 899 |
+
compiled_snapshot = Path(tmp) / "compiled"
|
| 900 |
+
|
| 901 |
+
started = time.monotonic()
|
| 902 |
+
removed = remove_hashed_files(
|
| 903 |
+
WORKSPACE, set(metadata.get("eval_clean_hashes", []))
|
| 904 |
+
)
|
| 905 |
+
result["log"].append(
|
| 906 |
+
{
|
| 907 |
+
"step": "remove_hashed_files",
|
| 908 |
+
"command": "remove files matching eval_clean_hashes",
|
| 909 |
+
"wall_time": time.monotonic() - started,
|
| 910 |
+
"output": "".join(f"removed '{path}'\n" for path in removed),
|
| 911 |
+
"returncode": 0,
|
| 912 |
+
"exception_info": "",
|
| 913 |
+
}
|
| 914 |
+
)
|
| 915 |
+
|
| 916 |
+
compile_sh = WORKSPACE / "compile.sh"
|
| 917 |
+
if not compile_sh.exists():
|
| 918 |
+
return fail_all(
|
| 919 |
+
"missing_compile_sh", "submission did not contain compile.sh"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
seed = (
|
| 923 |
+
"if [ ! -d .git ]; then "
|
| 924 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 925 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 926 |
+
"git -c init.defaultBranch=gold init -q && "
|
| 927 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false add -A && "
|
| 928 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 929 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 930 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false commit -q --allow-empty -m gold; "
|
| 931 |
+
"fi"
|
| 932 |
+
)
|
| 933 |
+
try:
|
| 934 |
+
result["log"].append(
|
| 935 |
+
run_step(seed, WORKSPACE, timeout=300, step="seed_git")
|
| 936 |
+
)
|
| 937 |
+
compile_log = run_step(
|
| 938 |
+
"chmod +x ./compile.sh && ./compile.sh",
|
| 939 |
+
WORKSPACE,
|
| 940 |
+
timeout=compile_timeout,
|
| 941 |
+
step="compile",
|
| 942 |
+
accept_failure=True,
|
| 943 |
+
)
|
| 944 |
+
result["log"].append(compile_log)
|
| 945 |
+
if compile_log["returncode"]:
|
| 946 |
+
return fail_all("compile_failed", compile_log["output"])
|
| 947 |
+
executable = WORKSPACE / "executable"
|
| 948 |
+
if not executable.exists():
|
| 949 |
+
return fail_all(
|
| 950 |
+
"missing_executable",
|
| 951 |
+
"compile.sh completed but did not create ./executable",
|
| 952 |
+
)
|
| 953 |
+
STASHED_EXECUTABLE.parent.mkdir(parents=True, exist_ok=True)
|
| 954 |
+
# `move` (not copy) so /workspace doesn't keep a parallel copy of
|
| 955 |
+
# the agent's executable during the stash→restore window. Mirrors
|
| 956 |
+
# upstream `mv ./executable {STASHED}` (eval.py:472).
|
| 957 |
+
shutil.move(str(executable), STASHED_EXECUTABLE)
|
| 958 |
+
result["executable_hash"] = sha256(STASHED_EXECUTABLE)
|
| 959 |
+
result["log"].append(
|
| 960 |
+
run_step(
|
| 961 |
+
"pip3 install -q --disable-pip-version-check pytest-rerunfailures",
|
| 962 |
+
WORKSPACE,
|
| 963 |
+
timeout=120,
|
| 964 |
+
step="install_rerunfailures",
|
| 965 |
+
accept_failure=True,
|
| 966 |
+
)
|
| 967 |
+
)
|
| 968 |
+
has_rerunfailures = result["log"][-1]["returncode"] == 0
|
| 969 |
+
handoff_removed = remove_oracle_handoff_artifacts()
|
| 970 |
+
if handoff_removed:
|
| 971 |
+
result["log"].append(
|
| 972 |
+
{
|
| 973 |
+
"step": "remove_oracle_handoff",
|
| 974 |
+
"command": "remove oracle handoff artifacts from workspace",
|
| 975 |
+
"wall_time": 0.0,
|
| 976 |
+
"output": "".join(
|
| 977 |
+
f"removed '{name}'\n" for name in handoff_removed
|
| 978 |
+
),
|
| 979 |
+
"returncode": 0,
|
| 980 |
+
"exception_info": "",
|
| 981 |
+
}
|
| 982 |
+
)
|
| 983 |
+
snapshot_workspace(compiled_snapshot)
|
| 984 |
+
except Exception as exc:
|
| 985 |
+
return fail_all(type(exc).__name__, str(exc))
|
| 986 |
+
|
| 987 |
+
try:
|
| 988 |
+
blob_dir = resolve_blob_dir(instance_id, metadata)
|
| 989 |
+
except Exception as exc:
|
| 990 |
+
details = f"{type(exc).__name__}: {exc}"
|
| 991 |
+
for branch, info in active_branch_items:
|
| 992 |
+
result["test_branch_errors"][branch] = [
|
| 993 |
+
{
|
| 994 |
+
"error_code": "blob_resolution_failed",
|
| 995 |
+
"error_details": details,
|
| 996 |
+
}
|
| 997 |
+
]
|
| 998 |
+
inject_not_run(
|
| 999 |
+
result, branch, branch_tests(info), "blob_resolution_failed"
|
| 1000 |
+
)
|
| 1001 |
+
return result
|
| 1002 |
+
|
| 1003 |
+
for branch, info in active_branch_items:
|
| 1004 |
+
tests = branch_tests(info)
|
| 1005 |
+
blob = blob_dir / "tests" / f"{branch}.tar.gz"
|
| 1006 |
+
if not blob.exists():
|
| 1007 |
+
result["test_branch_errors"][branch] = [
|
| 1008 |
+
{"error_code": "missing_test_blob", "error_details": blob.name}
|
| 1009 |
+
]
|
| 1010 |
+
inject_not_run(result, branch, tests, "missing_test_blob")
|
| 1011 |
+
continue
|
| 1012 |
+
|
| 1013 |
+
best_xml = ""
|
| 1014 |
+
# Prefer a complete, clean XML result, then the result covering the
|
| 1015 |
+
# most expected tests, and only then the one with the most passes.
|
| 1016 |
+
# Pass-count-only ranking can retain a partial xdist result over a
|
| 1017 |
+
# complete serial result.
|
| 1018 |
+
best_quality = (-1, -1, -1)
|
| 1019 |
+
serial = bool(metadata.get("force_serial_branches"))
|
| 1020 |
+
branch_log: list[dict[str, Any]] = []
|
| 1021 |
+
branch_ignored = {
|
| 1022 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 1023 |
+
}
|
| 1024 |
+
n_expected = len([name for name in tests if name not in branch_ignored])
|
| 1025 |
+
|
| 1026 |
+
def merge_best_xml(raw_xml: str) -> None:
|
| 1027 |
+
try:
|
| 1028 |
+
parsed, warnings = parse_junit(
|
| 1029 |
+
raw_xml, branch, list(info.get("tests", [])), branch_ignored
|
| 1030 |
+
)
|
| 1031 |
+
except Exception as exc:
|
| 1032 |
+
result["test_branch_errors"][branch] = [
|
| 1033 |
+
{"error_code": "xml_parse_error", "error_details": str(exc)}
|
| 1034 |
+
]
|
| 1035 |
+
inject_not_run(result, branch, tests, "xml_parse_error")
|
| 1036 |
+
else:
|
| 1037 |
+
result["test_results"].extend(parsed)
|
| 1038 |
+
result["warnings"].extend(warnings)
|
| 1039 |
+
|
| 1040 |
+
while True:
|
| 1041 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1042 |
+
restore_workspace(compiled_snapshot)
|
| 1043 |
+
extract_trusted_blob(blob, WORKSPACE)
|
| 1044 |
+
restore_reference_executable()
|
| 1045 |
+
actual_hash = sha256(WORKSPACE / "executable")
|
| 1046 |
+
if actual_hash != result["executable_hash"]:
|
| 1047 |
+
result["test_branch_errors"][branch] = [
|
| 1048 |
+
{
|
| 1049 |
+
"error_code": "executable_hash_mismatch",
|
| 1050 |
+
"error_details": (
|
| 1051 |
+
f"expected {result['executable_hash']}, got {actual_hash}"
|
| 1052 |
+
),
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
inject_not_run(result, branch, tests, "executable_hash_mismatch")
|
| 1056 |
+
break
|
| 1057 |
+
run_sh = WORKSPACE / "eval" / "run.sh"
|
| 1058 |
+
if not run_sh.exists():
|
| 1059 |
+
result["test_branch_errors"][branch] = [
|
| 1060 |
+
{
|
| 1061 |
+
"error_code": "missing_run_sh",
|
| 1062 |
+
"error_details": "eval/run.sh missing",
|
| 1063 |
+
}
|
| 1064 |
+
]
|
| 1065 |
+
inject_not_run(result, branch, tests, "missing_run_sh")
|
| 1066 |
+
break
|
| 1067 |
+
# Upstream rewrites thread→signal so xdist workers fail cleanly
|
| 1068 |
+
# instead of os._exit(1) on timeout. That works in fresh
|
| 1069 |
+
# containers per branch; here we reuse one container and
|
| 1070 |
+
# signal timeouts leave TUI/log-watcher subprocesses alive
|
| 1071 |
+
# (e.g. lazygit --logs + tail -f), wedging pytest for up to
|
| 1072 |
+
# branch_timeout. Keep the blob's thread method and rely on
|
| 1073 |
+
# cleanup_lingering_processes + serial fallback after crashes.
|
| 1074 |
+
env = branch_env(
|
| 1075 |
+
serial=serial,
|
| 1076 |
+
has_rerunfailures=has_rerunfailures,
|
| 1077 |
+
extras=metadata.get("branch_env"),
|
| 1078 |
+
)
|
| 1079 |
+
branch_log.append(
|
| 1080 |
+
run_step(
|
| 1081 |
+
"rm -f eval/results.xml results.xml",
|
| 1082 |
+
WORKSPACE,
|
| 1083 |
+
timeout=120,
|
| 1084 |
+
step="clean_stale_results",
|
| 1085 |
+
accept_failure=True,
|
| 1086 |
+
)
|
| 1087 |
+
)
|
| 1088 |
+
if serial:
|
| 1089 |
+
prepare_serial_run_sh(run_sh)
|
| 1090 |
+
run_entry = run_step(
|
| 1091 |
+
run_tests_command(serial=serial),
|
| 1092 |
+
WORKSPACE,
|
| 1093 |
+
timeout=branch_timeout,
|
| 1094 |
+
env=env,
|
| 1095 |
+
step="run_tests",
|
| 1096 |
+
accept_failure=True,
|
| 1097 |
+
)
|
| 1098 |
+
branch_log.append(run_entry)
|
| 1099 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1100 |
+
xml_path = find_results_xml()
|
| 1101 |
+
if xml_path is None:
|
| 1102 |
+
if best_xml:
|
| 1103 |
+
merge_best_xml(best_xml)
|
| 1104 |
+
break
|
| 1105 |
+
if serial:
|
| 1106 |
+
result["test_branch_errors"][branch] = [
|
| 1107 |
+
{
|
| 1108 |
+
"error_code": "missing_results_xml",
|
| 1109 |
+
"error_details": "eval/results.xml was not produced",
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
inject_not_run(result, branch, tests, "missing_results_xml")
|
| 1113 |
+
break
|
| 1114 |
+
serial = True
|
| 1115 |
+
continue
|
| 1116 |
+
raw_xml = xml_path.read_text(errors="replace")
|
| 1117 |
+
crashes, n_tests, failures, missing = branch_attempt_metrics(
|
| 1118 |
+
raw_xml,
|
| 1119 |
+
run_output=run_entry.get("output", ""),
|
| 1120 |
+
expected_tests=n_expected,
|
| 1121 |
+
)
|
| 1122 |
+
useful = count_junit_passed(raw_xml)
|
| 1123 |
+
quality = (
|
| 1124 |
+
int(crashes == 0 and missing == 0),
|
| 1125 |
+
n_tests,
|
| 1126 |
+
useful,
|
| 1127 |
+
)
|
| 1128 |
+
if quality > best_quality:
|
| 1129 |
+
best_xml = raw_xml
|
| 1130 |
+
best_quality = quality
|
| 1131 |
+
retry = needs_serial_retry(
|
| 1132 |
+
serial=serial,
|
| 1133 |
+
crashes=crashes,
|
| 1134 |
+
missing=missing,
|
| 1135 |
+
failures=failures,
|
| 1136 |
+
n_tests=n_tests,
|
| 1137 |
+
expected_tests=n_expected,
|
| 1138 |
+
run_output=run_entry.get("output", ""),
|
| 1139 |
+
)
|
| 1140 |
+
if not retry:
|
| 1141 |
+
merge_best_xml(best_xml)
|
| 1142 |
+
break
|
| 1143 |
+
serial = True
|
| 1144 |
+
for entry in branch_log:
|
| 1145 |
+
entry["branch"] = branch
|
| 1146 |
+
result["log"].extend(branch_log)
|
| 1147 |
+
|
| 1148 |
+
return result
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
def write_outputs(result: dict[str, Any], metadata: dict[str, Any]) -> None:
|
| 1152 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1153 |
+
write_json(LOG_DIR / "programgym_eval.json", result)
|
| 1154 |
+
write_json(LOG_DIR / "harbor_diagnostics.json", diagnostics(result, metadata))
|
| 1155 |
+
rewards = summarize(result, metadata)
|
| 1156 |
+
write_json(LOG_DIR / "reward.json", rewards)
|
| 1157 |
+
(LOG_DIR / "reward.txt").write_text(str(rewards["reward"]))
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
def main() -> None:
|
| 1161 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1162 |
+
log_path = LOG_DIR / "programgym_eval.log"
|
| 1163 |
+
metadata = json.loads(METADATA_PATH.read_text())
|
| 1164 |
+
branches = metadata.get("branches", {})
|
| 1165 |
+
try:
|
| 1166 |
+
result = evaluate(metadata)
|
| 1167 |
+
except Exception as exc:
|
| 1168 |
+
error_code = type(exc).__name__
|
| 1169 |
+
result = {
|
| 1170 |
+
"test_results": [],
|
| 1171 |
+
"error_code": error_code,
|
| 1172 |
+
"error_details": str(exc),
|
| 1173 |
+
"log": [
|
| 1174 |
+
{
|
| 1175 |
+
"step": "evaluator_exception",
|
| 1176 |
+
"exception_info": traceback.format_exc(),
|
| 1177 |
+
"returncode": 1,
|
| 1178 |
+
}
|
| 1179 |
+
],
|
| 1180 |
+
"solution_branch": "submission",
|
| 1181 |
+
"test_branches": [
|
| 1182 |
+
name for name, info in branches.items() if not info.get("ignored")
|
| 1183 |
+
],
|
| 1184 |
+
"test_branch_errors": {
|
| 1185 |
+
"__evaluator__": [{"error_code": error_code, "error_details": str(exc)}]
|
| 1186 |
+
},
|
| 1187 |
+
"executable_hash": None,
|
| 1188 |
+
"warnings": [],
|
| 1189 |
+
}
|
| 1190 |
+
for branch, info in branches.items():
|
| 1191 |
+
if info.get("ignored"):
|
| 1192 |
+
continue
|
| 1193 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 1194 |
+
log_path.write_text(traceback.format_exc())
|
| 1195 |
+
else:
|
| 1196 |
+
log_path.write_text("")
|
| 1197 |
+
write_outputs(result, metadata)
|
| 1198 |
+
|
| 1199 |
+
|
| 1200 |
+
if __name__ == "__main__":
|
| 1201 |
+
main()
|
orhun--pkgtop.c41e785/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [],
|
| 7 |
+
"tests": [
|
| 8 |
+
"eval.tests.test_cli.test_help_beats_version_when_both_given",
|
| 9 |
+
"eval.tests.test_cli.test_help_prints_full_usage[double_dash_help]",
|
| 10 |
+
"eval.tests.test_cli.test_help_prints_full_usage[long_help]",
|
| 11 |
+
"eval.tests.test_cli.test_help_prints_full_usage[short_h]",
|
| 12 |
+
"eval.tests.test_cli.test_missing_flag_value_reports_needs_argument[color]",
|
| 13 |
+
"eval.tests.test_cli.test_missing_flag_value_reports_needs_argument[distro]",
|
| 14 |
+
"eval.tests.test_cli.test_missing_flag_value_reports_needs_argument[pacman_backend]",
|
| 15 |
+
"eval.tests.test_cli.test_tui_init_fails_without_terminal[explicit_distro]",
|
| 16 |
+
"eval.tests.test_cli.test_tui_init_fails_without_terminal[no_args]",
|
| 17 |
+
"eval.tests.test_cli.test_tui_init_fails_without_terminal[unknown_distro]",
|
| 18 |
+
"eval.tests.test_cli.test_tui_init_fails_without_terminal[version_false]",
|
| 19 |
+
"eval.tests.test_cli.test_unknown_flag_reports_undefined[long_color]",
|
| 20 |
+
"eval.tests.test_cli.test_unknown_flag_reports_undefined[long_version]",
|
| 21 |
+
"eval.tests.test_cli.test_unknown_flag_reports_undefined[prefix_pac]",
|
| 22 |
+
"eval.tests.test_cli.test_unknown_flag_reports_undefined[unknown_short]",
|
| 23 |
+
"eval.tests.test_cli.test_unknown_flag_reports_undefined[unknown_x]",
|
| 24 |
+
"eval.tests.test_cli.test_unsupported_color_fails_with_message[compound]",
|
| 25 |
+
"eval.tests.test_cli.test_unsupported_color_fails_with_message[empty]",
|
| 26 |
+
"eval.tests.test_cli.test_unsupported_color_fails_with_message[numeric]",
|
| 27 |
+
"eval.tests.test_cli.test_unsupported_color_fails_with_message[trailing_space]",
|
| 28 |
+
"eval.tests.test_cli.test_unsupported_color_fails_with_message[word]",
|
| 29 |
+
"eval.tests.test_cli.test_uppercase_color_accepted",
|
| 30 |
+
"eval.tests.test_cli.test_valid_color_with_version[blue]",
|
| 31 |
+
"eval.tests.test_cli.test_valid_color_with_version[cyan]",
|
| 32 |
+
"eval.tests.test_cli.test_valid_color_with_version[green]",
|
| 33 |
+
"eval.tests.test_cli.test_valid_color_with_version[magenta]",
|
| 34 |
+
"eval.tests.test_cli.test_valid_color_with_version[red]",
|
| 35 |
+
"eval.tests.test_cli.test_valid_color_with_version[white]",
|
| 36 |
+
"eval.tests.test_cli.test_valid_color_with_version[yellow]",
|
| 37 |
+
"eval.tests.test_cli.test_version_flag_prints_version[all_flags_combined]",
|
| 38 |
+
"eval.tests.test_cli.test_version_flag_prints_version[doubled_flag]",
|
| 39 |
+
"eval.tests.test_cli.test_version_flag_prints_version[equals_true]",
|
| 40 |
+
"eval.tests.test_cli.test_version_flag_prints_version[positional_ignored]",
|
| 41 |
+
"eval.tests.test_cli.test_version_flag_prints_version[short_version]",
|
| 42 |
+
"eval.tests.test_cli.test_version_flag_prints_version[with_sort_reverse]",
|
| 43 |
+
"eval.tests.test_tui.test_arch_distro_renders_header_only",
|
| 44 |
+
"eval.tests.test_tui.test_disk_usage_gauges_rendered",
|
| 45 |
+
"eval.tests.test_tui.test_enter_toggles_package_info_then_exit",
|
| 46 |
+
"eval.tests.test_tui.test_exit_keys_quit_cleanly[ctrl_c]",
|
| 47 |
+
"eval.tests.test_tui.test_exit_keys_quit_cleanly[ctrl_d]",
|
| 48 |
+
"eval.tests.test_tui.test_exit_keys_quit_cleanly[escape]",
|
| 49 |
+
"eval.tests.test_tui.test_exit_keys_quit_cleanly[q_key]",
|
| 50 |
+
"eval.tests.test_tui.test_help_screen_lists_key_actions",
|
| 51 |
+
"eval.tests.test_tui.test_os_info_rendered_from_uname",
|
| 52 |
+
"eval.tests.test_tui.test_package_list_renders_columns[auto_os_detect]",
|
| 53 |
+
"eval.tests.test_tui.test_package_list_renders_columns[explicit_debian]",
|
| 54 |
+
"eval.tests.test_tui.test_package_list_renders_columns[explicit_mint]",
|
| 55 |
+
"eval.tests.test_tui.test_package_list_renders_columns[explicit_ubuntu]",
|
| 56 |
+
"eval.tests.test_tui.test_pacman_backend_flag_render",
|
| 57 |
+
"eval.tests.test_tui.test_scroll_command_list_then_exit",
|
| 58 |
+
"eval.tests.test_tui.test_scroll_packages_then_exit",
|
| 59 |
+
"eval.tests.test_tui.test_sort_and_reverse_flags_render",
|
| 60 |
+
"eval.tests.test_tui.test_unknown_distro_fails_with_hint"
|
| 61 |
+
]
|
| 62 |
+
},
|
| 63 |
+
"generated_module_02": {
|
| 64 |
+
"ignore_reason": "",
|
| 65 |
+
"ignored": false,
|
| 66 |
+
"ignored_tests": [],
|
| 67 |
+
"tests": [
|
| 68 |
+
"eval.tests.test_color_validation.test_default_color_is_valid_blue",
|
| 69 |
+
"eval.tests.test_color_validation.test_first_valid_color_does_not_mask_second_missing_value",
|
| 70 |
+
"eval.tests.test_color_validation.test_invalid_color_message_on_stdout_only",
|
| 71 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[-1]",
|
| 72 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[0xdead]",
|
| 73 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[BLUE-suboptimal]",
|
| 74 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[]",
|
| 75 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[blu]",
|
| 76 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[grayz]",
|
| 77 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[nocolor]",
|
| 78 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[notacolor]",
|
| 79 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[red blue]",
|
| 80 |
+
"eval.tests.test_color_validation.test_invalid_color_rejected[redd]",
|
| 81 |
+
"eval.tests.test_color_validation.test_valid_color_case_sensitive",
|
| 82 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[black]",
|
| 83 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[blue]",
|
| 84 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[cyan]",
|
| 85 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[green]",
|
| 86 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[magenta]",
|
| 87 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[red]",
|
| 88 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[white]",
|
| 89 |
+
"eval.tests.test_color_validation.test_valid_color_passes_to_termui_init[yellow]",
|
| 90 |
+
"eval.tests.test_distro_validation.test_arch_group_enters_event_loop",
|
| 91 |
+
"eval.tests.test_distro_validation.test_debian_alias_enters_event_loop",
|
| 92 |
+
"eval.tests.test_distro_validation.test_endeavouros_alias_maps_to_arch_group",
|
| 93 |
+
"eval.tests.test_distro_validation.test_manjaro_alias_maps_to_arch_group",
|
| 94 |
+
"eval.tests.test_distro_validation.test_mint_alias_enters_event_loop",
|
| 95 |
+
"eval.tests.test_distro_validation.test_ubuntu_supported_distro_enters_event_loop",
|
| 96 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_fatals_naming_supported[distro99]",
|
| 97 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_fatals_naming_supported[freebsd]",
|
| 98 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_fatals_naming_supported[macos]",
|
| 99 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_fatals_naming_supported[nixoo]",
|
| 100 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_fatals_naming_supported[solaris]",
|
| 101 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_fatals_naming_supported[unknown]",
|
| 102 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_fatals_naming_supported[zzz]",
|
| 103 |
+
"eval.tests.test_distro_validation.test_unsupported_distro_stays_in_render_no_color_error",
|
| 104 |
+
"eval.tests.test_distro_validation.test_uppercase_distro_id_is_normalised",
|
| 105 |
+
"eval.tests.test_distro_validation.test_whitespace_padded_supported_distro_is_normalised",
|
| 106 |
+
"eval.tests.test_tui_modes.test_default_pacman_backend_is_pacman",
|
| 107 |
+
"eval.tests.test_tui_modes.test_help_screen_lists_copy_package_binding",
|
| 108 |
+
"eval.tests.test_tui_modes.test_help_screen_reached_via_question_key",
|
| 109 |
+
"eval.tests.test_tui_modes.test_pacman_backend_not_applied_to_debian_group",
|
| 110 |
+
"eval.tests.test_tui_modes.test_pacman_backend_substituted_in_arch_command[aurman]",
|
| 111 |
+
"eval.tests.test_tui_modes.test_pacman_backend_substituted_in_arch_command[pamac]",
|
| 112 |
+
"eval.tests.test_tui_modes.test_pacman_backend_substituted_in_arch_command[paru]",
|
| 113 |
+
"eval.tests.test_tui_modes.test_pacman_backend_substituted_in_arch_command[yay]",
|
| 114 |
+
"eval.tests.test_tui_modes.test_reverse_flag_changes_lead_package",
|
| 115 |
+
"eval.tests.test_tui_modes.test_reverse_flag_diffs_from_sort_flag",
|
| 116 |
+
"eval.tests.test_tui_modes.test_sort_flag_leads_with_alphabetically_smallest",
|
| 117 |
+
"eval.tests.test_tui_modes.test_sort_then_reverse_leads_with_alphabetically_largest",
|
| 118 |
+
"eval.tests.test_tui_render.test_df_gauge_percent_is_digit",
|
| 119 |
+
"eval.tests.test_tui_render.test_df_gauge_title_format_uses_tilde_and_mount",
|
| 120 |
+
"eval.tests.test_tui_render.test_df_gauge_used_size_pairs_are_populated",
|
| 121 |
+
"eval.tests.test_tui_render.test_df_root_mount_is_bracketed",
|
| 122 |
+
"eval.tests.test_tui_render.test_executed_command_row_shows_package_query",
|
| 123 |
+
"eval.tests.test_tui_render.test_exit_keys_leave_cleanly[Q]",
|
| 124 |
+
"eval.tests.test_tui_render.test_exit_keys_leave_cleanly[\\x03]",
|
| 125 |
+
"eval.tests.test_tui_render.test_exit_keys_leave_cleanly[\\x04]",
|
| 126 |
+
"eval.tests.test_tui_render.test_exit_keys_leave_cleanly[\\x1b]",
|
| 127 |
+
"eval.tests.test_tui_render.test_exit_keys_leave_cleanly[q]",
|
| 128 |
+
"eval.tests.test_tui_render.test_full_render_has_no_fatal_diagnostic",
|
| 129 |
+
"eval.tests.test_tui_render.test_humanized_byte_sizes_present",
|
| 130 |
+
"eval.tests.test_tui_render.test_package_column_titles_rendered",
|
| 131 |
+
"eval.tests.test_tui_render.test_package_rows_populated_from_dpkg",
|
| 132 |
+
"eval.tests.test_tui_render.test_project_banner_rendered",
|
| 133 |
+
"eval.tests.test_tui_render.test_repeated_q_is_idempotent",
|
| 134 |
+
"eval.tests.test_tui_render.test_scroll_counter_title_updates",
|
| 135 |
+
"eval.tests.test_tui_render.test_sysinfo_hostname_field_is_real_value",
|
| 136 |
+
"eval.tests.test_tui_render.test_sysinfo_uname_fields_rendered",
|
| 137 |
+
"eval.tests.test_version_help.test_extra_positional_args_do_not_break_version",
|
| 138 |
+
"eval.tests.test_version_help.test_help_documents_every_registered_flag",
|
| 139 |
+
"eval.tests.test_version_help.test_help_goes_to_stderr_not_stdout",
|
| 140 |
+
"eval.tests.test_version_help.test_help_renders_usage[--help]",
|
| 141 |
+
"eval.tests.test_version_help.test_help_renders_usage[-h]",
|
| 142 |
+
"eval.tests.test_version_help.test_help_renders_usage[-help]",
|
| 143 |
+
"eval.tests.test_version_help.test_invalid_boolean_value_for_bool_flag",
|
| 144 |
+
"eval.tests.test_version_help.test_missing_value_for_color_flag",
|
| 145 |
+
"eval.tests.test_version_help.test_missing_value_for_distro_flag",
|
| 146 |
+
"eval.tests.test_version_help.test_undefined_flag_exits_2[--bogus]",
|
| 147 |
+
"eval.tests.test_version_help.test_undefined_flag_exits_2[--color]",
|
| 148 |
+
"eval.tests.test_version_help.test_undefined_flag_exits_2[--nope=1]",
|
| 149 |
+
"eval.tests.test_version_help.test_undefined_flag_exits_2[-abogus]",
|
| 150 |
+
"eval.tests.test_version_help.test_undefined_flag_exits_2[-z]",
|
| 151 |
+
"eval.tests.test_version_help.test_version_banner_exact[--v]",
|
| 152 |
+
"eval.tests.test_version_help.test_version_banner_exact[-v=1]",
|
| 153 |
+
"eval.tests.test_version_help.test_version_banner_exact[-v=true]",
|
| 154 |
+
"eval.tests.test_version_help.test_version_banner_exact[-v]",
|
| 155 |
+
"eval.tests.test_version_help.test_version_banner_matches_semver",
|
| 156 |
+
"eval.tests.test_version_help.test_version_short_circuits_bad_color",
|
| 157 |
+
"eval.tests.test_version_help.test_version_short_circuits_tui_start"
|
| 158 |
+
]
|
| 159 |
+
}
|
| 160 |
+
},
|
| 161 |
+
"commit": "c41e78537542a36b6ab62251d24de15c3793a2a8",
|
| 162 |
+
"data_source": "synthetic_programgym",
|
| 163 |
+
"difficulty": "easy",
|
| 164 |
+
"difficulty_score": 1.673113104238234,
|
| 165 |
+
"eval_clean_hashes": [
|
| 166 |
+
"e14bd184de80171eee662f197fd3aa816489de4d88ab38c9c50ee7aa032c277a"
|
| 167 |
+
],
|
| 168 |
+
"input_record": {
|
| 169 |
+
"commit": "c41e78537542a36b6ab62251d24de15c3793a2a8",
|
| 170 |
+
"commits": 417,
|
| 171 |
+
"contributors": 9,
|
| 172 |
+
"difficulty": "easy",
|
| 173 |
+
"difficulty_code_lines": 673,
|
| 174 |
+
"difficulty_has_tests": false,
|
| 175 |
+
"difficulty_product_code_lines": 673,
|
| 176 |
+
"difficulty_runtime_deps": 6,
|
| 177 |
+
"difficulty_score": 1.673113104238234,
|
| 178 |
+
"difficulty_test_code_lines": 67,
|
| 179 |
+
"full_name": "orhun/pkgtop",
|
| 180 |
+
"github_stars": 346,
|
| 181 |
+
"input_joern_zip": "go_joern/orhun__pkgtop.zip",
|
| 182 |
+
"joern_status": true,
|
| 183 |
+
"joern_time": 7.583050379063934,
|
| 184 |
+
"language": "go",
|
| 185 |
+
"pb_match": [
|
| 186 |
+
{
|
| 187 |
+
"pb_fullname": "antonmedv/walk",
|
| 188 |
+
"rank": 107,
|
| 189 |
+
"similarity": 0.5563536286354065
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"pb_fullname": "peco/peco",
|
| 193 |
+
"rank": 86,
|
| 194 |
+
"similarity": 0.5498165488243103
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"pb_fullname": "mikefarah/yq",
|
| 198 |
+
"rank": 909,
|
| 199 |
+
"similarity": 0.5077672004699707
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"pb_fullname": "johnkerl/miller",
|
| 203 |
+
"rank": 604,
|
| 204 |
+
"similarity": 0.47418418526649475
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"pb_fullname": "guumaster/hostctl",
|
| 208 |
+
"rank": 156,
|
| 209 |
+
"similarity": 0.4946421980857849
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"pb_fullname": "direnv/direnv",
|
| 213 |
+
"rank": 129,
|
| 214 |
+
"similarity": 0.46874964237213135
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"pb_fullname": "JohannesKaufmann/html-to-markdown",
|
| 218 |
+
"rank": 574,
|
| 219 |
+
"similarity": 0.4841079115867615
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"pb_fullname": "alecthomas/chroma",
|
| 223 |
+
"rank": 312,
|
| 224 |
+
"similarity": 0.5070496797561646
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"pb_fullname": "gabotechs/dep-tree",
|
| 228 |
+
"rank": 263,
|
| 229 |
+
"similarity": 0.5416624546051025
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"pb_fullname": "jesseduffield/lazygit",
|
| 233 |
+
"rank": 159,
|
| 234 |
+
"similarity": 0.5833232998847961
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"pb_fullname": "FiloSottile/age",
|
| 238 |
+
"rank": 826,
|
| 239 |
+
"similarity": 0.45389246940612793
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"pb_fullname": "boyter/scc",
|
| 243 |
+
"rank": 274,
|
| 244 |
+
"similarity": 0.5381957292556763
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"pb_fullname": "rs/jplot",
|
| 248 |
+
"rank": 524,
|
| 249 |
+
"similarity": 0.5020490288734436
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"pb_fullname": "naggie/dstask",
|
| 253 |
+
"rank": 189,
|
| 254 |
+
"similarity": 0.5364949703216553
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"pb_fullname": "astaxie/bat",
|
| 258 |
+
"rank": 700,
|
| 259 |
+
"similarity": 0.5265482068061829
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"pb_fullname": "noborus/ov",
|
| 263 |
+
"rank": 81,
|
| 264 |
+
"similarity": 0.5855653285980225
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"pb_fullname": "sibprogrammer/xq",
|
| 268 |
+
"rank": 216,
|
| 269 |
+
"similarity": 0.5225847363471985
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"pb_fullname": "sheepla/pingu",
|
| 273 |
+
"rank": 98,
|
| 274 |
+
"similarity": 0.5444959402084351
|
| 275 |
+
},
|
| 276 |
+
{
|
| 277 |
+
"pb_fullname": "raviqqe/muffet",
|
| 278 |
+
"rank": 263,
|
| 279 |
+
"similarity": 0.51237952709198
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"pb_fullname": "eliukblau/pixterm",
|
| 283 |
+
"rank": 304,
|
| 284 |
+
"similarity": 0.5354799032211304
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"pb_fullname": "TheZoraiz/ascii-image-converter",
|
| 288 |
+
"rank": 507,
|
| 289 |
+
"similarity": 0.48906397819519043
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"pb_fullname": "cheat/cheat",
|
| 293 |
+
"rank": 213,
|
| 294 |
+
"similarity": 0.5496819615364075
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"pb_fullname": "ariga/atlas",
|
| 298 |
+
"rank": 572,
|
| 299 |
+
"similarity": 0.5114861130714417
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"pb_fullname": "psampaz/go-mod-outdated",
|
| 303 |
+
"rank": 319,
|
| 304 |
+
"similarity": 0.4995744228363037
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"pb_fullname": "antonmedv/fx",
|
| 308 |
+
"rank": 171,
|
| 309 |
+
"similarity": 0.5311919450759888
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"pb_fullname": "dundee/gdu",
|
| 313 |
+
"rank": 9,
|
| 314 |
+
"similarity": 0.6277928352355957
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"pb_fullname": "tomnomnom/gron",
|
| 318 |
+
"rank": 759,
|
| 319 |
+
"similarity": 0.478606641292572
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"pb_fullname": "junegunn/fzf",
|
| 323 |
+
"rank": 70,
|
| 324 |
+
"similarity": 0.555743932723999
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"pb_fullname": "zk-org/zk",
|
| 328 |
+
"rank": 273,
|
| 329 |
+
"similarity": 0.5697087645530701
|
| 330 |
+
}
|
| 331 |
+
],
|
| 332 |
+
"repo_age": 7.04,
|
| 333 |
+
"repo_path": "go/orhun__pkgtop",
|
| 334 |
+
"source": "commit:c41e78537542a36b6ab62251d24de15c3793a2a8",
|
| 335 |
+
"status": "done",
|
| 336 |
+
"url": "https://github.com/orhun/pkgtop"
|
| 337 |
+
},
|
| 338 |
+
"instance_id": "orhun__pkgtop.c41e785",
|
| 339 |
+
"language": "go",
|
| 340 |
+
"module_iterations": [
|
| 341 |
+
{
|
| 342 |
+
"actual_iterations": 5,
|
| 343 |
+
"branch_name": "generated_module_01",
|
| 344 |
+
"iteration_limit": 5,
|
| 345 |
+
"module_index": 1,
|
| 346 |
+
"module_kind": "source",
|
| 347 |
+
"termination_reason": "max_iterations"
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"actual_iterations": 5,
|
| 351 |
+
"branch_name": "generated_module_02",
|
| 352 |
+
"iteration_limit": 5,
|
| 353 |
+
"module_index": 2,
|
| 354 |
+
"module_kind": "source",
|
| 355 |
+
"termination_reason": "max_iterations"
|
| 356 |
+
}
|
| 357 |
+
],
|
| 358 |
+
"repository": "orhun/pkgtop"
|
| 359 |
+
}
|
orhun--pkgtop.c41e785/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
|
orhun--pkgtop.c41e785/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e9aee18ea771f26967cbe32b954c5fd580d2ae35bad3dc2ba82204a6c588823
|
| 3 |
+
size 4246
|
orhun--systeroid.810348e/environment/Dockerfile
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM rust:1.97.1-bookworm
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV CARGO_HOME=/usr/local/cargo
|
| 24 |
+
ENV RUSTUP_HOME=/usr/local/rustup
|
| 25 |
+
ENV RUSTUP_TOOLCHAIN=1.97.1
|
| 26 |
+
ENV PROGRAMGYM_RUST_TOOLCHAIN=1.97.1
|
| 27 |
+
ENV PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 28 |
+
ENV PAGER=cat
|
| 29 |
+
ENV MANPAGER=cat
|
| 30 |
+
ENV LESS=-R
|
| 31 |
+
ENV TQDM_DISABLE=1
|
| 32 |
+
RUN apt-get update && apt-get install -y --no-install-recommends apt=2.6.1 bash=5.2.15-2+b13 build-essential=12.9 ca-certificates=20250419~deb12u1 cmake=3.25.1-1 git=1:2.39.5-0+deb12u3 make=4.3-4.1 pkg-config=1.8.1-1 python3=3.11.2-1+b1 python3-pip=23.0.1+dfsg-1 python3-dev=3.11.2-1+b1 autoconf=2.71-3 automake=1:1.16.5-1.3 gettext=0.21-12 file=1:5.44-3 binutils=2.40-2 libtool=2.4.7-7~deb12u1 libncurses-dev=6.4-4 meson=1.0.1-5 ninja-build=1.11.1-2~deb12u1 curl=7.88.1-10+deb12u15 wget=1.21.3-1+deb12u1 xz-utils=5.4.1-1+deb12u1 zstd=1.5.4+dfsg2-5 bzip2=1.0.8-5+b1 zip=3.0-13 unzip=6.0-28+deb12u1 patch=2.7.6-7 grep=3.8-5 python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 33 |
+
RUN rustup component add llvm-tools-preview --toolchain 1.97.1
|
| 34 |
+
RUN RUST_SYSROOT="$(rustc --print sysroot)"; RUST_HOST="$(rustc -vV | sed -n 's/^host: //p')"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-profdata"; test -x "$RUST_SYSROOT/lib/rustlib/$RUST_HOST/bin/llvm-cov"
|
| 35 |
+
RUN rustc --version && cargo --version && rustup show active-toolchain
|
| 36 |
+
WORKDIR /workspace
|
| 37 |
+
ADD workspace.tar.gz /workspace/
|
| 38 |
+
COPY executable /workspace/executable
|
| 39 |
+
COPY download.sh /tmp/programgym-download.sh
|
| 40 |
+
RUN chmod 755 /tmp/programgym-download.sh
|
| 41 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 42 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 43 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 44 |
+
&& rm -f /tmp/programgym-download.sh \
|
| 45 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 46 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 47 |
+
RUN chmod 111 /workspace/executable
|
| 48 |
+
WORKDIR /workspace
|
| 49 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 50 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 51 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 52 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 53 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 54 |
+
RUN mkdir -p /home/agent \
|
| 55 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 56 |
+
&& chown agent:agent /workspace/executable \
|
| 57 |
+
&& chmod 111 /workspace/executable
|
| 58 |
+
ENV HOME=/home/agent
|
| 59 |
+
WORKDIR /workspace
|
orhun--systeroid.810348e/environment/download.sh
ADDED
|
@@ -0,0 +1,1936 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# download.sh — ProgramGym networked dependency-prefetch stage for systeroid.
|
| 4 |
+
#
|
| 5 |
+
# This script is STANDALONE and is run via `source /source_ro/download.sh`.
|
| 6 |
+
# It is intentionally independent of the repository source tree: it generates a
|
| 7 |
+
# temporary Cargo workspace (manifests + the pinned Cargo.lock) from inline data
|
| 8 |
+
# and runs `cargo fetch --locked` against that generated workspace so every crate
|
| 9 |
+
# needed for the offline build of the `systeroid` bin is present in the local
|
| 10 |
+
# Cargo cache. It performs NO build, compile, link, test, or install step.
|
| 11 |
+
#
|
| 12 |
+
# It is source-safe: it only exports environment variables and populates the
|
| 13 |
+
# cargo registry cache. It uses `return 1` in failure branches because it is
|
| 14 |
+
# sourced, never `exit`.
|
| 15 |
+
|
| 16 |
+
set -u
|
| 17 |
+
|
| 18 |
+
# Your cargo registry cache. `cargo fetch` below populates this; build.sh runs
|
| 19 |
+
# fully offline against it. We do NOT set CARGO_TARGET_DIR here: that is a
|
| 20 |
+
# build-time concern that belongs in build.sh and must resolve under the
|
| 21 |
+
# writable /workspace/source working directory, never under the read-only
|
| 22 |
+
# /source_ro mount that this script is sourced from.
|
| 23 |
+
export CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}"
|
| 24 |
+
|
| 25 |
+
# Deterministic directory that will hold the generated, self-contained Cargo
|
| 26 |
+
# workspace (mirror manifests + the pinned Cargo.lock) used only for prefetch.
|
| 27 |
+
WORK="${PROGRAMGYM_PREFETCH_DIR:-$HOME/.systeroid-prefetch}"
|
| 28 |
+
mkdir -p "$WORK"
|
| 29 |
+
|
| 30 |
+
# ---- Generate a standalone Cargo workspace that mirrors the real one (with the
|
| 31 |
+
# ---- exact pinned Cargo.lock) so `cargo fetch --locked` populates a cache that
|
| 32 |
+
# ---- is a superset of what the offline build needs, including target-specific
|
| 33 |
+
# ---- crates (e.g. redox_termios) referenced only in the lockfile.
|
| 34 |
+
mkdir -p "$WORK/systeroid-core/src" "$WORK/systeroid/src" "$WORK/systeroid-tui/src"
|
| 35 |
+
|
| 36 |
+
# Root workspace manifest (generated, standalone).
|
| 37 |
+
cat > "$WORK/Cargo.toml" <<'EOF'
|
| 38 |
+
[workspace]
|
| 39 |
+
members = ["systeroid-core", "systeroid-tui", "systeroid"]
|
| 40 |
+
resolver = "2"
|
| 41 |
+
|
| 42 |
+
[workspace.dependencies]
|
| 43 |
+
parseit = { version = "0.1.2", features = ["gzip"] }
|
| 44 |
+
log = { version = "0.4.28", features = ["std"] }
|
| 45 |
+
thiserror = "1.0.69"
|
| 46 |
+
EOF
|
| 47 |
+
|
| 48 |
+
# Pinned lockfile, embedded verbatim (matches the repository Cargo.lock) so that
|
| 49 |
+
# the fetched crate set is exactly what the offline resolution requires.
|
| 50 |
+
cat > "$WORK/Cargo.lock" <<'LOCKEOF'
|
| 51 |
+
# This file is automatically @generated by Cargo.
|
| 52 |
+
# It is not intended for manual editing.
|
| 53 |
+
version = 4
|
| 54 |
+
|
| 55 |
+
[[package]]
|
| 56 |
+
name = "adler2"
|
| 57 |
+
version = "2.0.0"
|
| 58 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 59 |
+
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
| 60 |
+
|
| 61 |
+
[[package]]
|
| 62 |
+
name = "aho-corasick"
|
| 63 |
+
version = "1.1.3"
|
| 64 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 65 |
+
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
| 66 |
+
dependencies = [
|
| 67 |
+
"memchr",
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
[[package]]
|
| 71 |
+
name = "allocator-api2"
|
| 72 |
+
version = "0.2.21"
|
| 73 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 74 |
+
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
| 75 |
+
|
| 76 |
+
[[package]]
|
| 77 |
+
name = "android-tzdata"
|
| 78 |
+
version = "0.1.1"
|
| 79 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 80 |
+
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
| 81 |
+
|
| 82 |
+
[[package]]
|
| 83 |
+
name = "android_system_properties"
|
| 84 |
+
version = "0.1.5"
|
| 85 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 86 |
+
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
| 87 |
+
dependencies = [
|
| 88 |
+
"libc",
|
| 89 |
+
]
|
| 90 |
+
|
| 91 |
+
[[package]]
|
| 92 |
+
name = "anstream"
|
| 93 |
+
version = "0.6.18"
|
| 94 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 95 |
+
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
|
| 96 |
+
dependencies = [
|
| 97 |
+
"anstyle",
|
| 98 |
+
"anstyle-parse",
|
| 99 |
+
"anstyle-query",
|
| 100 |
+
"anstyle-wincon",
|
| 101 |
+
"colorchoice",
|
| 102 |
+
"is_terminal_polyfill",
|
| 103 |
+
"utf8parse",
|
| 104 |
+
]
|
| 105 |
+
|
| 106 |
+
[[package]]
|
| 107 |
+
name = "anstyle"
|
| 108 |
+
version = "1.0.10"
|
| 109 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 110 |
+
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
| 111 |
+
|
| 112 |
+
[[package]]
|
| 113 |
+
name = "anstyle-parse"
|
| 114 |
+
version = "0.2.6"
|
| 115 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 116 |
+
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
|
| 117 |
+
dependencies = [
|
| 118 |
+
"utf8parse",
|
| 119 |
+
]
|
| 120 |
+
|
| 121 |
+
[[package]]
|
| 122 |
+
name = "anstyle-query"
|
| 123 |
+
version = "1.1.2"
|
| 124 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 125 |
+
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
|
| 126 |
+
dependencies = [
|
| 127 |
+
"windows-sys 0.59.0",
|
| 128 |
+
]
|
| 129 |
+
|
| 130 |
+
[[package]]
|
| 131 |
+
name = "anstyle-wincon"
|
| 132 |
+
version = "3.0.6"
|
| 133 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 134 |
+
checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
|
| 135 |
+
dependencies = [
|
| 136 |
+
"anstyle",
|
| 137 |
+
"windows-sys 0.59.0",
|
| 138 |
+
]
|
| 139 |
+
|
| 140 |
+
[[package]]
|
| 141 |
+
name = "autocfg"
|
| 142 |
+
version = "1.4.0"
|
| 143 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 144 |
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
| 145 |
+
|
| 146 |
+
[[package]]
|
| 147 |
+
name = "bitflags"
|
| 148 |
+
version = "1.3.2"
|
| 149 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 150 |
+
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
| 151 |
+
|
| 152 |
+
[[package]]
|
| 153 |
+
name = "bitflags"
|
| 154 |
+
version = "2.6.0"
|
| 155 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 156 |
+
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
| 157 |
+
|
| 158 |
+
[[package]]
|
| 159 |
+
name = "block"
|
| 160 |
+
version = "0.1.6"
|
| 161 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 162 |
+
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
|
| 163 |
+
|
| 164 |
+
[[package]]
|
| 165 |
+
name = "bstr"
|
| 166 |
+
version = "1.11.0"
|
| 167 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 168 |
+
checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22"
|
| 169 |
+
dependencies = [
|
| 170 |
+
"memchr",
|
| 171 |
+
"serde",
|
| 172 |
+
]
|
| 173 |
+
|
| 174 |
+
[[package]]
|
| 175 |
+
name = "bumpalo"
|
| 176 |
+
version = "3.16.0"
|
| 177 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 178 |
+
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
| 179 |
+
|
| 180 |
+
[[package]]
|
| 181 |
+
name = "byteorder"
|
| 182 |
+
version = "1.5.0"
|
| 183 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 184 |
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
| 185 |
+
|
| 186 |
+
[[package]]
|
| 187 |
+
name = "cassowary"
|
| 188 |
+
version = "0.3.0"
|
| 189 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 190 |
+
checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
|
| 191 |
+
|
| 192 |
+
[[package]]
|
| 193 |
+
name = "castaway"
|
| 194 |
+
version = "0.2.3"
|
| 195 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 196 |
+
checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5"
|
| 197 |
+
dependencies = [
|
| 198 |
+
"rustversion",
|
| 199 |
+
]
|
| 200 |
+
|
| 201 |
+
[[package]]
|
| 202 |
+
name = "cc"
|
| 203 |
+
version = "1.2.3"
|
| 204 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 205 |
+
checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d"
|
| 206 |
+
dependencies = [
|
| 207 |
+
"shlex",
|
| 208 |
+
]
|
| 209 |
+
|
| 210 |
+
[[package]]
|
| 211 |
+
name = "cfg-if"
|
| 212 |
+
version = "1.0.0"
|
| 213 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 214 |
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
| 215 |
+
|
| 216 |
+
[[package]]
|
| 217 |
+
name = "chrono"
|
| 218 |
+
version = "0.4.39"
|
| 219 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 220 |
+
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
|
| 221 |
+
dependencies = [
|
| 222 |
+
"android-tzdata",
|
| 223 |
+
"iana-time-zone",
|
| 224 |
+
"num-traits",
|
| 225 |
+
"windows-targets",
|
| 226 |
+
]
|
| 227 |
+
|
| 228 |
+
[[package]]
|
| 229 |
+
name = "clipboard-win"
|
| 230 |
+
version = "3.1.1"
|
| 231 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 232 |
+
checksum = "9fdf5e01086b6be750428ba4a40619f847eb2e95756eee84b18e06e5f0b50342"
|
| 233 |
+
dependencies = [
|
| 234 |
+
"lazy-bytes-cast",
|
| 235 |
+
"winapi",
|
| 236 |
+
]
|
| 237 |
+
|
| 238 |
+
[[package]]
|
| 239 |
+
name = "colorchoice"
|
| 240 |
+
version = "1.0.3"
|
| 241 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 242 |
+
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
| 243 |
+
|
| 244 |
+
[[package]]
|
| 245 |
+
name = "compact_str"
|
| 246 |
+
version = "0.8.0"
|
| 247 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 248 |
+
checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644"
|
| 249 |
+
dependencies = [
|
| 250 |
+
"castaway",
|
| 251 |
+
"cfg-if",
|
| 252 |
+
"itoa",
|
| 253 |
+
"rustversion",
|
| 254 |
+
"ryu",
|
| 255 |
+
"static_assertions",
|
| 256 |
+
]
|
| 257 |
+
|
| 258 |
+
[[package]]
|
| 259 |
+
name = "console"
|
| 260 |
+
version = "0.15.8"
|
| 261 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 262 |
+
checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
|
| 263 |
+
dependencies = [
|
| 264 |
+
"encode_unicode",
|
| 265 |
+
"lazy_static",
|
| 266 |
+
"libc",
|
| 267 |
+
"windows-sys 0.52.0",
|
| 268 |
+
]
|
| 269 |
+
|
| 270 |
+
[[package]]
|
| 271 |
+
name = "const-random"
|
| 272 |
+
version = "0.1.18"
|
| 273 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 274 |
+
checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
|
| 275 |
+
dependencies = [
|
| 276 |
+
"const-random-macro",
|
| 277 |
+
]
|
| 278 |
+
|
| 279 |
+
[[package]]
|
| 280 |
+
name = "const-random-macro"
|
| 281 |
+
version = "0.1.16"
|
| 282 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 283 |
+
checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
|
| 284 |
+
dependencies = [
|
| 285 |
+
"getrandom",
|
| 286 |
+
"once_cell",
|
| 287 |
+
"tiny-keccak",
|
| 288 |
+
]
|
| 289 |
+
|
| 290 |
+
[[package]]
|
| 291 |
+
name = "copypasta"
|
| 292 |
+
version = "0.8.2"
|
| 293 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 294 |
+
checksum = "133fc8675ee3a4ec9aa513584deda9aa0faeda3586b87f7f0f2ba082c66fb172"
|
| 295 |
+
dependencies = [
|
| 296 |
+
"clipboard-win",
|
| 297 |
+
"objc",
|
| 298 |
+
"objc-foundation",
|
| 299 |
+
"objc_id",
|
| 300 |
+
"smithay-clipboard",
|
| 301 |
+
"x11-clipboard",
|
| 302 |
+
]
|
| 303 |
+
|
| 304 |
+
[[package]]
|
| 305 |
+
name = "copypasta-ext"
|
| 306 |
+
version = "0.4.4"
|
| 307 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 308 |
+
checksum = "9455f470ea0c7d50c3fe3d22389c3a482f38a9f5fbab1c8ee368121356c56718"
|
| 309 |
+
dependencies = [
|
| 310 |
+
"copypasta",
|
| 311 |
+
"libc",
|
| 312 |
+
"which",
|
| 313 |
+
"x11-clipboard",
|
| 314 |
+
]
|
| 315 |
+
|
| 316 |
+
[[package]]
|
| 317 |
+
name = "core-foundation-sys"
|
| 318 |
+
version = "0.8.7"
|
| 319 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 320 |
+
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
| 321 |
+
|
| 322 |
+
[[package]]
|
| 323 |
+
name = "crc32fast"
|
| 324 |
+
version = "1.4.2"
|
| 325 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 326 |
+
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
|
| 327 |
+
dependencies = [
|
| 328 |
+
"cfg-if",
|
| 329 |
+
]
|
| 330 |
+
|
| 331 |
+
[[package]]
|
| 332 |
+
name = "crossbeam-deque"
|
| 333 |
+
version = "0.8.5"
|
| 334 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 335 |
+
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
|
| 336 |
+
dependencies = [
|
| 337 |
+
"crossbeam-epoch",
|
| 338 |
+
"crossbeam-utils",
|
| 339 |
+
]
|
| 340 |
+
|
| 341 |
+
[[package]]
|
| 342 |
+
name = "crossbeam-epoch"
|
| 343 |
+
version = "0.9.18"
|
| 344 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 345 |
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
| 346 |
+
dependencies = [
|
| 347 |
+
"crossbeam-utils",
|
| 348 |
+
]
|
| 349 |
+
|
| 350 |
+
[[package]]
|
| 351 |
+
name = "crossbeam-utils"
|
| 352 |
+
version = "0.8.20"
|
| 353 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 354 |
+
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
|
| 355 |
+
|
| 356 |
+
[[package]]
|
| 357 |
+
name = "crunchy"
|
| 358 |
+
version = "0.2.2"
|
| 359 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 360 |
+
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
|
| 361 |
+
|
| 362 |
+
[[package]]
|
| 363 |
+
name = "darling"
|
| 364 |
+
version = "0.20.10"
|
| 365 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 366 |
+
checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
|
| 367 |
+
dependencies = [
|
| 368 |
+
"darling_core",
|
| 369 |
+
"darling_macro",
|
| 370 |
+
]
|
| 371 |
+
|
| 372 |
+
[[package]]
|
| 373 |
+
name = "darling_core"
|
| 374 |
+
version = "0.20.10"
|
| 375 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 376 |
+
checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
|
| 377 |
+
dependencies = [
|
| 378 |
+
"fnv",
|
| 379 |
+
"ident_case",
|
| 380 |
+
"proc-macro2",
|
| 381 |
+
"quote",
|
| 382 |
+
"strsim",
|
| 383 |
+
"syn",
|
| 384 |
+
]
|
| 385 |
+
|
| 386 |
+
[[package]]
|
| 387 |
+
name = "darling_macro"
|
| 388 |
+
version = "0.20.10"
|
| 389 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 390 |
+
checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
|
| 391 |
+
dependencies = [
|
| 392 |
+
"darling_core",
|
| 393 |
+
"quote",
|
| 394 |
+
"syn",
|
| 395 |
+
]
|
| 396 |
+
|
| 397 |
+
[[package]]
|
| 398 |
+
name = "diff"
|
| 399 |
+
version = "0.1.13"
|
| 400 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 401 |
+
checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
|
| 402 |
+
|
| 403 |
+
[[package]]
|
| 404 |
+
name = "dirs-next"
|
| 405 |
+
version = "2.0.0"
|
| 406 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 407 |
+
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
|
| 408 |
+
dependencies = [
|
| 409 |
+
"cfg-if",
|
| 410 |
+
"dirs-sys-next",
|
| 411 |
+
]
|
| 412 |
+
|
| 413 |
+
[[package]]
|
| 414 |
+
name = "dirs-sys-next"
|
| 415 |
+
version = "0.1.2"
|
| 416 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 417 |
+
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
|
| 418 |
+
dependencies = [
|
| 419 |
+
"libc",
|
| 420 |
+
"redox_users",
|
| 421 |
+
"winapi",
|
| 422 |
+
]
|
| 423 |
+
|
| 424 |
+
[[package]]
|
| 425 |
+
name = "dlib"
|
| 426 |
+
version = "0.5.2"
|
| 427 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 428 |
+
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
|
| 429 |
+
dependencies = [
|
| 430 |
+
"libloading",
|
| 431 |
+
]
|
| 432 |
+
|
| 433 |
+
[[package]]
|
| 434 |
+
name = "dlv-list"
|
| 435 |
+
version = "0.5.2"
|
| 436 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 437 |
+
checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f"
|
| 438 |
+
dependencies = [
|
| 439 |
+
"const-random",
|
| 440 |
+
]
|
| 441 |
+
|
| 442 |
+
[[package]]
|
| 443 |
+
name = "downcast-rs"
|
| 444 |
+
version = "1.2.1"
|
| 445 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 446 |
+
checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
|
| 447 |
+
|
| 448 |
+
[[package]]
|
| 449 |
+
name = "either"
|
| 450 |
+
version = "1.13.0"
|
| 451 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 452 |
+
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
| 453 |
+
|
| 454 |
+
[[package]]
|
| 455 |
+
name = "encode_unicode"
|
| 456 |
+
version = "0.3.6"
|
| 457 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 458 |
+
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
|
| 459 |
+
|
| 460 |
+
[[package]]
|
| 461 |
+
name = "enum-as-inner"
|
| 462 |
+
version = "0.6.1"
|
| 463 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 464 |
+
checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc"
|
| 465 |
+
dependencies = [
|
| 466 |
+
"heck",
|
| 467 |
+
"proc-macro2",
|
| 468 |
+
"quote",
|
| 469 |
+
"syn",
|
| 470 |
+
]
|
| 471 |
+
|
| 472 |
+
[[package]]
|
| 473 |
+
name = "env_filter"
|
| 474 |
+
version = "0.1.3"
|
| 475 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 476 |
+
checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0"
|
| 477 |
+
dependencies = [
|
| 478 |
+
"log",
|
| 479 |
+
"regex",
|
| 480 |
+
]
|
| 481 |
+
|
| 482 |
+
[[package]]
|
| 483 |
+
name = "env_logger"
|
| 484 |
+
version = "0.11.8"
|
| 485 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 486 |
+
checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f"
|
| 487 |
+
dependencies = [
|
| 488 |
+
"anstream",
|
| 489 |
+
"anstyle",
|
| 490 |
+
"env_filter",
|
| 491 |
+
"jiff",
|
| 492 |
+
"log",
|
| 493 |
+
]
|
| 494 |
+
|
| 495 |
+
[[package]]
|
| 496 |
+
name = "equivalent"
|
| 497 |
+
version = "1.0.1"
|
| 498 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 499 |
+
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
| 500 |
+
|
| 501 |
+
[[package]]
|
| 502 |
+
name = "errno"
|
| 503 |
+
version = "0.3.10"
|
| 504 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 505 |
+
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
| 506 |
+
dependencies = [
|
| 507 |
+
"libc",
|
| 508 |
+
"windows-sys 0.59.0",
|
| 509 |
+
]
|
| 510 |
+
|
| 511 |
+
[[package]]
|
| 512 |
+
name = "flate2"
|
| 513 |
+
version = "1.0.35"
|
| 514 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 515 |
+
checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
|
| 516 |
+
dependencies = [
|
| 517 |
+
"crc32fast",
|
| 518 |
+
"miniz_oxide",
|
| 519 |
+
]
|
| 520 |
+
|
| 521 |
+
[[package]]
|
| 522 |
+
name = "fnv"
|
| 523 |
+
version = "1.0.7"
|
| 524 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 525 |
+
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
| 526 |
+
|
| 527 |
+
[[package]]
|
| 528 |
+
name = "foldhash"
|
| 529 |
+
version = "0.1.3"
|
| 530 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 531 |
+
checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
|
| 532 |
+
|
| 533 |
+
[[package]]
|
| 534 |
+
name = "fxhash"
|
| 535 |
+
version = "0.2.1"
|
| 536 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 537 |
+
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
| 538 |
+
dependencies = [
|
| 539 |
+
"byteorder",
|
| 540 |
+
]
|
| 541 |
+
|
| 542 |
+
[[package]]
|
| 543 |
+
name = "gethostname"
|
| 544 |
+
version = "0.2.3"
|
| 545 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 546 |
+
checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e"
|
| 547 |
+
dependencies = [
|
| 548 |
+
"libc",
|
| 549 |
+
"winapi",
|
| 550 |
+
]
|
| 551 |
+
|
| 552 |
+
[[package]]
|
| 553 |
+
name = "getopts"
|
| 554 |
+
version = "0.2.24"
|
| 555 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 556 |
+
checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df"
|
| 557 |
+
dependencies = [
|
| 558 |
+
"unicode-width 0.2.0",
|
| 559 |
+
]
|
| 560 |
+
|
| 561 |
+
[[package]]
|
| 562 |
+
name = "getrandom"
|
| 563 |
+
version = "0.2.15"
|
| 564 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 565 |
+
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
| 566 |
+
dependencies = [
|
| 567 |
+
"cfg-if",
|
| 568 |
+
"libc",
|
| 569 |
+
"wasi",
|
| 570 |
+
]
|
| 571 |
+
|
| 572 |
+
[[package]]
|
| 573 |
+
name = "globset"
|
| 574 |
+
version = "0.4.15"
|
| 575 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 576 |
+
checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19"
|
| 577 |
+
dependencies = [
|
| 578 |
+
"aho-corasick",
|
| 579 |
+
"bstr",
|
| 580 |
+
"log",
|
| 581 |
+
"regex-automata",
|
| 582 |
+
"regex-syntax",
|
| 583 |
+
]
|
| 584 |
+
|
| 585 |
+
[[package]]
|
| 586 |
+
name = "globwalk"
|
| 587 |
+
version = "0.8.1"
|
| 588 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 589 |
+
checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc"
|
| 590 |
+
dependencies = [
|
| 591 |
+
"bitflags 1.3.2",
|
| 592 |
+
"ignore",
|
| 593 |
+
"walkdir",
|
| 594 |
+
]
|
| 595 |
+
|
| 596 |
+
[[package]]
|
| 597 |
+
name = "hashbrown"
|
| 598 |
+
version = "0.14.5"
|
| 599 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 600 |
+
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
| 601 |
+
|
| 602 |
+
[[package]]
|
| 603 |
+
name = "hashbrown"
|
| 604 |
+
version = "0.15.2"
|
| 605 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 606 |
+
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
|
| 607 |
+
dependencies = [
|
| 608 |
+
"allocator-api2",
|
| 609 |
+
"equivalent",
|
| 610 |
+
"foldhash",
|
| 611 |
+
]
|
| 612 |
+
|
| 613 |
+
[[package]]
|
| 614 |
+
name = "heck"
|
| 615 |
+
version = "0.5.0"
|
| 616 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 617 |
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
| 618 |
+
|
| 619 |
+
[[package]]
|
| 620 |
+
name = "hermit-abi"
|
| 621 |
+
version = "0.4.0"
|
| 622 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 623 |
+
checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
|
| 624 |
+
|
| 625 |
+
[[package]]
|
| 626 |
+
name = "home"
|
| 627 |
+
version = "0.5.9"
|
| 628 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 629 |
+
checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
|
| 630 |
+
dependencies = [
|
| 631 |
+
"windows-sys 0.52.0",
|
| 632 |
+
]
|
| 633 |
+
|
| 634 |
+
[[package]]
|
| 635 |
+
name = "iana-time-zone"
|
| 636 |
+
version = "0.1.61"
|
| 637 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 638 |
+
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
|
| 639 |
+
dependencies = [
|
| 640 |
+
"android_system_properties",
|
| 641 |
+
"core-foundation-sys",
|
| 642 |
+
"iana-time-zone-haiku",
|
| 643 |
+
"js-sys",
|
| 644 |
+
"wasm-bindgen",
|
| 645 |
+
"windows-core",
|
| 646 |
+
]
|
| 647 |
+
|
| 648 |
+
[[package]]
|
| 649 |
+
name = "iana-time-zone-haiku"
|
| 650 |
+
version = "0.1.2"
|
| 651 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 652 |
+
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
| 653 |
+
dependencies = [
|
| 654 |
+
"cc",
|
| 655 |
+
]
|
| 656 |
+
|
| 657 |
+
[[package]]
|
| 658 |
+
name = "ident_case"
|
| 659 |
+
version = "1.0.1"
|
| 660 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 661 |
+
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
| 662 |
+
|
| 663 |
+
[[package]]
|
| 664 |
+
name = "ignore"
|
| 665 |
+
version = "0.4.23"
|
| 666 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 667 |
+
checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b"
|
| 668 |
+
dependencies = [
|
| 669 |
+
"crossbeam-deque",
|
| 670 |
+
"globset",
|
| 671 |
+
"log",
|
| 672 |
+
"memchr",
|
| 673 |
+
"regex-automata",
|
| 674 |
+
"same-file",
|
| 675 |
+
"walkdir",
|
| 676 |
+
"winapi-util",
|
| 677 |
+
]
|
| 678 |
+
|
| 679 |
+
[[package]]
|
| 680 |
+
name = "indoc"
|
| 681 |
+
version = "2.0.5"
|
| 682 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 683 |
+
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
| 684 |
+
|
| 685 |
+
[[package]]
|
| 686 |
+
name = "insta"
|
| 687 |
+
version = "1.43.2"
|
| 688 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 689 |
+
checksum = "46fdb647ebde000f43b5b53f773c30cf9b0cb4300453208713fa38b2c70935a0"
|
| 690 |
+
dependencies = [
|
| 691 |
+
"console",
|
| 692 |
+
"once_cell",
|
| 693 |
+
"similar",
|
| 694 |
+
]
|
| 695 |
+
|
| 696 |
+
[[package]]
|
| 697 |
+
name = "instability"
|
| 698 |
+
version = "0.3.3"
|
| 699 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 700 |
+
checksum = "b829f37dead9dc39df40c2d3376c179fdfd2ac771f53f55d3c30dc096a3c0c6e"
|
| 701 |
+
dependencies = [
|
| 702 |
+
"darling",
|
| 703 |
+
"indoc",
|
| 704 |
+
"pretty_assertions",
|
| 705 |
+
"proc-macro2",
|
| 706 |
+
"quote",
|
| 707 |
+
"syn",
|
| 708 |
+
]
|
| 709 |
+
|
| 710 |
+
[[package]]
|
| 711 |
+
name = "is-terminal"
|
| 712 |
+
version = "0.4.13"
|
| 713 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 714 |
+
checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
|
| 715 |
+
dependencies = [
|
| 716 |
+
"hermit-abi",
|
| 717 |
+
"libc",
|
| 718 |
+
"windows-sys 0.52.0",
|
| 719 |
+
]
|
| 720 |
+
|
| 721 |
+
[[package]]
|
| 722 |
+
name = "is_ci"
|
| 723 |
+
version = "1.2.0"
|
| 724 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 725 |
+
checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45"
|
| 726 |
+
|
| 727 |
+
[[package]]
|
| 728 |
+
name = "is_terminal_polyfill"
|
| 729 |
+
version = "1.70.1"
|
| 730 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 731 |
+
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
| 732 |
+
|
| 733 |
+
[[package]]
|
| 734 |
+
name = "itertools"
|
| 735 |
+
version = "0.13.0"
|
| 736 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 737 |
+
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
|
| 738 |
+
dependencies = [
|
| 739 |
+
"either",
|
| 740 |
+
]
|
| 741 |
+
|
| 742 |
+
[[package]]
|
| 743 |
+
name = "itoa"
|
| 744 |
+
version = "1.0.14"
|
| 745 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 746 |
+
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
|
| 747 |
+
|
| 748 |
+
[[package]]
|
| 749 |
+
name = "jiff"
|
| 750 |
+
version = "0.2.15"
|
| 751 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 752 |
+
checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49"
|
| 753 |
+
dependencies = [
|
| 754 |
+
"jiff-static",
|
| 755 |
+
"log",
|
| 756 |
+
"portable-atomic",
|
| 757 |
+
"portable-atomic-util",
|
| 758 |
+
"serde",
|
| 759 |
+
]
|
| 760 |
+
|
| 761 |
+
[[package]]
|
| 762 |
+
name = "jiff-static"
|
| 763 |
+
version = "0.2.15"
|
| 764 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 765 |
+
checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4"
|
| 766 |
+
dependencies = [
|
| 767 |
+
"proc-macro2",
|
| 768 |
+
"quote",
|
| 769 |
+
"syn",
|
| 770 |
+
]
|
| 771 |
+
|
| 772 |
+
[[package]]
|
| 773 |
+
name = "js-sys"
|
| 774 |
+
version = "0.3.76"
|
| 775 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 776 |
+
checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
|
| 777 |
+
dependencies = [
|
| 778 |
+
"once_cell",
|
| 779 |
+
"wasm-bindgen",
|
| 780 |
+
]
|
| 781 |
+
|
| 782 |
+
[[package]]
|
| 783 |
+
name = "lazy-bytes-cast"
|
| 784 |
+
version = "5.0.1"
|
| 785 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 786 |
+
checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b"
|
| 787 |
+
|
| 788 |
+
[[package]]
|
| 789 |
+
name = "lazy_static"
|
| 790 |
+
version = "1.5.0"
|
| 791 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 792 |
+
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
| 793 |
+
|
| 794 |
+
[[package]]
|
| 795 |
+
name = "libc"
|
| 796 |
+
version = "0.2.168"
|
| 797 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 798 |
+
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
|
| 799 |
+
|
| 800 |
+
[[package]]
|
| 801 |
+
name = "libloading"
|
| 802 |
+
version = "0.8.6"
|
| 803 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 804 |
+
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
| 805 |
+
dependencies = [
|
| 806 |
+
"cfg-if",
|
| 807 |
+
"windows-targets",
|
| 808 |
+
]
|
| 809 |
+
|
| 810 |
+
[[package]]
|
| 811 |
+
name = "libredox"
|
| 812 |
+
version = "0.1.3"
|
| 813 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 814 |
+
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
|
| 815 |
+
dependencies = [
|
| 816 |
+
"bitflags 2.6.0",
|
| 817 |
+
"libc",
|
| 818 |
+
"redox_syscall",
|
| 819 |
+
]
|
| 820 |
+
|
| 821 |
+
[[package]]
|
| 822 |
+
name = "linux-raw-sys"
|
| 823 |
+
version = "0.4.14"
|
| 824 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 825 |
+
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
|
| 826 |
+
|
| 827 |
+
[[package]]
|
| 828 |
+
name = "lock_api"
|
| 829 |
+
version = "0.4.12"
|
| 830 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 831 |
+
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
| 832 |
+
dependencies = [
|
| 833 |
+
"autocfg",
|
| 834 |
+
"scopeguard",
|
| 835 |
+
]
|
| 836 |
+
|
| 837 |
+
[[package]]
|
| 838 |
+
name = "log"
|
| 839 |
+
version = "0.4.28"
|
| 840 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 841 |
+
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
|
| 842 |
+
|
| 843 |
+
[[package]]
|
| 844 |
+
name = "lru"
|
| 845 |
+
version = "0.12.5"
|
| 846 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 847 |
+
checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
|
| 848 |
+
dependencies = [
|
| 849 |
+
"hashbrown 0.15.2",
|
| 850 |
+
]
|
| 851 |
+
|
| 852 |
+
[[package]]
|
| 853 |
+
name = "malloc_buf"
|
| 854 |
+
version = "0.0.6"
|
| 855 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 856 |
+
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
|
| 857 |
+
dependencies = [
|
| 858 |
+
"libc",
|
| 859 |
+
]
|
| 860 |
+
|
| 861 |
+
[[package]]
|
| 862 |
+
name = "memchr"
|
| 863 |
+
version = "2.7.4"
|
| 864 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 865 |
+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
| 866 |
+
|
| 867 |
+
[[package]]
|
| 868 |
+
name = "memmap2"
|
| 869 |
+
version = "0.5.10"
|
| 870 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 871 |
+
checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
|
| 872 |
+
dependencies = [
|
| 873 |
+
"libc",
|
| 874 |
+
]
|
| 875 |
+
|
| 876 |
+
[[package]]
|
| 877 |
+
name = "memoffset"
|
| 878 |
+
version = "0.6.5"
|
| 879 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 880 |
+
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
| 881 |
+
dependencies = [
|
| 882 |
+
"autocfg",
|
| 883 |
+
]
|
| 884 |
+
|
| 885 |
+
[[package]]
|
| 886 |
+
name = "miniz_oxide"
|
| 887 |
+
version = "0.8.0"
|
| 888 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 889 |
+
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
|
| 890 |
+
dependencies = [
|
| 891 |
+
"adler2",
|
| 892 |
+
]
|
| 893 |
+
|
| 894 |
+
[[package]]
|
| 895 |
+
name = "nix"
|
| 896 |
+
version = "0.24.3"
|
| 897 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 898 |
+
checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069"
|
| 899 |
+
dependencies = [
|
| 900 |
+
"bitflags 1.3.2",
|
| 901 |
+
"cfg-if",
|
| 902 |
+
"libc",
|
| 903 |
+
"memoffset",
|
| 904 |
+
]
|
| 905 |
+
|
| 906 |
+
[[package]]
|
| 907 |
+
name = "num-traits"
|
| 908 |
+
version = "0.2.19"
|
| 909 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 910 |
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
| 911 |
+
dependencies = [
|
| 912 |
+
"autocfg",
|
| 913 |
+
]
|
| 914 |
+
|
| 915 |
+
[[package]]
|
| 916 |
+
name = "numtoa"
|
| 917 |
+
version = "0.2.4"
|
| 918 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 919 |
+
checksum = "6aa2c4e539b869820a2b82e1aef6ff40aa85e65decdd5185e83fb4b1249cd00f"
|
| 920 |
+
|
| 921 |
+
[[package]]
|
| 922 |
+
name = "objc"
|
| 923 |
+
version = "0.2.7"
|
| 924 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 925 |
+
checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
|
| 926 |
+
dependencies = [
|
| 927 |
+
"malloc_buf",
|
| 928 |
+
]
|
| 929 |
+
|
| 930 |
+
[[package]]
|
| 931 |
+
name = "objc-foundation"
|
| 932 |
+
version = "0.1.1"
|
| 933 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 934 |
+
checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
|
| 935 |
+
dependencies = [
|
| 936 |
+
"block",
|
| 937 |
+
"objc",
|
| 938 |
+
"objc_id",
|
| 939 |
+
]
|
| 940 |
+
|
| 941 |
+
[[package]]
|
| 942 |
+
name = "objc_id"
|
| 943 |
+
version = "0.1.1"
|
| 944 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 945 |
+
checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
|
| 946 |
+
dependencies = [
|
| 947 |
+
"objc",
|
| 948 |
+
]
|
| 949 |
+
|
| 950 |
+
[[package]]
|
| 951 |
+
name = "once_cell"
|
| 952 |
+
version = "1.20.2"
|
| 953 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 954 |
+
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
| 955 |
+
|
| 956 |
+
[[package]]
|
| 957 |
+
name = "ordered-multimap"
|
| 958 |
+
version = "0.7.3"
|
| 959 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 960 |
+
checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79"
|
| 961 |
+
dependencies = [
|
| 962 |
+
"dlv-list",
|
| 963 |
+
"hashbrown 0.14.5",
|
| 964 |
+
]
|
| 965 |
+
|
| 966 |
+
[[package]]
|
| 967 |
+
name = "owo-colors"
|
| 968 |
+
version = "4.2.2"
|
| 969 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 970 |
+
checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e"
|
| 971 |
+
dependencies = [
|
| 972 |
+
"supports-color 2.1.0",
|
| 973 |
+
"supports-color 3.0.2",
|
| 974 |
+
]
|
| 975 |
+
|
| 976 |
+
[[package]]
|
| 977 |
+
name = "parking_lot"
|
| 978 |
+
version = "0.12.3"
|
| 979 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 980 |
+
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
| 981 |
+
dependencies = [
|
| 982 |
+
"lock_api",
|
| 983 |
+
"parking_lot_core",
|
| 984 |
+
]
|
| 985 |
+
|
| 986 |
+
[[package]]
|
| 987 |
+
name = "parking_lot_core"
|
| 988 |
+
version = "0.9.10"
|
| 989 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 990 |
+
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
| 991 |
+
dependencies = [
|
| 992 |
+
"cfg-if",
|
| 993 |
+
"libc",
|
| 994 |
+
"redox_syscall",
|
| 995 |
+
"smallvec",
|
| 996 |
+
"windows-targets",
|
| 997 |
+
]
|
| 998 |
+
|
| 999 |
+
[[package]]
|
| 1000 |
+
name = "parseit"
|
| 1001 |
+
version = "0.1.2"
|
| 1002 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1003 |
+
checksum = "6d8f3e34b613160ce92ccc5c48ddac0949bf9d8269e81a8218788906fcff20df"
|
| 1004 |
+
dependencies = [
|
| 1005 |
+
"flate2",
|
| 1006 |
+
"globwalk",
|
| 1007 |
+
"regex",
|
| 1008 |
+
"thiserror",
|
| 1009 |
+
]
|
| 1010 |
+
|
| 1011 |
+
[[package]]
|
| 1012 |
+
name = "paste"
|
| 1013 |
+
version = "1.0.15"
|
| 1014 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1015 |
+
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
| 1016 |
+
|
| 1017 |
+
[[package]]
|
| 1018 |
+
name = "pkg-config"
|
| 1019 |
+
version = "0.3.31"
|
| 1020 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1021 |
+
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
|
| 1022 |
+
|
| 1023 |
+
[[package]]
|
| 1024 |
+
name = "portable-atomic"
|
| 1025 |
+
version = "1.11.1"
|
| 1026 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1027 |
+
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
| 1028 |
+
|
| 1029 |
+
[[package]]
|
| 1030 |
+
name = "portable-atomic-util"
|
| 1031 |
+
version = "0.2.4"
|
| 1032 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1033 |
+
checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
|
| 1034 |
+
dependencies = [
|
| 1035 |
+
"portable-atomic",
|
| 1036 |
+
]
|
| 1037 |
+
|
| 1038 |
+
[[package]]
|
| 1039 |
+
name = "pretty_assertions"
|
| 1040 |
+
version = "1.4.1"
|
| 1041 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1042 |
+
checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d"
|
| 1043 |
+
dependencies = [
|
| 1044 |
+
"diff",
|
| 1045 |
+
"yansi",
|
| 1046 |
+
]
|
| 1047 |
+
|
| 1048 |
+
[[package]]
|
| 1049 |
+
name = "proc-macro2"
|
| 1050 |
+
version = "1.0.95"
|
| 1051 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1052 |
+
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
| 1053 |
+
dependencies = [
|
| 1054 |
+
"unicode-ident",
|
| 1055 |
+
]
|
| 1056 |
+
|
| 1057 |
+
[[package]]
|
| 1058 |
+
name = "quote"
|
| 1059 |
+
version = "1.0.40"
|
| 1060 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1061 |
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
| 1062 |
+
dependencies = [
|
| 1063 |
+
"proc-macro2",
|
| 1064 |
+
]
|
| 1065 |
+
|
| 1066 |
+
[[package]]
|
| 1067 |
+
name = "ratatui"
|
| 1068 |
+
version = "0.29.0"
|
| 1069 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1070 |
+
checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
|
| 1071 |
+
dependencies = [
|
| 1072 |
+
"bitflags 2.6.0",
|
| 1073 |
+
"cassowary",
|
| 1074 |
+
"compact_str",
|
| 1075 |
+
"indoc",
|
| 1076 |
+
"instability",
|
| 1077 |
+
"itertools",
|
| 1078 |
+
"lru",
|
| 1079 |
+
"paste",
|
| 1080 |
+
"strum",
|
| 1081 |
+
"termion",
|
| 1082 |
+
"unicode-segmentation",
|
| 1083 |
+
"unicode-truncate",
|
| 1084 |
+
"unicode-width 0.2.0",
|
| 1085 |
+
]
|
| 1086 |
+
|
| 1087 |
+
[[package]]
|
| 1088 |
+
name = "rayon"
|
| 1089 |
+
version = "1.11.0"
|
| 1090 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1091 |
+
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
|
| 1092 |
+
dependencies = [
|
| 1093 |
+
"either",
|
| 1094 |
+
"rayon-core",
|
| 1095 |
+
]
|
| 1096 |
+
|
| 1097 |
+
[[package]]
|
| 1098 |
+
name = "rayon-core"
|
| 1099 |
+
version = "1.13.0"
|
| 1100 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1101 |
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
| 1102 |
+
dependencies = [
|
| 1103 |
+
"crossbeam-deque",
|
| 1104 |
+
"crossbeam-utils",
|
| 1105 |
+
]
|
| 1106 |
+
|
| 1107 |
+
[[package]]
|
| 1108 |
+
name = "redox_syscall"
|
| 1109 |
+
version = "0.5.8"
|
| 1110 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1111 |
+
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
|
| 1112 |
+
dependencies = [
|
| 1113 |
+
"bitflags 2.6.0",
|
| 1114 |
+
]
|
| 1115 |
+
|
| 1116 |
+
[[package]]
|
| 1117 |
+
name = "redox_termios"
|
| 1118 |
+
version = "0.1.3"
|
| 1119 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1120 |
+
checksum = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb"
|
| 1121 |
+
|
| 1122 |
+
[[package]]
|
| 1123 |
+
name = "redox_users"
|
| 1124 |
+
version = "0.4.6"
|
| 1125 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1126 |
+
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
|
| 1127 |
+
dependencies = [
|
| 1128 |
+
"getrandom",
|
| 1129 |
+
"libredox",
|
| 1130 |
+
"thiserror",
|
| 1131 |
+
]
|
| 1132 |
+
|
| 1133 |
+
[[package]]
|
| 1134 |
+
name = "regex"
|
| 1135 |
+
version = "1.11.1"
|
| 1136 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1137 |
+
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
| 1138 |
+
dependencies = [
|
| 1139 |
+
"aho-corasick",
|
| 1140 |
+
"memchr",
|
| 1141 |
+
"regex-automata",
|
| 1142 |
+
"regex-syntax",
|
| 1143 |
+
]
|
| 1144 |
+
|
| 1145 |
+
[[package]]
|
| 1146 |
+
name = "regex-automata"
|
| 1147 |
+
version = "0.4.9"
|
| 1148 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1149 |
+
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
| 1150 |
+
dependencies = [
|
| 1151 |
+
"aho-corasick",
|
| 1152 |
+
"memchr",
|
| 1153 |
+
"regex-syntax",
|
| 1154 |
+
]
|
| 1155 |
+
|
| 1156 |
+
[[package]]
|
| 1157 |
+
name = "regex-syntax"
|
| 1158 |
+
version = "0.8.5"
|
| 1159 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1160 |
+
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
| 1161 |
+
|
| 1162 |
+
[[package]]
|
| 1163 |
+
name = "rust-ini"
|
| 1164 |
+
version = "0.21.3"
|
| 1165 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1166 |
+
checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7"
|
| 1167 |
+
dependencies = [
|
| 1168 |
+
"cfg-if",
|
| 1169 |
+
"ordered-multimap",
|
| 1170 |
+
]
|
| 1171 |
+
|
| 1172 |
+
[[package]]
|
| 1173 |
+
name = "rustix"
|
| 1174 |
+
version = "0.38.42"
|
| 1175 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1176 |
+
checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
|
| 1177 |
+
dependencies = [
|
| 1178 |
+
"bitflags 2.6.0",
|
| 1179 |
+
"errno",
|
| 1180 |
+
"libc",
|
| 1181 |
+
"linux-raw-sys",
|
| 1182 |
+
"windows-sys 0.59.0",
|
| 1183 |
+
]
|
| 1184 |
+
|
| 1185 |
+
[[package]]
|
| 1186 |
+
name = "rustversion"
|
| 1187 |
+
version = "1.0.18"
|
| 1188 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1189 |
+
checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
|
| 1190 |
+
|
| 1191 |
+
[[package]]
|
| 1192 |
+
name = "ryu"
|
| 1193 |
+
version = "1.0.18"
|
| 1194 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1195 |
+
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
|
| 1196 |
+
|
| 1197 |
+
[[package]]
|
| 1198 |
+
name = "same-file"
|
| 1199 |
+
version = "1.0.6"
|
| 1200 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1201 |
+
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
| 1202 |
+
dependencies = [
|
| 1203 |
+
"winapi-util",
|
| 1204 |
+
]
|
| 1205 |
+
|
| 1206 |
+
[[package]]
|
| 1207 |
+
name = "scoped-tls"
|
| 1208 |
+
version = "1.0.1"
|
| 1209 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1210 |
+
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
|
| 1211 |
+
|
| 1212 |
+
[[package]]
|
| 1213 |
+
name = "scopeguard"
|
| 1214 |
+
version = "1.2.0"
|
| 1215 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1216 |
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
| 1217 |
+
|
| 1218 |
+
[[package]]
|
| 1219 |
+
name = "serde"
|
| 1220 |
+
version = "1.0.225"
|
| 1221 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1222 |
+
checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d"
|
| 1223 |
+
dependencies = [
|
| 1224 |
+
"serde_core",
|
| 1225 |
+
"serde_derive",
|
| 1226 |
+
]
|
| 1227 |
+
|
| 1228 |
+
[[package]]
|
| 1229 |
+
name = "serde_core"
|
| 1230 |
+
version = "1.0.225"
|
| 1231 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1232 |
+
checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383"
|
| 1233 |
+
dependencies = [
|
| 1234 |
+
"serde_derive",
|
| 1235 |
+
]
|
| 1236 |
+
|
| 1237 |
+
[[package]]
|
| 1238 |
+
name = "serde_derive"
|
| 1239 |
+
version = "1.0.225"
|
| 1240 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1241 |
+
checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516"
|
| 1242 |
+
dependencies = [
|
| 1243 |
+
"proc-macro2",
|
| 1244 |
+
"quote",
|
| 1245 |
+
"syn",
|
| 1246 |
+
]
|
| 1247 |
+
|
| 1248 |
+
[[package]]
|
| 1249 |
+
name = "serde_json"
|
| 1250 |
+
version = "1.0.145"
|
| 1251 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1252 |
+
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
|
| 1253 |
+
dependencies = [
|
| 1254 |
+
"itoa",
|
| 1255 |
+
"memchr",
|
| 1256 |
+
"ryu",
|
| 1257 |
+
"serde",
|
| 1258 |
+
"serde_core",
|
| 1259 |
+
]
|
| 1260 |
+
|
| 1261 |
+
[[package]]
|
| 1262 |
+
name = "shlex"
|
| 1263 |
+
version = "1.3.0"
|
| 1264 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1265 |
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
| 1266 |
+
|
| 1267 |
+
[[package]]
|
| 1268 |
+
name = "similar"
|
| 1269 |
+
version = "2.6.0"
|
| 1270 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1271 |
+
checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
|
| 1272 |
+
|
| 1273 |
+
[[package]]
|
| 1274 |
+
name = "smallvec"
|
| 1275 |
+
version = "1.13.2"
|
| 1276 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1277 |
+
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
| 1278 |
+
|
| 1279 |
+
[[package]]
|
| 1280 |
+
name = "smithay-client-toolkit"
|
| 1281 |
+
version = "0.16.1"
|
| 1282 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1283 |
+
checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9"
|
| 1284 |
+
dependencies = [
|
| 1285 |
+
"bitflags 1.3.2",
|
| 1286 |
+
"dlib",
|
| 1287 |
+
"lazy_static",
|
| 1288 |
+
"log",
|
| 1289 |
+
"memmap2",
|
| 1290 |
+
"nix",
|
| 1291 |
+
"pkg-config",
|
| 1292 |
+
"wayland-client",
|
| 1293 |
+
"wayland-cursor",
|
| 1294 |
+
"wayland-protocols",
|
| 1295 |
+
]
|
| 1296 |
+
|
| 1297 |
+
[[package]]
|
| 1298 |
+
name = "smithay-clipboard"
|
| 1299 |
+
version = "0.6.6"
|
| 1300 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1301 |
+
checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8"
|
| 1302 |
+
dependencies = [
|
| 1303 |
+
"smithay-client-toolkit",
|
| 1304 |
+
"wayland-client",
|
| 1305 |
+
]
|
| 1306 |
+
|
| 1307 |
+
[[package]]
|
| 1308 |
+
name = "static_assertions"
|
| 1309 |
+
version = "1.1.0"
|
| 1310 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1311 |
+
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
| 1312 |
+
|
| 1313 |
+
[[package]]
|
| 1314 |
+
name = "strsim"
|
| 1315 |
+
version = "0.11.1"
|
| 1316 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1317 |
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
| 1318 |
+
|
| 1319 |
+
[[package]]
|
| 1320 |
+
name = "strum"
|
| 1321 |
+
version = "0.26.3"
|
| 1322 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1323 |
+
checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
|
| 1324 |
+
dependencies = [
|
| 1325 |
+
"strum_macros",
|
| 1326 |
+
]
|
| 1327 |
+
|
| 1328 |
+
[[package]]
|
| 1329 |
+
name = "strum_macros"
|
| 1330 |
+
version = "0.26.4"
|
| 1331 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1332 |
+
checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
|
| 1333 |
+
dependencies = [
|
| 1334 |
+
"heck",
|
| 1335 |
+
"proc-macro2",
|
| 1336 |
+
"quote",
|
| 1337 |
+
"rustversion",
|
| 1338 |
+
"syn",
|
| 1339 |
+
]
|
| 1340 |
+
|
| 1341 |
+
[[package]]
|
| 1342 |
+
name = "supports-color"
|
| 1343 |
+
version = "2.1.0"
|
| 1344 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1345 |
+
checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89"
|
| 1346 |
+
dependencies = [
|
| 1347 |
+
"is-terminal",
|
| 1348 |
+
"is_ci",
|
| 1349 |
+
]
|
| 1350 |
+
|
| 1351 |
+
[[package]]
|
| 1352 |
+
name = "supports-color"
|
| 1353 |
+
version = "3.0.2"
|
| 1354 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1355 |
+
checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6"
|
| 1356 |
+
dependencies = [
|
| 1357 |
+
"is_ci",
|
| 1358 |
+
]
|
| 1359 |
+
|
| 1360 |
+
[[package]]
|
| 1361 |
+
name = "syn"
|
| 1362 |
+
version = "2.0.104"
|
| 1363 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1364 |
+
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
|
| 1365 |
+
dependencies = [
|
| 1366 |
+
"proc-macro2",
|
| 1367 |
+
"quote",
|
| 1368 |
+
"unicode-ident",
|
| 1369 |
+
]
|
| 1370 |
+
|
| 1371 |
+
[[package]]
|
| 1372 |
+
name = "sysctl"
|
| 1373 |
+
version = "0.6.0"
|
| 1374 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1375 |
+
checksum = "01198a2debb237c62b6826ec7081082d951f46dbb64b0e8c7649a452230d1dfc"
|
| 1376 |
+
dependencies = [
|
| 1377 |
+
"bitflags 2.6.0",
|
| 1378 |
+
"byteorder",
|
| 1379 |
+
"enum-as-inner",
|
| 1380 |
+
"libc",
|
| 1381 |
+
"thiserror",
|
| 1382 |
+
"walkdir",
|
| 1383 |
+
]
|
| 1384 |
+
|
| 1385 |
+
[[package]]
|
| 1386 |
+
name = "systeroid"
|
| 1387 |
+
version = "0.4.6"
|
| 1388 |
+
dependencies = [
|
| 1389 |
+
"env_logger",
|
| 1390 |
+
"getopts",
|
| 1391 |
+
"log",
|
| 1392 |
+
"parseit",
|
| 1393 |
+
"systeroid-core",
|
| 1394 |
+
]
|
| 1395 |
+
|
| 1396 |
+
[[package]]
|
| 1397 |
+
name = "systeroid-core"
|
| 1398 |
+
version = "0.4.6"
|
| 1399 |
+
dependencies = [
|
| 1400 |
+
"dirs-next",
|
| 1401 |
+
"lazy_static",
|
| 1402 |
+
"log",
|
| 1403 |
+
"owo-colors",
|
| 1404 |
+
"parseit",
|
| 1405 |
+
"rayon",
|
| 1406 |
+
"rust-ini",
|
| 1407 |
+
"serde",
|
| 1408 |
+
"serde_json",
|
| 1409 |
+
"sysctl",
|
| 1410 |
+
"thiserror",
|
| 1411 |
+
]
|
| 1412 |
+
|
| 1413 |
+
[[package]]
|
| 1414 |
+
name = "systeroid-tui"
|
| 1415 |
+
version = "0.4.6"
|
| 1416 |
+
dependencies = [
|
| 1417 |
+
"copypasta-ext",
|
| 1418 |
+
"getopts",
|
| 1419 |
+
"insta",
|
| 1420 |
+
"log",
|
| 1421 |
+
"ratatui",
|
| 1422 |
+
"systeroid-core",
|
| 1423 |
+
"termion",
|
| 1424 |
+
"thiserror",
|
| 1425 |
+
"tui-logger",
|
| 1426 |
+
"unicode-width 0.2.0",
|
| 1427 |
+
]
|
| 1428 |
+
|
| 1429 |
+
[[package]]
|
| 1430 |
+
name = "termion"
|
| 1431 |
+
version = "4.0.5"
|
| 1432 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1433 |
+
checksum = "3669a69de26799d6321a5aa713f55f7e2cd37bd47be044b50f2acafc42c122bb"
|
| 1434 |
+
dependencies = [
|
| 1435 |
+
"libc",
|
| 1436 |
+
"libredox",
|
| 1437 |
+
"numtoa",
|
| 1438 |
+
"redox_termios",
|
| 1439 |
+
]
|
| 1440 |
+
|
| 1441 |
+
[[package]]
|
| 1442 |
+
name = "thiserror"
|
| 1443 |
+
version = "1.0.69"
|
| 1444 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1445 |
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
| 1446 |
+
dependencies = [
|
| 1447 |
+
"thiserror-impl",
|
| 1448 |
+
]
|
| 1449 |
+
|
| 1450 |
+
[[package]]
|
| 1451 |
+
name = "thiserror-impl"
|
| 1452 |
+
version = "1.0.69"
|
| 1453 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1454 |
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
| 1455 |
+
dependencies = [
|
| 1456 |
+
"proc-macro2",
|
| 1457 |
+
"quote",
|
| 1458 |
+
"syn",
|
| 1459 |
+
]
|
| 1460 |
+
|
| 1461 |
+
[[package]]
|
| 1462 |
+
name = "tiny-keccak"
|
| 1463 |
+
version = "2.0.2"
|
| 1464 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1465 |
+
checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
|
| 1466 |
+
dependencies = [
|
| 1467 |
+
"crunchy",
|
| 1468 |
+
]
|
| 1469 |
+
|
| 1470 |
+
[[package]]
|
| 1471 |
+
name = "tui-logger"
|
| 1472 |
+
version = "0.17.3"
|
| 1473 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1474 |
+
checksum = "57ea457a31a3fff1073f83e5c9e1c61a7805c435b2476b1df3a78f934adebabe"
|
| 1475 |
+
dependencies = [
|
| 1476 |
+
"chrono",
|
| 1477 |
+
"env_filter",
|
| 1478 |
+
"fxhash",
|
| 1479 |
+
"lazy_static",
|
| 1480 |
+
"log",
|
| 1481 |
+
"parking_lot",
|
| 1482 |
+
"ratatui",
|
| 1483 |
+
"unicode-segmentation",
|
| 1484 |
+
]
|
| 1485 |
+
|
| 1486 |
+
[[package]]
|
| 1487 |
+
name = "unicode-ident"
|
| 1488 |
+
version = "1.0.14"
|
| 1489 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1490 |
+
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
| 1491 |
+
|
| 1492 |
+
[[package]]
|
| 1493 |
+
name = "unicode-segmentation"
|
| 1494 |
+
version = "1.12.0"
|
| 1495 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1496 |
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
| 1497 |
+
|
| 1498 |
+
[[package]]
|
| 1499 |
+
name = "unicode-truncate"
|
| 1500 |
+
version = "1.1.0"
|
| 1501 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1502 |
+
checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
|
| 1503 |
+
dependencies = [
|
| 1504 |
+
"itertools",
|
| 1505 |
+
"unicode-segmentation",
|
| 1506 |
+
"unicode-width 0.1.14",
|
| 1507 |
+
]
|
| 1508 |
+
|
| 1509 |
+
[[package]]
|
| 1510 |
+
name = "unicode-width"
|
| 1511 |
+
version = "0.1.14"
|
| 1512 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1513 |
+
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
|
| 1514 |
+
|
| 1515 |
+
[[package]]
|
| 1516 |
+
name = "unicode-width"
|
| 1517 |
+
version = "0.2.0"
|
| 1518 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1519 |
+
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
|
| 1520 |
+
|
| 1521 |
+
[[package]]
|
| 1522 |
+
name = "utf8parse"
|
| 1523 |
+
version = "0.2.2"
|
| 1524 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1525 |
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
| 1526 |
+
|
| 1527 |
+
[[package]]
|
| 1528 |
+
name = "walkdir"
|
| 1529 |
+
version = "2.5.0"
|
| 1530 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1531 |
+
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
| 1532 |
+
dependencies = [
|
| 1533 |
+
"same-file",
|
| 1534 |
+
"winapi-util",
|
| 1535 |
+
]
|
| 1536 |
+
|
| 1537 |
+
[[package]]
|
| 1538 |
+
name = "wasi"
|
| 1539 |
+
version = "0.11.0+wasi-snapshot-preview1"
|
| 1540 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1541 |
+
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
| 1542 |
+
|
| 1543 |
+
[[package]]
|
| 1544 |
+
name = "wasm-bindgen"
|
| 1545 |
+
version = "0.2.99"
|
| 1546 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1547 |
+
checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
|
| 1548 |
+
dependencies = [
|
| 1549 |
+
"cfg-if",
|
| 1550 |
+
"once_cell",
|
| 1551 |
+
"wasm-bindgen-macro",
|
| 1552 |
+
]
|
| 1553 |
+
|
| 1554 |
+
[[package]]
|
| 1555 |
+
name = "wasm-bindgen-backend"
|
| 1556 |
+
version = "0.2.99"
|
| 1557 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1558 |
+
checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
|
| 1559 |
+
dependencies = [
|
| 1560 |
+
"bumpalo",
|
| 1561 |
+
"log",
|
| 1562 |
+
"proc-macro2",
|
| 1563 |
+
"quote",
|
| 1564 |
+
"syn",
|
| 1565 |
+
"wasm-bindgen-shared",
|
| 1566 |
+
]
|
| 1567 |
+
|
| 1568 |
+
[[package]]
|
| 1569 |
+
name = "wasm-bindgen-macro"
|
| 1570 |
+
version = "0.2.99"
|
| 1571 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1572 |
+
checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
|
| 1573 |
+
dependencies = [
|
| 1574 |
+
"quote",
|
| 1575 |
+
"wasm-bindgen-macro-support",
|
| 1576 |
+
]
|
| 1577 |
+
|
| 1578 |
+
[[package]]
|
| 1579 |
+
name = "wasm-bindgen-macro-support"
|
| 1580 |
+
version = "0.2.99"
|
| 1581 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1582 |
+
checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
|
| 1583 |
+
dependencies = [
|
| 1584 |
+
"proc-macro2",
|
| 1585 |
+
"quote",
|
| 1586 |
+
"syn",
|
| 1587 |
+
"wasm-bindgen-backend",
|
| 1588 |
+
"wasm-bindgen-shared",
|
| 1589 |
+
]
|
| 1590 |
+
|
| 1591 |
+
[[package]]
|
| 1592 |
+
name = "wasm-bindgen-shared"
|
| 1593 |
+
version = "0.2.99"
|
| 1594 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1595 |
+
checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
|
| 1596 |
+
|
| 1597 |
+
[[package]]
|
| 1598 |
+
name = "wayland-client"
|
| 1599 |
+
version = "0.29.5"
|
| 1600 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1601 |
+
checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715"
|
| 1602 |
+
dependencies = [
|
| 1603 |
+
"bitflags 1.3.2",
|
| 1604 |
+
"downcast-rs",
|
| 1605 |
+
"libc",
|
| 1606 |
+
"nix",
|
| 1607 |
+
"scoped-tls",
|
| 1608 |
+
"wayland-commons",
|
| 1609 |
+
"wayland-scanner",
|
| 1610 |
+
"wayland-sys",
|
| 1611 |
+
]
|
| 1612 |
+
|
| 1613 |
+
[[package]]
|
| 1614 |
+
name = "wayland-commons"
|
| 1615 |
+
version = "0.29.5"
|
| 1616 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1617 |
+
checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902"
|
| 1618 |
+
dependencies = [
|
| 1619 |
+
"nix",
|
| 1620 |
+
"once_cell",
|
| 1621 |
+
"smallvec",
|
| 1622 |
+
"wayland-sys",
|
| 1623 |
+
]
|
| 1624 |
+
|
| 1625 |
+
[[package]]
|
| 1626 |
+
name = "wayland-cursor"
|
| 1627 |
+
version = "0.29.5"
|
| 1628 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1629 |
+
checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661"
|
| 1630 |
+
dependencies = [
|
| 1631 |
+
"nix",
|
| 1632 |
+
"wayland-client",
|
| 1633 |
+
"xcursor",
|
| 1634 |
+
]
|
| 1635 |
+
|
| 1636 |
+
[[package]]
|
| 1637 |
+
name = "wayland-protocols"
|
| 1638 |
+
version = "0.29.5"
|
| 1639 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1640 |
+
checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6"
|
| 1641 |
+
dependencies = [
|
| 1642 |
+
"bitflags 1.3.2",
|
| 1643 |
+
"wayland-client",
|
| 1644 |
+
"wayland-commons",
|
| 1645 |
+
"wayland-scanner",
|
| 1646 |
+
]
|
| 1647 |
+
|
| 1648 |
+
[[package]]
|
| 1649 |
+
name = "wayland-scanner"
|
| 1650 |
+
version = "0.29.5"
|
| 1651 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1652 |
+
checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53"
|
| 1653 |
+
dependencies = [
|
| 1654 |
+
"proc-macro2",
|
| 1655 |
+
"quote",
|
| 1656 |
+
"xml-rs",
|
| 1657 |
+
]
|
| 1658 |
+
|
| 1659 |
+
[[package]]
|
| 1660 |
+
name = "wayland-sys"
|
| 1661 |
+
version = "0.29.5"
|
| 1662 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1663 |
+
checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4"
|
| 1664 |
+
dependencies = [
|
| 1665 |
+
"dlib",
|
| 1666 |
+
"lazy_static",
|
| 1667 |
+
"pkg-config",
|
| 1668 |
+
]
|
| 1669 |
+
|
| 1670 |
+
[[package]]
|
| 1671 |
+
name = "which"
|
| 1672 |
+
version = "4.4.2"
|
| 1673 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1674 |
+
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
|
| 1675 |
+
dependencies = [
|
| 1676 |
+
"either",
|
| 1677 |
+
"home",
|
| 1678 |
+
"once_cell",
|
| 1679 |
+
"rustix",
|
| 1680 |
+
]
|
| 1681 |
+
|
| 1682 |
+
[[package]]
|
| 1683 |
+
name = "winapi"
|
| 1684 |
+
version = "0.3.9"
|
| 1685 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1686 |
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
| 1687 |
+
dependencies = [
|
| 1688 |
+
"winapi-i686-pc-windows-gnu",
|
| 1689 |
+
"winapi-x86_64-pc-windows-gnu",
|
| 1690 |
+
]
|
| 1691 |
+
|
| 1692 |
+
[[package]]
|
| 1693 |
+
name = "winapi-i686-pc-windows-gnu"
|
| 1694 |
+
version = "0.4.0"
|
| 1695 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1696 |
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
| 1697 |
+
|
| 1698 |
+
[[package]]
|
| 1699 |
+
name = "winapi-util"
|
| 1700 |
+
version = "0.1.9"
|
| 1701 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1702 |
+
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
| 1703 |
+
dependencies = [
|
| 1704 |
+
"windows-sys 0.59.0",
|
| 1705 |
+
]
|
| 1706 |
+
|
| 1707 |
+
[[package]]
|
| 1708 |
+
name = "winapi-wsapoll"
|
| 1709 |
+
version = "0.1.2"
|
| 1710 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1711 |
+
checksum = "1eafc5f679c576995526e81635d0cf9695841736712b4e892f87abbe6fed3f28"
|
| 1712 |
+
dependencies = [
|
| 1713 |
+
"winapi",
|
| 1714 |
+
]
|
| 1715 |
+
|
| 1716 |
+
[[package]]
|
| 1717 |
+
name = "winapi-x86_64-pc-windows-gnu"
|
| 1718 |
+
version = "0.4.0"
|
| 1719 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1720 |
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
| 1721 |
+
|
| 1722 |
+
[[package]]
|
| 1723 |
+
name = "windows-core"
|
| 1724 |
+
version = "0.52.0"
|
| 1725 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1726 |
+
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
|
| 1727 |
+
dependencies = [
|
| 1728 |
+
"windows-targets",
|
| 1729 |
+
]
|
| 1730 |
+
|
| 1731 |
+
[[package]]
|
| 1732 |
+
name = "windows-sys"
|
| 1733 |
+
version = "0.52.0"
|
| 1734 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1735 |
+
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
| 1736 |
+
dependencies = [
|
| 1737 |
+
"windows-targets",
|
| 1738 |
+
]
|
| 1739 |
+
|
| 1740 |
+
[[package]]
|
| 1741 |
+
name = "windows-sys"
|
| 1742 |
+
version = "0.59.0"
|
| 1743 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1744 |
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
| 1745 |
+
dependencies = [
|
| 1746 |
+
"windows-targets",
|
| 1747 |
+
]
|
| 1748 |
+
|
| 1749 |
+
[[package]]
|
| 1750 |
+
name = "windows-targets"
|
| 1751 |
+
version = "0.52.6"
|
| 1752 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1753 |
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
| 1754 |
+
dependencies = [
|
| 1755 |
+
"windows_aarch64_gnullvm",
|
| 1756 |
+
"windows_aarch64_msvc",
|
| 1757 |
+
"windows_i686_gnu",
|
| 1758 |
+
"windows_i686_gnullvm",
|
| 1759 |
+
"windows_i686_msvc",
|
| 1760 |
+
"windows_x86_64_gnu",
|
| 1761 |
+
"windows_x86_64_gnullvm",
|
| 1762 |
+
"windows_x86_64_msvc",
|
| 1763 |
+
]
|
| 1764 |
+
|
| 1765 |
+
[[package]]
|
| 1766 |
+
name = "windows_aarch64_gnullvm"
|
| 1767 |
+
version = "0.52.6"
|
| 1768 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1769 |
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
| 1770 |
+
|
| 1771 |
+
[[package]]
|
| 1772 |
+
name = "windows_aarch64_msvc"
|
| 1773 |
+
version = "0.52.6"
|
| 1774 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1775 |
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
| 1776 |
+
|
| 1777 |
+
[[package]]
|
| 1778 |
+
name = "windows_i686_gnu"
|
| 1779 |
+
version = "0.52.6"
|
| 1780 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1781 |
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
| 1782 |
+
|
| 1783 |
+
[[package]]
|
| 1784 |
+
name = "windows_i686_gnullvm"
|
| 1785 |
+
version = "0.52.6"
|
| 1786 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1787 |
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
| 1788 |
+
|
| 1789 |
+
[[package]]
|
| 1790 |
+
name = "windows_i686_msvc"
|
| 1791 |
+
version = "0.52.6"
|
| 1792 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1793 |
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
| 1794 |
+
|
| 1795 |
+
[[package]]
|
| 1796 |
+
name = "windows_x86_64_gnu"
|
| 1797 |
+
version = "0.52.6"
|
| 1798 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1799 |
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
| 1800 |
+
|
| 1801 |
+
[[package]]
|
| 1802 |
+
name = "windows_x86_64_gnullvm"
|
| 1803 |
+
version = "0.52.6"
|
| 1804 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1805 |
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
| 1806 |
+
|
| 1807 |
+
[[package]]
|
| 1808 |
+
name = "windows_x86_64_msvc"
|
| 1809 |
+
version = "0.52.6"
|
| 1810 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1811 |
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
| 1812 |
+
|
| 1813 |
+
[[package]]
|
| 1814 |
+
name = "x11-clipboard"
|
| 1815 |
+
version = "0.7.1"
|
| 1816 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1817 |
+
checksum = "980b9aa9226c3b7de8e2adb11bf20124327c054e0e5812d2aac0b5b5a87e7464"
|
| 1818 |
+
dependencies = [
|
| 1819 |
+
"x11rb",
|
| 1820 |
+
]
|
| 1821 |
+
|
| 1822 |
+
[[package]]
|
| 1823 |
+
name = "x11rb"
|
| 1824 |
+
version = "0.10.1"
|
| 1825 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1826 |
+
checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507"
|
| 1827 |
+
dependencies = [
|
| 1828 |
+
"gethostname",
|
| 1829 |
+
"nix",
|
| 1830 |
+
"winapi",
|
| 1831 |
+
"winapi-wsapoll",
|
| 1832 |
+
"x11rb-protocol",
|
| 1833 |
+
]
|
| 1834 |
+
|
| 1835 |
+
[[package]]
|
| 1836 |
+
name = "x11rb-protocol"
|
| 1837 |
+
version = "0.10.0"
|
| 1838 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1839 |
+
checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67"
|
| 1840 |
+
dependencies = [
|
| 1841 |
+
"nix",
|
| 1842 |
+
]
|
| 1843 |
+
|
| 1844 |
+
[[package]]
|
| 1845 |
+
name = "xcursor"
|
| 1846 |
+
version = "0.3.8"
|
| 1847 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1848 |
+
checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61"
|
| 1849 |
+
|
| 1850 |
+
[[package]]
|
| 1851 |
+
name = "xml-rs"
|
| 1852 |
+
version = "0.8.24"
|
| 1853 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1854 |
+
checksum = "ea8b391c9a790b496184c29f7f93b9ed5b16abb306c05415b68bcc16e4d06432"
|
| 1855 |
+
|
| 1856 |
+
[[package]]
|
| 1857 |
+
name = "yansi"
|
| 1858 |
+
version = "1.0.1"
|
| 1859 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1860 |
+
checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
|
| 1861 |
+
LOCKEOF
|
| 1862 |
+
|
| 1863 |
+
# systeroid-core package manifest (mirrors systeroid-core/Cargo.toml).
|
| 1864 |
+
cat > "$WORK/systeroid-core/Cargo.toml" <<'EOF'
|
| 1865 |
+
[package]
|
| 1866 |
+
name = "systeroid-core"
|
| 1867 |
+
version = "0.4.6"
|
| 1868 |
+
edition = "2021"
|
| 1869 |
+
|
| 1870 |
+
[dependencies]
|
| 1871 |
+
parseit = { version = "0.1.2", features = ["gzip"] }
|
| 1872 |
+
log = { version = "0.4.28", features = ["std"] }
|
| 1873 |
+
thiserror = "1.0.69"
|
| 1874 |
+
sysctl = "0.6.0"
|
| 1875 |
+
lazy_static = "1.5.0"
|
| 1876 |
+
rayon = "1.11.0"
|
| 1877 |
+
owo-colors = { version = "4.2.2", features = ["supports-colors"] }
|
| 1878 |
+
serde = { version = "1.0.224", features = ["derive"] }
|
| 1879 |
+
serde_json = "1.0.145"
|
| 1880 |
+
dirs-next = "2.0.0"
|
| 1881 |
+
rust-ini = "0.21.3"
|
| 1882 |
+
EOF
|
| 1883 |
+
printf 'pub fn stub() {}\n' > "$WORK/systeroid-core/src/lib.rs"
|
| 1884 |
+
|
| 1885 |
+
# systeroid package manifest (mirrors systeroid/Cargo.toml).
|
| 1886 |
+
cat > "$WORK/systeroid/Cargo.toml" <<'EOF'
|
| 1887 |
+
[package]
|
| 1888 |
+
name = "systeroid"
|
| 1889 |
+
version = "0.4.6"
|
| 1890 |
+
edition = "2021"
|
| 1891 |
+
|
| 1892 |
+
[[bin]]
|
| 1893 |
+
name = "systeroid"
|
| 1894 |
+
path = "src/main.rs"
|
| 1895 |
+
|
| 1896 |
+
[dependencies]
|
| 1897 |
+
parseit = { version = "0.1.2", features = ["gzip"] }
|
| 1898 |
+
log = { version = "0.4.28", features = ["std"] }
|
| 1899 |
+
env_logger = "0.11.8"
|
| 1900 |
+
getopts = "0.2.24"
|
| 1901 |
+
systeroid-core = { path = "../systeroid-core", version = "0.4.6" }
|
| 1902 |
+
EOF
|
| 1903 |
+
printf 'fn main() {}\n' > "$WORK/systeroid/src/main.rs"
|
| 1904 |
+
printf 'pub fn stub() {}\n' > "$WORK/systeroid/src/lib.rs"
|
| 1905 |
+
|
| 1906 |
+
# systeroid-tui package manifest (mirrors systeroid-tui/Cargo.toml, default features).
|
| 1907 |
+
cat > "$WORK/systeroid-tui/Cargo.toml" <<'EOF'
|
| 1908 |
+
[package]
|
| 1909 |
+
name = "systeroid-tui"
|
| 1910 |
+
version = "0.4.6"
|
| 1911 |
+
edition = "2021"
|
| 1912 |
+
|
| 1913 |
+
[features]
|
| 1914 |
+
default = ["clipboard"]
|
| 1915 |
+
clipboard = ["copypasta-ext"]
|
| 1916 |
+
|
| 1917 |
+
[dependencies]
|
| 1918 |
+
termion = "4.0.5"
|
| 1919 |
+
unicode-width = "0.2.0"
|
| 1920 |
+
getopts = "0.2.24"
|
| 1921 |
+
copypasta-ext = { version = "0.4.4", optional = true }
|
| 1922 |
+
log = { version = "0.4.28", features = ["std"] }
|
| 1923 |
+
thiserror = "1.0.69"
|
| 1924 |
+
systeroid-core = { path = "../systeroid-core", version = "0.4.6" }
|
| 1925 |
+
ratatui = { version = "0.29.0", default-features = false, features = ["termion"] }
|
| 1926 |
+
tui-logger = { version = "0.17.3", default-features = false, features = ["termion"] }
|
| 1927 |
+
|
| 1928 |
+
[dev-dependencies]
|
| 1929 |
+
insta = "1.43.2"
|
| 1930 |
+
EOF
|
| 1931 |
+
printf 'pub fn stub() {}\n' > "$WORK/systeroid-tui/src/lib.rs"
|
| 1932 |
+
|
| 1933 |
+
# ---- Prefetch the exact pinned dependency closure for the offline build.
|
| 1934 |
+
cargo fetch --locked --manifest-path "$WORK/Cargo.toml"
|
| 1935 |
+
|
| 1936 |
+
rm -rf "$WORK"
|
orhun--systeroid.810348e/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf94c10b98da788c4637f0bc7595a436a6ab1a3576aa01ce31febe5c0a95fe6d
|
| 3 |
+
size 2998208
|
orhun--systeroid.810348e/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
|
orhun--systeroid.810348e/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e554ebd468e19d11f1d26f1770e334fa898f93683905212637dfe4670bd01b30
|
| 3 |
+
size 1187331
|
orhun--systeroid.810348e/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
|