Datasets:
Upload folder using huggingface_hub (part 8)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +56 -0
- automata-labs-team--code-sandbox/tests/programgym_evaluator.py +1201 -0
- automata-labs-team--code-sandbox/tests/programgym_task.json +1254 -0
- automata-labs-team--code-sandbox/tests/test.sh +82 -0
- automata-labs-team--code-sandbox/tests/workspace.tar.gz +3 -0
- autometrics-dev--autometrics-rs/environment/Dockerfile +59 -0
- autometrics-dev--autometrics-rs/environment/download.sh +459 -0
- autometrics-dev--autometrics-rs/environment/executable +3 -0
- autometrics-dev--autometrics-rs/environment/harbor_prepare_download_env.sh +37 -0
- autometrics-dev--autometrics-rs/environment/workspace.tar.gz +3 -0
- autometrics-dev--autometrics-rs/instruction.md +98 -0
- autometrics-dev--autometrics-rs/solution/solve.sh +33 -0
- autometrics-dev--autometrics-rs/task.toml +69 -0
- autometrics-dev--autometrics-rs/tests/Dockerfile +68 -0
- autometrics-dev--autometrics-rs/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- autometrics-dev--autometrics-rs/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- autometrics-dev--autometrics-rs/tests/download.sh +459 -0
- autometrics-dev--autometrics-rs/tests/executable +3 -0
- autometrics-dev--autometrics-rs/tests/harbor_prepare_download_env.sh +37 -0
- autometrics-dev--autometrics-rs/tests/programgym_evaluator.py +1201 -0
- autometrics-dev--autometrics-rs/tests/programgym_task.json +810 -0
- autometrics-dev--autometrics-rs/tests/test.sh +82 -0
- autometrics-dev--autometrics-rs/tests/workspace.tar.gz +3 -0
- autopawn--3d-ascii-viewer.d122eb/environment/Dockerfile +56 -0
- autopawn--3d-ascii-viewer.d122eb/environment/download.sh +49 -0
- autopawn--3d-ascii-viewer.d122eb/environment/executable +0 -0
- autopawn--3d-ascii-viewer.d122eb/environment/harbor_prepare_download_env.sh +34 -0
- autopawn--3d-ascii-viewer.d122eb/environment/workspace.tar.gz +3 -0
- autopawn--3d-ascii-viewer.d122eb/instruction.md +98 -0
- autopawn--3d-ascii-viewer.d122eb/solution/solve.sh +33 -0
- autopawn--3d-ascii-viewer.d122eb/task.toml +69 -0
- autopawn--3d-ascii-viewer.d122eb/tests/Dockerfile +70 -0
- autopawn--3d-ascii-viewer.d122eb/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- autopawn--3d-ascii-viewer.d122eb/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- autopawn--3d-ascii-viewer.d122eb/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- autopawn--3d-ascii-viewer.d122eb/tests/blobs/tests/generated_module_04.tar.gz +3 -0
- autopawn--3d-ascii-viewer.d122eb/tests/download.sh +49 -0
- autopawn--3d-ascii-viewer.d122eb/tests/executable +0 -0
- autopawn--3d-ascii-viewer.d122eb/tests/harbor_prepare_download_env.sh +34 -0
- autopawn--3d-ascii-viewer.d122eb/tests/programgym_evaluator.py +1201 -0
- autopawn--3d-ascii-viewer.d122eb/tests/programgym_task.json +935 -0
- autopawn--3d-ascii-viewer.d122eb/tests/test.sh +82 -0
- autopawn--3d-ascii-viewer.d122eb/tests/workspace.tar.gz +3 -0
- autotag-dev--autotag.d0176cb/environment/Dockerfile +60 -0
- autotag-dev--autotag.d0176cb/environment/download.sh +75 -0
- autotag-dev--autotag.d0176cb/environment/executable +3 -0
- autotag-dev--autotag.d0176cb/environment/programgym-go.tar.gz +3 -0
- autotag-dev--autotag.d0176cb/environment/workspace.tar.gz +3 -0
- autotag-dev--autotag.d0176cb/instruction.md +98 -0
- autotag-dev--autotag.d0176cb/solution/solve.sh +33 -0
.gitattributes
CHANGED
|
@@ -280,3 +280,59 @@ atotto--clipboard.8ac5904/environment/executable filter=lfs diff=lfs merge=lfs -
|
|
| 280 |
atotto--clipboard.8ac5904/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 281 |
automata-labs-team--code-sandbox/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 282 |
automata-labs-team--code-sandbox/tests/executable filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
atotto--clipboard.8ac5904/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 281 |
automata-labs-team--code-sandbox/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 282 |
automata-labs-team--code-sandbox/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 283 |
+
autometrics-dev--autometrics-rs/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 284 |
+
autometrics-dev--autometrics-rs/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 285 |
+
autotag-dev--autotag.d0176cb/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 286 |
+
autotag-dev--autotag.d0176cb/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 287 |
+
auxten--go-sqldb.bbea46d/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 288 |
+
auxten--go-sqldb.bbea46d/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 289 |
+
auyer--steganography.4290c10/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 290 |
+
auyer--steganography.4290c10/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 291 |
+
avtechscientific--asl.f3b739c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 292 |
+
avtechscientific--asl.f3b739c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 293 |
+
awalsh128--cache-apt-pkgs-action/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 294 |
+
awalsh128--cache-apt-pkgs-action/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 295 |
+
aws--aws-lambda-go.87e344b/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 296 |
+
aws--aws-lambda-go.87e344b/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 297 |
+
aws--session-manager-plugin.930a/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 298 |
+
aws--session-manager-plugin.930a/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 299 |
+
awslabs--amazon-ecr-credential-h/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 300 |
+
awslabs--amazon-ecr-credential-h/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 301 |
+
axllent--wireguard-vanity-keygen/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 302 |
+
axllent--wireguard-vanity-keygen/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 303 |
+
aydinnyunus--exiflooter.b8cc568/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 304 |
+
aydinnyunus--exiflooter.b8cc568/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 305 |
+
aykamko--tag.a1f5b04/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 306 |
+
aykamko--tag.a1f5b04/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 307 |
+
aymanbagabas--go-udiff.9a65141/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 308 |
+
aymanbagabas--go-udiff.9a65141/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 309 |
+
azure--secrets-store-csi-driver/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 310 |
+
azure--secrets-store-csi-driver/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 311 |
+
azuremarker--shaku.0f90dd9/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 312 |
+
azuremarker--shaku.0f90dd9/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 313 |
+
b23r0--rsocx.4d8cc59/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 314 |
+
b23r0--rsocx.4d8cc59/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 315 |
+
badboy--mdbook-mermaid.25c2b56/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 316 |
+
badboy--mdbook-mermaid.25c2b56/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 317 |
+
baidu--babylon.67cd149/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 318 |
+
baidu--babylon.67cd149/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 319 |
+
baidu--familia.958febf/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 320 |
+
baidu--familia.958febf/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 321 |
+
baidu--lac.3e10dbe/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 322 |
+
baidu--lac.3e10dbe/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 323 |
+
baize1998--go-learning.91f9a3c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 324 |
+
baize1998--go-learning.91f9a3c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 325 |
+
balacode--one-file-pdf.6d37537/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 326 |
+
balacode--one-file-pdf.6d37537/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 327 |
+
banach-space--llvm-tutor.6245457/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 328 |
+
banach-space--llvm-tutor.6245457/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 329 |
+
banksy-git--lidl-gateway-freedom/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 330 |
+
banksy-git--lidl-gateway-freedom/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 331 |
+
bayraktugrul--modview.58e3966/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 332 |
+
bayraktugrul--modview.58e3966/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 333 |
+
bcicen--grmon.63facda/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 334 |
+
bcicen--grmon.63facda/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 335 |
+
bcicen--jstream.6894471/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 336 |
+
bcicen--jstream.6894471/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 337 |
+
bcicen--slackcat.5c4e441/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 338 |
+
bcicen--slackcat.5c4e441/tests/executable filter=lfs diff=lfs merge=lfs -text
|
automata-labs-team--code-sandbox/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()
|
automata-labs-team--code-sandbox/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,1254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [
|
| 7 |
+
{
|
| 8 |
+
"name": "eval.tests.test_01_cli_flags.test_default_invocation_does_not_crash",
|
| 9 |
+
"reasons": [
|
| 10 |
+
{
|
| 11 |
+
"id": "generic_keyword_oracle",
|
| 12 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 13 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 14 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 15 |
+
"severity": "error",
|
| 16 |
+
"stage": "static_lint"
|
| 17 |
+
}
|
| 18 |
+
]
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"name": "eval.tests.test_01_cli_flags.test_help_usage_lists_only_install_and_no_update",
|
| 22 |
+
"reasons": [
|
| 23 |
+
{
|
| 24 |
+
"id": "assertion_disjunction",
|
| 25 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 26 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 27 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 28 |
+
"severity": "error",
|
| 29 |
+
"stage": "static_lint"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"id": "short_substring",
|
| 33 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 34 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 35 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 36 |
+
"severity": "error",
|
| 37 |
+
"stage": "static_lint"
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"id": "generic_keyword_oracle",
|
| 41 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 42 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 43 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 44 |
+
"severity": "error",
|
| 45 |
+
"stage": "static_lint"
|
| 46 |
+
}
|
| 47 |
+
]
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"name": "eval.tests.test_01_cli_flags.test_install_combines_with_no_update",
|
| 51 |
+
"reasons": [
|
| 52 |
+
{
|
| 53 |
+
"detail": "AssertionError: assert 0 == 1 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install', '--no-update'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claud",
|
| 54 |
+
"id": "gold_fail",
|
| 55 |
+
"message": "test failed against the reference executable",
|
| 56 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 57 |
+
"severity": "error",
|
| 58 |
+
"stage": "gold_execution"
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"id": "short_substring",
|
| 62 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 63 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 64 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 65 |
+
"severity": "error",
|
| 66 |
+
"stage": "static_lint"
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"id": "generic_keyword_oracle",
|
| 70 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 71 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 72 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 73 |
+
"severity": "error",
|
| 74 |
+
"stage": "static_lint"
|
| 75 |
+
}
|
| 76 |
+
]
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"name": "eval.tests.test_01_cli_flags.test_install_error_path_reports_error_to_stderr",
|
| 80 |
+
"reasons": [
|
| 81 |
+
{
|
| 82 |
+
"detail": "AssertionError: assert 0 == 1 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claude/claude_deskto",
|
| 83 |
+
"id": "gold_fail",
|
| 84 |
+
"message": "test failed against the reference executable",
|
| 85 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 86 |
+
"severity": "error",
|
| 87 |
+
"stage": "gold_execution"
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"id": "short_substring",
|
| 91 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 92 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 93 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 94 |
+
"severity": "error",
|
| 95 |
+
"stage": "static_lint"
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"id": "generic_keyword_oracle",
|
| 99 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 100 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 101 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 102 |
+
"severity": "error",
|
| 103 |
+
"stage": "static_lint"
|
| 104 |
+
}
|
| 105 |
+
]
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"name": "eval.tests.test_01_cli_flags.test_install_failure_creates_no_config_artifact",
|
| 109 |
+
"reasons": [
|
| 110 |
+
{
|
| 111 |
+
"detail": "AssertionError: assert 0 == 1 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claude/claude_deskto",
|
| 112 |
+
"id": "gold_fail",
|
| 113 |
+
"message": "test failed against the reference executable",
|
| 114 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 115 |
+
"severity": "error",
|
| 116 |
+
"stage": "gold_execution"
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"id": "short_substring",
|
| 120 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 121 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 122 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 123 |
+
"severity": "error",
|
| 124 |
+
"stage": "static_lint"
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"id": "generic_keyword_oracle",
|
| 128 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 129 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 130 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 131 |
+
"severity": "error",
|
| 132 |
+
"stage": "static_lint"
|
| 133 |
+
}
|
| 134 |
+
]
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"name": "eval.tests.test_01_cli_flags.test_port_flag_is_rejected_because_unregistered_at_init_parse",
|
| 138 |
+
"reasons": [
|
| 139 |
+
{
|
| 140 |
+
"id": "short_substring",
|
| 141 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 142 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 143 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 144 |
+
"severity": "error",
|
| 145 |
+
"stage": "static_lint"
|
| 146 |
+
}
|
| 147 |
+
]
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"name": "eval.tests.test_01_cli_flags.test_transport_flag_is_rejected_because_unregistered_at_init_parse",
|
| 151 |
+
"reasons": [
|
| 152 |
+
{
|
| 153 |
+
"id": "short_substring",
|
| 154 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 155 |
+
"path": "eval/tests/test_01_cli_flags.py",
|
| 156 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 157 |
+
"severity": "error",
|
| 158 |
+
"stage": "static_lint"
|
| 159 |
+
}
|
| 160 |
+
]
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"name": "eval.tests.test_02_mcp_handshake.test_blank_line_yields_parse_error_between_requests",
|
| 164 |
+
"reasons": [
|
| 165 |
+
{
|
| 166 |
+
"id": "test_network_dependency",
|
| 167 |
+
"message": "test appears to depend on networking",
|
| 168 |
+
"path": "eval/tests/test_02_mcp_handshake.py",
|
| 169 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 170 |
+
"severity": "error",
|
| 171 |
+
"stage": "static_lint"
|
| 172 |
+
}
|
| 173 |
+
]
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"name": "eval.tests.test_02_mcp_handshake.test_initialize_returns_server_info",
|
| 177 |
+
"reasons": [
|
| 178 |
+
{
|
| 179 |
+
"id": "short_substring",
|
| 180 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 181 |
+
"path": "eval/tests/test_02_mcp_handshake.py",
|
| 182 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 183 |
+
"severity": "error",
|
| 184 |
+
"stage": "static_lint"
|
| 185 |
+
}
|
| 186 |
+
]
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"name": "eval.tests.test_02_mcp_handshake.test_initialize_without_protocol_version",
|
| 190 |
+
"reasons": [
|
| 191 |
+
{
|
| 192 |
+
"id": "short_substring",
|
| 193 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 194 |
+
"path": "eval/tests/test_02_mcp_handshake.py",
|
| 195 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 196 |
+
"severity": "error",
|
| 197 |
+
"stage": "static_lint"
|
| 198 |
+
}
|
| 199 |
+
]
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"name": "eval.tests.test_02_mcp_handshake.test_invalid_json_rpc_version_rejected",
|
| 203 |
+
"reasons": [
|
| 204 |
+
{
|
| 205 |
+
"id": "short_substring",
|
| 206 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 207 |
+
"path": "eval/tests/test_02_mcp_handshake.py",
|
| 208 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 209 |
+
"severity": "error",
|
| 210 |
+
"stage": "static_lint"
|
| 211 |
+
}
|
| 212 |
+
]
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"name": "eval.tests.test_02_mcp_handshake.test_multiple_requests_in_one_session",
|
| 216 |
+
"reasons": [
|
| 217 |
+
{
|
| 218 |
+
"id": "test_network_dependency",
|
| 219 |
+
"message": "test appears to depend on networking",
|
| 220 |
+
"path": "eval/tests/test_02_mcp_handshake.py",
|
| 221 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 222 |
+
"severity": "error",
|
| 223 |
+
"stage": "static_lint"
|
| 224 |
+
}
|
| 225 |
+
]
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"name": "eval.tests.test_03_tool_registration.test_all_properties_are_typed_string_objects",
|
| 229 |
+
"reasons": [
|
| 230 |
+
{
|
| 231 |
+
"id": "short_substring",
|
| 232 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 233 |
+
"path": "eval/tests/test_03_tool_registration.py",
|
| 234 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 235 |
+
"severity": "error",
|
| 236 |
+
"stage": "static_lint"
|
| 237 |
+
}
|
| 238 |
+
]
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"name": "eval.tests.test_03_tool_registration.test_copy_file_required_fields",
|
| 242 |
+
"reasons": [
|
| 243 |
+
{
|
| 244 |
+
"id": "short_substring",
|
| 245 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 246 |
+
"path": "eval/tests/test_03_tool_registration.py",
|
| 247 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 248 |
+
"severity": "error",
|
| 249 |
+
"stage": "static_lint"
|
| 250 |
+
}
|
| 251 |
+
]
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"name": "eval.tests.test_03_tool_registration.test_write_file_required_fields",
|
| 255 |
+
"reasons": [
|
| 256 |
+
{
|
| 257 |
+
"id": "short_substring",
|
| 258 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 259 |
+
"path": "eval/tests/test_03_tool_registration.py",
|
| 260 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 261 |
+
"severity": "error",
|
| 262 |
+
"stage": "static_lint"
|
| 263 |
+
}
|
| 264 |
+
]
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"name": "eval.tests.test_04_tool_calls.test_copy_file_attempts_docker",
|
| 268 |
+
"reasons": [
|
| 269 |
+
{
|
| 270 |
+
"id": "short_substring",
|
| 271 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 272 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 273 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 274 |
+
"severity": "error",
|
| 275 |
+
"stage": "static_lint"
|
| 276 |
+
}
|
| 277 |
+
]
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"name": "eval.tests.test_04_tool_calls.test_copy_file_from_sandbox_attempts_docker",
|
| 281 |
+
"reasons": [
|
| 282 |
+
{
|
| 283 |
+
"id": "short_substring",
|
| 284 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 285 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 286 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 287 |
+
"severity": "error",
|
| 288 |
+
"stage": "static_lint"
|
| 289 |
+
}
|
| 290 |
+
]
|
| 291 |
+
},
|
| 292 |
+
{
|
| 293 |
+
"name": "eval.tests.test_04_tool_calls.test_copy_project_missing_required_is_validated",
|
| 294 |
+
"reasons": [
|
| 295 |
+
{
|
| 296 |
+
"id": "short_substring",
|
| 297 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 298 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 299 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 300 |
+
"severity": "error",
|
| 301 |
+
"stage": "static_lint"
|
| 302 |
+
}
|
| 303 |
+
]
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"name": "eval.tests.test_04_tool_calls.test_copy_project_with_ids_attempts_docker",
|
| 307 |
+
"reasons": [
|
| 308 |
+
{
|
| 309 |
+
"id": "assertion_disjunction",
|
| 310 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 311 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 312 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 313 |
+
"severity": "error",
|
| 314 |
+
"stage": "static_lint"
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"id": "short_substring",
|
| 318 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 319 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 320 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 321 |
+
"severity": "error",
|
| 322 |
+
"stage": "static_lint"
|
| 323 |
+
}
|
| 324 |
+
]
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"name": "eval.tests.test_04_tool_calls.test_initialize_custom_image_attempts_that_image",
|
| 328 |
+
"reasons": [
|
| 329 |
+
{
|
| 330 |
+
"id": "short_substring",
|
| 331 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 332 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 333 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 334 |
+
"severity": "error",
|
| 335 |
+
"stage": "static_lint"
|
| 336 |
+
}
|
| 337 |
+
]
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"name": "eval.tests.test_04_tool_calls.test_initialize_tries_docker_and_reports_daemon_error",
|
| 341 |
+
"reasons": [
|
| 342 |
+
{
|
| 343 |
+
"id": "assertion_disjunction",
|
| 344 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 345 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 346 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 347 |
+
"severity": "error",
|
| 348 |
+
"stage": "static_lint"
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"id": "short_substring",
|
| 352 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 353 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 354 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 355 |
+
"severity": "error",
|
| 356 |
+
"stage": "static_lint"
|
| 357 |
+
}
|
| 358 |
+
]
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"name": "eval.tests.test_04_tool_calls.test_jsonrpc_version_mismatch_for_tool_call",
|
| 362 |
+
"reasons": [
|
| 363 |
+
{
|
| 364 |
+
"id": "short_substring",
|
| 365 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 366 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 367 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 368 |
+
"severity": "error",
|
| 369 |
+
"stage": "static_lint"
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"id": "generic_keyword_oracle",
|
| 373 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 374 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 375 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 376 |
+
"severity": "error",
|
| 377 |
+
"stage": "static_lint"
|
| 378 |
+
}
|
| 379 |
+
]
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"name": "eval.tests.test_04_tool_calls.test_sandbox_exec_runs_commands_via_docker",
|
| 383 |
+
"reasons": [
|
| 384 |
+
{
|
| 385 |
+
"id": "assertion_disjunction",
|
| 386 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 387 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 388 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 389 |
+
"severity": "error",
|
| 390 |
+
"stage": "static_lint"
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"id": "short_substring",
|
| 394 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 395 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 396 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 397 |
+
"severity": "error",
|
| 398 |
+
"stage": "static_lint"
|
| 399 |
+
}
|
| 400 |
+
]
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"name": "eval.tests.test_04_tool_calls.test_stop_container_attempts_docker",
|
| 404 |
+
"reasons": [
|
| 405 |
+
{
|
| 406 |
+
"id": "assertion_disjunction",
|
| 407 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 408 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 409 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 410 |
+
"severity": "error",
|
| 411 |
+
"stage": "static_lint"
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"id": "short_substring",
|
| 415 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 416 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 417 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 418 |
+
"severity": "error",
|
| 419 |
+
"stage": "static_lint"
|
| 420 |
+
}
|
| 421 |
+
]
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"name": "eval.tests.test_04_tool_calls.test_tool_call_unknown_tool_not_found",
|
| 425 |
+
"reasons": [
|
| 426 |
+
{
|
| 427 |
+
"id": "short_substring",
|
| 428 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 429 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 430 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 431 |
+
"severity": "error",
|
| 432 |
+
"stage": "static_lint"
|
| 433 |
+
}
|
| 434 |
+
]
|
| 435 |
+
},
|
| 436 |
+
{
|
| 437 |
+
"name": "eval.tests.test_04_tool_calls.test_write_file_attempts_docker_dir_creation",
|
| 438 |
+
"reasons": [
|
| 439 |
+
{
|
| 440 |
+
"id": "assertion_disjunction",
|
| 441 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 442 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 443 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 444 |
+
"severity": "error",
|
| 445 |
+
"stage": "static_lint"
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"id": "short_substring",
|
| 449 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 450 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 451 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 452 |
+
"severity": "error",
|
| 453 |
+
"stage": "static_lint"
|
| 454 |
+
},
|
| 455 |
+
{
|
| 456 |
+
"id": "generic_keyword_oracle",
|
| 457 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 458 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 459 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 460 |
+
"severity": "error",
|
| 461 |
+
"stage": "static_lint"
|
| 462 |
+
}
|
| 463 |
+
]
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"name": "eval.tests.test_04_tool_calls.test_write_file_missing_contents_required",
|
| 467 |
+
"reasons": [
|
| 468 |
+
{
|
| 469 |
+
"id": "assertion_disjunction",
|
| 470 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 471 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 472 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 473 |
+
"severity": "error",
|
| 474 |
+
"stage": "static_lint"
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"id": "short_substring",
|
| 478 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 479 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 480 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 481 |
+
"severity": "error",
|
| 482 |
+
"stage": "static_lint"
|
| 483 |
+
},
|
| 484 |
+
{
|
| 485 |
+
"id": "generic_keyword_oracle",
|
| 486 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 487 |
+
"path": "eval/tests/test_04_tool_calls.py",
|
| 488 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 489 |
+
"severity": "error",
|
| 490 |
+
"stage": "static_lint"
|
| 491 |
+
}
|
| 492 |
+
]
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"name": "eval.tests.test_05_resources.test_resource_read_known_template_reaches_docker",
|
| 496 |
+
"reasons": [
|
| 497 |
+
{
|
| 498 |
+
"id": "assertion_disjunction",
|
| 499 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 500 |
+
"path": "eval/tests/test_05_resources.py",
|
| 501 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 502 |
+
"severity": "error",
|
| 503 |
+
"stage": "static_lint"
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"id": "short_substring",
|
| 507 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 508 |
+
"path": "eval/tests/test_05_resources.py",
|
| 509 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 510 |
+
"severity": "error",
|
| 511 |
+
"stage": "static_lint"
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"id": "generic_keyword_oracle",
|
| 515 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 516 |
+
"path": "eval/tests/test_05_resources.py",
|
| 517 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 518 |
+
"severity": "error",
|
| 519 |
+
"stage": "static_lint"
|
| 520 |
+
}
|
| 521 |
+
]
|
| 522 |
+
},
|
| 523 |
+
{
|
| 524 |
+
"name": "eval.tests.test_05_resources.test_resource_read_missing_uri_no_handler",
|
| 525 |
+
"reasons": [
|
| 526 |
+
{
|
| 527 |
+
"id": "short_substring",
|
| 528 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 529 |
+
"path": "eval/tests/test_05_resources.py",
|
| 530 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 531 |
+
"severity": "error",
|
| 532 |
+
"stage": "static_lint"
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"id": "generic_keyword_oracle",
|
| 536 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 537 |
+
"path": "eval/tests/test_05_resources.py",
|
| 538 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 539 |
+
"severity": "error",
|
| 540 |
+
"stage": "static_lint"
|
| 541 |
+
}
|
| 542 |
+
]
|
| 543 |
+
},
|
| 544 |
+
{
|
| 545 |
+
"name": "eval.tests.test_05_resources.test_resource_read_unknown_scheme_no_handler",
|
| 546 |
+
"reasons": [
|
| 547 |
+
{
|
| 548 |
+
"id": "short_substring",
|
| 549 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 550 |
+
"path": "eval/tests/test_05_resources.py",
|
| 551 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 552 |
+
"severity": "error",
|
| 553 |
+
"stage": "static_lint"
|
| 554 |
+
},
|
| 555 |
+
{
|
| 556 |
+
"id": "generic_keyword_oracle",
|
| 557 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 558 |
+
"path": "eval/tests/test_05_resources.py",
|
| 559 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 560 |
+
"severity": "error",
|
| 561 |
+
"stage": "static_lint"
|
| 562 |
+
}
|
| 563 |
+
]
|
| 564 |
+
},
|
| 565 |
+
{
|
| 566 |
+
"name": "eval.tests.test_05_resources.test_resource_templates_list",
|
| 567 |
+
"reasons": [
|
| 568 |
+
{
|
| 569 |
+
"id": "short_substring",
|
| 570 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 571 |
+
"path": "eval/tests/test_05_resources.py",
|
| 572 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 573 |
+
"severity": "error",
|
| 574 |
+
"stage": "static_lint"
|
| 575 |
+
}
|
| 576 |
+
]
|
| 577 |
+
},
|
| 578 |
+
{
|
| 579 |
+
"name": "eval.tests.test_06_notifications.test_notification_handler_logs_received_error_notification",
|
| 580 |
+
"reasons": [
|
| 581 |
+
{
|
| 582 |
+
"id": "generic_keyword_oracle",
|
| 583 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 584 |
+
"path": "eval/tests/test_06_notifications.py",
|
| 585 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 586 |
+
"severity": "error",
|
| 587 |
+
"stage": "static_lint"
|
| 588 |
+
}
|
| 589 |
+
]
|
| 590 |
+
},
|
| 591 |
+
{
|
| 592 |
+
"name": "eval.tests.test_07_update_transport.test_update_check_error_arm_with_unreachable_endpoint",
|
| 593 |
+
"reasons": [
|
| 594 |
+
{
|
| 595 |
+
"id": "generic_keyword_oracle",
|
| 596 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 597 |
+
"path": "eval/tests/test_07_update_transport.py",
|
| 598 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 599 |
+
"severity": "error",
|
| 600 |
+
"stage": "static_lint"
|
| 601 |
+
}
|
| 602 |
+
]
|
| 603 |
+
}
|
| 604 |
+
],
|
| 605 |
+
"tests": [
|
| 606 |
+
"eval.tests.test_01_cli_flags.test_default_invocation_does_not_crash",
|
| 607 |
+
"eval.tests.test_01_cli_flags.test_help_usage_lists_only_install_and_no_update",
|
| 608 |
+
"eval.tests.test_01_cli_flags.test_install_combines_with_no_update",
|
| 609 |
+
"eval.tests.test_01_cli_flags.test_install_error_path_reports_error_to_stderr",
|
| 610 |
+
"eval.tests.test_01_cli_flags.test_install_failure_creates_no_config_artifact",
|
| 611 |
+
"eval.tests.test_01_cli_flags.test_no_update_reaches_main_and_exits_cleanly",
|
| 612 |
+
"eval.tests.test_01_cli_flags.test_port_flag_is_rejected_because_unregistered_at_init_parse",
|
| 613 |
+
"eval.tests.test_01_cli_flags.test_transport_flag_alone_is_rejected",
|
| 614 |
+
"eval.tests.test_01_cli_flags.test_transport_flag_is_rejected_because_unregistered_at_init_parse",
|
| 615 |
+
"eval.tests.test_01_cli_flags.test_unknown_flag_is_rejected",
|
| 616 |
+
"eval.tests.test_02_mcp_handshake.test_blank_line_yields_parse_error_between_requests",
|
| 617 |
+
"eval.tests.test_02_mcp_handshake.test_initialize_newer_protocol_version_is_pinned_by_server",
|
| 618 |
+
"eval.tests.test_02_mcp_handshake.test_initialize_returns_server_info",
|
| 619 |
+
"eval.tests.test_02_mcp_handshake.test_initialize_without_protocol_version",
|
| 620 |
+
"eval.tests.test_02_mcp_handshake.test_invalid_json_parse_error_code",
|
| 621 |
+
"eval.tests.test_02_mcp_handshake.test_invalid_json_rpc_version_rejected",
|
| 622 |
+
"eval.tests.test_02_mcp_handshake.test_missing_method_field",
|
| 623 |
+
"eval.tests.test_02_mcp_handshake.test_multiple_requests_in_one_session",
|
| 624 |
+
"eval.tests.test_02_mcp_handshake.test_notification_without_id_gets_no_response",
|
| 625 |
+
"eval.tests.test_02_mcp_handshake.test_ping_returns_empty_result",
|
| 626 |
+
"eval.tests.test_02_mcp_handshake.test_request_with_empty_method_name",
|
| 627 |
+
"eval.tests.test_02_mcp_handshake.test_unknown_method_returns_method_not_found",
|
| 628 |
+
"eval.tests.test_03_tool_registration.test_all_properties_are_typed_string_objects",
|
| 629 |
+
"eval.tests.test_03_tool_registration.test_all_seven_tools_are_registered",
|
| 630 |
+
"eval.tests.test_03_tool_registration.test_copy_file_from_sandbox_required_fields",
|
| 631 |
+
"eval.tests.test_03_tool_registration.test_copy_file_required_fields",
|
| 632 |
+
"eval.tests.test_03_tool_registration.test_copy_project_property_types",
|
| 633 |
+
"eval.tests.test_03_tool_registration.test_copy_project_required_fields",
|
| 634 |
+
"eval.tests.test_03_tool_registration.test_every_tool_has_name_and_description",
|
| 635 |
+
"eval.tests.test_03_tool_registration.test_initialize_image_default",
|
| 636 |
+
"eval.tests.test_03_tool_registration.test_initialize_property_keys",
|
| 637 |
+
"eval.tests.test_03_tool_registration.test_sandbox_exec_commands_is_array",
|
| 638 |
+
"eval.tests.test_03_tool_registration.test_stop_container_requires_container_id",
|
| 639 |
+
"eval.tests.test_03_tool_registration.test_tool_descriptions_are_public",
|
| 640 |
+
"eval.tests.test_03_tool_registration.test_write_file_required_fields",
|
| 641 |
+
"eval.tests.test_04_tool_calls.test_copy_file_attempts_docker",
|
| 642 |
+
"eval.tests.test_04_tool_calls.test_copy_file_from_sandbox_attempts_docker",
|
| 643 |
+
"eval.tests.test_04_tool_calls.test_copy_project_missing_required_is_validated",
|
| 644 |
+
"eval.tests.test_04_tool_calls.test_copy_project_with_ids_attempts_docker",
|
| 645 |
+
"eval.tests.test_04_tool_calls.test_initialize_custom_image_attempts_that_image",
|
| 646 |
+
"eval.tests.test_04_tool_calls.test_initialize_tries_docker_and_reports_daemon_error",
|
| 647 |
+
"eval.tests.test_04_tool_calls.test_jsonrpc_version_mismatch_for_tool_call",
|
| 648 |
+
"eval.tests.test_04_tool_calls.test_sandbox_exec_runs_commands_via_docker",
|
| 649 |
+
"eval.tests.test_04_tool_calls.test_stop_container_attempts_docker",
|
| 650 |
+
"eval.tests.test_04_tool_calls.test_tool_call_missing_name_start",
|
| 651 |
+
"eval.tests.test_04_tool_calls.test_tool_call_unknown_tool_not_found",
|
| 652 |
+
"eval.tests.test_04_tool_calls.test_write_file_attempts_docker_dir_creation",
|
| 653 |
+
"eval.tests.test_04_tool_calls.test_write_file_missing_contents_required",
|
| 654 |
+
"eval.tests.test_05_resources.test_logging_setlevel_not_supported",
|
| 655 |
+
"eval.tests.test_05_resources.test_prompts_list_is_empty",
|
| 656 |
+
"eval.tests.test_05_resources.test_resource_list_is_empty",
|
| 657 |
+
"eval.tests.test_05_resources.test_resource_read_known_template_reaches_docker",
|
| 658 |
+
"eval.tests.test_05_resources.test_resource_read_missing_uri_no_handler",
|
| 659 |
+
"eval.tests.test_05_resources.test_resource_read_unknown_scheme_no_handler",
|
| 660 |
+
"eval.tests.test_05_resources.test_resource_template_audience_annotations",
|
| 661 |
+
"eval.tests.test_05_resources.test_resource_templates_list",
|
| 662 |
+
"eval.tests.test_05_resources.test_resources_subscribe_not_supported",
|
| 663 |
+
"eval.tests.test_06_notifications.test_client_serves_request_after_error_notification",
|
| 664 |
+
"eval.tests.test_06_notifications.test_initialize_is_idempotent_within_session",
|
| 665 |
+
"eval.tests.test_06_notifications.test_notification_handler_logs_received_error_notification",
|
| 666 |
+
"eval.tests.test_06_notifications.test_server_infos_are_stable_across_initializations",
|
| 667 |
+
"eval.tests.test_07_update_transport.test_default_transport_is_stdio_jsonrpc",
|
| 668 |
+
"eval.tests.test_07_update_transport.test_no_update_flag_skips_update_check",
|
| 669 |
+
"eval.tests.test_07_update_transport.test_no_update_reaches_main_and_serves_ping",
|
| 670 |
+
"eval.tests.test_07_update_transport.test_update_check_error_arm_states_jsonrpcline_is_absent",
|
| 671 |
+
"eval.tests.test_07_update_transport.test_update_check_error_arm_with_unreachable_endpoint"
|
| 672 |
+
]
|
| 673 |
+
},
|
| 674 |
+
"generated_module_02": {
|
| 675 |
+
"ignore_reason": "",
|
| 676 |
+
"ignored": false,
|
| 677 |
+
"ignored_tests": [
|
| 678 |
+
{
|
| 679 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_initialize_returns_text_content_shape",
|
| 680 |
+
"reasons": [
|
| 681 |
+
{
|
| 682 |
+
"id": "short_substring",
|
| 683 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 684 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 685 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 686 |
+
"severity": "error",
|
| 687 |
+
"stage": "static_lint"
|
| 688 |
+
}
|
| 689 |
+
]
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_initialize_whitespace_image_is_passed_through",
|
| 693 |
+
"reasons": [
|
| 694 |
+
{
|
| 695 |
+
"id": "generic_keyword_oracle",
|
| 696 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 697 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 698 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 699 |
+
"severity": "error",
|
| 700 |
+
"stage": "static_lint"
|
| 701 |
+
}
|
| 702 |
+
]
|
| 703 |
+
},
|
| 704 |
+
{
|
| 705 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_logs_empty_id_reports_invalid_name",
|
| 706 |
+
"reasons": [
|
| 707 |
+
{
|
| 708 |
+
"id": "generic_keyword_oracle",
|
| 709 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 710 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 711 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 712 |
+
"severity": "error",
|
| 713 |
+
"stage": "static_lint"
|
| 714 |
+
}
|
| 715 |
+
]
|
| 716 |
+
},
|
| 717 |
+
{
|
| 718 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_logs_read_returns_error_object",
|
| 719 |
+
"reasons": [
|
| 720 |
+
{
|
| 721 |
+
"id": "short_substring",
|
| 722 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 723 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 724 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 725 |
+
"severity": "error",
|
| 726 |
+
"stage": "static_lint"
|
| 727 |
+
},
|
| 728 |
+
{
|
| 729 |
+
"id": "generic_keyword_oracle",
|
| 730 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 731 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 732 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 733 |
+
"severity": "error",
|
| 734 |
+
"stage": "static_lint"
|
| 735 |
+
}
|
| 736 |
+
]
|
| 737 |
+
},
|
| 738 |
+
{
|
| 739 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_stop_returns_text_not_error_object",
|
| 740 |
+
"reasons": [
|
| 741 |
+
{
|
| 742 |
+
"id": "short_substring",
|
| 743 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 744 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 745 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 746 |
+
"severity": "error",
|
| 747 |
+
"stage": "static_lint"
|
| 748 |
+
}
|
| 749 |
+
]
|
| 750 |
+
},
|
| 751 |
+
{
|
| 752 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_tools_list_advertises_initialize_and_stop",
|
| 753 |
+
"reasons": [
|
| 754 |
+
{
|
| 755 |
+
"id": "short_substring",
|
| 756 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 757 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 758 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 759 |
+
"severity": "error",
|
| 760 |
+
"stage": "static_lint"
|
| 761 |
+
}
|
| 762 |
+
]
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_tools_list_initialize_image_is_optional",
|
| 766 |
+
"reasons": [
|
| 767 |
+
{
|
| 768 |
+
"id": "short_substring",
|
| 769 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 770 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 771 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 772 |
+
"severity": "error",
|
| 773 |
+
"stage": "static_lint"
|
| 774 |
+
}
|
| 775 |
+
]
|
| 776 |
+
},
|
| 777 |
+
{
|
| 778 |
+
"name": "eval.tests.test_sandbox_lifecycle.test_unknown_tool_returns_tool_not_found",
|
| 779 |
+
"reasons": [
|
| 780 |
+
{
|
| 781 |
+
"id": "short_substring",
|
| 782 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 783 |
+
"path": "eval/tests/test_sandbox_lifecycle.py",
|
| 784 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 785 |
+
"severity": "error",
|
| 786 |
+
"stage": "static_lint"
|
| 787 |
+
}
|
| 788 |
+
]
|
| 789 |
+
}
|
| 790 |
+
],
|
| 791 |
+
"tests": [
|
| 792 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_default_image",
|
| 793 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_default_image_the_observable_error_carries_the_default_image",
|
| 794 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_empty_string_image_falls_back_to_default",
|
| 795 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_explicit_image_is_used[bare]",
|
| 796 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_explicit_image_is_used[custom_tagged]",
|
| 797 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_explicit_image_is_used[python311]",
|
| 798 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_explicit_image_is_used[ubuntu]",
|
| 799 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_handshake_negotiates_protocol",
|
| 800 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_lowercased_underlying_error_reported",
|
| 801 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_non_string_image_falls_back_to_default[array]",
|
| 802 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_non_string_image_falls_back_to_default[bool]",
|
| 803 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_non_string_image_falls_back_to_default[float]",
|
| 804 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_non_string_image_falls_back_to_default[int]",
|
| 805 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_non_string_image_falls_back_to_default[object]",
|
| 806 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_null_image_falls_back_to_default",
|
| 807 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_returns_text_content_shape",
|
| 808 |
+
"eval.tests.test_sandbox_lifecycle.test_initialize_whitespace_image_is_passed_through",
|
| 809 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_empty_id_reports_invalid_name",
|
| 810 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_non_matching_uri_no_handler",
|
| 811 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_read_returns_error_object",
|
| 812 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_template_advertised_with_mime_type",
|
| 813 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_uri_missing_logs_suffix_no_handler",
|
| 814 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_uri_with_mixed_id_characters",
|
| 815 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_valid_uri_daemon_down_tail",
|
| 816 |
+
"eval.tests.test_sandbox_lifecycle.test_logs_valid_uri_reaches_daemon",
|
| 817 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_empty_string_container_id_required_error",
|
| 818 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_missing_container_id_required_error",
|
| 819 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_non_string_container_id_required_error[array]",
|
| 820 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_non_string_container_id_required_error[bool]",
|
| 821 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_non_string_container_id_required_error[int]",
|
| 822 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_non_string_container_id_required_error[object]",
|
| 823 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_non_string_container_id_required_error[zero]",
|
| 824 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_returns_text_not_error_object",
|
| 825 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_short_and_long_ids_both_forwarded",
|
| 826 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_string_container_id_reaches_daemon",
|
| 827 |
+
"eval.tests.test_sandbox_lifecycle.test_stop_string_id_reports_daemon_unreachable_tail",
|
| 828 |
+
"eval.tests.test_sandbox_lifecycle.test_tools_list_advertises_initialize_and_stop",
|
| 829 |
+
"eval.tests.test_sandbox_lifecycle.test_tools_list_initialize_image_is_optional",
|
| 830 |
+
"eval.tests.test_sandbox_lifecycle.test_unknown_tool_returns_tool_not_found"
|
| 831 |
+
]
|
| 832 |
+
},
|
| 833 |
+
"generated_module_03": {
|
| 834 |
+
"ignore_reason": "",
|
| 835 |
+
"ignored": false,
|
| 836 |
+
"ignored_tests": [],
|
| 837 |
+
"tests": [
|
| 838 |
+
"eval.tests.test_copy_file.test_copy_file_binary_bytes_reaches_transfer",
|
| 839 |
+
"eval.tests.test_copy_file.test_copy_file_empty_container_id[]",
|
| 840 |
+
"eval.tests.test_copy_file.test_copy_file_empty_file_reaches_transfer",
|
| 841 |
+
"eval.tests.test_copy_file.test_copy_file_empty_local_src_file[]",
|
| 842 |
+
"eval.tests.test_copy_file.test_copy_file_missing_container_id_non_string[123]",
|
| 843 |
+
"eval.tests.test_copy_file.test_copy_file_missing_container_id_non_string[None]",
|
| 844 |
+
"eval.tests.test_copy_file.test_copy_file_missing_container_id_non_string[True]",
|
| 845 |
+
"eval.tests.test_copy_file.test_copy_file_missing_container_id_non_string[bad_value3]",
|
| 846 |
+
"eval.tests.test_copy_file.test_copy_file_missing_container_id_non_string[bad_value4]",
|
| 847 |
+
"eval.tests.test_copy_file.test_copy_file_missing_local_src_file_non_string[7]",
|
| 848 |
+
"eval.tests.test_copy_file.test_copy_file_missing_local_src_file_non_string[None]",
|
| 849 |
+
"eval.tests.test_copy_file.test_copy_file_missing_local_src_file_non_string[True]",
|
| 850 |
+
"eval.tests.test_copy_file.test_copy_file_missing_local_src_file_non_string[bad_value3]",
|
| 851 |
+
"eval.tests.test_copy_file.test_copy_file_source_directory_with_trailing_slash",
|
| 852 |
+
"eval.tests.test_copy_file.test_copy_file_source_file_missing[/nonexistent/definitely/missing.txt]",
|
| 853 |
+
"eval.tests.test_copy_file.test_copy_file_source_file_missing[/tmp/no_such_programgym_file_xyz.dat]",
|
| 854 |
+
"eval.tests.test_copy_file.test_copy_file_source_is_directory",
|
| 855 |
+
"eval.tests.test_copy_file.test_copy_file_valid_absolute_dest_path",
|
| 856 |
+
"eval.tests.test_copy_file.test_copy_file_valid_default_dest_reaches_transfer",
|
| 857 |
+
"eval.tests.test_copy_file.test_copy_file_valid_relative_dest_path",
|
| 858 |
+
"eval.tests.test_copy_file.test_copy_file_ws_container_id_accepted",
|
| 859 |
+
"eval.tests.test_copy_file.test_copy_file_ws_local_src_file_missing_path",
|
| 860 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_absolute_src_path_reaches_transfer",
|
| 861 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_blank_container_id_accepted",
|
| 862 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_creates_local_dest_parent_dir",
|
| 863 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_empty_container_src_path[]",
|
| 864 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_missing_container_id[9]",
|
| 865 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_missing_container_id[False]",
|
| 866 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_missing_container_id[None]",
|
| 867 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_missing_container_src_path[4.2]",
|
| 868 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_missing_container_src_path[None]",
|
| 869 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_missing_container_src_path[bad_value2]",
|
| 870 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_relative_local_dest_resolves_under_cwd",
|
| 871 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_relative_src_path_normalized_to_app",
|
| 872 |
+
"eval.tests.test_copy_file_from_sandbox.test_from_ws_container_src_path_reaches_transfer",
|
| 873 |
+
"eval.tests.test_copy_project.test_copy_project_absolute_dest_dir",
|
| 874 |
+
"eval.tests.test_copy_project.test_copy_project_dot_prefix_source_dir",
|
| 875 |
+
"eval.tests.test_copy_project.test_copy_project_empty_dir_reaches_transfer",
|
| 876 |
+
"eval.tests.test_copy_project.test_copy_project_empty_local_src_dir[]",
|
| 877 |
+
"eval.tests.test_copy_project.test_copy_project_missing_container_id[12.5]",
|
| 878 |
+
"eval.tests.test_copy_project.test_copy_project_missing_container_id[False]",
|
| 879 |
+
"eval.tests.test_copy_project.test_copy_project_missing_container_id[None]",
|
| 880 |
+
"eval.tests.test_copy_project.test_copy_project_missing_local_src_dir[7]",
|
| 881 |
+
"eval.tests.test_copy_project.test_copy_project_missing_local_src_dir[None]",
|
| 882 |
+
"eval.tests.test_copy_project.test_copy_project_missing_local_src_dir[bad_value2]",
|
| 883 |
+
"eval.tests.test_copy_project.test_copy_project_missing_local_src_dir[bad_value3]",
|
| 884 |
+
"eval.tests.test_copy_project.test_copy_project_nested_tree_reaches_transfer",
|
| 885 |
+
"eval.tests.test_copy_project.test_copy_project_relative_dest_dir",
|
| 886 |
+
"eval.tests.test_copy_project.test_copy_project_source_dir_missing",
|
| 887 |
+
"eval.tests.test_copy_project.test_copy_project_source_is_file",
|
| 888 |
+
"eval.tests.test_copy_project.test_copy_project_ws_container_id_accepted",
|
| 889 |
+
"eval.tests.test_copy_project.test_copy_project_ws_local_src_dir_missing_path",
|
| 890 |
+
"eval.tests.test_tool_registry.test_assigned_module_tools_present",
|
| 891 |
+
"eval.tests.test_tool_registry.test_module_tool_registered[copy_file-req0-opt0]",
|
| 892 |
+
"eval.tests.test_tool_registry.test_module_tool_registered[copy_file_from_sandbox-req2-opt2]",
|
| 893 |
+
"eval.tests.test_tool_registry.test_module_tool_registered[copy_project-req1-opt1]",
|
| 894 |
+
"eval.tests.test_tool_registry.test_module_tool_registered[write_file_sandbox-req3-opt3]",
|
| 895 |
+
"eval.tests.test_write_file.test_write_absolute_dest_dir",
|
| 896 |
+
"eval.tests.test_write_file.test_write_blank_container_id_accepted",
|
| 897 |
+
"eval.tests.test_write_file.test_write_blank_file_name_accepted",
|
| 898 |
+
"eval.tests.test_write_file.test_write_deep_filename_basename_handling",
|
| 899 |
+
"eval.tests.test_write_file.test_write_default_dest_dir",
|
| 900 |
+
"eval.tests.test_write_file.test_write_empty_container_id",
|
| 901 |
+
"eval.tests.test_write_file.test_write_empty_contents_is_nonzero_payload",
|
| 902 |
+
"eval.tests.test_write_file.test_write_empty_file_name",
|
| 903 |
+
"eval.tests.test_write_file.test_write_missing_container_id[3.14]",
|
| 904 |
+
"eval.tests.test_write_file.test_write_missing_container_id[None]",
|
| 905 |
+
"eval.tests.test_write_file.test_write_missing_container_id[True]",
|
| 906 |
+
"eval.tests.test_write_file.test_write_missing_file_contents_key",
|
| 907 |
+
"eval.tests.test_write_file.test_write_missing_file_name[5]",
|
| 908 |
+
"eval.tests.test_write_file.test_write_missing_file_name[False]",
|
| 909 |
+
"eval.tests.test_write_file.test_write_missing_file_name[None]",
|
| 910 |
+
"eval.tests.test_write_file.test_write_missing_file_name[bad_value2]",
|
| 911 |
+
"eval.tests.test_write_file.test_write_multiline_contents",
|
| 912 |
+
"eval.tests.test_write_file.test_write_relative_dest_dir"
|
| 913 |
+
]
|
| 914 |
+
},
|
| 915 |
+
"generated_module_04": {
|
| 916 |
+
"ignore_reason": "",
|
| 917 |
+
"ignored": false,
|
| 918 |
+
"ignored_tests": [
|
| 919 |
+
{
|
| 920 |
+
"name": "eval.tests.test_exec_tool.test_exec_array_multiple_commands_stops_at_first_exec_error",
|
| 921 |
+
"reasons": [
|
| 922 |
+
{
|
| 923 |
+
"id": "generic_keyword_oracle",
|
| 924 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 925 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 926 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 927 |
+
"severity": "error",
|
| 928 |
+
"stage": "static_lint"
|
| 929 |
+
}
|
| 930 |
+
]
|
| 931 |
+
},
|
| 932 |
+
{
|
| 933 |
+
"name": "eval.tests.test_exec_tool.test_exec_distinct_container_ids_share_validation",
|
| 934 |
+
"reasons": [
|
| 935 |
+
{
|
| 936 |
+
"id": "generic_keyword_oracle",
|
| 937 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 938 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 939 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 940 |
+
"severity": "error",
|
| 941 |
+
"stage": "static_lint"
|
| 942 |
+
}
|
| 943 |
+
]
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"name": "eval.tests.test_exec_tool.test_exec_empty_string_command_still_runs_exec",
|
| 947 |
+
"reasons": [
|
| 948 |
+
{
|
| 949 |
+
"id": "generic_keyword_oracle",
|
| 950 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 951 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 952 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 953 |
+
"severity": "error",
|
| 954 |
+
"stage": "static_lint"
|
| 955 |
+
}
|
| 956 |
+
]
|
| 957 |
+
},
|
| 958 |
+
{
|
| 959 |
+
"name": "eval.tests.test_exec_tool.test_exec_single_string_command_reaches_docker_error",
|
| 960 |
+
"reasons": [
|
| 961 |
+
{
|
| 962 |
+
"id": "short_substring",
|
| 963 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 964 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 965 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 966 |
+
"severity": "error",
|
| 967 |
+
"stage": "static_lint"
|
| 968 |
+
},
|
| 969 |
+
{
|
| 970 |
+
"id": "generic_keyword_oracle",
|
| 971 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 972 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 973 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 974 |
+
"severity": "error",
|
| 975 |
+
"stage": "static_lint"
|
| 976 |
+
}
|
| 977 |
+
]
|
| 978 |
+
},
|
| 979 |
+
{
|
| 980 |
+
"name": "eval.tests.test_exec_tool.test_sandbox_exec_registered_in_tools_list",
|
| 981 |
+
"reasons": [
|
| 982 |
+
{
|
| 983 |
+
"id": "short_substring",
|
| 984 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 985 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 986 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 987 |
+
"severity": "error",
|
| 988 |
+
"stage": "static_lint"
|
| 989 |
+
}
|
| 990 |
+
]
|
| 991 |
+
},
|
| 992 |
+
{
|
| 993 |
+
"name": "eval.tests.test_exec_tool.test_unknown_tool_returns_server_error",
|
| 994 |
+
"reasons": [
|
| 995 |
+
{
|
| 996 |
+
"id": "assertion_disjunction",
|
| 997 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 998 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 999 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 1000 |
+
"severity": "error",
|
| 1001 |
+
"stage": "static_lint"
|
| 1002 |
+
},
|
| 1003 |
+
{
|
| 1004 |
+
"id": "if_else_both_assert",
|
| 1005 |
+
"message": "pytest test asserts different outcomes in both if and else branches",
|
| 1006 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 1007 |
+
"repair_hint": "Remove nondeterministic branching and assert one deterministic expected behavior.",
|
| 1008 |
+
"severity": "error",
|
| 1009 |
+
"stage": "static_lint"
|
| 1010 |
+
},
|
| 1011 |
+
{
|
| 1012 |
+
"id": "short_substring",
|
| 1013 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 1014 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 1015 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 1016 |
+
"severity": "error",
|
| 1017 |
+
"stage": "static_lint"
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"id": "generic_keyword_oracle",
|
| 1021 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 1022 |
+
"path": "eval/tests/test_exec_tool.py",
|
| 1023 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 1024 |
+
"severity": "error",
|
| 1025 |
+
"stage": "static_lint"
|
| 1026 |
+
}
|
| 1027 |
+
]
|
| 1028 |
+
},
|
| 1029 |
+
{
|
| 1030 |
+
"name": "eval.tests.test_install.test_install_exits_before_starting_mcp_server",
|
| 1031 |
+
"reasons": [
|
| 1032 |
+
{
|
| 1033 |
+
"detail": "AssertionError: assert 0 == 1 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claude/claude_deskto",
|
| 1034 |
+
"id": "gold_fail",
|
| 1035 |
+
"message": "test failed against the reference executable",
|
| 1036 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 1037 |
+
"severity": "error",
|
| 1038 |
+
"stage": "gold_execution"
|
| 1039 |
+
}
|
| 1040 |
+
]
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"name": "eval.tests.test_install.test_install_flag_is_registered",
|
| 1044 |
+
"reasons": [
|
| 1045 |
+
{
|
| 1046 |
+
"detail": "AssertionError: assert 0 != 0 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claude/claude_deskto",
|
| 1047 |
+
"id": "gold_fail",
|
| 1048 |
+
"message": "test failed against the reference executable",
|
| 1049 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 1050 |
+
"severity": "error",
|
| 1051 |
+
"stage": "gold_execution"
|
| 1052 |
+
}
|
| 1053 |
+
]
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"name": "eval.tests.test_install.test_install_reports_read_only_config_dir_error",
|
| 1057 |
+
"reasons": [
|
| 1058 |
+
{
|
| 1059 |
+
"detail": "AssertionError: assert 0 == 1 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claude/claude_deskto",
|
| 1060 |
+
"id": "gold_fail",
|
| 1061 |
+
"message": "test failed against the reference executable",
|
| 1062 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 1063 |
+
"severity": "error",
|
| 1064 |
+
"stage": "gold_execution"
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"id": "short_substring",
|
| 1068 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 1069 |
+
"path": "eval/tests/test_install.py",
|
| 1070 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 1071 |
+
"severity": "error",
|
| 1072 |
+
"stage": "static_lint"
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"id": "generic_keyword_oracle",
|
| 1076 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 1077 |
+
"path": "eval/tests/test_install.py",
|
| 1078 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 1079 |
+
"severity": "error",
|
| 1080 |
+
"stage": "static_lint"
|
| 1081 |
+
}
|
| 1082 |
+
]
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"name": "eval.tests.test_install.test_install_with_no_update_flag_still_installs",
|
| 1086 |
+
"reasons": [
|
| 1087 |
+
{
|
| 1088 |
+
"detail": "AssertionError: assert 0 == 1 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install', '-no-update'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claude",
|
| 1089 |
+
"id": "gold_fail",
|
| 1090 |
+
"message": "test failed against the reference executable",
|
| 1091 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 1092 |
+
"severity": "error",
|
| 1093 |
+
"stage": "gold_execution"
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"id": "assertion_disjunction",
|
| 1097 |
+
"message": "pytest assertion accepts alternatives with or",
|
| 1098 |
+
"path": "eval/tests/test_install.py",
|
| 1099 |
+
"repair_hint": "Assert one exact expected outcome instead of accepting alternative outcomes with or.",
|
| 1100 |
+
"severity": "error",
|
| 1101 |
+
"stage": "static_lint"
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"id": "generic_keyword_oracle",
|
| 1105 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 1106 |
+
"path": "eval/tests/test_install.py",
|
| 1107 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 1108 |
+
"severity": "error",
|
| 1109 |
+
"stage": "static_lint"
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
},
|
| 1113 |
+
{
|
| 1114 |
+
"name": "eval.tests.test_install.test_install_writes_nothing_to_stdout_on_failure",
|
| 1115 |
+
"reasons": [
|
| 1116 |
+
{
|
| 1117 |
+
"detail": "AssertionError: assert 0 == 1 + where 0 = CompletedProcess(args=['/workspace/golden-2/executable', '--install'], returncode=0, stdout='Added code-sandbox-mcp to /workspace/.config/Claude/claude_deskto",
|
| 1118 |
+
"id": "gold_fail",
|
| 1119 |
+
"message": "test failed against the reference executable",
|
| 1120 |
+
"repair_hint": "Fix the expected observable behavior so the test passes against the reference executable.",
|
| 1121 |
+
"severity": "error",
|
| 1122 |
+
"stage": "gold_execution"
|
| 1123 |
+
}
|
| 1124 |
+
]
|
| 1125 |
+
},
|
| 1126 |
+
{
|
| 1127 |
+
"name": "eval.tests.test_update.test_default_startup_does_not_print_update_warning_in_this_env",
|
| 1128 |
+
"reasons": [
|
| 1129 |
+
{
|
| 1130 |
+
"id": "short_substring",
|
| 1131 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 1132 |
+
"path": "eval/tests/test_update.py",
|
| 1133 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 1134 |
+
"severity": "error",
|
| 1135 |
+
"stage": "static_lint"
|
| 1136 |
+
}
|
| 1137 |
+
]
|
| 1138 |
+
},
|
| 1139 |
+
{
|
| 1140 |
+
"name": "eval.tests.test_update.test_no_update_serves_exec_tool_after_handshake",
|
| 1141 |
+
"reasons": [
|
| 1142 |
+
{
|
| 1143 |
+
"id": "generic_keyword_oracle",
|
| 1144 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 1145 |
+
"path": "eval/tests/test_update.py",
|
| 1146 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 1147 |
+
"severity": "error",
|
| 1148 |
+
"stage": "static_lint"
|
| 1149 |
+
}
|
| 1150 |
+
]
|
| 1151 |
+
}
|
| 1152 |
+
],
|
| 1153 |
+
"tests": [
|
| 1154 |
+
"eval.tests.test_exec_tool.test_exec_array_multiple_commands_stops_at_first_exec_error",
|
| 1155 |
+
"eval.tests.test_exec_tool.test_exec_array_non_string_element_rejected[array-with-array]",
|
| 1156 |
+
"eval.tests.test_exec_tool.test_exec_array_non_string_element_rejected[array-with-float]",
|
| 1157 |
+
"eval.tests.test_exec_tool.test_exec_array_non_string_element_rejected[array-with-int]",
|
| 1158 |
+
"eval.tests.test_exec_tool.test_exec_array_non_string_element_rejected[array-with-null]",
|
| 1159 |
+
"eval.tests.test_exec_tool.test_exec_array_non_string_element_rejected[array-with-object]",
|
| 1160 |
+
"eval.tests.test_exec_tool.test_exec_commands_must_be_string_or_array[commands-absent]",
|
| 1161 |
+
"eval.tests.test_exec_tool.test_exec_commands_must_be_string_or_array[commands-bool]",
|
| 1162 |
+
"eval.tests.test_exec_tool.test_exec_commands_must_be_string_or_array[commands-float]",
|
| 1163 |
+
"eval.tests.test_exec_tool.test_exec_commands_must_be_string_or_array[commands-integer]",
|
| 1164 |
+
"eval.tests.test_exec_tool.test_exec_commands_must_be_string_or_array[commands-object]",
|
| 1165 |
+
"eval.tests.test_exec_tool.test_exec_distinct_container_ids_share_validation",
|
| 1166 |
+
"eval.tests.test_exec_tool.test_exec_empty_commands_array_rejected",
|
| 1167 |
+
"eval.tests.test_exec_tool.test_exec_empty_string_command_still_runs_exec",
|
| 1168 |
+
"eval.tests.test_exec_tool.test_exec_missing_or_invalid_container_id_returns_required[container_id-absent]",
|
| 1169 |
+
"eval.tests.test_exec_tool.test_exec_missing_or_invalid_container_id_returns_required[container_id-empty-array]",
|
| 1170 |
+
"eval.tests.test_exec_tool.test_exec_missing_or_invalid_container_id_returns_required[container_id-empty-string]",
|
| 1171 |
+
"eval.tests.test_exec_tool.test_exec_missing_or_invalid_container_id_returns_required[container_id-number]",
|
| 1172 |
+
"eval.tests.test_exec_tool.test_exec_missing_or_invalid_container_id_returns_required[container_id-object]",
|
| 1173 |
+
"eval.tests.test_exec_tool.test_exec_single_string_command_reaches_docker_error",
|
| 1174 |
+
"eval.tests.test_exec_tool.test_sandbox_exec_registered_in_tools_list",
|
| 1175 |
+
"eval.tests.test_exec_tool.test_unknown_tool_returns_server_error",
|
| 1176 |
+
"eval.tests.test_install.test_install_exits_before_starting_mcp_server",
|
| 1177 |
+
"eval.tests.test_install.test_install_flag_is_registered",
|
| 1178 |
+
"eval.tests.test_install.test_install_reports_read_only_config_dir_error",
|
| 1179 |
+
"eval.tests.test_install.test_install_with_no_update_flag_still_installs",
|
| 1180 |
+
"eval.tests.test_install.test_install_writes_nothing_to_stdout_on_failure",
|
| 1181 |
+
"eval.tests.test_update.test_default_startup_does_not_print_update_warning_in_this_env",
|
| 1182 |
+
"eval.tests.test_update.test_no_update_serves_exec_tool_after_handshake",
|
| 1183 |
+
"eval.tests.test_update.test_server_reaches_stdio_initialize_with_and_without_no_update[default-startup]",
|
| 1184 |
+
"eval.tests.test_update.test_server_reaches_stdio_initialize_with_and_without_no_update[no-update-flag]"
|
| 1185 |
+
]
|
| 1186 |
+
}
|
| 1187 |
+
},
|
| 1188 |
+
"commit": "0f0b8d607f5097afe43782bb6d223156ee49dc49",
|
| 1189 |
+
"data_source": "synthetic_programgym",
|
| 1190 |
+
"difficulty": "",
|
| 1191 |
+
"difficulty_score": null,
|
| 1192 |
+
"eval_clean_hashes": [
|
| 1193 |
+
"9a97e1af3b2b44c962fc9b7ce929601699884b3f00117a3ff1961a8a27d7c984"
|
| 1194 |
+
],
|
| 1195 |
+
"input_record": {
|
| 1196 |
+
"commit": "0f0b8d607f5097afe43782bb6d223156ee49dc49",
|
| 1197 |
+
"commits": 60,
|
| 1198 |
+
"contributors": 2,
|
| 1199 |
+
"difficulty": "easy",
|
| 1200 |
+
"difficulty_code_lines": 1365,
|
| 1201 |
+
"difficulty_has_tests": true,
|
| 1202 |
+
"difficulty_product_code_lines": 1365,
|
| 1203 |
+
"difficulty_runtime_deps": 0,
|
| 1204 |
+
"difficulty_score": 1.1351326513767748,
|
| 1205 |
+
"difficulty_test_code_lines": 81,
|
| 1206 |
+
"full_name": "Automata-Labs-team/code-sandbox-mcp",
|
| 1207 |
+
"github_stars": 326,
|
| 1208 |
+
"input_joern_zip": "go_joern/Automata-Labs-team__code-sandbox-mcp.zip",
|
| 1209 |
+
"joern_status": true,
|
| 1210 |
+
"joern_time": 6.422676430083811,
|
| 1211 |
+
"language": "go",
|
| 1212 |
+
"pb_match": [
|
| 1213 |
+
{
|
| 1214 |
+
"pb_fullname": "segmentio/chamber",
|
| 1215 |
+
"rank": 519,
|
| 1216 |
+
"similarity": 0.5162831544876099
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"pb_fullname": "direnv/direnv",
|
| 1220 |
+
"rank": 355,
|
| 1221 |
+
"similarity": 0.43824487924575806
|
| 1222 |
+
},
|
| 1223 |
+
{
|
| 1224 |
+
"pb_fullname": "gabotechs/dep-tree",
|
| 1225 |
+
"rank": 473,
|
| 1226 |
+
"similarity": 0.5204416513442993
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"pb_fullname": "boyter/scc",
|
| 1230 |
+
"rank": 941,
|
| 1231 |
+
"similarity": 0.4805245101451874
|
| 1232 |
+
},
|
| 1233 |
+
{
|
| 1234 |
+
"pb_fullname": "skeema/skeema",
|
| 1235 |
+
"rank": 672,
|
| 1236 |
+
"similarity": 0.4949629306793213
|
| 1237 |
+
},
|
| 1238 |
+
{
|
| 1239 |
+
"pb_fullname": "eliukblau/pixterm",
|
| 1240 |
+
"rank": 972,
|
| 1241 |
+
"similarity": 0.48699724674224854
|
| 1242 |
+
}
|
| 1243 |
+
],
|
| 1244 |
+
"repo_age": 1.52,
|
| 1245 |
+
"repo_path": "go/Automata-Labs-team__code-sandbox-mcp",
|
| 1246 |
+
"source": "commit:0f0b8d607f5097afe43782bb6d223156ee49dc49",
|
| 1247 |
+
"status": "done",
|
| 1248 |
+
"url": "https://github.com/Automata-Labs-team/code-sandbox-mcp"
|
| 1249 |
+
},
|
| 1250 |
+
"instance_id": "Automata-Labs-team__code-sandbox-mcp.0f0b8d6",
|
| 1251 |
+
"language": "go",
|
| 1252 |
+
"module_iterations": [],
|
| 1253 |
+
"repository": "Automata-Labs-team/code-sandbox-mcp"
|
| 1254 |
+
}
|
automata-labs-team--code-sandbox/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
|
automata-labs-team--code-sandbox/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26e9e139b7a7cdb1876970f2c19e4153bb9ccabc8473d88bb6efc4fd58271760
|
| 3 |
+
size 4886
|
autometrics-dev--autometrics-rs/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
|
autometrics-dev--autometrics-rs/environment/download.sh
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# ProgramGym download.sh for autometrics-dev/autometrics-rs
|
| 3 |
+
#
|
| 4 |
+
# This script is sourced (not executed) from /source_ro/download.sh during the
|
| 5 |
+
# networked download validation stage. It prefetches the full Rust workspace
|
| 6 |
+
# dependency closure into the cargo registry cache so that build.sh can compile
|
| 7 |
+
# the selected target (autometrics-cli) completely offline.
|
| 8 |
+
#
|
| 9 |
+
# It is fully standalone: it does NOT read any repository source file. All
|
| 10 |
+
# Cargo manifests are embedded inline below and written to a temporary mirror
|
| 11 |
+
# workspace, then `cargo fetch --manifest-path` is run against that generated
|
| 12 |
+
# manifest. No compilation, linking, or testing is performed here.
|
| 13 |
+
#
|
| 14 |
+
# Because the download stage does not receive the repository source tree, this
|
| 15 |
+
# script mirrors the workspace layout (Cargo.toml + per-member manifests) so the
|
| 16 |
+
# resolved dependency set is identical to what build.sh will require.
|
| 17 |
+
|
| 18 |
+
# Keep exported env vars in the current shell; build.sh depends on CARGO_HOME so
|
| 19 |
+
# both stages share the same prefetched registry cache.
|
| 20 |
+
export CARGO_HOME="${CARGO_HOME:-/root/.cargo}"
|
| 21 |
+
|
| 22 |
+
_fetch_dir="/tmp/pb_fetch"
|
| 23 |
+
|
| 24 |
+
# Recreate a clean temporary mirror workspace.
|
| 25 |
+
rm -rf "$_fetch_dir"
|
| 26 |
+
mkdir -p "$_fetch_dir"
|
| 27 |
+
|
| 28 |
+
mkdir -p "$_fetch_dir/autometrics"
|
| 29 |
+
mkdir -p "$_fetch_dir/autometrics-cli"
|
| 30 |
+
mkdir -p "$_fetch_dir/autometrics-macros"
|
| 31 |
+
mkdir -p "$_fetch_dir/examples/actix-web"
|
| 32 |
+
mkdir -p "$_fetch_dir/examples/axum"
|
| 33 |
+
mkdir -p "$_fetch_dir/examples/custom-metrics"
|
| 34 |
+
mkdir -p "$_fetch_dir/examples/exemplars-tracing"
|
| 35 |
+
mkdir -p "$_fetch_dir/examples/full-api"
|
| 36 |
+
mkdir -p "$_fetch_dir/examples/grpc-http"
|
| 37 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push"
|
| 38 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push-custom"
|
| 39 |
+
mkdir -p "$_fetch_dir/examples/util"
|
| 40 |
+
|
| 41 |
+
# --- Workspace root manifest (mirrors repository Cargo.toml) ---
|
| 42 |
+
cat > "$_fetch_dir/Cargo.toml" <<'CARGO_EOF'
|
| 43 |
+
[workspace.package]
|
| 44 |
+
version = "3.0.0"
|
| 45 |
+
edition = "2021"
|
| 46 |
+
authors = ["Fiberplane <info@fiberplane.com>", "Evan Schwartz <3262610+emschwartz@users.noreply.github.com>"]
|
| 47 |
+
description = " Easily add metrics to your code that actually help you spot and debug issues in production. Built on Prometheus and OpenTelemetry."
|
| 48 |
+
documentation = "https://docs.rs/autometrics"
|
| 49 |
+
repository = "https://github.com/autometrics-dev/autometrics-rs"
|
| 50 |
+
homepage = "https://autometrics.dev"
|
| 51 |
+
license = "MIT OR Apache-2.0"
|
| 52 |
+
keywords = ["metrics", "prometheus", "opentelemetry"]
|
| 53 |
+
categories = ["development-tools::debugging", "development-tools::profiling"]
|
| 54 |
+
|
| 55 |
+
[workspace]
|
| 56 |
+
resolver = "2"
|
| 57 |
+
default-members = ["autometrics", "autometrics-cli", "autometrics-macros"]
|
| 58 |
+
members = [
|
| 59 |
+
"autometrics",
|
| 60 |
+
"autometrics-cli",
|
| 61 |
+
"autometrics-macros",
|
| 62 |
+
"examples/*"
|
| 63 |
+
]
|
| 64 |
+
exclude = ["examples/data", "examples/target"]
|
| 65 |
+
|
| 66 |
+
[workspace.dependencies]
|
| 67 |
+
autometrics-macros = { version = "3.0.0", path = "autometrics-macros" }
|
| 68 |
+
CARGO_EOF
|
| 69 |
+
|
| 70 |
+
# --- autometrics-macros (proc-macro library) ---
|
| 71 |
+
cat > "$_fetch_dir/autometrics-macros/Cargo.toml" <<'CARGO_EOF'
|
| 72 |
+
[package]
|
| 73 |
+
name = "autometrics-macros"
|
| 74 |
+
version = { workspace = true }
|
| 75 |
+
edition = { workspace = true }
|
| 76 |
+
authors = { workspace = true }
|
| 77 |
+
description = { workspace = true }
|
| 78 |
+
documentation = { workspace = true }
|
| 79 |
+
repository = { workspace = true }
|
| 80 |
+
homepage = { workspace = true }
|
| 81 |
+
license = { workspace = true }
|
| 82 |
+
keywords = { workspace = true }
|
| 83 |
+
categories = { workspace = true }
|
| 84 |
+
|
| 85 |
+
[lib]
|
| 86 |
+
name = "autometrics_macros"
|
| 87 |
+
path = "src/lib.rs"
|
| 88 |
+
proc-macro = true
|
| 89 |
+
|
| 90 |
+
[dependencies]
|
| 91 |
+
percent-encoding = "2.2"
|
| 92 |
+
proc-macro2 = "1"
|
| 93 |
+
quote = "1"
|
| 94 |
+
regex = "1.10.2"
|
| 95 |
+
syn = { version = "2", features = ["full"] }
|
| 96 |
+
CARGO_EOF
|
| 97 |
+
mkdir -p "$_fetch_dir/autometrics-macros/src"
|
| 98 |
+
: > "$_fetch_dir/autometrics-macros/src/lib.rs"
|
| 99 |
+
|
| 100 |
+
# --- autometrics-cli (selected target) ---
|
| 101 |
+
cat > "$_fetch_dir/autometrics-cli/Cargo.toml" <<'CARGO_EOF'
|
| 102 |
+
[package]
|
| 103 |
+
name = "autometrics-cli"
|
| 104 |
+
description = "The command line interface for autometrics"
|
| 105 |
+
version = { workspace = true }
|
| 106 |
+
edition = { workspace = true }
|
| 107 |
+
authors = { workspace = true }
|
| 108 |
+
repository = { workspace = true }
|
| 109 |
+
homepage = { workspace = true }
|
| 110 |
+
license = { workspace = true }
|
| 111 |
+
keywords = { workspace = true }
|
| 112 |
+
categories = { workspace = true }
|
| 113 |
+
|
| 114 |
+
[dependencies]
|
| 115 |
+
clap = { version = "4.1", features = ["derive"] }
|
| 116 |
+
|
| 117 |
+
[[bin]]
|
| 118 |
+
name = "autometrics-cli"
|
| 119 |
+
path = "src/main.rs"
|
| 120 |
+
CARGO_EOF
|
| 121 |
+
mkdir -p "$_fetch_dir/autometrics-cli/src"
|
| 122 |
+
: > "$_fetch_dir/autometrics-cli/src/main.rs"
|
| 123 |
+
|
| 124 |
+
# --- autometrics (library) ---
|
| 125 |
+
cat > "$_fetch_dir/autometrics/Cargo.toml" <<'CARGO_EOF'
|
| 126 |
+
[package]
|
| 127 |
+
name = "autometrics"
|
| 128 |
+
version = { workspace = true }
|
| 129 |
+
edition = { workspace = true }
|
| 130 |
+
authors = { workspace = true }
|
| 131 |
+
description = { workspace = true }
|
| 132 |
+
documentation = { workspace = true }
|
| 133 |
+
repository = { workspace = true }
|
| 134 |
+
homepage = { workspace = true }
|
| 135 |
+
license = { workspace = true }
|
| 136 |
+
keywords = { workspace = true }
|
| 137 |
+
categories = { workspace = true }
|
| 138 |
+
readme = "README.md"
|
| 139 |
+
|
| 140 |
+
[features]
|
| 141 |
+
metrics-0_24 = ["dep:metrics"]
|
| 142 |
+
opentelemetry-0_30 = ["opentelemetry/metrics", "dep:prometheus"]
|
| 143 |
+
prometheus-0_14 = ["dep:prometheus"]
|
| 144 |
+
prometheus-client-0_22 = ["dep:prometheus-client"]
|
| 145 |
+
metrics = ["metrics-0_24"]
|
| 146 |
+
opentelemetry = ["opentelemetry-0_30"]
|
| 147 |
+
prometheus = ["prometheus-0_14"]
|
| 148 |
+
prometheus-client = ["prometheus-client-0_22"]
|
| 149 |
+
exemplars-tracing-opentelemetry = ["exemplars-tracing-opentelemetry-0_31"]
|
| 150 |
+
prometheus-exporter = [
|
| 151 |
+
"http",
|
| 152 |
+
"metrics-exporter-prometheus",
|
| 153 |
+
"opentelemetry_sdk",
|
| 154 |
+
"opentelemetry_sdk/spec_unstable_metrics_views",
|
| 155 |
+
"dep:prometheus",
|
| 156 |
+
"dep:prometheus-client",
|
| 157 |
+
]
|
| 158 |
+
otel-push-exporter = [
|
| 159 |
+
"opentelemetry_sdk",
|
| 160 |
+
"dep:opentelemetry",
|
| 161 |
+
"opentelemetry-otlp",
|
| 162 |
+
"opentelemetry-otlp/metrics",
|
| 163 |
+
"opentelemetry-otlp/tls-roots",
|
| 164 |
+
"opentelemetry-otlp/reqwest-rustls"
|
| 165 |
+
]
|
| 166 |
+
otel-push-exporter-http = [
|
| 167 |
+
"otel-push-exporter",
|
| 168 |
+
"opentelemetry-otlp/http-proto"
|
| 169 |
+
]
|
| 170 |
+
otel-push-exporter-grpc = [
|
| 171 |
+
"otel-push-exporter",
|
| 172 |
+
"opentelemetry-otlp/grpc-tonic"
|
| 173 |
+
]
|
| 174 |
+
otel-push-exporter-tokio = [
|
| 175 |
+
"otel-push-exporter",
|
| 176 |
+
"opentelemetry_sdk/rt-tokio"
|
| 177 |
+
]
|
| 178 |
+
otel-push-exporter-tokio-current-thread = [
|
| 179 |
+
"otel-push-exporter",
|
| 180 |
+
"opentelemetry_sdk/rt-tokio-current-thread"
|
| 181 |
+
]
|
| 182 |
+
exemplars-tracing = ["tracing", "tracing-subscriber"]
|
| 183 |
+
exemplars-tracing-opentelemetry-0_31 = [
|
| 184 |
+
"dep:opentelemetry",
|
| 185 |
+
"opentelemetry_sdk/trace",
|
| 186 |
+
"tracing",
|
| 187 |
+
"dep:tracing-opentelemetry"
|
| 188 |
+
]
|
| 189 |
+
custom-objective-percentile = []
|
| 190 |
+
custom-objective-latency = []
|
| 191 |
+
|
| 192 |
+
[dependencies]
|
| 193 |
+
autometrics-macros = { workspace = true }
|
| 194 |
+
linkme = "0.3"
|
| 195 |
+
once_cell = "1.17"
|
| 196 |
+
spez = "0.1.2"
|
| 197 |
+
thiserror = "1"
|
| 198 |
+
opentelemetry = { version = "0.30", default-features = false, optional = true }
|
| 199 |
+
metrics = { version = "0.24", default-features = false, optional = true }
|
| 200 |
+
http = { version = "1.0.0", optional = true }
|
| 201 |
+
metrics-exporter-prometheus = { version = "0.17", default-features = false, optional = true }
|
| 202 |
+
opentelemetry_sdk = { version = "0.30.0", default-features = false, features = [
|
| 203 |
+
"metrics",
|
| 204 |
+
], optional = true }
|
| 205 |
+
opentelemetry-otlp = { version = "0.30", default-features = false, optional = true }
|
| 206 |
+
prometheus = { version = "0.14", default-features = false, optional = true }
|
| 207 |
+
prometheus-client = { version = "0.22", optional = true }
|
| 208 |
+
tracing = { version = "0.1", optional = true }
|
| 209 |
+
tracing-subscriber = { version = "0.3", default-features = false, features = [
|
| 210 |
+
"registry",
|
| 211 |
+
], optional = true }
|
| 212 |
+
tracing-opentelemetry = { version = "0.31", default-features = false, optional = true }
|
| 213 |
+
|
| 214 |
+
[dev-dependencies]
|
| 215 |
+
async-trait = "0.1.74"
|
| 216 |
+
axum = { version = "0.7.2", features = ["tokio"] }
|
| 217 |
+
criterion = "0.5"
|
| 218 |
+
http = "1.0.0"
|
| 219 |
+
opentelemetry = "0.30"
|
| 220 |
+
opentelemetry-stdout = { version = "0.30", features = ["trace"] }
|
| 221 |
+
prometheus-client = "0.22"
|
| 222 |
+
tokio = { version = "1", features = ["full"] }
|
| 223 |
+
tracing = "0.1"
|
| 224 |
+
tracing-subscriber = "0.3"
|
| 225 |
+
trybuild = "1.0"
|
| 226 |
+
uuid = { version = "1", features = ["v4"] }
|
| 227 |
+
vergen = { version = "8.1", features = ["git", "gitcl"] }
|
| 228 |
+
|
| 229 |
+
[build-dependencies]
|
| 230 |
+
cfg_aliases = "0.2.1"
|
| 231 |
+
|
| 232 |
+
[package.metadata.docs.rs]
|
| 233 |
+
all-features = true
|
| 234 |
+
rustdoc-args = ["--cfg", "docsrs"]
|
| 235 |
+
|
| 236 |
+
[lib]
|
| 237 |
+
name = "autometrics"
|
| 238 |
+
path = "src/lib.rs"
|
| 239 |
+
CARGO_EOF
|
| 240 |
+
mkdir -p "$_fetch_dir/autometrics/src"
|
| 241 |
+
: > "$_fetch_dir/autometrics/src/lib.rs"
|
| 242 |
+
|
| 243 |
+
# --- examples ---
|
| 244 |
+
cat > "$_fetch_dir/examples/actix-web/Cargo.toml" <<'CARGO_EOF'
|
| 245 |
+
[package]
|
| 246 |
+
name = "example-actix-web"
|
| 247 |
+
version = "0.0.0"
|
| 248 |
+
edition = "2021"
|
| 249 |
+
publish = false
|
| 250 |
+
|
| 251 |
+
[dependencies]
|
| 252 |
+
actix-web = "4.3.1"
|
| 253 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 254 |
+
autometrics-example-util = { path = "../util" }
|
| 255 |
+
rand = "0.8.5"
|
| 256 |
+
reqwest = "0.11"
|
| 257 |
+
tokio = { version = "1.28.2", features = ["full"] }
|
| 258 |
+
|
| 259 |
+
[[bin]]
|
| 260 |
+
name = "example-actix-web"
|
| 261 |
+
path = "src/main.rs"
|
| 262 |
+
CARGO_EOF
|
| 263 |
+
mkdir -p "$_fetch_dir/examples/actix-web/src"
|
| 264 |
+
: > "$_fetch_dir/examples/actix-web/src/main.rs"
|
| 265 |
+
|
| 266 |
+
cat > "$_fetch_dir/examples/axum/Cargo.toml" <<'CARGO_EOF'
|
| 267 |
+
[package]
|
| 268 |
+
name = "example-axum"
|
| 269 |
+
version = "0.0.0"
|
| 270 |
+
publish = false
|
| 271 |
+
edition = "2021"
|
| 272 |
+
|
| 273 |
+
[dependencies]
|
| 274 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 275 |
+
autometrics-example-util = { path = "../util" }
|
| 276 |
+
axum = { version = "0.7.2", features = ["json"] }
|
| 277 |
+
rand = "0.8"
|
| 278 |
+
reqwest = { version = "0.11", features = ["json"] }
|
| 279 |
+
tokio = { version = "1", features = ["full"] }
|
| 280 |
+
|
| 281 |
+
[[bin]]
|
| 282 |
+
name = "example-axum"
|
| 283 |
+
path = "src/main.rs"
|
| 284 |
+
CARGO_EOF
|
| 285 |
+
mkdir -p "$_fetch_dir/examples/axum/src"
|
| 286 |
+
: > "$_fetch_dir/examples/axum/src/main.rs"
|
| 287 |
+
|
| 288 |
+
cat > "$_fetch_dir/examples/custom-metrics/Cargo.toml" <<'CARGO_EOF'
|
| 289 |
+
[package]
|
| 290 |
+
name = "example-custom-metrics"
|
| 291 |
+
version = "0.0.0"
|
| 292 |
+
publish = false
|
| 293 |
+
edition = "2021"
|
| 294 |
+
|
| 295 |
+
[features]
|
| 296 |
+
metrics = ["autometrics/metrics", "dep:metrics"]
|
| 297 |
+
opentelemetry = ["autometrics/opentelemetry", "dep:opentelemetry"]
|
| 298 |
+
prometheus = ["autometrics/prometheus", "dep:prometheus"]
|
| 299 |
+
prometheus-client = ["autometrics/prometheus-client", "dep:prometheus-client"]
|
| 300 |
+
|
| 301 |
+
[dependencies]
|
| 302 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 303 |
+
metrics = { version = "0.21.1", optional = true }
|
| 304 |
+
opentelemetry = { version = "0.20", features = ["metrics"], optional = true }
|
| 305 |
+
prometheus = { version = "0.13", optional = true }
|
| 306 |
+
prometheus-client = { version = "0.21.2", optional = true }
|
| 307 |
+
|
| 308 |
+
[[bin]]
|
| 309 |
+
name = "example-custom-metrics"
|
| 310 |
+
path = "src/main.rs"
|
| 311 |
+
CARGO_EOF
|
| 312 |
+
mkdir -p "$_fetch_dir/examples/custom-metrics/src"
|
| 313 |
+
: > "$_fetch_dir/examples/custom-metrics/src/main.rs"
|
| 314 |
+
|
| 315 |
+
cat > "$_fetch_dir/examples/exemplars-tracing/Cargo.toml" <<'CARGO_EOF'
|
| 316 |
+
[package]
|
| 317 |
+
name = "example-exemplars-tracing"
|
| 318 |
+
version = "0.0.0"
|
| 319 |
+
publish = false
|
| 320 |
+
edition = "2021"
|
| 321 |
+
|
| 322 |
+
[dependencies]
|
| 323 |
+
autometrics = { path = "../../autometrics", features = [
|
| 324 |
+
"prometheus-client-0_22",
|
| 325 |
+
"prometheus-exporter",
|
| 326 |
+
"exemplars-tracing"
|
| 327 |
+
] }
|
| 328 |
+
autometrics-example-util = { path = "../util" }
|
| 329 |
+
axum = { version = "0.7.2", features = ["json"] }
|
| 330 |
+
reqwest = { version = "0.11", features = ["json"] }
|
| 331 |
+
tokio = { version = "1", features = ["full"] }
|
| 332 |
+
tracing = "0.1"
|
| 333 |
+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
| 334 |
+
uuid = { version = "1.3", features = ["v4"] }
|
| 335 |
+
|
| 336 |
+
[[bin]]
|
| 337 |
+
name = "example-exemplars-tracing"
|
| 338 |
+
path = "src/main.rs"
|
| 339 |
+
CARGO_EOF
|
| 340 |
+
mkdir -p "$_fetch_dir/examples/exemplars-tracing/src"
|
| 341 |
+
: > "$_fetch_dir/examples/exemplars-tracing/src/main.rs"
|
| 342 |
+
|
| 343 |
+
cat > "$_fetch_dir/examples/full-api/Cargo.toml" <<'CARGO_EOF'
|
| 344 |
+
[package]
|
| 345 |
+
name = "example-full-api"
|
| 346 |
+
version = "0.0.0"
|
| 347 |
+
publish = false
|
| 348 |
+
edition = "2021"
|
| 349 |
+
|
| 350 |
+
[dependencies]
|
| 351 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 352 |
+
autometrics-example-util = { path = "../util" }
|
| 353 |
+
axum = { version = "0.7.2", features = ["json"] }
|
| 354 |
+
rand = "0.8"
|
| 355 |
+
reqwest = { version = "0.11", features = ["json"] }
|
| 356 |
+
serde = { version = "1", features = ["derive"] }
|
| 357 |
+
strum = { version = "0.24", features = ["derive"] }
|
| 358 |
+
thiserror = "1"
|
| 359 |
+
tokio = { version = "1", features = ["full"] }
|
| 360 |
+
|
| 361 |
+
[build-dependencies]
|
| 362 |
+
vergen = { version = "8.1", features = ["git", "gitcl"] }
|
| 363 |
+
|
| 364 |
+
[[bin]]
|
| 365 |
+
name = "example-full-api"
|
| 366 |
+
path = "src/main.rs"
|
| 367 |
+
CARGO_EOF
|
| 368 |
+
mkdir -p "$_fetch_dir/examples/full-api/src"
|
| 369 |
+
: > "$_fetch_dir/examples/full-api/src/main.rs"
|
| 370 |
+
|
| 371 |
+
cat > "$_fetch_dir/examples/grpc-http/Cargo.toml" <<'CARGO_EOF'
|
| 372 |
+
[package]
|
| 373 |
+
name = "example-grpc-http"
|
| 374 |
+
version = "0.0.0"
|
| 375 |
+
publish = false
|
| 376 |
+
edition = "2021"
|
| 377 |
+
|
| 378 |
+
[dependencies]
|
| 379 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 380 |
+
prost = "0.12"
|
| 381 |
+
tokio = { version = "1", features = ["full"] }
|
| 382 |
+
tonic = "0.10"
|
| 383 |
+
tonic-health = "0.10"
|
| 384 |
+
warp = "0.3"
|
| 385 |
+
|
| 386 |
+
[build-dependencies]
|
| 387 |
+
tonic-build = "0.10"
|
| 388 |
+
|
| 389 |
+
[[bin]]
|
| 390 |
+
name = "example-grpc-http"
|
| 391 |
+
path = "src/main.rs"
|
| 392 |
+
CARGO_EOF
|
| 393 |
+
mkdir -p "$_fetch_dir/examples/grpc-http/src"
|
| 394 |
+
: > "$_fetch_dir/examples/grpc-http/src/main.rs"
|
| 395 |
+
|
| 396 |
+
cat > "$_fetch_dir/examples/opentelemetry-push-custom/Cargo.toml" <<'CARGO_EOF'
|
| 397 |
+
[package]
|
| 398 |
+
name = "example-opentelemetry-push-custom"
|
| 399 |
+
version = "0.0.0"
|
| 400 |
+
publish = false
|
| 401 |
+
edition = "2021"
|
| 402 |
+
|
| 403 |
+
[dependencies]
|
| 404 |
+
autometrics = { path = "../../autometrics", features = ["opentelemetry-0_30"] }
|
| 405 |
+
autometrics-example-util = { path = "../util" }
|
| 406 |
+
opentelemetry = { version = "0.30", features = ["metrics"] }
|
| 407 |
+
opentelemetry_sdk = { version = "0.30", features = ["metrics", "rt-tokio"] }
|
| 408 |
+
opentelemetry-otlp = { version = "0.30", features = ["tonic", "metrics"] }
|
| 409 |
+
opentelemetry-semantic-conventions = { version = "0.30.0" }
|
| 410 |
+
tokio = { version = "1", features = ["full"] }
|
| 411 |
+
|
| 412 |
+
[[bin]]
|
| 413 |
+
name = "example-opentelemetry-push-custom"
|
| 414 |
+
path = "src/main.rs"
|
| 415 |
+
CARGO_EOF
|
| 416 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push-custom/src"
|
| 417 |
+
: > "$_fetch_dir/examples/opentelemetry-push-custom/src/main.rs"
|
| 418 |
+
|
| 419 |
+
cat > "$_fetch_dir/examples/opentelemetry-push/Cargo.toml" <<'CARGO_EOF'
|
| 420 |
+
[package]
|
| 421 |
+
name = "example-opentelemetry-push"
|
| 422 |
+
version = "0.0.0"
|
| 423 |
+
publish = false
|
| 424 |
+
edition = "2021"
|
| 425 |
+
|
| 426 |
+
[dependencies]
|
| 427 |
+
autometrics = { path = "../../autometrics", features = ["opentelemetry-0_30", "otel-push-exporter-http", "otel-push-exporter-tokio"] }
|
| 428 |
+
autometrics-example-util = { path = "../util" }
|
| 429 |
+
tokio = { version = "1", features = ["full"] }
|
| 430 |
+
|
| 431 |
+
[[bin]]
|
| 432 |
+
name = "example-opentelemetry-push"
|
| 433 |
+
path = "src/main.rs"
|
| 434 |
+
CARGO_EOF
|
| 435 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push/src"
|
| 436 |
+
: > "$_fetch_dir/examples/opentelemetry-push/src/main.rs"
|
| 437 |
+
|
| 438 |
+
cat > "$_fetch_dir/examples/util/Cargo.toml" <<'CARGO_EOF'
|
| 439 |
+
[package]
|
| 440 |
+
name = "autometrics-example-util"
|
| 441 |
+
version = "0.0.0"
|
| 442 |
+
publish = false
|
| 443 |
+
edition = "2021"
|
| 444 |
+
|
| 445 |
+
[dependencies]
|
| 446 |
+
rand = "0.8"
|
| 447 |
+
tokio = { version = "1", features = ["time"] }
|
| 448 |
+
|
| 449 |
+
[lib]
|
| 450 |
+
name = "autometrics_example_util"
|
| 451 |
+
path = "src/lib.rs"
|
| 452 |
+
CARGO_EOF
|
| 453 |
+
mkdir -p "$_fetch_dir/examples/util/src"
|
| 454 |
+
: > "$_fetch_dir/examples/util/src/lib.rs"
|
| 455 |
+
|
| 456 |
+
# --- Fetch every dependency into the cargo registry cache (offline build uses it) ---
|
| 457 |
+
# Unlike running `cargo fetch` from /source_ro or the repo root, we point cargo
|
| 458 |
+
# at the generated mirror manifest so the repository source files are not needed.
|
| 459 |
+
cargo fetch --manifest-path "$_fetch_dir/Cargo.toml"
|
autometrics-dev--autometrics-rs/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1414bf6ca9183e4743e976a1b27d84d9031026d583661b6acd78806e0d478f71
|
| 3 |
+
size 1132376
|
autometrics-dev--autometrics-rs/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
|
autometrics-dev--autometrics-rs/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ad9908b3287b0546600f7c53a6080cb093baced0be1f68707fb8d6e1ea1664f
|
| 3 |
+
size 13439
|
autometrics-dev--autometrics-rs/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
|
autometrics-dev--autometrics-rs/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
|
autometrics-dev--autometrics-rs/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/autometrics-dev--autometrics-rs"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for autometrics-dev/autometrics-rs"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "rust"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "autometrics-dev__autometrics-rs.dec7c0d"
|
| 32 |
+
repository = "autometrics-dev/autometrics-rs"
|
| 33 |
+
commit = "dec7c0dabc3242c53c0b30c25c7cae6f7ce90037"
|
| 34 |
+
language = "rust"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.5703093854358796
|
| 37 |
+
test_branches = 2
|
| 38 |
+
test_count = 373
|
| 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"
|
autometrics-dev--autometrics-rs/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
|
autometrics-dev--autometrics-rs/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:ba177636e43ad5a4fc930e428394e9434799c066fb1ddfdfbd2b4870a04b576c
|
| 3 |
+
size 21727
|
autometrics-dev--autometrics-rs/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:19fb452b6f75586e7da61abae423c9eaa7eb85d80e382ac206f5ed86d767a2f7
|
| 3 |
+
size 20288
|
autometrics-dev--autometrics-rs/tests/download.sh
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
+
#!/usr/bin/env bash
|
| 2 |
+
# ProgramGym download.sh for autometrics-dev/autometrics-rs
|
| 3 |
+
#
|
| 4 |
+
# This script is sourced (not executed) from /source_ro/download.sh during the
|
| 5 |
+
# networked download validation stage. It prefetches the full Rust workspace
|
| 6 |
+
# dependency closure into the cargo registry cache so that build.sh can compile
|
| 7 |
+
# the selected target (autometrics-cli) completely offline.
|
| 8 |
+
#
|
| 9 |
+
# It is fully standalone: it does NOT read any repository source file. All
|
| 10 |
+
# Cargo manifests are embedded inline below and written to a temporary mirror
|
| 11 |
+
# workspace, then `cargo fetch --manifest-path` is run against that generated
|
| 12 |
+
# manifest. No compilation, linking, or testing is performed here.
|
| 13 |
+
#
|
| 14 |
+
# Because the download stage does not receive the repository source tree, this
|
| 15 |
+
# script mirrors the workspace layout (Cargo.toml + per-member manifests) so the
|
| 16 |
+
# resolved dependency set is identical to what build.sh will require.
|
| 17 |
+
|
| 18 |
+
# Keep exported env vars in the current shell; build.sh depends on CARGO_HOME so
|
| 19 |
+
# both stages share the same prefetched registry cache.
|
| 20 |
+
export CARGO_HOME="${CARGO_HOME:-/root/.cargo}"
|
| 21 |
+
|
| 22 |
+
_fetch_dir="/tmp/pb_fetch"
|
| 23 |
+
|
| 24 |
+
# Recreate a clean temporary mirror workspace.
|
| 25 |
+
rm -rf "$_fetch_dir"
|
| 26 |
+
mkdir -p "$_fetch_dir"
|
| 27 |
+
|
| 28 |
+
mkdir -p "$_fetch_dir/autometrics"
|
| 29 |
+
mkdir -p "$_fetch_dir/autometrics-cli"
|
| 30 |
+
mkdir -p "$_fetch_dir/autometrics-macros"
|
| 31 |
+
mkdir -p "$_fetch_dir/examples/actix-web"
|
| 32 |
+
mkdir -p "$_fetch_dir/examples/axum"
|
| 33 |
+
mkdir -p "$_fetch_dir/examples/custom-metrics"
|
| 34 |
+
mkdir -p "$_fetch_dir/examples/exemplars-tracing"
|
| 35 |
+
mkdir -p "$_fetch_dir/examples/full-api"
|
| 36 |
+
mkdir -p "$_fetch_dir/examples/grpc-http"
|
| 37 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push"
|
| 38 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push-custom"
|
| 39 |
+
mkdir -p "$_fetch_dir/examples/util"
|
| 40 |
+
|
| 41 |
+
# --- Workspace root manifest (mirrors repository Cargo.toml) ---
|
| 42 |
+
cat > "$_fetch_dir/Cargo.toml" <<'CARGO_EOF'
|
| 43 |
+
[workspace.package]
|
| 44 |
+
version = "3.0.0"
|
| 45 |
+
edition = "2021"
|
| 46 |
+
authors = ["Fiberplane <info@fiberplane.com>", "Evan Schwartz <3262610+emschwartz@users.noreply.github.com>"]
|
| 47 |
+
description = " Easily add metrics to your code that actually help you spot and debug issues in production. Built on Prometheus and OpenTelemetry."
|
| 48 |
+
documentation = "https://docs.rs/autometrics"
|
| 49 |
+
repository = "https://github.com/autometrics-dev/autometrics-rs"
|
| 50 |
+
homepage = "https://autometrics.dev"
|
| 51 |
+
license = "MIT OR Apache-2.0"
|
| 52 |
+
keywords = ["metrics", "prometheus", "opentelemetry"]
|
| 53 |
+
categories = ["development-tools::debugging", "development-tools::profiling"]
|
| 54 |
+
|
| 55 |
+
[workspace]
|
| 56 |
+
resolver = "2"
|
| 57 |
+
default-members = ["autometrics", "autometrics-cli", "autometrics-macros"]
|
| 58 |
+
members = [
|
| 59 |
+
"autometrics",
|
| 60 |
+
"autometrics-cli",
|
| 61 |
+
"autometrics-macros",
|
| 62 |
+
"examples/*"
|
| 63 |
+
]
|
| 64 |
+
exclude = ["examples/data", "examples/target"]
|
| 65 |
+
|
| 66 |
+
[workspace.dependencies]
|
| 67 |
+
autometrics-macros = { version = "3.0.0", path = "autometrics-macros" }
|
| 68 |
+
CARGO_EOF
|
| 69 |
+
|
| 70 |
+
# --- autometrics-macros (proc-macro library) ---
|
| 71 |
+
cat > "$_fetch_dir/autometrics-macros/Cargo.toml" <<'CARGO_EOF'
|
| 72 |
+
[package]
|
| 73 |
+
name = "autometrics-macros"
|
| 74 |
+
version = { workspace = true }
|
| 75 |
+
edition = { workspace = true }
|
| 76 |
+
authors = { workspace = true }
|
| 77 |
+
description = { workspace = true }
|
| 78 |
+
documentation = { workspace = true }
|
| 79 |
+
repository = { workspace = true }
|
| 80 |
+
homepage = { workspace = true }
|
| 81 |
+
license = { workspace = true }
|
| 82 |
+
keywords = { workspace = true }
|
| 83 |
+
categories = { workspace = true }
|
| 84 |
+
|
| 85 |
+
[lib]
|
| 86 |
+
name = "autometrics_macros"
|
| 87 |
+
path = "src/lib.rs"
|
| 88 |
+
proc-macro = true
|
| 89 |
+
|
| 90 |
+
[dependencies]
|
| 91 |
+
percent-encoding = "2.2"
|
| 92 |
+
proc-macro2 = "1"
|
| 93 |
+
quote = "1"
|
| 94 |
+
regex = "1.10.2"
|
| 95 |
+
syn = { version = "2", features = ["full"] }
|
| 96 |
+
CARGO_EOF
|
| 97 |
+
mkdir -p "$_fetch_dir/autometrics-macros/src"
|
| 98 |
+
: > "$_fetch_dir/autometrics-macros/src/lib.rs"
|
| 99 |
+
|
| 100 |
+
# --- autometrics-cli (selected target) ---
|
| 101 |
+
cat > "$_fetch_dir/autometrics-cli/Cargo.toml" <<'CARGO_EOF'
|
| 102 |
+
[package]
|
| 103 |
+
name = "autometrics-cli"
|
| 104 |
+
description = "The command line interface for autometrics"
|
| 105 |
+
version = { workspace = true }
|
| 106 |
+
edition = { workspace = true }
|
| 107 |
+
authors = { workspace = true }
|
| 108 |
+
repository = { workspace = true }
|
| 109 |
+
homepage = { workspace = true }
|
| 110 |
+
license = { workspace = true }
|
| 111 |
+
keywords = { workspace = true }
|
| 112 |
+
categories = { workspace = true }
|
| 113 |
+
|
| 114 |
+
[dependencies]
|
| 115 |
+
clap = { version = "4.1", features = ["derive"] }
|
| 116 |
+
|
| 117 |
+
[[bin]]
|
| 118 |
+
name = "autometrics-cli"
|
| 119 |
+
path = "src/main.rs"
|
| 120 |
+
CARGO_EOF
|
| 121 |
+
mkdir -p "$_fetch_dir/autometrics-cli/src"
|
| 122 |
+
: > "$_fetch_dir/autometrics-cli/src/main.rs"
|
| 123 |
+
|
| 124 |
+
# --- autometrics (library) ---
|
| 125 |
+
cat > "$_fetch_dir/autometrics/Cargo.toml" <<'CARGO_EOF'
|
| 126 |
+
[package]
|
| 127 |
+
name = "autometrics"
|
| 128 |
+
version = { workspace = true }
|
| 129 |
+
edition = { workspace = true }
|
| 130 |
+
authors = { workspace = true }
|
| 131 |
+
description = { workspace = true }
|
| 132 |
+
documentation = { workspace = true }
|
| 133 |
+
repository = { workspace = true }
|
| 134 |
+
homepage = { workspace = true }
|
| 135 |
+
license = { workspace = true }
|
| 136 |
+
keywords = { workspace = true }
|
| 137 |
+
categories = { workspace = true }
|
| 138 |
+
readme = "README.md"
|
| 139 |
+
|
| 140 |
+
[features]
|
| 141 |
+
metrics-0_24 = ["dep:metrics"]
|
| 142 |
+
opentelemetry-0_30 = ["opentelemetry/metrics", "dep:prometheus"]
|
| 143 |
+
prometheus-0_14 = ["dep:prometheus"]
|
| 144 |
+
prometheus-client-0_22 = ["dep:prometheus-client"]
|
| 145 |
+
metrics = ["metrics-0_24"]
|
| 146 |
+
opentelemetry = ["opentelemetry-0_30"]
|
| 147 |
+
prometheus = ["prometheus-0_14"]
|
| 148 |
+
prometheus-client = ["prometheus-client-0_22"]
|
| 149 |
+
exemplars-tracing-opentelemetry = ["exemplars-tracing-opentelemetry-0_31"]
|
| 150 |
+
prometheus-exporter = [
|
| 151 |
+
"http",
|
| 152 |
+
"metrics-exporter-prometheus",
|
| 153 |
+
"opentelemetry_sdk",
|
| 154 |
+
"opentelemetry_sdk/spec_unstable_metrics_views",
|
| 155 |
+
"dep:prometheus",
|
| 156 |
+
"dep:prometheus-client",
|
| 157 |
+
]
|
| 158 |
+
otel-push-exporter = [
|
| 159 |
+
"opentelemetry_sdk",
|
| 160 |
+
"dep:opentelemetry",
|
| 161 |
+
"opentelemetry-otlp",
|
| 162 |
+
"opentelemetry-otlp/metrics",
|
| 163 |
+
"opentelemetry-otlp/tls-roots",
|
| 164 |
+
"opentelemetry-otlp/reqwest-rustls"
|
| 165 |
+
]
|
| 166 |
+
otel-push-exporter-http = [
|
| 167 |
+
"otel-push-exporter",
|
| 168 |
+
"opentelemetry-otlp/http-proto"
|
| 169 |
+
]
|
| 170 |
+
otel-push-exporter-grpc = [
|
| 171 |
+
"otel-push-exporter",
|
| 172 |
+
"opentelemetry-otlp/grpc-tonic"
|
| 173 |
+
]
|
| 174 |
+
otel-push-exporter-tokio = [
|
| 175 |
+
"otel-push-exporter",
|
| 176 |
+
"opentelemetry_sdk/rt-tokio"
|
| 177 |
+
]
|
| 178 |
+
otel-push-exporter-tokio-current-thread = [
|
| 179 |
+
"otel-push-exporter",
|
| 180 |
+
"opentelemetry_sdk/rt-tokio-current-thread"
|
| 181 |
+
]
|
| 182 |
+
exemplars-tracing = ["tracing", "tracing-subscriber"]
|
| 183 |
+
exemplars-tracing-opentelemetry-0_31 = [
|
| 184 |
+
"dep:opentelemetry",
|
| 185 |
+
"opentelemetry_sdk/trace",
|
| 186 |
+
"tracing",
|
| 187 |
+
"dep:tracing-opentelemetry"
|
| 188 |
+
]
|
| 189 |
+
custom-objective-percentile = []
|
| 190 |
+
custom-objective-latency = []
|
| 191 |
+
|
| 192 |
+
[dependencies]
|
| 193 |
+
autometrics-macros = { workspace = true }
|
| 194 |
+
linkme = "0.3"
|
| 195 |
+
once_cell = "1.17"
|
| 196 |
+
spez = "0.1.2"
|
| 197 |
+
thiserror = "1"
|
| 198 |
+
opentelemetry = { version = "0.30", default-features = false, optional = true }
|
| 199 |
+
metrics = { version = "0.24", default-features = false, optional = true }
|
| 200 |
+
http = { version = "1.0.0", optional = true }
|
| 201 |
+
metrics-exporter-prometheus = { version = "0.17", default-features = false, optional = true }
|
| 202 |
+
opentelemetry_sdk = { version = "0.30.0", default-features = false, features = [
|
| 203 |
+
"metrics",
|
| 204 |
+
], optional = true }
|
| 205 |
+
opentelemetry-otlp = { version = "0.30", default-features = false, optional = true }
|
| 206 |
+
prometheus = { version = "0.14", default-features = false, optional = true }
|
| 207 |
+
prometheus-client = { version = "0.22", optional = true }
|
| 208 |
+
tracing = { version = "0.1", optional = true }
|
| 209 |
+
tracing-subscriber = { version = "0.3", default-features = false, features = [
|
| 210 |
+
"registry",
|
| 211 |
+
], optional = true }
|
| 212 |
+
tracing-opentelemetry = { version = "0.31", default-features = false, optional = true }
|
| 213 |
+
|
| 214 |
+
[dev-dependencies]
|
| 215 |
+
async-trait = "0.1.74"
|
| 216 |
+
axum = { version = "0.7.2", features = ["tokio"] }
|
| 217 |
+
criterion = "0.5"
|
| 218 |
+
http = "1.0.0"
|
| 219 |
+
opentelemetry = "0.30"
|
| 220 |
+
opentelemetry-stdout = { version = "0.30", features = ["trace"] }
|
| 221 |
+
prometheus-client = "0.22"
|
| 222 |
+
tokio = { version = "1", features = ["full"] }
|
| 223 |
+
tracing = "0.1"
|
| 224 |
+
tracing-subscriber = "0.3"
|
| 225 |
+
trybuild = "1.0"
|
| 226 |
+
uuid = { version = "1", features = ["v4"] }
|
| 227 |
+
vergen = { version = "8.1", features = ["git", "gitcl"] }
|
| 228 |
+
|
| 229 |
+
[build-dependencies]
|
| 230 |
+
cfg_aliases = "0.2.1"
|
| 231 |
+
|
| 232 |
+
[package.metadata.docs.rs]
|
| 233 |
+
all-features = true
|
| 234 |
+
rustdoc-args = ["--cfg", "docsrs"]
|
| 235 |
+
|
| 236 |
+
[lib]
|
| 237 |
+
name = "autometrics"
|
| 238 |
+
path = "src/lib.rs"
|
| 239 |
+
CARGO_EOF
|
| 240 |
+
mkdir -p "$_fetch_dir/autometrics/src"
|
| 241 |
+
: > "$_fetch_dir/autometrics/src/lib.rs"
|
| 242 |
+
|
| 243 |
+
# --- examples ---
|
| 244 |
+
cat > "$_fetch_dir/examples/actix-web/Cargo.toml" <<'CARGO_EOF'
|
| 245 |
+
[package]
|
| 246 |
+
name = "example-actix-web"
|
| 247 |
+
version = "0.0.0"
|
| 248 |
+
edition = "2021"
|
| 249 |
+
publish = false
|
| 250 |
+
|
| 251 |
+
[dependencies]
|
| 252 |
+
actix-web = "4.3.1"
|
| 253 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 254 |
+
autometrics-example-util = { path = "../util" }
|
| 255 |
+
rand = "0.8.5"
|
| 256 |
+
reqwest = "0.11"
|
| 257 |
+
tokio = { version = "1.28.2", features = ["full"] }
|
| 258 |
+
|
| 259 |
+
[[bin]]
|
| 260 |
+
name = "example-actix-web"
|
| 261 |
+
path = "src/main.rs"
|
| 262 |
+
CARGO_EOF
|
| 263 |
+
mkdir -p "$_fetch_dir/examples/actix-web/src"
|
| 264 |
+
: > "$_fetch_dir/examples/actix-web/src/main.rs"
|
| 265 |
+
|
| 266 |
+
cat > "$_fetch_dir/examples/axum/Cargo.toml" <<'CARGO_EOF'
|
| 267 |
+
[package]
|
| 268 |
+
name = "example-axum"
|
| 269 |
+
version = "0.0.0"
|
| 270 |
+
publish = false
|
| 271 |
+
edition = "2021"
|
| 272 |
+
|
| 273 |
+
[dependencies]
|
| 274 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 275 |
+
autometrics-example-util = { path = "../util" }
|
| 276 |
+
axum = { version = "0.7.2", features = ["json"] }
|
| 277 |
+
rand = "0.8"
|
| 278 |
+
reqwest = { version = "0.11", features = ["json"] }
|
| 279 |
+
tokio = { version = "1", features = ["full"] }
|
| 280 |
+
|
| 281 |
+
[[bin]]
|
| 282 |
+
name = "example-axum"
|
| 283 |
+
path = "src/main.rs"
|
| 284 |
+
CARGO_EOF
|
| 285 |
+
mkdir -p "$_fetch_dir/examples/axum/src"
|
| 286 |
+
: > "$_fetch_dir/examples/axum/src/main.rs"
|
| 287 |
+
|
| 288 |
+
cat > "$_fetch_dir/examples/custom-metrics/Cargo.toml" <<'CARGO_EOF'
|
| 289 |
+
[package]
|
| 290 |
+
name = "example-custom-metrics"
|
| 291 |
+
version = "0.0.0"
|
| 292 |
+
publish = false
|
| 293 |
+
edition = "2021"
|
| 294 |
+
|
| 295 |
+
[features]
|
| 296 |
+
metrics = ["autometrics/metrics", "dep:metrics"]
|
| 297 |
+
opentelemetry = ["autometrics/opentelemetry", "dep:opentelemetry"]
|
| 298 |
+
prometheus = ["autometrics/prometheus", "dep:prometheus"]
|
| 299 |
+
prometheus-client = ["autometrics/prometheus-client", "dep:prometheus-client"]
|
| 300 |
+
|
| 301 |
+
[dependencies]
|
| 302 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 303 |
+
metrics = { version = "0.21.1", optional = true }
|
| 304 |
+
opentelemetry = { version = "0.20", features = ["metrics"], optional = true }
|
| 305 |
+
prometheus = { version = "0.13", optional = true }
|
| 306 |
+
prometheus-client = { version = "0.21.2", optional = true }
|
| 307 |
+
|
| 308 |
+
[[bin]]
|
| 309 |
+
name = "example-custom-metrics"
|
| 310 |
+
path = "src/main.rs"
|
| 311 |
+
CARGO_EOF
|
| 312 |
+
mkdir -p "$_fetch_dir/examples/custom-metrics/src"
|
| 313 |
+
: > "$_fetch_dir/examples/custom-metrics/src/main.rs"
|
| 314 |
+
|
| 315 |
+
cat > "$_fetch_dir/examples/exemplars-tracing/Cargo.toml" <<'CARGO_EOF'
|
| 316 |
+
[package]
|
| 317 |
+
name = "example-exemplars-tracing"
|
| 318 |
+
version = "0.0.0"
|
| 319 |
+
publish = false
|
| 320 |
+
edition = "2021"
|
| 321 |
+
|
| 322 |
+
[dependencies]
|
| 323 |
+
autometrics = { path = "../../autometrics", features = [
|
| 324 |
+
"prometheus-client-0_22",
|
| 325 |
+
"prometheus-exporter",
|
| 326 |
+
"exemplars-tracing"
|
| 327 |
+
] }
|
| 328 |
+
autometrics-example-util = { path = "../util" }
|
| 329 |
+
axum = { version = "0.7.2", features = ["json"] }
|
| 330 |
+
reqwest = { version = "0.11", features = ["json"] }
|
| 331 |
+
tokio = { version = "1", features = ["full"] }
|
| 332 |
+
tracing = "0.1"
|
| 333 |
+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
| 334 |
+
uuid = { version = "1.3", features = ["v4"] }
|
| 335 |
+
|
| 336 |
+
[[bin]]
|
| 337 |
+
name = "example-exemplars-tracing"
|
| 338 |
+
path = "src/main.rs"
|
| 339 |
+
CARGO_EOF
|
| 340 |
+
mkdir -p "$_fetch_dir/examples/exemplars-tracing/src"
|
| 341 |
+
: > "$_fetch_dir/examples/exemplars-tracing/src/main.rs"
|
| 342 |
+
|
| 343 |
+
cat > "$_fetch_dir/examples/full-api/Cargo.toml" <<'CARGO_EOF'
|
| 344 |
+
[package]
|
| 345 |
+
name = "example-full-api"
|
| 346 |
+
version = "0.0.0"
|
| 347 |
+
publish = false
|
| 348 |
+
edition = "2021"
|
| 349 |
+
|
| 350 |
+
[dependencies]
|
| 351 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 352 |
+
autometrics-example-util = { path = "../util" }
|
| 353 |
+
axum = { version = "0.7.2", features = ["json"] }
|
| 354 |
+
rand = "0.8"
|
| 355 |
+
reqwest = { version = "0.11", features = ["json"] }
|
| 356 |
+
serde = { version = "1", features = ["derive"] }
|
| 357 |
+
strum = { version = "0.24", features = ["derive"] }
|
| 358 |
+
thiserror = "1"
|
| 359 |
+
tokio = { version = "1", features = ["full"] }
|
| 360 |
+
|
| 361 |
+
[build-dependencies]
|
| 362 |
+
vergen = { version = "8.1", features = ["git", "gitcl"] }
|
| 363 |
+
|
| 364 |
+
[[bin]]
|
| 365 |
+
name = "example-full-api"
|
| 366 |
+
path = "src/main.rs"
|
| 367 |
+
CARGO_EOF
|
| 368 |
+
mkdir -p "$_fetch_dir/examples/full-api/src"
|
| 369 |
+
: > "$_fetch_dir/examples/full-api/src/main.rs"
|
| 370 |
+
|
| 371 |
+
cat > "$_fetch_dir/examples/grpc-http/Cargo.toml" <<'CARGO_EOF'
|
| 372 |
+
[package]
|
| 373 |
+
name = "example-grpc-http"
|
| 374 |
+
version = "0.0.0"
|
| 375 |
+
publish = false
|
| 376 |
+
edition = "2021"
|
| 377 |
+
|
| 378 |
+
[dependencies]
|
| 379 |
+
autometrics = { path = "../../autometrics", features = ["prometheus-exporter"] }
|
| 380 |
+
prost = "0.12"
|
| 381 |
+
tokio = { version = "1", features = ["full"] }
|
| 382 |
+
tonic = "0.10"
|
| 383 |
+
tonic-health = "0.10"
|
| 384 |
+
warp = "0.3"
|
| 385 |
+
|
| 386 |
+
[build-dependencies]
|
| 387 |
+
tonic-build = "0.10"
|
| 388 |
+
|
| 389 |
+
[[bin]]
|
| 390 |
+
name = "example-grpc-http"
|
| 391 |
+
path = "src/main.rs"
|
| 392 |
+
CARGO_EOF
|
| 393 |
+
mkdir -p "$_fetch_dir/examples/grpc-http/src"
|
| 394 |
+
: > "$_fetch_dir/examples/grpc-http/src/main.rs"
|
| 395 |
+
|
| 396 |
+
cat > "$_fetch_dir/examples/opentelemetry-push-custom/Cargo.toml" <<'CARGO_EOF'
|
| 397 |
+
[package]
|
| 398 |
+
name = "example-opentelemetry-push-custom"
|
| 399 |
+
version = "0.0.0"
|
| 400 |
+
publish = false
|
| 401 |
+
edition = "2021"
|
| 402 |
+
|
| 403 |
+
[dependencies]
|
| 404 |
+
autometrics = { path = "../../autometrics", features = ["opentelemetry-0_30"] }
|
| 405 |
+
autometrics-example-util = { path = "../util" }
|
| 406 |
+
opentelemetry = { version = "0.30", features = ["metrics"] }
|
| 407 |
+
opentelemetry_sdk = { version = "0.30", features = ["metrics", "rt-tokio"] }
|
| 408 |
+
opentelemetry-otlp = { version = "0.30", features = ["tonic", "metrics"] }
|
| 409 |
+
opentelemetry-semantic-conventions = { version = "0.30.0" }
|
| 410 |
+
tokio = { version = "1", features = ["full"] }
|
| 411 |
+
|
| 412 |
+
[[bin]]
|
| 413 |
+
name = "example-opentelemetry-push-custom"
|
| 414 |
+
path = "src/main.rs"
|
| 415 |
+
CARGO_EOF
|
| 416 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push-custom/src"
|
| 417 |
+
: > "$_fetch_dir/examples/opentelemetry-push-custom/src/main.rs"
|
| 418 |
+
|
| 419 |
+
cat > "$_fetch_dir/examples/opentelemetry-push/Cargo.toml" <<'CARGO_EOF'
|
| 420 |
+
[package]
|
| 421 |
+
name = "example-opentelemetry-push"
|
| 422 |
+
version = "0.0.0"
|
| 423 |
+
publish = false
|
| 424 |
+
edition = "2021"
|
| 425 |
+
|
| 426 |
+
[dependencies]
|
| 427 |
+
autometrics = { path = "../../autometrics", features = ["opentelemetry-0_30", "otel-push-exporter-http", "otel-push-exporter-tokio"] }
|
| 428 |
+
autometrics-example-util = { path = "../util" }
|
| 429 |
+
tokio = { version = "1", features = ["full"] }
|
| 430 |
+
|
| 431 |
+
[[bin]]
|
| 432 |
+
name = "example-opentelemetry-push"
|
| 433 |
+
path = "src/main.rs"
|
| 434 |
+
CARGO_EOF
|
| 435 |
+
mkdir -p "$_fetch_dir/examples/opentelemetry-push/src"
|
| 436 |
+
: > "$_fetch_dir/examples/opentelemetry-push/src/main.rs"
|
| 437 |
+
|
| 438 |
+
cat > "$_fetch_dir/examples/util/Cargo.toml" <<'CARGO_EOF'
|
| 439 |
+
[package]
|
| 440 |
+
name = "autometrics-example-util"
|
| 441 |
+
version = "0.0.0"
|
| 442 |
+
publish = false
|
| 443 |
+
edition = "2021"
|
| 444 |
+
|
| 445 |
+
[dependencies]
|
| 446 |
+
rand = "0.8"
|
| 447 |
+
tokio = { version = "1", features = ["time"] }
|
| 448 |
+
|
| 449 |
+
[lib]
|
| 450 |
+
name = "autometrics_example_util"
|
| 451 |
+
path = "src/lib.rs"
|
| 452 |
+
CARGO_EOF
|
| 453 |
+
mkdir -p "$_fetch_dir/examples/util/src"
|
| 454 |
+
: > "$_fetch_dir/examples/util/src/lib.rs"
|
| 455 |
+
|
| 456 |
+
# --- Fetch every dependency into the cargo registry cache (offline build uses it) ---
|
| 457 |
+
# Unlike running `cargo fetch` from /source_ro or the repo root, we point cargo
|
| 458 |
+
# at the generated mirror manifest so the repository source files are not needed.
|
| 459 |
+
cargo fetch --manifest-path "$_fetch_dir/Cargo.toml"
|
autometrics-dev--autometrics-rs/tests/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1414bf6ca9183e4743e976a1b27d84d9031026d583661b6acd78806e0d478f71
|
| 3 |
+
size 1132376
|
autometrics-dev--autometrics-rs/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
|
autometrics-dev--autometrics-rs/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()
|
autometrics-dev--autometrics-rs/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,810 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [
|
| 7 |
+
{
|
| 8 |
+
"name": "eval.tests.test_help.test_help_lists_generate_sloth_file_subcommand_purpose",
|
| 9 |
+
"reasons": [
|
| 10 |
+
{
|
| 11 |
+
"id": "missing_fixture_assets",
|
| 12 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 13 |
+
"path": "eval/tests/test_help.py",
|
| 14 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 15 |
+
"severity": "error",
|
| 16 |
+
"stage": "static_lint"
|
| 17 |
+
}
|
| 18 |
+
]
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"name": "eval.tests.test_help.test_help_subcommand_prints_top_help_to_stdout",
|
| 22 |
+
"reasons": [
|
| 23 |
+
{
|
| 24 |
+
"id": "missing_fixture_assets",
|
| 25 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 26 |
+
"path": "eval/tests/test_help.py",
|
| 27 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 28 |
+
"severity": "error",
|
| 29 |
+
"stage": "static_lint"
|
| 30 |
+
}
|
| 31 |
+
]
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"name": "eval.tests.test_help.test_no_arguments_prints_help_to_stderr_exact",
|
| 35 |
+
"reasons": [
|
| 36 |
+
{
|
| 37 |
+
"id": "missing_fixture_assets",
|
| 38 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 39 |
+
"path": "eval/tests/test_help.py",
|
| 40 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 41 |
+
"severity": "error",
|
| 42 |
+
"stage": "static_lint"
|
| 43 |
+
}
|
| 44 |
+
]
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"name": "eval.tests.test_help.test_no_arguments_stderr_names_generate_sloth_file",
|
| 48 |
+
"reasons": [
|
| 49 |
+
{
|
| 50 |
+
"id": "missing_fixture_assets",
|
| 51 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 52 |
+
"path": "eval/tests/test_help.py",
|
| 53 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 54 |
+
"severity": "error",
|
| 55 |
+
"stage": "static_lint"
|
| 56 |
+
}
|
| 57 |
+
]
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"name": "eval.tests.test_help_more.test_missing_subcommand_epilogue_and_usage",
|
| 61 |
+
"reasons": [
|
| 62 |
+
{
|
| 63 |
+
"id": "missing_fixture_assets",
|
| 64 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 65 |
+
"path": "eval/tests/test_help_more.py",
|
| 66 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 67 |
+
"severity": "error",
|
| 68 |
+
"stage": "static_lint"
|
| 69 |
+
}
|
| 70 |
+
]
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"name": "eval.tests.test_help_more.test_short_h_and_long_help_subcommand_agree_on_options",
|
| 74 |
+
"reasons": [
|
| 75 |
+
{
|
| 76 |
+
"id": "missing_fixture_assets",
|
| 77 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 78 |
+
"path": "eval/tests/test_help_more.py",
|
| 79 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 80 |
+
"severity": "error",
|
| 81 |
+
"stage": "static_lint"
|
| 82 |
+
}
|
| 83 |
+
]
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"name": "eval.tests.test_help_more.test_subcommand_help_defaults_listed",
|
| 87 |
+
"reasons": [
|
| 88 |
+
{
|
| 89 |
+
"id": "missing_fixture_assets",
|
| 90 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 91 |
+
"path": "eval/tests/test_help_more.py",
|
| 92 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 93 |
+
"severity": "error",
|
| 94 |
+
"stage": "static_lint"
|
| 95 |
+
}
|
| 96 |
+
]
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"name": "eval.tests.test_help_more.test_subcommand_help_lists_all_options",
|
| 100 |
+
"reasons": [
|
| 101 |
+
{
|
| 102 |
+
"id": "missing_fixture_assets",
|
| 103 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 104 |
+
"path": "eval/tests/test_help_more.py",
|
| 105 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 106 |
+
"severity": "error",
|
| 107 |
+
"stage": "static_lint"
|
| 108 |
+
}
|
| 109 |
+
]
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"name": "eval.tests.test_help_more.test_top_help_mentions_only_subcommands",
|
| 113 |
+
"reasons": [
|
| 114 |
+
{
|
| 115 |
+
"id": "missing_fixture_assets",
|
| 116 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 117 |
+
"path": "eval/tests/test_help_more.py",
|
| 118 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 119 |
+
"severity": "error",
|
| 120 |
+
"stage": "static_lint"
|
| 121 |
+
}
|
| 122 |
+
]
|
| 123 |
+
}
|
| 124 |
+
],
|
| 125 |
+
"tests": [
|
| 126 |
+
"eval.tests.test_content.test_annotation_summary_references_labels",
|
| 127 |
+
"eval.tests.test_content.test_block_order_matches_objective_order",
|
| 128 |
+
"eval.tests.test_content.test_default_document_has_eight_slo_blocks",
|
| 129 |
+
"eval.tests.test_content.test_header_structure",
|
| 130 |
+
"eval.tests.test_content.test_latency_alerting_name_uses_objective_percent",
|
| 131 |
+
"eval.tests.test_content.test_latency_block_uses_label_join_for_equality",
|
| 132 |
+
"eval.tests.test_content.test_latency_metric_selector_uses_duration_metrics",
|
| 133 |
+
"eval.tests.test_content.test_output_is_single_stable_document",
|
| 134 |
+
"eval.tests.test_content.test_success_alerting_name_uses_objective_percent[90]",
|
| 135 |
+
"eval.tests.test_content.test_success_alerting_name_uses_objective_percent[95]",
|
| 136 |
+
"eval.tests.test_content.test_success_alerting_name_uses_objective_percent[99.9]",
|
| 137 |
+
"eval.tests.test_content.test_success_alerting_name_uses_objective_percent[99]",
|
| 138 |
+
"eval.tests.test_content.test_success_and_latency_pass_block_groups",
|
| 139 |
+
"eval.tests.test_content.test_success_block_page_and_ticket_severity",
|
| 140 |
+
"eval.tests.test_content.test_success_error_query_percentile_selects_own_value",
|
| 141 |
+
"eval.tests.test_content.test_success_error_query_uses_error_result_filter",
|
| 142 |
+
"eval.tests.test_content.test_success_rate_blocks_precede_latency_blocks",
|
| 143 |
+
"eval.tests.test_content.test_window_template_placeholder_is_single_braced",
|
| 144 |
+
"eval.tests.test_dispatch.test_combined_short_flags_with_values",
|
| 145 |
+
"eval.tests.test_dispatch.test_double_dash_separator_before_subcommand_rejected",
|
| 146 |
+
"eval.tests.test_dispatch.test_empty_output_path_string_is_rejected",
|
| 147 |
+
"eval.tests.test_dispatch.test_flags_reordered_are_still_accepted",
|
| 148 |
+
"eval.tests.test_dispatch.test_help_does_not_leak_to_stderr_when_explicit",
|
| 149 |
+
"eval.tests.test_dispatch.test_help_fingerprint_mentions_about_line",
|
| 150 |
+
"eval.tests.test_dispatch.test_help_invocations_exit_zero[args0-Usage: executable <COMMAND>]",
|
| 151 |
+
"eval.tests.test_dispatch.test_help_invocations_exit_zero[args1-Usage: executable <COMMAND>]",
|
| 152 |
+
"eval.tests.test_dispatch.test_help_invocations_exit_zero[args2-Usage: executable <COMMAND>]",
|
| 153 |
+
"eval.tests.test_dispatch.test_help_invocations_exit_zero[args3-Usage: executable generate-sloth-file [OPTIONS]]",
|
| 154 |
+
"eval.tests.test_dispatch.test_relative_output_path_writes_to_cwd",
|
| 155 |
+
"eval.tests.test_dispatch.test_subcommand_help_short_summary_differs_from_long",
|
| 156 |
+
"eval.tests.test_dispatch_more.test_attached_short_value_accepts_decimal",
|
| 157 |
+
"eval.tests.test_dispatch_more.test_attached_short_value_accepts_integer",
|
| 158 |
+
"eval.tests.test_dispatch_more.test_double_dash_separator_within_subcommand_value",
|
| 159 |
+
"eval.tests.test_dispatch_more.test_long_equals_form_for_objectives",
|
| 160 |
+
"eval.tests.test_dispatch_more.test_long_equals_form_for_threshold",
|
| 161 |
+
"eval.tests.test_dispatch_more.test_mixed_flag_order_with_equals_and_attached",
|
| 162 |
+
"eval.tests.test_dispatch_more.test_objectives_equals_and_attached_threshold_club",
|
| 163 |
+
"eval.tests.test_dispatch_more.test_objectives_long_space_form_once",
|
| 164 |
+
"eval.tests.test_dispatch_more.test_output_attached_short_value",
|
| 165 |
+
"eval.tests.test_dispatch_more.test_output_equals_short_form",
|
| 166 |
+
"eval.tests.test_dispatch_more.test_short_equals_form_for_threshold",
|
| 167 |
+
"eval.tests.test_golden_default.test_default_document_has_exact_golden_byte_length",
|
| 168 |
+
"eval.tests.test_golden_default.test_default_document_is_deterministic_across_runs",
|
| 169 |
+
"eval.tests.test_golden_default.test_default_document_matches_golden_exactly",
|
| 170 |
+
"eval.tests.test_golden_default.test_default_golden_contains_all_eight_named_blocks",
|
| 171 |
+
"eval.tests.test_golden_default.test_golden_asset_is_packaged",
|
| 172 |
+
"eval.tests.test_golden_default.test_golden_default_threshold_is_per_second_rate",
|
| 173 |
+
"eval.tests.test_golden_default.test_golden_success_alerting_names_use_percents",
|
| 174 |
+
"eval.tests.test_help.test_double_dash_help_prints_exact_header_lines",
|
| 175 |
+
"eval.tests.test_help.test_help_accepts_each_registered_subcommand[generate-sloth-file-Usage: executable generate-sloth-file [OPTIONS]]",
|
| 176 |
+
"eval.tests.test_help.test_help_accepts_each_registered_subcommand[help-Usage: executable help [COMMAND]...]",
|
| 177 |
+
"eval.tests.test_help.test_help_bogus_subcommand_is_rejected",
|
| 178 |
+
"eval.tests.test_help.test_help_lists_generate_sloth_file_subcommand_purpose",
|
| 179 |
+
"eval.tests.test_help.test_help_subcommand_named_subcommand_prints_its_help",
|
| 180 |
+
"eval.tests.test_help.test_help_subcommand_prints_top_help_to_stdout",
|
| 181 |
+
"eval.tests.test_help.test_no_arguments_prints_help_to_stderr_exact",
|
| 182 |
+
"eval.tests.test_help.test_no_arguments_stderr_names_generate_sloth_file",
|
| 183 |
+
"eval.tests.test_help.test_single_dash_h_help_matches_double_dash",
|
| 184 |
+
"eval.tests.test_help.test_unknown_subcommand_rejected",
|
| 185 |
+
"eval.tests.test_help.test_various_unrecognized_subcommands_rejected[ -error: unrecognized subcommand ' '\\n\\nUsage: executable <COMMAND>\\n\\nFor more information, try '--help'.\\n]",
|
| 186 |
+
"eval.tests.test_help.test_various_unrecognized_subcommands_rejected[-error: unrecognized subcommand ''\\n\\nUsage: executable <COMMAND>\\n\\nFor more information, try '--help'.\\n]",
|
| 187 |
+
"eval.tests.test_help.test_various_unrecognized_subcommands_rejected[GENERATE-SLOTH-FILE-error: unrecognized subcommand 'GENERATE-SLOTH-FILE'\\n\\nUsage: executable <COMMAND>\\n\\nFor more information, try '--help'.\\n]",
|
| 188 |
+
"eval.tests.test_help.test_various_unrecognized_subcommands_rejected[GenerateSlothFile-error: unrecognized subcommand 'GenerateSlothFile'\\n\\n tip: a similar subcommand exists: 'generate-sloth-file'\\n\\nUsage: executable <COMMAND>\\n\\nFor more information, try '--help'.\\n]",
|
| 189 |
+
"eval.tests.test_help.test_various_unrecognized_subcommands_rejected[gen-error: unrecognized subcommand 'gen'\\n\\n tip: a similar subcommand exists: 'generate-sloth-file'\\n\\nUsage: executable <COMMAND>\\n\\nFor more information, try '--help'.\\n]",
|
| 190 |
+
"eval.tests.test_help.test_various_unrecognized_subcommands_rejected[gnerate-error: unrecognized subcommand 'gnerate'\\n\\nUsage: executable <COMMAND>\\n\\nFor more information, try '--help'.\\n]",
|
| 191 |
+
"eval.tests.test_help.test_various_unrecognized_subcommands_rejected[sloth-error: unrecognized subcommand 'sloth'\\n\\nUsage: executable <COMMAND>\\n\\nFor more information, try '--help'.\\n]",
|
| 192 |
+
"eval.tests.test_help_more.test_double_dash_help_matches_help_subcommand",
|
| 193 |
+
"eval.tests.test_help_more.test_help_subcommand_help",
|
| 194 |
+
"eval.tests.test_help_more.test_missing_subcommand_epilogue_and_usage",
|
| 195 |
+
"eval.tests.test_help_more.test_parse_error_help_epilogue",
|
| 196 |
+
"eval.tests.test_help_more.test_short_h_and_long_help_subcommand_agree_on_options",
|
| 197 |
+
"eval.tests.test_help_more.test_subcommand_help_defaults_listed",
|
| 198 |
+
"eval.tests.test_help_more.test_subcommand_help_lists_all_options",
|
| 199 |
+
"eval.tests.test_help_more.test_top_help_mentions_only_subcommands",
|
| 200 |
+
"eval.tests.test_objective_edge_cases.test_each_unusual_objective_emits_one_la_one_success",
|
| 201 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[+90]",
|
| 202 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[.5]",
|
| 203 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[0.001]",
|
| 204 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[007]",
|
| 205 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[1.2.3.4]",
|
| 206 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[1e3]",
|
| 207 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[50-99]",
|
| 208 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[99%]",
|
| 209 |
+
"eval.tests.test_objective_edge_cases.test_objective_field_preserves_original_literal[a.b.c]",
|
| 210 |
+
"eval.tests.test_objective_edge_cases.test_objective_with_spaces_handling[ 90-90]",
|
| 211 |
+
"eval.tests.test_objective_edge_cases.test_objective_with_spaces_handling[9 9-9 9]",
|
| 212 |
+
"eval.tests.test_objective_edge_cases.test_objective_with_spaces_handling[90 -90 ]",
|
| 213 |
+
"eval.tests.test_objective_edge_cases.test_objective_with_spaces_handling[99.9-99.9]",
|
| 214 |
+
"eval.tests.test_objective_edge_cases.test_unicode_objective_renders_in_both_blocks",
|
| 215 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[+90-success-rate-+90]",
|
| 216 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[.-success-rate-_]",
|
| 217 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[.5-success-rate-_5]",
|
| 218 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[.99-success-rate-_99]",
|
| 219 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[0-success-rate-0]",
|
| 220 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[0.001-success-rate-0_001]",
|
| 221 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[007-success-rate-007]",
|
| 222 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[1.-success-rate-1_]",
|
| 223 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[1.2.3.4-success-rate-1_2_3_4]",
|
| 224 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[123456789-success-rate-123456789]",
|
| 225 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[1e3-success-rate-1e3]",
|
| 226 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[50-99-success-rate-50-99]",
|
| 227 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[9.9.9-success-rate-9_9_9]",
|
| 228 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[99%-success-rate-99%]",
|
| 229 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[\\u271399-success-rate-\\u271399]",
|
| 230 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[_-success-rate-_]",
|
| 231 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[__-success-rate-__]",
|
| 232 |
+
"eval.tests.test_objective_edge_cases.test_unusual_objective_name[a.b.c-success-rate-a_b_c]",
|
| 233 |
+
"eval.tests.test_objective_interaction.test_duplicate_objectives_are_emitted_twice",
|
| 234 |
+
"eval.tests.test_objective_interaction.test_empty_objective_between_real_ones_keeps_position",
|
| 235 |
+
"eval.tests.test_objective_interaction.test_many_objectives_scale_blocks_linearly[10]",
|
| 236 |
+
"eval.tests.test_objective_interaction.test_many_objectives_scale_blocks_linearly[5]",
|
| 237 |
+
"eval.tests.test_objective_interaction.test_many_objectives_scale_blocks_linearly[6]",
|
| 238 |
+
"eval.tests.test_objective_interaction.test_many_objectives_scale_blocks_linearly[8]",
|
| 239 |
+
"eval.tests.test_objective_interaction.test_non_sorted_objectives_keep_entry_order",
|
| 240 |
+
"eval.tests.test_objective_interaction.test_success_latency_order_is_strict_pass_separation",
|
| 241 |
+
"eval.tests.test_objective_interaction.test_threshold_shared_across_duplicate_objectives",
|
| 242 |
+
"eval.tests.test_objectives.test_comma_in_objective_is_kept_as_single_token",
|
| 243 |
+
"eval.tests.test_objectives.test_default_objectives_produce_both_slo_kinds",
|
| 244 |
+
"eval.tests.test_objectives.test_dot_in_objective_converted_to_underscore_in_name",
|
| 245 |
+
"eval.tests.test_objectives.test_dot_preserved_in_objective_field",
|
| 246 |
+
"eval.tests.test_objectives.test_empty_objective_still_emits_blocks[--objectives=]",
|
| 247 |
+
"eval.tests.test_objectives.test_empty_objective_still_emits_blocks[--objectives]",
|
| 248 |
+
"eval.tests.test_objectives.test_latency_block_fields",
|
| 249 |
+
"eval.tests.test_objectives.test_multiple_dots_become_underscores",
|
| 250 |
+
"eval.tests.test_objectives.test_non_numeric_objective_rendered_verbatim_once",
|
| 251 |
+
"eval.tests.test_objectives.test_objective_percentile_selected_in_query",
|
| 252 |
+
"eval.tests.test_objectives.test_repeated_objectives_accumulate",
|
| 253 |
+
"eval.tests.test_objectives.test_repeated_objectives_n_blocks[2]",
|
| 254 |
+
"eval.tests.test_objectives.test_repeated_objectives_n_blocks[3]",
|
| 255 |
+
"eval.tests.test_objectives.test_repeated_objectives_n_blocks[4]",
|
| 256 |
+
"eval.tests.test_objectives.test_single_objective_produces_success_and_latency[100-names4]",
|
| 257 |
+
"eval.tests.test_objectives.test_single_objective_produces_success_and_latency[100.0-names5]",
|
| 258 |
+
"eval.tests.test_objectives.test_single_objective_produces_success_and_latency[50-names6]",
|
| 259 |
+
"eval.tests.test_objectives.test_single_objective_produces_success_and_latency[90-names0]",
|
| 260 |
+
"eval.tests.test_objectives.test_single_objective_produces_success_and_latency[95-names1]",
|
| 261 |
+
"eval.tests.test_objectives.test_single_objective_produces_success_and_latency[99-names2]",
|
| 262 |
+
"eval.tests.test_objectives.test_single_objective_produces_success_and_latency[99.9-names3]",
|
| 263 |
+
"eval.tests.test_objectives.test_special_characters_preserved_in_name",
|
| 264 |
+
"eval.tests.test_objectives.test_success_and_latency_queries_differ",
|
| 265 |
+
"eval.tests.test_objectives.test_success_rate_block_fields",
|
| 266 |
+
"eval.tests.test_objectives.test_window_placeholder_preserved",
|
| 267 |
+
"eval.tests.test_output_file.test_output_equals_form",
|
| 268 |
+
"eval.tests.test_output_file.test_output_file_content_matches_stdout",
|
| 269 |
+
"eval.tests.test_output_file.test_output_long_flag_form",
|
| 270 |
+
"eval.tests.test_output_file.test_output_overwrites_existing_file",
|
| 271 |
+
"eval.tests.test_output_file.test_output_panic_message_contains_os_error",
|
| 272 |
+
"eval.tests.test_output_file.test_output_path_is_directory_panics",
|
| 273 |
+
"eval.tests.test_output_file.test_output_path_is_missing_parent_single_level",
|
| 274 |
+
"eval.tests.test_output_file.test_output_to_existing_directory_uses_nested_file",
|
| 275 |
+
"eval.tests.test_output_file.test_output_to_missing_parent_dir_panics",
|
| 276 |
+
"eval.tests.test_output_file.test_output_with_custom_objectives_reflected",
|
| 277 |
+
"eval.tests.test_output_file.test_output_with_custom_threshold_reflected",
|
| 278 |
+
"eval.tests.test_output_file.test_output_writes_file_and_leaves_stdout_empty",
|
| 279 |
+
"eval.tests.test_output_file_more.test_output_custom_objectives_do_not_appear_when_absent",
|
| 280 |
+
"eval.tests.test_output_file_more.test_output_file_content_matches_stdout_with_custom_objectives",
|
| 281 |
+
"eval.tests.test_output_file_more.test_output_file_content_matches_stdout_with_custom_threshold",
|
| 282 |
+
"eval.tests.test_output_file_more.test_output_reports_panic_when_parent_is_regular_file",
|
| 283 |
+
"eval.tests.test_output_file_more.test_output_reports_panic_when_target_is_directory",
|
| 284 |
+
"eval.tests.test_output_file_more.test_output_reports_panic_when_target_is_dot_dir",
|
| 285 |
+
"eval.tests.test_output_file_more.test_output_stderr_contains_panic_prefix_but_not_stdout",
|
| 286 |
+
"eval.tests.test_output_file_more.test_output_to_single_missing_parent_is_panic",
|
| 287 |
+
"eval.tests.test_output_file_more.test_output_write_leaves_no_stdout_for_custom_options",
|
| 288 |
+
"eval.tests.test_parse_errors.test_alerting_threshold_cannot_be_used_multiple_times",
|
| 289 |
+
"eval.tests.test_parse_errors.test_double_dash_consumes_flag_value",
|
| 290 |
+
"eval.tests.test_parse_errors.test_empty_alerting_threshold_rejected",
|
| 291 |
+
"eval.tests.test_parse_errors.test_flag_after_positional_rejected",
|
| 292 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[-]",
|
| 293 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[..2]",
|
| 294 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[1..]",
|
| 295 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[1.1.1]",
|
| 296 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[1.2.3]",
|
| 297 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[1e]",
|
| 298 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[abc123]",
|
| 299 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[abc]",
|
| 300 |
+
"eval.tests.test_parse_errors.test_invalid_float_literal_alerting_threshold_rejected[one]",
|
| 301 |
+
"eval.tests.test_parse_errors.test_missing_value_for_alerting_threshold",
|
| 302 |
+
"eval.tests.test_parse_errors.test_missing_value_for_long_alerting_threshold",
|
| 303 |
+
"eval.tests.test_parse_errors.test_missing_value_for_long_output",
|
| 304 |
+
"eval.tests.test_parse_errors.test_missing_value_for_objectives",
|
| 305 |
+
"eval.tests.test_parse_errors.test_missing_value_for_short_output",
|
| 306 |
+
"eval.tests.test_parse_errors.test_output_cannot_be_used_multiple_times",
|
| 307 |
+
"eval.tests.test_parse_errors.test_short_version_flag_not_supported",
|
| 308 |
+
"eval.tests.test_parse_errors.test_special_float_thresholds_are_accepted[-inf--inf]",
|
| 309 |
+
"eval.tests.test_parse_errors.test_special_float_thresholds_are_accepted[INF-inf]",
|
| 310 |
+
"eval.tests.test_parse_errors.test_special_float_thresholds_are_accepted[Infinity-inf]",
|
| 311 |
+
"eval.tests.test_parse_errors.test_special_float_thresholds_are_accepted[NaN-NaN]",
|
| 312 |
+
"eval.tests.test_parse_errors.test_special_float_thresholds_are_accepted[inf-inf]",
|
| 313 |
+
"eval.tests.test_parse_errors.test_special_float_thresholds_are_accepted[nan-NaN]",
|
| 314 |
+
"eval.tests.test_parse_errors.test_unexpected_positional_after_objectives",
|
| 315 |
+
"eval.tests.test_parse_errors.test_unexpected_positional_in_subcommand",
|
| 316 |
+
"eval.tests.test_parse_errors.test_unknown_long_flag_rejected",
|
| 317 |
+
"eval.tests.test_parse_errors.test_unknown_short_flag_rejected[-q]",
|
| 318 |
+
"eval.tests.test_parse_errors.test_unknown_short_flag_rejected[-v]",
|
| 319 |
+
"eval.tests.test_parse_errors.test_unknown_short_flag_rejected[-x]",
|
| 320 |
+
"eval.tests.test_parse_errors.test_unknown_short_flag_rejected[-z]",
|
| 321 |
+
"eval.tests.test_parse_errors.test_version_flag_not_supported_at_top_level",
|
| 322 |
+
"eval.tests.test_round4_extension.test_custom_threshold_reaches_every_block",
|
| 323 |
+
"eval.tests.test_round4_extension.test_extra_threshold_conversions_exact[-7--0.11666666666666667]",
|
| 324 |
+
"eval.tests.test_round4_extension.test_extra_threshold_conversions_exact[0.25-0.004166666666666667]",
|
| 325 |
+
"eval.tests.test_round4_extension.test_extra_threshold_conversions_exact[0.3-0.005]",
|
| 326 |
+
"eval.tests.test_round4_extension.test_extra_threshold_conversions_exact[1e-6-0.000000016666666666666667]",
|
| 327 |
+
"eval.tests.test_round4_extension.test_extra_threshold_conversions_exact[45-0.75]",
|
| 328 |
+
"eval.tests.test_round4_extension.test_extra_threshold_conversions_exact[720-12]",
|
| 329 |
+
"eval.tests.test_round4_extension.test_extra_threshold_conversions_exact[9.5-0.15833333333333333]",
|
| 330 |
+
"eval.tests.test_round4_extension.test_large_exponent_threshold_is_positive_and_finite",
|
| 331 |
+
"eval.tests.test_round4_extension.test_latency_error_query_uses_wrapped_expression",
|
| 332 |
+
"eval.tests.test_round4_extension.test_negative_zero_threshold_is_exact_negative_zero",
|
| 333 |
+
"eval.tests.test_round4_extension.test_objectives_override_default_set",
|
| 334 |
+
"eval.tests.test_round4_extension.test_objectives_preserve_duplicate_and_order_in_success_pass",
|
| 335 |
+
"eval.tests.test_round4_extension.test_objectives_success_before_latency_for_large_set",
|
| 336 |
+
"eval.tests.test_round4_extension.test_total_query_count_scales_with_objectives",
|
| 337 |
+
"eval.tests.test_threshold.test_default_threshold_is_one_per_minute",
|
| 338 |
+
"eval.tests.test_threshold.test_each_objective_gets_own_threshold_line",
|
| 339 |
+
"eval.tests.test_threshold.test_equals_form_for_alerting_flag",
|
| 340 |
+
"eval.tests.test_threshold.test_negative_threshold_emitted_negative",
|
| 341 |
+
"eval.tests.test_threshold.test_special_float_threshold_rendered[-inf]",
|
| 342 |
+
"eval.tests.test_threshold.test_special_float_threshold_rendered[NaN]",
|
| 343 |
+
"eval.tests.test_threshold.test_special_float_threshold_rendered[inf]",
|
| 344 |
+
"eval.tests.test_threshold.test_threshold_applies_to_success_and_latency",
|
| 345 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[0-0]",
|
| 346 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[0.5-0.008333333333333333]",
|
| 347 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[0.6-0.01]",
|
| 348 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[1-0.016666666666666666]",
|
| 349 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[120-2]",
|
| 350 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[3-0.05]",
|
| 351 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[30-0.5]",
|
| 352 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[60-1]",
|
| 353 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[600-10]",
|
| 354 |
+
"eval.tests.test_threshold_more.test_exponent_threshold_conversion[1000-16.666666666666668]",
|
| 355 |
+
"eval.tests.test_threshold_more.test_exponent_threshold_conversion[1E3-16.666666666666668]",
|
| 356 |
+
"eval.tests.test_threshold_more.test_exponent_threshold_conversion[1e-2-0.00016666666666666666]",
|
| 357 |
+
"eval.tests.test_threshold_more.test_exponent_threshold_conversion[1e3-16.666666666666668]",
|
| 358 |
+
"eval.tests.test_threshold_more.test_exponent_threshold_conversion[2.5e-1-0.004166666666666667]",
|
| 359 |
+
"eval.tests.test_threshold_more.test_exponent_threshold_conversion[6e1-1]",
|
| 360 |
+
"eval.tests.test_threshold_more.test_large_threshold_renders_large_rate[1e6]",
|
| 361 |
+
"eval.tests.test_threshold_more.test_large_threshold_renders_large_rate[1e8]",
|
| 362 |
+
"eval.tests.test_threshold_more.test_negative_threshold_conversion[-1--0.016666666666666666]",
|
| 363 |
+
"eval.tests.test_threshold_more.test_negative_threshold_conversion[-120--2]",
|
| 364 |
+
"eval.tests.test_threshold_more.test_negative_threshold_conversion[-30--0.5]",
|
| 365 |
+
"eval.tests.test_threshold_more.test_negative_threshold_conversion[-60--1]",
|
| 366 |
+
"eval.tests.test_threshold_more.test_negative_zero_threshold_renders",
|
| 367 |
+
"eval.tests.test_threshold_more.test_threshold_applied_to_single_objective",
|
| 368 |
+
"eval.tests.test_threshold_more.test_threshold_one_tenth_minute",
|
| 369 |
+
"eval.tests.test_threshold_more.test_threshold_via_equals_and_space_agree",
|
| 370 |
+
"eval.tests.test_threshold_more.test_threshold_zero_made_queries_never_below"
|
| 371 |
+
]
|
| 372 |
+
},
|
| 373 |
+
"generated_module_02": {
|
| 374 |
+
"ignore_reason": "",
|
| 375 |
+
"ignored": false,
|
| 376 |
+
"ignored_tests": [
|
| 377 |
+
{
|
| 378 |
+
"name": "eval.tests.test_arg_validation.test_help_mentions_default_threshold",
|
| 379 |
+
"reasons": [
|
| 380 |
+
{
|
| 381 |
+
"id": "short_substring",
|
| 382 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 383 |
+
"path": "eval/tests/test_arg_validation.py",
|
| 384 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 385 |
+
"severity": "error",
|
| 386 |
+
"stage": "static_lint"
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"id": "generic_keyword_oracle",
|
| 390 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 391 |
+
"path": "eval/tests/test_arg_validation.py",
|
| 392 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 393 |
+
"severity": "error",
|
| 394 |
+
"stage": "static_lint"
|
| 395 |
+
}
|
| 396 |
+
]
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"name": "eval.tests.test_objective_edges_and_goldens.test_objective_alert_name_uses_literal_percent",
|
| 400 |
+
"reasons": [
|
| 401 |
+
{
|
| 402 |
+
"id": "generic_keyword_oracle",
|
| 403 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 404 |
+
"path": "eval/tests/test_objective_edges_and_goldens.py",
|
| 405 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 406 |
+
"severity": "error",
|
| 407 |
+
"stage": "static_lint"
|
| 408 |
+
}
|
| 409 |
+
]
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"name": "eval.tests.test_output_generation.test_alerting_name_uses_percent_suffix",
|
| 413 |
+
"reasons": [
|
| 414 |
+
{
|
| 415 |
+
"id": "generic_keyword_oracle",
|
| 416 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 417 |
+
"path": "eval/tests/test_output_generation.py",
|
| 418 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 419 |
+
"severity": "error",
|
| 420 |
+
"stage": "static_lint"
|
| 421 |
+
}
|
| 422 |
+
]
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"name": "eval.tests.test_output_generation.test_four_default_objectives_yield_eight_slos",
|
| 426 |
+
"reasons": [
|
| 427 |
+
{
|
| 428 |
+
"id": "all_assertions_weak",
|
| 429 |
+
"message": "pytest test uses only weak assertions",
|
| 430 |
+
"path": "eval/tests/test_output_generation.py",
|
| 431 |
+
"repair_hint": "Add at least one semantic oracle over concrete output, files, schema, or state.",
|
| 432 |
+
"severity": "error",
|
| 433 |
+
"stage": "static_lint"
|
| 434 |
+
}
|
| 435 |
+
]
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"name": "eval.tests.test_output_generation.test_success_rate_error_query_echoes_objective",
|
| 439 |
+
"reasons": [
|
| 440 |
+
{
|
| 441 |
+
"id": "generic_keyword_oracle",
|
| 442 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 443 |
+
"path": "eval/tests/test_output_generation.py",
|
| 444 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 445 |
+
"severity": "error",
|
| 446 |
+
"stage": "static_lint"
|
| 447 |
+
}
|
| 448 |
+
]
|
| 449 |
+
},
|
| 450 |
+
{
|
| 451 |
+
"name": "eval.tests.test_output_generation.test_two_slos_per_objective",
|
| 452 |
+
"reasons": [
|
| 453 |
+
{
|
| 454 |
+
"id": "all_assertions_weak",
|
| 455 |
+
"message": "pytest test uses only weak assertions",
|
| 456 |
+
"path": "eval/tests/test_output_generation.py",
|
| 457 |
+
"repair_hint": "Add at least one semantic oracle over concrete output, files, schema, or state.",
|
| 458 |
+
"severity": "error",
|
| 459 |
+
"stage": "static_lint"
|
| 460 |
+
}
|
| 461 |
+
]
|
| 462 |
+
}
|
| 463 |
+
],
|
| 464 |
+
"tests": [
|
| 465 |
+
"eval.tests.test_arg_validation.test_duplicate_flag_accumulation_arg_form_equals",
|
| 466 |
+
"eval.tests.test_arg_validation.test_empty_objective_still_produces_blocks_with_blank_value",
|
| 467 |
+
"eval.tests.test_arg_validation.test_extra_positional_rejected",
|
| 468 |
+
"eval.tests.test_arg_validation.test_help_mentions_default_objectives",
|
| 469 |
+
"eval.tests.test_arg_validation.test_help_mentions_default_threshold",
|
| 470 |
+
"eval.tests.test_arg_validation.test_objectives_flag_not_valid_at_top_level",
|
| 471 |
+
"eval.tests.test_arg_validation.test_output_flag_equals_form",
|
| 472 |
+
"eval.tests.test_arg_validation.test_threshold_flag_value_equals_form",
|
| 473 |
+
"eval.tests.test_arg_validation.test_version_flag_not_supported",
|
| 474 |
+
"eval.tests.test_cli_and_help.test_default_objectives_are_emitted",
|
| 475 |
+
"eval.tests.test_cli_and_help.test_generate_subcommand_help_exits_zero",
|
| 476 |
+
"eval.tests.test_cli_and_help.test_generate_subcommand_short_help_exits_zero",
|
| 477 |
+
"eval.tests.test_cli_and_help.test_help_subcommand_for_generate",
|
| 478 |
+
"eval.tests.test_cli_and_help.test_invalid_threshold_rejected[alpha]",
|
| 479 |
+
"eval.tests.test_cli_and_help.test_invalid_threshold_rejected[double_dot]",
|
| 480 |
+
"eval.tests.test_cli_and_help.test_invalid_threshold_rejected[empty]",
|
| 481 |
+
"eval.tests.test_cli_and_help.test_invalid_threshold_rejected[trailing_garbage]",
|
| 482 |
+
"eval.tests.test_cli_and_help.test_invalid_threshold_space_form_rejected",
|
| 483 |
+
"eval.tests.test_cli_and_help.test_long_vs_short_subcommand_help_differ_consistently",
|
| 484 |
+
"eval.tests.test_cli_and_help.test_missing_threshold_value_rejected",
|
| 485 |
+
"eval.tests.test_cli_and_help.test_multiple_objectives_all_emitted[five]",
|
| 486 |
+
"eval.tests.test_cli_and_help.test_multiple_objectives_all_emitted[single]",
|
| 487 |
+
"eval.tests.test_cli_and_help.test_multiple_objectives_all_emitted[triple]",
|
| 488 |
+
"eval.tests.test_cli_and_help.test_no_argument_prints_top_level_help_and_exits_error",
|
| 489 |
+
"eval.tests.test_cli_and_help.test_short_alerting_threshold_flag",
|
| 490 |
+
"eval.tests.test_cli_and_help.test_short_output_flag_writes_file",
|
| 491 |
+
"eval.tests.test_cli_and_help.test_top_level_help_exits_zero",
|
| 492 |
+
"eval.tests.test_cli_and_help.test_top_level_help_matches_invocation_name_invariant",
|
| 493 |
+
"eval.tests.test_cli_and_help.test_top_level_short_help_exits_zero",
|
| 494 |
+
"eval.tests.test_cli_and_help.test_unknown_subcommand_errors",
|
| 495 |
+
"eval.tests.test_e2e_and_invariants.test_combination_file_vs_stdout_consistency",
|
| 496 |
+
"eval.tests.test_e2e_and_invariants.test_document_is_deterministic",
|
| 497 |
+
"eval.tests.test_e2e_and_invariants.test_exit_code_zero_on_success_stdout",
|
| 498 |
+
"eval.tests.test_e2e_and_invariants.test_generated_file_is_valid_yaml_scalar_free_header",
|
| 499 |
+
"eval.tests.test_e2e_and_invariants.test_indentation_two_spaces_for_list_items",
|
| 500 |
+
"eval.tests.test_e2e_and_invariants.test_many_combinations_exit_zero[combined]",
|
| 501 |
+
"eval.tests.test_e2e_and_invariants.test_many_combinations_exit_zero[custom_threshold]",
|
| 502 |
+
"eval.tests.test_e2e_and_invariants.test_many_combinations_exit_zero[empty]",
|
| 503 |
+
"eval.tests.test_e2e_and_invariants.test_many_combinations_exit_zero[one_objective]",
|
| 504 |
+
"eval.tests.test_e2e_and_invariants.test_output_path_and_objectives_together",
|
| 505 |
+
"eval.tests.test_file_output.test_file_contains_generated_document",
|
| 506 |
+
"eval.tests.test_file_output.test_file_content_has_no_trailing_garbage",
|
| 507 |
+
"eval.tests.test_file_output.test_file_output_matches_stdout_output",
|
| 508 |
+
"eval.tests.test_file_output.test_no_output_flag_defaults_to_stdout",
|
| 509 |
+
"eval.tests.test_file_output.test_output_double_dash_and_hyphenated_path",
|
| 510 |
+
"eval.tests.test_file_output.test_output_overwrites_existing_file",
|
| 511 |
+
"eval.tests.test_file_output.test_output_relative_path_under_cwd",
|
| 512 |
+
"eval.tests.test_file_output.test_output_to_nested_missing_dir_fails",
|
| 513 |
+
"eval.tests.test_file_output.test_output_unwritable_target_panics[missing_parent_relative]",
|
| 514 |
+
"eval.tests.test_file_output.test_output_unwritable_target_panics[unwritable_abs]",
|
| 515 |
+
"eval.tests.test_file_output.test_stdout_empty_when_output_file_given",
|
| 516 |
+
"eval.tests.test_golden_document.test_file_matches_golden_exactly",
|
| 517 |
+
"eval.tests.test_golden_document.test_golden_contains_window_template_placeholder",
|
| 518 |
+
"eval.tests.test_golden_document.test_golden_document_has_expected_line_count",
|
| 519 |
+
"eval.tests.test_golden_document.test_stdout_matches_golden_exactly",
|
| 520 |
+
"eval.tests.test_objective_edges_and_goldens.test_alert_name_echoes_original_token_with_percent[1..2]",
|
| 521 |
+
"eval.tests.test_objective_edges_and_goldens.test_alert_name_echoes_original_token_with_percent[9.9.9]",
|
| 522 |
+
"eval.tests.test_objective_edges_and_goldens.test_alert_name_echoes_original_token_with_percent[a*b]",
|
| 523 |
+
"eval.tests.test_objective_edges_and_goldens.test_alert_name_echoes_original_token_with_percent[caf\\xe9]",
|
| 524 |
+
"eval.tests.test_objective_edges_and_goldens.test_decimal_objective_document_matches_golden",
|
| 525 |
+
"eval.tests.test_objective_edges_and_goldens.test_decimal_objective_file_matches_golden_exactly",
|
| 526 |
+
"eval.tests.test_objective_edges_and_goldens.test_distinct_metric_regex_set_is_exactly_three",
|
| 527 |
+
"eval.tests.test_objective_edges_and_goldens.test_extreme_threshold_formatting[one_and_half_per_sec]",
|
| 528 |
+
"eval.tests.test_objective_edges_and_goldens.test_extreme_threshold_formatting[sixty_per_sec]",
|
| 529 |
+
"eval.tests.test_objective_edges_and_goldens.test_extreme_threshold_formatting[sub_micro]",
|
| 530 |
+
"eval.tests.test_objective_edges_and_goldens.test_extreme_threshold_formatting[thirty_per_sec]",
|
| 531 |
+
"eval.tests.test_objective_edges_and_goldens.test_golden_line_count_two_objectives",
|
| 532 |
+
"eval.tests.test_objective_edges_and_goldens.test_latency_and_success_total_query_both_carry_threshold",
|
| 533 |
+
"eval.tests.test_objective_edges_and_goldens.test_latency_error_query_is_folded_multiline",
|
| 534 |
+
"eval.tests.test_objective_edges_and_goldens.test_many_objectives_scales_block_count",
|
| 535 |
+
"eval.tests.test_objective_edges_and_goldens.test_multi_dot_objective_every_dot_sanitized[adjacent_dots]",
|
| 536 |
+
"eval.tests.test_objective_edges_and_goldens.test_multi_dot_objective_every_dot_sanitized[dots_with_letters]",
|
| 537 |
+
"eval.tests.test_objective_edges_and_goldens.test_multi_dot_objective_every_dot_sanitized[two_dots]",
|
| 538 |
+
"eval.tests.test_objective_edges_and_goldens.test_multi_dot_objective_every_dot_sanitized[two_dots_diff]",
|
| 539 |
+
"eval.tests.test_objective_edges_and_goldens.test_non_dot_special_characters_preserved[comma]",
|
| 540 |
+
"eval.tests.test_objective_edges_and_goldens.test_non_dot_special_characters_preserved[slash]",
|
| 541 |
+
"eval.tests.test_objective_edges_and_goldens.test_non_dot_special_characters_preserved[space]",
|
| 542 |
+
"eval.tests.test_objective_edges_and_goldens.test_non_dot_special_characters_preserved[star]",
|
| 543 |
+
"eval.tests.test_objective_edges_and_goldens.test_non_dot_special_characters_preserved[unicode]",
|
| 544 |
+
"eval.tests.test_objective_edges_and_goldens.test_objective_alert_name_uses_literal_percent",
|
| 545 |
+
"eval.tests.test_objective_edges_and_goldens.test_objective_label_reference_count_single_doc",
|
| 546 |
+
"eval.tests.test_objective_edges_and_goldens.test_order_preserved_across_mixed_decimals",
|
| 547 |
+
"eval.tests.test_objective_edges_and_goldens.test_page_and_ticket_alert_exactly_once_per_block",
|
| 548 |
+
"eval.tests.test_objective_edges_and_goldens.test_two_objective_document_matches_golden",
|
| 549 |
+
"eval.tests.test_objective_edges_and_goldens.test_two_objective_file_matches_golden_exactly",
|
| 550 |
+
"eval.tests.test_objective_edges_and_goldens.test_two_objective_golden_is_four_blocks_in_order",
|
| 551 |
+
"eval.tests.test_objectives_and_order.test_block_order_by_kind_across_many_objectives",
|
| 552 |
+
"eval.tests.test_objectives_and_order.test_comma_separated_objectives_not_split",
|
| 553 |
+
"eval.tests.test_objectives_and_order.test_duplicate_objective_emits_duplicate_blocks",
|
| 554 |
+
"eval.tests.test_objectives_and_order.test_each_block_is_a_complete_slo_item",
|
| 555 |
+
"eval.tests.test_objectives_and_order.test_empty_objective_produces_blank_names",
|
| 556 |
+
"eval.tests.test_objectives_and_order.test_extreme_objective_values_accepted[0]",
|
| 557 |
+
"eval.tests.test_objectives_and_order.test_extreme_objective_values_accepted[100]",
|
| 558 |
+
"eval.tests.test_objectives_and_order.test_extreme_objective_values_accepted[1]",
|
| 559 |
+
"eval.tests.test_objectives_and_order.test_extreme_objective_values_accepted[50.0]",
|
| 560 |
+
"eval.tests.test_objectives_and_order.test_objective_case_sensitivity_preserved",
|
| 561 |
+
"eval.tests.test_objectives_and_order.test_objectives_order_preserved_in_success_blocks",
|
| 562 |
+
"eval.tests.test_objectives_and_order.test_single_objective_single_block_of_each_kind",
|
| 563 |
+
"eval.tests.test_output_generation.test_alerting_name_uses_percent_suffix",
|
| 564 |
+
"eval.tests.test_output_generation.test_annotations_summary_present",
|
| 565 |
+
"eval.tests.test_output_generation.test_decimal_objective_name_sanitized[integer]",
|
| 566 |
+
"eval.tests.test_output_generation.test_decimal_objective_name_sanitized[leading_zero]",
|
| 567 |
+
"eval.tests.test_output_generation.test_decimal_objective_name_sanitized[one_decimal]",
|
| 568 |
+
"eval.tests.test_output_generation.test_decimal_objective_name_sanitized[two_decimals]",
|
| 569 |
+
"eval.tests.test_output_generation.test_four_default_objectives_yield_eight_slos",
|
| 570 |
+
"eval.tests.test_output_generation.test_header_and_service_and_slos_prefix",
|
| 571 |
+
"eval.tests.test_output_generation.test_latency_block_fields",
|
| 572 |
+
"eval.tests.test_output_generation.test_latency_error_query_uses_duration_metrics",
|
| 573 |
+
"eval.tests.test_output_generation.test_non_numeric_objective_passthrough",
|
| 574 |
+
"eval.tests.test_output_generation.test_objective_percentile_appears_in_queries",
|
| 575 |
+
"eval.tests.test_output_generation.test_objective_with_no_decimal_unchanged_in_name",
|
| 576 |
+
"eval.tests.test_output_generation.test_page_and_ticket_alert_labels",
|
| 577 |
+
"eval.tests.test_output_generation.test_single_objective_whole_document_matches_reconstruction",
|
| 578 |
+
"eval.tests.test_output_generation.test_success_rate_block_fields",
|
| 579 |
+
"eval.tests.test_output_generation.test_success_rate_error_query_echoes_objective",
|
| 580 |
+
"eval.tests.test_output_generation.test_success_rate_query_contains_sum_by",
|
| 581 |
+
"eval.tests.test_output_generation.test_success_rate_slos_come_first",
|
| 582 |
+
"eval.tests.test_output_generation.test_two_slos_per_objective",
|
| 583 |
+
"eval.tests.test_precise_lines.test_double_brace_escaped_in_output",
|
| 584 |
+
"eval.tests.test_precise_lines.test_label_selector_double_quotes_preserved",
|
| 585 |
+
"eval.tests.test_precise_lines.test_labels_category_lines",
|
| 586 |
+
"eval.tests.test_precise_lines.test_latency_query_uses_label_join",
|
| 587 |
+
"eval.tests.test_precise_lines.test_latency_total_query_threshold",
|
| 588 |
+
"eval.tests.test_precise_lines.test_page_alert_severity_page_label",
|
| 589 |
+
"eval.tests.test_precise_lines.test_regex_class_non_escaped",
|
| 590 |
+
"eval.tests.test_precise_lines.test_success_error_query_line_exact",
|
| 591 |
+
"eval.tests.test_precise_lines.test_success_total_query_line_exact",
|
| 592 |
+
"eval.tests.test_precise_lines.test_summary_annotations_pin_service_label",
|
| 593 |
+
"eval.tests.test_precise_lines.test_ticket_alert_severity_ticket_label",
|
| 594 |
+
"eval.tests.test_threshold.test_default_threshold_emits_one_over_sixty",
|
| 595 |
+
"eval.tests.test_threshold.test_half_step_threshold_reconstruction",
|
| 596 |
+
"eval.tests.test_threshold.test_negative_threshold_via_equals_form_emitted",
|
| 597 |
+
"eval.tests.test_threshold.test_threshold_applied_to_every_objective[1]",
|
| 598 |
+
"eval.tests.test_threshold.test_threshold_applied_to_every_objective[2]",
|
| 599 |
+
"eval.tests.test_threshold.test_threshold_applied_to_every_objective[3]",
|
| 600 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[half_per_sec]",
|
| 601 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[one_per_sec]",
|
| 602 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[tiny_fraction]",
|
| 603 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[twenty_per_sec]",
|
| 604 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[two_per_sec]",
|
| 605 |
+
"eval.tests.test_threshold.test_threshold_divided_by_sixty[zero]",
|
| 606 |
+
"eval.tests.test_threshold.test_threshold_flag_short_and_threshold_equal",
|
| 607 |
+
"eval.tests.test_threshold.test_threshold_less_than_default_tightens_query"
|
| 608 |
+
]
|
| 609 |
+
}
|
| 610 |
+
},
|
| 611 |
+
"commit": "dec7c0dabc3242c53c0b30c25c7cae6f7ce90037",
|
| 612 |
+
"data_source": "synthetic_programgym",
|
| 613 |
+
"difficulty": "easy",
|
| 614 |
+
"difficulty_score": 1.5703093854358796,
|
| 615 |
+
"eval_clean_hashes": [
|
| 616 |
+
"1414bf6ca9183e4743e976a1b27d84d9031026d583661b6acd78806e0d478f71"
|
| 617 |
+
],
|
| 618 |
+
"input_record": {
|
| 619 |
+
"codeql_db_mb": 84.07,
|
| 620 |
+
"codeql_status": true,
|
| 621 |
+
"codeql_time": 38.60504521988332,
|
| 622 |
+
"commit": "dec7c0dabc3242c53c0b30c25c7cae6f7ce90037",
|
| 623 |
+
"commits": 176,
|
| 624 |
+
"contributors": 17,
|
| 625 |
+
"difficulty": "easy",
|
| 626 |
+
"difficulty_code_lines": 3718,
|
| 627 |
+
"difficulty_has_tests": false,
|
| 628 |
+
"difficulty_product_code_lines": 3718,
|
| 629 |
+
"difficulty_runtime_deps": 0,
|
| 630 |
+
"difficulty_score": 1.5703093854358796,
|
| 631 |
+
"difficulty_test_code_lines": 1841,
|
| 632 |
+
"full_name": "autometrics-dev/autometrics-rs",
|
| 633 |
+
"github_stars": 834,
|
| 634 |
+
"input_codeql_db": "rust_codeql/autometrics-dev__autometrics-rs",
|
| 635 |
+
"language": "rs",
|
| 636 |
+
"pb_match": [
|
| 637 |
+
{
|
| 638 |
+
"pb_fullname": "ducaale/xh",
|
| 639 |
+
"rank": 693,
|
| 640 |
+
"similarity": 0.4799189567565918
|
| 641 |
+
},
|
| 642 |
+
{
|
| 643 |
+
"pb_fullname": "Miserlou/Loop",
|
| 644 |
+
"rank": 268,
|
| 645 |
+
"similarity": 0.4810506999492645
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"pb_fullname": "nachoparker/dutree",
|
| 649 |
+
"rank": 893,
|
| 650 |
+
"similarity": 0.4576203227043152
|
| 651 |
+
},
|
| 652 |
+
{
|
| 653 |
+
"pb_fullname": "Canop/rhit",
|
| 654 |
+
"rank": 93,
|
| 655 |
+
"similarity": 0.5015616416931152
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"pb_fullname": "brocode/fblog",
|
| 659 |
+
"rank": 100,
|
| 660 |
+
"similarity": 0.5177932977676392
|
| 661 |
+
},
|
| 662 |
+
{
|
| 663 |
+
"pb_fullname": "Stranger6667/jsonschema",
|
| 664 |
+
"rank": 818,
|
| 665 |
+
"similarity": 0.3708686828613281
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"pb_fullname": "rvben/rumdl",
|
| 669 |
+
"rank": 725,
|
| 670 |
+
"similarity": 0.44348961114883423
|
| 671 |
+
},
|
| 672 |
+
{
|
| 673 |
+
"pb_fullname": "dandavison/delta",
|
| 674 |
+
"rank": 673,
|
| 675 |
+
"similarity": 0.46038639545440674
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"pb_fullname": "sharkdp/hyperfine",
|
| 679 |
+
"rank": 374,
|
| 680 |
+
"similarity": 0.48237305879592896
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"pb_fullname": "orf/gping",
|
| 684 |
+
"rank": 280,
|
| 685 |
+
"similarity": 0.4901939034461975
|
| 686 |
+
},
|
| 687 |
+
{
|
| 688 |
+
"pb_fullname": "stacked-git/stgit",
|
| 689 |
+
"rank": 723,
|
| 690 |
+
"similarity": 0.4476031959056854
|
| 691 |
+
},
|
| 692 |
+
{
|
| 693 |
+
"pb_fullname": "oppiliappan/statix",
|
| 694 |
+
"rank": 978,
|
| 695 |
+
"similarity": 0.43073204159736633
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"pb_fullname": "bensadeh/tailspin",
|
| 699 |
+
"rank": 249,
|
| 700 |
+
"similarity": 0.5208069086074829
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"pb_fullname": "oppiliappan/eva",
|
| 704 |
+
"rank": 920,
|
| 705 |
+
"similarity": 0.4522407352924347
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"pb_fullname": "axodotdev/oranda",
|
| 709 |
+
"rank": 426,
|
| 710 |
+
"similarity": 0.5063585638999939
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"pb_fullname": "o2sh/onefetch",
|
| 714 |
+
"rank": 314,
|
| 715 |
+
"similarity": 0.5105358362197876
|
| 716 |
+
},
|
| 717 |
+
{
|
| 718 |
+
"pb_fullname": "codesnap-rs/codesnap",
|
| 719 |
+
"rank": 641,
|
| 720 |
+
"similarity": 0.534156084060669
|
| 721 |
+
},
|
| 722 |
+
{
|
| 723 |
+
"pb_fullname": "sirwart/ripsecrets",
|
| 724 |
+
"rank": 554,
|
| 725 |
+
"similarity": 0.49170148372650146
|
| 726 |
+
},
|
| 727 |
+
{
|
| 728 |
+
"pb_fullname": "clog-tool/clog-cli",
|
| 729 |
+
"rank": 902,
|
| 730 |
+
"similarity": 0.41652125120162964
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"pb_fullname": "unhappychoice/gittype",
|
| 734 |
+
"rank": 668,
|
| 735 |
+
"similarity": 0.516352653503418
|
| 736 |
+
},
|
| 737 |
+
{
|
| 738 |
+
"pb_fullname": "rcoh/angle-grinder",
|
| 739 |
+
"rank": 105,
|
| 740 |
+
"similarity": 0.5385841131210327
|
| 741 |
+
},
|
| 742 |
+
{
|
| 743 |
+
"pb_fullname": "nikolassv/bartib",
|
| 744 |
+
"rank": 60,
|
| 745 |
+
"similarity": 0.5247343182563782
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"pb_fullname": "KSXGitHub/parallel-disk-usage",
|
| 749 |
+
"rank": 819,
|
| 750 |
+
"similarity": 0.4529643654823303
|
| 751 |
+
},
|
| 752 |
+
{
|
| 753 |
+
"pb_fullname": "hatoo/oha",
|
| 754 |
+
"rank": 135,
|
| 755 |
+
"similarity": 0.5652400255203247
|
| 756 |
+
},
|
| 757 |
+
{
|
| 758 |
+
"pb_fullname": "trasta298/keifu",
|
| 759 |
+
"rank": 948,
|
| 760 |
+
"similarity": 0.4651411771774292
|
| 761 |
+
},
|
| 762 |
+
{
|
| 763 |
+
"pb_fullname": "jrnxf/thokr",
|
| 764 |
+
"rank": 542,
|
| 765 |
+
"similarity": 0.49981674551963806
|
| 766 |
+
},
|
| 767 |
+
{
|
| 768 |
+
"pb_fullname": "XAMPPRocky/tokei",
|
| 769 |
+
"rank": 580,
|
| 770 |
+
"similarity": 0.4301581382751465
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"pb_fullname": "YS-L/flamelens",
|
| 774 |
+
"rank": 307,
|
| 775 |
+
"similarity": 0.5154556632041931
|
| 776 |
+
}
|
| 777 |
+
],
|
| 778 |
+
"repo_age": 3.56,
|
| 779 |
+
"repo_path": "rust/autometrics-dev__autometrics-rs",
|
| 780 |
+
"rust_channel": "stable",
|
| 781 |
+
"rust_edition": "2021",
|
| 782 |
+
"rust_release_date": "2021-10-21",
|
| 783 |
+
"rust_version": "1.56.0",
|
| 784 |
+
"rust_version_source": "edition",
|
| 785 |
+
"source": "commit:dec7c0dabc3242c53c0b30c25c7cae6f7ce90037",
|
| 786 |
+
"status": "done",
|
| 787 |
+
"url": "https://github.com/autometrics-dev/autometrics-rs"
|
| 788 |
+
},
|
| 789 |
+
"instance_id": "autometrics-dev__autometrics-rs.dec7c0d",
|
| 790 |
+
"language": "rust",
|
| 791 |
+
"module_iterations": [
|
| 792 |
+
{
|
| 793 |
+
"actual_iterations": 5,
|
| 794 |
+
"branch_name": "generated_module_01",
|
| 795 |
+
"iteration_limit": 5,
|
| 796 |
+
"module_index": 1,
|
| 797 |
+
"module_kind": "source",
|
| 798 |
+
"termination_reason": "max_iterations"
|
| 799 |
+
},
|
| 800 |
+
{
|
| 801 |
+
"actual_iterations": 5,
|
| 802 |
+
"branch_name": "generated_module_02",
|
| 803 |
+
"iteration_limit": 5,
|
| 804 |
+
"module_index": 2,
|
| 805 |
+
"module_kind": "source",
|
| 806 |
+
"termination_reason": "max_iterations"
|
| 807 |
+
}
|
| 808 |
+
],
|
| 809 |
+
"repository": "autometrics-dev/autometrics-rs"
|
| 810 |
+
}
|
autometrics-dev--autometrics-rs/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
|
autometrics-dev--autometrics-rs/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ad9908b3287b0546600f7c53a6080cb093baced0be1f68707fb8d6e1ea1664f
|
| 3 |
+
size 13439
|
autopawn--3d-ascii-viewer.d122eb/environment/Dockerfile
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV PAGER=cat
|
| 24 |
+
ENV MANPAGER=cat
|
| 25 |
+
ENV LESS=-R
|
| 26 |
+
ENV TQDM_DISABLE=1
|
| 27 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip python3-dev autoconf automake gettext file binutils libtool libncurses-dev meson ninja-build python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 28 |
+
ARG CMAKE_VERSION=3.31.10
|
| 29 |
+
ARG CMAKE_PYPI_INDEX_URL=https://pypi.org/simple
|
| 30 |
+
RUN set -eux; python3 -m pip install --no-cache-dir --index-url "${CMAKE_PYPI_INDEX_URL}" --trusted-host "mirror.example.invalid" "cmake==${CMAKE_VERSION}"; cmake --version; ctest --version; cpack --version
|
| 31 |
+
# programgym_quota_aware_nproc=1
|
| 32 |
+
RUN set -eux; printf '%s\n' '#!/bin/sh' 'if [ "$#" -gt 0 ]; then exec /usr/bin/nproc "$@"; fi' 'visible="$(/usr/bin/nproc)"' 'quota=""' 'period=""' 'if [ -r /sys/fs/cgroup/cpu.max ]; then' ' set -- $(cat /sys/fs/cgroup/cpu.max)' ' quota="${1:-}"' ' period="${2:-}"' 'elif [ -r /sys/fs/cgroup/cpu/cpu.cfs_quota_us ] && [ -r /sys/fs/cgroup/cpu/cpu.cfs_period_us ]; then' ' quota="$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)"' ' period="$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)"' fi 'if [ -n "$quota" ] && [ "$quota" != max ] && [ "$quota" -gt 0 ] 2>/dev/null && [ "$period" -gt 0 ] 2>/dev/null; then' ' limit=$(( (quota + period - 1) / period ))' ' if [ "$limit" -lt 1 ]; then limit=1; fi' ' if [ "$limit" -lt "$visible" ]; then visible="$limit"; fi' fi 'printf "%s\n" "$visible"' > /usr/local/bin/nproc; chmod 0755 /usr/local/bin/nproc; /usr/local/bin/nproc >/dev/null
|
| 33 |
+
WORKDIR /workspace
|
| 34 |
+
ADD workspace.tar.gz /workspace/
|
| 35 |
+
COPY executable /workspace/executable
|
| 36 |
+
COPY download.sh /workspace/download.sh
|
| 37 |
+
RUN chmod 755 /workspace/download.sh
|
| 38 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 39 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 40 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 41 |
+
&& rm -f /workspace/download.sh \
|
| 42 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 43 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 44 |
+
RUN chmod 111 /workspace/executable
|
| 45 |
+
WORKDIR /workspace
|
| 46 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 47 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 48 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 49 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 50 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 51 |
+
RUN mkdir -p /home/agent \
|
| 52 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 53 |
+
&& chown agent:agent /workspace/executable \
|
| 54 |
+
&& chmod 111 /workspace/executable
|
| 55 |
+
ENV HOME=/home/agent
|
| 56 |
+
WORKDIR /workspace
|
autopawn--3d-ascii-viewer.d122eb/environment/download.sh
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# ProgramGym download stage for autopawn/3d-ascii-viewer.
|
| 3 |
+
# This script is SOURCED (source /source_ro/download.sh) from a read-only
|
| 4 |
+
# repository mount. It must be standalone and source-safe:
|
| 5 |
+
# - exported variables persist in the current shell
|
| 6 |
+
# - no build / compile / link / test steps
|
| 7 |
+
# - no reading of any repository file
|
| 8 |
+
# - idempotent
|
| 9 |
+
#
|
| 10 |
+
# The product (3d-ascii-viewer) is a single C executable that needs only
|
| 11 |
+
# ncurses. The base image already ships libncurses-dev@6.3 and libncurses6;
|
| 12 |
+
# we install it explicitly only when the header is absent, so we avoid
|
| 13 |
+
# unnecessary apt work on an already-provisioned image.
|
| 14 |
+
|
| 15 |
+
# --- helper to fail safely while being sourced ---
|
| 16 |
+
fail_download() {
|
| 17 |
+
printf 'download.sh: error: %s\n' "$1" >&2
|
| 18 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 19 |
+
return 1
|
| 20 |
+
else
|
| 21 |
+
exit 1
|
| 22 |
+
fi
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
# Prefer apt-get update only if we actually need to install. ncurses header.
|
| 26 |
+
if [ ! -f /usr/include/ncurses.h ]; then
|
| 27 |
+
if command -v apt-get; then
|
| 28 |
+
apt-get update -y || fail_download "apt-get update failed"
|
| 29 |
+
apt-get install -y libncurses-dev || fail_download "could not install libncurses-dev"
|
| 30 |
+
else
|
| 31 |
+
fail_download "apt-get is not available and ncurses development header is missing"
|
| 32 |
+
fi
|
| 33 |
+
fi
|
| 34 |
+
|
| 35 |
+
if [ ! -f /usr/include/ncurses.h ]; then
|
| 36 |
+
fail_download "ncurses development header /usr/include/ncurses.h is still missing after setup"
|
| 37 |
+
fi
|
| 38 |
+
|
| 39 |
+
# Export any environment expected by build.sh. The build has no external
|
| 40 |
+
# configuration, so we only pin the toolchain vars the build relies on.
|
| 41 |
+
export CC="${CC:-gcc}"
|
| 42 |
+
export MAKE="${MAKE:-make}"
|
| 43 |
+
|
| 44 |
+
printf 'download.sh: ncurses development headers present; build environment ready.\n'
|
| 45 |
+
# Source-safe exit; the script may be sourced or executed.
|
| 46 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 47 |
+
return 0
|
| 48 |
+
fi
|
| 49 |
+
exit 0
|
autopawn--3d-ascii-viewer.d122eb/environment/executable
ADDED
|
Binary file (63.1 kB). View file
|
|
|
autopawn--3d-ascii-viewer.d122eb/environment/harbor_prepare_download_env.sh
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
cd /workspace
|
| 4 |
+
set -a
|
| 5 |
+
source /workspace/download.sh
|
| 6 |
+
set +a
|
| 7 |
+
python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
|
| 8 |
+
import os
|
| 9 |
+
import shlex
|
| 10 |
+
|
| 11 |
+
ignored = {
|
| 12 |
+
"ALL_PROXY",
|
| 13 |
+
"HTTP_PROXY",
|
| 14 |
+
"HTTPS_PROXY",
|
| 15 |
+
"NO_PROXY",
|
| 16 |
+
"OLDPWD",
|
| 17 |
+
"PIP_PROXY",
|
| 18 |
+
"PWD",
|
| 19 |
+
"SHLVL",
|
| 20 |
+
"_",
|
| 21 |
+
"all_proxy",
|
| 22 |
+
"http_proxy",
|
| 23 |
+
"https_proxy",
|
| 24 |
+
"no_proxy",
|
| 25 |
+
"pip_proxy",
|
| 26 |
+
}
|
| 27 |
+
for key in sorted(os.environ):
|
| 28 |
+
if key in ignored or key.startswith("BASH_FUNC_"):
|
| 29 |
+
continue
|
| 30 |
+
value = os.environ[key]
|
| 31 |
+
if "\n" in value:
|
| 32 |
+
continue
|
| 33 |
+
print(f"export {key}={shlex.quote(value)}")
|
| 34 |
+
PY
|
autopawn--3d-ascii-viewer.d122eb/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c500517adab42ee27c8314566bb729a7818f62a008837eeae39cf5fb18658040
|
| 3 |
+
size 14753
|
autopawn--3d-ascii-viewer.d122eb/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
|
autopawn--3d-ascii-viewer.d122eb/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
|
autopawn--3d-ascii-viewer.d122eb/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/autopawn--3d-ascii-viewer.d122eb"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for autopawn/3d-ascii-viewer"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "c"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "autopawn__3d-ascii-viewer.d122eb6"
|
| 32 |
+
repository = "autopawn/3d-ascii-viewer"
|
| 33 |
+
commit = "d122eb600e58d79ced65ec20eb49a56fcdcf5693"
|
| 34 |
+
language = "c"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.3571722577230334
|
| 37 |
+
test_branches = 4
|
| 38 |
+
test_count = 779
|
| 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"
|
autopawn--3d-ascii-viewer.d122eb/tests/Dockerfile
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 14 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 15 |
+
ENV npm_config_strict_ssl=false
|
| 16 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 17 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 18 |
+
ENV PIP_TRUSTED_HOST=""
|
| 19 |
+
ENV HOME=/workspace
|
| 20 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 21 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 22 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 23 |
+
ENV PAGER=cat
|
| 24 |
+
ENV MANPAGER=cat
|
| 25 |
+
ENV LESS=-R
|
| 26 |
+
ENV TQDM_DISABLE=1
|
| 27 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip python3-dev autoconf automake gettext file binutils libtool libncurses-dev meson ninja-build python3-pytest python3-pytest-xdist python3-coverage && rm -rf /var/lib/apt/lists/*
|
| 28 |
+
ARG CMAKE_VERSION=3.31.10
|
| 29 |
+
ARG CMAKE_PYPI_INDEX_URL=https://pypi.org/simple
|
| 30 |
+
RUN set -eux; python3 -m pip install --no-cache-dir --index-url "${CMAKE_PYPI_INDEX_URL}" --trusted-host "mirror.example.invalid" "cmake==${CMAKE_VERSION}"; cmake --version; ctest --version; cpack --version
|
| 31 |
+
# programgym_quota_aware_nproc=1
|
| 32 |
+
RUN set -eux; printf '%s\n' '#!/bin/sh' 'if [ "$#" -gt 0 ]; then exec /usr/bin/nproc "$@"; fi' 'visible="$(/usr/bin/nproc)"' 'quota=""' 'period=""' 'if [ -r /sys/fs/cgroup/cpu.max ]; then' ' set -- $(cat /sys/fs/cgroup/cpu.max)' ' quota="${1:-}"' ' period="${2:-}"' 'elif [ -r /sys/fs/cgroup/cpu/cpu.cfs_quota_us ] && [ -r /sys/fs/cgroup/cpu/cpu.cfs_period_us ]; then' ' quota="$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)"' ' period="$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)"' fi 'if [ -n "$quota" ] && [ "$quota" != max ] && [ "$quota" -gt 0 ] 2>/dev/null && [ "$period" -gt 0 ] 2>/dev/null; then' ' limit=$(( (quota + period - 1) / period ))' ' if [ "$limit" -lt 1 ]; then limit=1; fi' ' if [ "$limit" -lt "$visible" ]; then visible="$limit"; fi' fi 'printf "%s\n" "$visible"' > /usr/local/bin/nproc; chmod 0755 /usr/local/bin/nproc; /usr/local/bin/nproc >/dev/null
|
| 33 |
+
WORKDIR /workspace
|
| 34 |
+
ADD workspace.tar.gz /workspace/
|
| 35 |
+
COPY executable /workspace/executable
|
| 36 |
+
COPY download.sh /workspace/download.sh
|
| 37 |
+
RUN chmod 755 /workspace/download.sh
|
| 38 |
+
COPY harbor_prepare_download_env.sh /tmp/harbor_prepare_download_env.sh
|
| 39 |
+
RUN chmod 755 /tmp/harbor_prepare_download_env.sh \
|
| 40 |
+
&& /bin/bash /tmp/harbor_prepare_download_env.sh \
|
| 41 |
+
&& rm -f /workspace/download.sh \
|
| 42 |
+
&& rm -f /tmp/harbor_prepare_download_env.sh
|
| 43 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 44 |
+
RUN chmod 111 /workspace/executable
|
| 45 |
+
WORKDIR /workspace
|
| 46 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 47 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 48 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 49 |
+
&& mkdir -p /workspace /tests
|
| 50 |
+
|
| 51 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 52 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 53 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 54 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 55 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 56 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 57 |
+
RUN set -eu; \
|
| 58 |
+
pip_break_system_packages=""; \
|
| 59 |
+
if python3 -m pip install --help | grep -q -- '--break-system-packages'; then \
|
| 60 |
+
pip_break_system_packages="--break-system-packages"; \
|
| 61 |
+
fi; \
|
| 62 |
+
python3 -m pip install ${pip_break_system_packages} \
|
| 63 |
+
--no-cache-dir --disable-pip-version-check \
|
| 64 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 65 |
+
|
| 66 |
+
COPY test.sh /tests/test.sh
|
| 67 |
+
COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
| 68 |
+
COPY programgym_task.json /tests/programgym_task.json
|
| 69 |
+
COPY blobs/ /tests/blobs/
|
| 70 |
+
RUN chmod +x /tests/test.sh
|
autopawn--3d-ascii-viewer.d122eb/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:22406f069a95935443bc8d404bce03f53b2caeabcc6563788b7bada70fcebfff
|
| 3 |
+
size 28775
|
autopawn--3d-ascii-viewer.d122eb/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:b31bca58ad4e324041e5e04bd5b27ae4ecc5a07b29f1fab37c4e9a363ac1c3b0
|
| 3 |
+
size 15806
|
autopawn--3d-ascii-viewer.d122eb/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:cd3a49b66abd055af8f1af9245b155019440b290d6b8c631139cdb4ba4bc1c7e
|
| 3 |
+
size 22626
|
autopawn--3d-ascii-viewer.d122eb/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:ca4d197a3d220ae58677b5c4975532d66504ac0f7f80c415c64b0dae37fbf83e
|
| 3 |
+
size 39786
|
autopawn--3d-ascii-viewer.d122eb/tests/download.sh
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# ProgramGym download stage for autopawn/3d-ascii-viewer.
|
| 3 |
+
# This script is SOURCED (source /source_ro/download.sh) from a read-only
|
| 4 |
+
# repository mount. It must be standalone and source-safe:
|
| 5 |
+
# - exported variables persist in the current shell
|
| 6 |
+
# - no build / compile / link / test steps
|
| 7 |
+
# - no reading of any repository file
|
| 8 |
+
# - idempotent
|
| 9 |
+
#
|
| 10 |
+
# The product (3d-ascii-viewer) is a single C executable that needs only
|
| 11 |
+
# ncurses. The base image already ships libncurses-dev@6.3 and libncurses6;
|
| 12 |
+
# we install it explicitly only when the header is absent, so we avoid
|
| 13 |
+
# unnecessary apt work on an already-provisioned image.
|
| 14 |
+
|
| 15 |
+
# --- helper to fail safely while being sourced ---
|
| 16 |
+
fail_download() {
|
| 17 |
+
printf 'download.sh: error: %s\n' "$1" >&2
|
| 18 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 19 |
+
return 1
|
| 20 |
+
else
|
| 21 |
+
exit 1
|
| 22 |
+
fi
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
# Prefer apt-get update only if we actually need to install. ncurses header.
|
| 26 |
+
if [ ! -f /usr/include/ncurses.h ]; then
|
| 27 |
+
if command -v apt-get; then
|
| 28 |
+
apt-get update -y || fail_download "apt-get update failed"
|
| 29 |
+
apt-get install -y libncurses-dev || fail_download "could not install libncurses-dev"
|
| 30 |
+
else
|
| 31 |
+
fail_download "apt-get is not available and ncurses development header is missing"
|
| 32 |
+
fi
|
| 33 |
+
fi
|
| 34 |
+
|
| 35 |
+
if [ ! -f /usr/include/ncurses.h ]; then
|
| 36 |
+
fail_download "ncurses development header /usr/include/ncurses.h is still missing after setup"
|
| 37 |
+
fi
|
| 38 |
+
|
| 39 |
+
# Export any environment expected by build.sh. The build has no external
|
| 40 |
+
# configuration, so we only pin the toolchain vars the build relies on.
|
| 41 |
+
export CC="${CC:-gcc}"
|
| 42 |
+
export MAKE="${MAKE:-make}"
|
| 43 |
+
|
| 44 |
+
printf 'download.sh: ncurses development headers present; build environment ready.\n'
|
| 45 |
+
# Source-safe exit; the script may be sourced or executed.
|
| 46 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 47 |
+
return 0
|
| 48 |
+
fi
|
| 49 |
+
exit 0
|
autopawn--3d-ascii-viewer.d122eb/tests/executable
ADDED
|
Binary file (63.1 kB). View file
|
|
|
autopawn--3d-ascii-viewer.d122eb/tests/harbor_prepare_download_env.sh
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
cd /workspace
|
| 4 |
+
set -a
|
| 5 |
+
source /workspace/download.sh
|
| 6 |
+
set +a
|
| 7 |
+
python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh
|
| 8 |
+
import os
|
| 9 |
+
import shlex
|
| 10 |
+
|
| 11 |
+
ignored = {
|
| 12 |
+
"ALL_PROXY",
|
| 13 |
+
"HTTP_PROXY",
|
| 14 |
+
"HTTPS_PROXY",
|
| 15 |
+
"NO_PROXY",
|
| 16 |
+
"OLDPWD",
|
| 17 |
+
"PIP_PROXY",
|
| 18 |
+
"PWD",
|
| 19 |
+
"SHLVL",
|
| 20 |
+
"_",
|
| 21 |
+
"all_proxy",
|
| 22 |
+
"http_proxy",
|
| 23 |
+
"https_proxy",
|
| 24 |
+
"no_proxy",
|
| 25 |
+
"pip_proxy",
|
| 26 |
+
}
|
| 27 |
+
for key in sorted(os.environ):
|
| 28 |
+
if key in ignored or key.startswith("BASH_FUNC_"):
|
| 29 |
+
continue
|
| 30 |
+
value = os.environ[key]
|
| 31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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()
|
autopawn--3d-ascii-viewer.d122eb/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,935 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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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_arg_errors.test_empty_luminescence_rejected",
|
| 9 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-a--2.5]",
|
| 10 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-a-0]",
|
| 11 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-a-abc]",
|
| 12 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-f--7]",
|
| 13 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-f-0]",
|
| 14 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-f-notanint]",
|
| 15 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-h--3]",
|
| 16 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-h-0]",
|
| 17 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-h-xyz]",
|
| 18 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-w--1]",
|
| 19 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-w-0]",
|
| 20 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-w-abc]",
|
| 21 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-z--100.5]",
|
| 22 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-z--5]",
|
| 23 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-z-0]",
|
| 24 |
+
"eval.tests.test_arg_errors.test_invalid_numeric_option[-z-abc]",
|
| 25 |
+
"eval.tests.test_arg_errors.test_negative_duration_rejected",
|
| 26 |
+
"eval.tests.test_arg_errors.test_option_with_missing_value[a_dangling]",
|
| 27 |
+
"eval.tests.test_arg_errors.test_option_with_missing_value[c_dangling]",
|
| 28 |
+
"eval.tests.test_arg_errors.test_option_with_missing_value[f_dangling]",
|
| 29 |
+
"eval.tests.test_arg_errors.test_option_with_missing_value[h_dangling]",
|
| 30 |
+
"eval.tests.test_arg_errors.test_option_with_missing_value[w_dangling]",
|
| 31 |
+
"eval.tests.test_arg_errors.test_option_with_missing_value[z_dangling]",
|
| 32 |
+
"eval.tests.test_arg_errors.test_snap_missing_angle_values[snap_one_arg]",
|
| 33 |
+
"eval.tests.test_arg_errors.test_snap_missing_angle_values[snap_zero_args]",
|
| 34 |
+
"eval.tests.test_arg_errors.test_too_many_input_files[flag_then_two_inputs]",
|
| 35 |
+
"eval.tests.test_arg_errors.test_too_many_input_files[two_inputs]",
|
| 36 |
+
"eval.tests.test_arg_errors.test_unknown_option_rejected[digit]",
|
| 37 |
+
"eval.tests.test_arg_errors.test_unknown_option_rejected[double_dash]",
|
| 38 |
+
"eval.tests.test_arg_errors.test_unknown_option_rejected[k]",
|
| 39 |
+
"eval.tests.test_arg_errors.test_unknown_option_rejected[long_bogus]",
|
| 40 |
+
"eval.tests.test_arg_errors.test_unknown_option_rejected[q]",
|
| 41 |
+
"eval.tests.test_color_term.test_color_capable_term_reaches_start_color",
|
| 42 |
+
"eval.tests.test_color_term.test_color_frame_draws_colored_material_characters",
|
| 43 |
+
"eval.tests.test_color_term.test_color_ok_on_stl_without_color",
|
| 44 |
+
"eval.tests.test_color_term.test_monochrome_term_reports_no_colors",
|
| 45 |
+
"eval.tests.test_color_term.test_multi_material_color_renders_across_palettes[linux_palette]",
|
| 46 |
+
"eval.tests.test_color_term.test_multi_material_color_renders_across_palettes[xterm256_palette]",
|
| 47 |
+
"eval.tests.test_color_term.test_obj_color_requires_can_change_color",
|
| 48 |
+
"eval.tests.test_color_term.test_ok_on_minimal_term_type",
|
| 49 |
+
"eval.tests.test_color_term.test_palette_too_small_warns_not_enough_colors",
|
| 50 |
+
"eval.tests.test_color_term.test_snap_without_TERM_reports_terminal_open_error",
|
| 51 |
+
"eval.tests.test_color_term.test_stl_color_warns_and_then_fails",
|
| 52 |
+
"eval.tests.test_color_term.test_various_term_types_render[ansi]",
|
| 53 |
+
"eval.tests.test_color_term.test_various_term_types_render[screen]",
|
| 54 |
+
"eval.tests.test_color_term.test_various_term_types_render[vt100]",
|
| 55 |
+
"eval.tests.test_color_term.test_various_term_types_render[xterm-256color]",
|
| 56 |
+
"eval.tests.test_color_term.test_various_term_types_render[xterm]",
|
| 57 |
+
"eval.tests.test_edge_cases.test_all_flag_forms_parse_without_error",
|
| 58 |
+
"eval.tests.test_edge_cases.test_altitude_overflow_rejected[-1e999]",
|
| 59 |
+
"eval.tests.test_edge_cases.test_altitude_overflow_rejected[1e40]",
|
| 60 |
+
"eval.tests.test_edge_cases.test_altitude_overflow_rejected[1e999]",
|
| 61 |
+
"eval.tests.test_edge_cases.test_azimuth_overflow_rejected[-1e999]",
|
| 62 |
+
"eval.tests.test_edge_cases.test_azimuth_overflow_rejected[1e40]",
|
| 63 |
+
"eval.tests.test_edge_cases.test_azimuth_overflow_rejected[1e999]",
|
| 64 |
+
"eval.tests.test_edge_cases.test_dangling_d_option_prints_usage",
|
| 65 |
+
"eval.tests.test_edge_cases.test_dangling_value_options_print_usage[dangling_a]",
|
| 66 |
+
"eval.tests.test_edge_cases.test_dangling_value_options_print_usage[dangling_c]",
|
| 67 |
+
"eval.tests.test_edge_cases.test_dangling_value_options_print_usage[dangling_d]",
|
| 68 |
+
"eval.tests.test_edge_cases.test_dangling_value_options_print_usage[dangling_f]",
|
| 69 |
+
"eval.tests.test_edge_cases.test_duration_and_fps_flags_combined_with_snap",
|
| 70 |
+
"eval.tests.test_edge_cases.test_extreme_aspect_ratio_render[0.001]",
|
| 71 |
+
"eval.tests.test_edge_cases.test_extreme_aspect_ratio_render[0.1]",
|
| 72 |
+
"eval.tests.test_edge_cases.test_extreme_aspect_ratio_render[100]",
|
| 73 |
+
"eval.tests.test_edge_cases.test_extreme_aspect_ratio_render[50.0]",
|
| 74 |
+
"eval.tests.test_edge_cases.test_extreme_zoom_values_render[z0p1]",
|
| 75 |
+
"eval.tests.test_edge_cases.test_extreme_zoom_values_render[z10000]",
|
| 76 |
+
"eval.tests.test_edge_cases.test_extreme_zoom_values_render[z1]",
|
| 77 |
+
"eval.tests.test_edge_cases.test_flag_like_numeric_value_rejected[f_letter]",
|
| 78 |
+
"eval.tests.test_edge_cases.test_flag_like_numeric_value_rejected[h_flag_val]",
|
| 79 |
+
"eval.tests.test_edge_cases.test_flag_like_numeric_value_rejected[w_flag_val]",
|
| 80 |
+
"eval.tests.test_edge_cases.test_flag_like_numeric_value_rejected[z_flag_val]",
|
| 81 |
+
"eval.tests.test_edge_cases.test_narrow_single_column_surface",
|
| 82 |
+
"eval.tests.test_edge_cases.test_opaque_nonnumeric_az_alt_do_not_error",
|
| 83 |
+
"eval.tests.test_edge_cases.test_option_after_input_file_still_parsed",
|
| 84 |
+
"eval.tests.test_edge_cases.test_out_of_range_snap_angles_do_not_crash[huge_al]",
|
| 85 |
+
"eval.tests.test_edge_cases.test_out_of_range_snap_angles_do_not_crash[huge_az]",
|
| 86 |
+
"eval.tests.test_edge_cases.test_out_of_range_snap_angles_do_not_crash[huge_both]",
|
| 87 |
+
"eval.tests.test_edge_cases.test_out_of_range_snap_angles_do_not_crash[huge_neg]",
|
| 88 |
+
"eval.tests.test_edge_cases.test_repeated_height_last_wins",
|
| 89 |
+
"eval.tests.test_edge_cases.test_repeated_width_last_wins",
|
| 90 |
+
"eval.tests.test_edge_cases.test_single_row_surface",
|
| 91 |
+
"eval.tests.test_edge_cases.test_varied_ramp_lengths_render[*#%]",
|
| 92 |
+
"eval.tests.test_edge_cases.test_varied_ramp_lengths_render[1234567890]",
|
| 93 |
+
"eval.tests.test_edge_cases.test_varied_ramp_lengths_render[a]",
|
| 94 |
+
"eval.tests.test_edge_cases.test_varied_ramp_lengths_render[ab]",
|
| 95 |
+
"eval.tests.test_edge_cases.test_varied_ramp_lengths_render[abcde]",
|
| 96 |
+
"eval.tests.test_edge_cases.test_zero_byte_obj_reports_no_vertexes",
|
| 97 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_case_5char_extension_still_rejected_after_dispatch",
|
| 98 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_extension_classifier_edge_cases[STLX4up]",
|
| 99 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_extension_classifier_edge_cases[no_dot]",
|
| 100 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_extension_classifier_edge_cases[objX4]",
|
| 101 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_extension_classifier_edge_cases[objjj5]",
|
| 102 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_extension_classifier_edge_cases[stlxx5]",
|
| 103 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_extension_classifier_edge_cases[trailing_dot]",
|
| 104 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_extension_classifier_edge_cases[verlong8]",
|
| 105 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_flag_like_altitude_token_parses_as_zero",
|
| 106 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_flag_like_azimuth_token_parses_as_zero",
|
| 107 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_leading_dot_basename_extension_branch",
|
| 108 |
+
"eval.tests.test_extension_edge_and_angle_tokens.test_leading_plus_angles_equal_clean_form",
|
| 109 |
+
"eval.tests.test_extension_errors.test_empty_obj_rejected",
|
| 110 |
+
"eval.tests.test_extension_errors.test_extension_case_normalized_uppercase",
|
| 111 |
+
"eval.tests.test_extension_errors.test_file_with_no_extension_rejected",
|
| 112 |
+
"eval.tests.test_extension_errors.test_missing_obj_file_reports_load_failure",
|
| 113 |
+
"eval.tests.test_extension_errors.test_missing_stl_file_reports_load_failure",
|
| 114 |
+
"eval.tests.test_extension_errors.test_obj_with_no_faces_rejected",
|
| 115 |
+
"eval.tests.test_extension_errors.test_other_unsupported_extensions[gif]",
|
| 116 |
+
"eval.tests.test_extension_errors.test_other_unsupported_extensions[png]",
|
| 117 |
+
"eval.tests.test_extension_errors.test_other_unsupported_extensions[stla]",
|
| 118 |
+
"eval.tests.test_extension_errors.test_unsupported_extension_rejected",
|
| 119 |
+
"eval.tests.test_extension_errors.test_valid_model_accepts_boundary_snap_angles[tiny.obj]",
|
| 120 |
+
"eval.tests.test_extension_errors.test_valid_model_accepts_boundary_snap_angles[tiny.stl]",
|
| 121 |
+
"eval.tests.test_help.test_help_advertises_option[line0]",
|
| 122 |
+
"eval.tests.test_help.test_help_advertises_option[line10]",
|
| 123 |
+
"eval.tests.test_help.test_help_advertises_option[line11]",
|
| 124 |
+
"eval.tests.test_help.test_help_advertises_option[line12]",
|
| 125 |
+
"eval.tests.test_help.test_help_advertises_option[line13]",
|
| 126 |
+
"eval.tests.test_help.test_help_advertises_option[line14]",
|
| 127 |
+
"eval.tests.test_help.test_help_advertises_option[line15]",
|
| 128 |
+
"eval.tests.test_help.test_help_advertises_option[line16]",
|
| 129 |
+
"eval.tests.test_help.test_help_advertises_option[line17]",
|
| 130 |
+
"eval.tests.test_help.test_help_advertises_option[line1]",
|
| 131 |
+
"eval.tests.test_help.test_help_advertises_option[line2]",
|
| 132 |
+
"eval.tests.test_help.test_help_advertises_option[line3]",
|
| 133 |
+
"eval.tests.test_help.test_help_advertises_option[line4]",
|
| 134 |
+
"eval.tests.test_help.test_help_advertises_option[line5]",
|
| 135 |
+
"eval.tests.test_help.test_help_advertises_option[line6]",
|
| 136 |
+
"eval.tests.test_help.test_help_advertises_option[line7]",
|
| 137 |
+
"eval.tests.test_help.test_help_advertises_option[line8]",
|
| 138 |
+
"eval.tests.test_help.test_help_advertises_option[line9]",
|
| 139 |
+
"eval.tests.test_help.test_help_exists_and_exits_one[help]",
|
| 140 |
+
"eval.tests.test_help.test_help_exists_and_exits_one[qmark]",
|
| 141 |
+
"eval.tests.test_help.test_help_mentions_each_flag[F]",
|
| 142 |
+
"eval.tests.test_help.test_help_mentions_each_flag[X]",
|
| 143 |
+
"eval.tests.test_help.test_help_mentions_each_flag[Y]",
|
| 144 |
+
"eval.tests.test_help.test_help_mentions_each_flag[Z]",
|
| 145 |
+
"eval.tests.test_help.test_help_mentions_each_flag[a]",
|
| 146 |
+
"eval.tests.test_help.test_help_mentions_each_flag[c]",
|
| 147 |
+
"eval.tests.test_help.test_help_mentions_each_flag[color]",
|
| 148 |
+
"eval.tests.test_help.test_help_mentions_each_flag[d]",
|
| 149 |
+
"eval.tests.test_help.test_help_mentions_each_flag[f]",
|
| 150 |
+
"eval.tests.test_help.test_help_mentions_each_flag[h]",
|
| 151 |
+
"eval.tests.test_help.test_help_mentions_each_flag[help]",
|
| 152 |
+
"eval.tests.test_help.test_help_mentions_each_flag[interactive]",
|
| 153 |
+
"eval.tests.test_help.test_help_mentions_each_flag[l]",
|
| 154 |
+
"eval.tests.test_help.test_help_mentions_each_flag[s]",
|
| 155 |
+
"eval.tests.test_help.test_help_mentions_each_flag[snap]",
|
| 156 |
+
"eval.tests.test_help.test_help_mentions_each_flag[t]",
|
| 157 |
+
"eval.tests.test_help.test_help_mentions_each_flag[w]",
|
| 158 |
+
"eval.tests.test_help.test_help_mentions_each_flag[z]",
|
| 159 |
+
"eval.tests.test_help.test_help_via_flag_works_even_after_input",
|
| 160 |
+
"eval.tests.test_help.test_help_without_term_no_terminal_required",
|
| 161 |
+
"eval.tests.test_help.test_no_arguments_description_without_term",
|
| 162 |
+
"eval.tests.test_help.test_no_arguments_prints_description_and_exits_one",
|
| 163 |
+
"eval.tests.test_help.test_orientation_flags_advertised",
|
| 164 |
+
"eval.tests.test_loop_and_resize.test_finite_loop_default_fps_draws_and_terminates",
|
| 165 |
+
"eval.tests.test_loop_and_resize.test_finite_loop_high_fps_falls_behind_tick[f100000]",
|
| 166 |
+
"eval.tests.test_loop_and_resize.test_finite_loop_high_fps_falls_behind_tick[f10000]",
|
| 167 |
+
"eval.tests.test_loop_and_resize.test_finite_loop_high_fps_falls_behind_tick[f1000]",
|
| 168 |
+
"eval.tests.test_loop_and_resize.test_finite_loop_high_fps_falls_behind_tick[f2000]",
|
| 169 |
+
"eval.tests.test_loop_and_resize.test_finite_loop_high_fps_falls_behind_tick[f500]",
|
| 170 |
+
"eval.tests.test_loop_and_resize.test_finite_loop_key_resize_recreates_surface",
|
| 171 |
+
"eval.tests.test_loop_and_resize.test_interactive_key_resize_recreates_surface",
|
| 172 |
+
"eval.tests.test_loop_timing_extra.test_finite_loop_with_top_elevation_runs_and_draws",
|
| 173 |
+
"eval.tests.test_loop_timing_extra.test_help_wins_at_any_position[p_leading]",
|
| 174 |
+
"eval.tests.test_loop_timing_extra.test_help_wins_at_any_position[p_mid]",
|
| 175 |
+
"eval.tests.test_loop_timing_extra.test_help_wins_at_any_position[p_trailing]",
|
| 176 |
+
"eval.tests.test_loop_timing_extra.test_repeated_lum_chars_last_wins[to_digits]",
|
| 177 |
+
"eval.tests.test_loop_timing_extra.test_repeated_lum_chars_last_wins[to_hash_at]",
|
| 178 |
+
"eval.tests.test_loop_timing_extra.test_repeated_lum_chars_last_wins[to_single_a]",
|
| 179 |
+
"eval.tests.test_loop_timing_extra.test_snap_without_input_file_prints_usage",
|
| 180 |
+
"eval.tests.test_parser_prefixes_and_stl.test_combined_axis_inversion_distinct_from_default",
|
| 181 |
+
"eval.tests.test_parser_prefixes_and_stl.test_duration_negative_prefix_still_rejected",
|
| 182 |
+
"eval.tests.test_parser_prefixes_and_stl.test_duration_non_numeric_accepted_runs_zero_length",
|
| 183 |
+
"eval.tests.test_parser_prefixes_and_stl.test_duration_positive_prefix_runs_briefly",
|
| 184 |
+
"eval.tests.test_parser_prefixes_and_stl.test_fps_prefix_accepted_with_snap",
|
| 185 |
+
"eval.tests.test_parser_prefixes_and_stl.test_height_prefix_truncates_to_valid_height",
|
| 186 |
+
"eval.tests.test_parser_prefixes_and_stl.test_numeric_prefix_accepted_equals_clean[aspect_suffix]",
|
| 187 |
+
"eval.tests.test_parser_prefixes_and_stl.test_numeric_prefix_accepted_equals_clean[height_suffix]",
|
| 188 |
+
"eval.tests.test_parser_prefixes_and_stl.test_numeric_prefix_accepted_equals_clean[width_float]",
|
| 189 |
+
"eval.tests.test_parser_prefixes_and_stl.test_numeric_prefix_accepted_equals_clean[zoom_suffix]",
|
| 190 |
+
"eval.tests.test_parser_prefixes_and_stl.test_static_light_exact_frame",
|
| 191 |
+
"eval.tests.test_parser_prefixes_and_stl.test_stl_snap_exact_frame[stl_10_50_8x5]",
|
| 192 |
+
"eval.tests.test_parser_prefixes_and_stl.test_stl_snap_exact_frame[stl_30_20_6x4]",
|
| 193 |
+
"eval.tests.test_parser_prefixes_and_stl.test_stretch_exact_frame",
|
| 194 |
+
"eval.tests.test_parser_prefixes_and_stl.test_width_prefix_truncates_to_one_tile",
|
| 195 |
+
"eval.tests.test_snap_rendering.test_aspect_ratio_changes_surface[0.5]",
|
| 196 |
+
"eval.tests.test_snap_rendering.test_aspect_ratio_changes_surface[1.0]",
|
| 197 |
+
"eval.tests.test_snap_rendering.test_aspect_ratio_changes_surface[2.0]",
|
| 198 |
+
"eval.tests.test_snap_rendering.test_aspect_ratio_changes_surface[4.0]",
|
| 199 |
+
"eval.tests.test_snap_rendering.test_coordinate_ordering_zxy_framedex_yzx",
|
| 200 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[abcd]",
|
| 201 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[at]",
|
| 202 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[dot_hash]",
|
| 203 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[dupe]",
|
| 204 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[q_plus]",
|
| 205 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[star_hash]",
|
| 206 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[ten]",
|
| 207 |
+
"eval.tests.test_snap_rendering.test_custom_luminescence_chars_are_used[xy]",
|
| 208 |
+
"eval.tests.test_snap_rendering.test_default_orientation_xyz_matches_no_flag",
|
| 209 |
+
"eval.tests.test_snap_rendering.test_default_zoom_matches_baseline",
|
| 210 |
+
"eval.tests.test_snap_rendering.test_invert_and_flip_flags_change_frame[flip_faces]",
|
| 211 |
+
"eval.tests.test_snap_rendering.test_invert_and_flip_flags_change_frame[invert_x]",
|
| 212 |
+
"eval.tests.test_snap_rendering.test_invert_and_flip_flags_change_frame[invert_y]",
|
| 213 |
+
"eval.tests.test_snap_rendering.test_invert_and_flip_flags_change_frame[invert_z]",
|
| 214 |
+
"eval.tests.test_snap_rendering.test_large_zoom_clips_to_surface",
|
| 215 |
+
"eval.tests.test_snap_rendering.test_option_combinations_render_without_error[all_invert]",
|
| 216 |
+
"eval.tests.test_snap_rendering.test_option_combinations_render_without_error[combo]",
|
| 217 |
+
"eval.tests.test_snap_rendering.test_option_combinations_render_without_error[orient_and_flip]",
|
| 218 |
+
"eval.tests.test_snap_rendering.test_option_combinations_render_without_error[ramp_zoom]",
|
| 219 |
+
"eval.tests.test_snap_rendering.test_option_combinations_render_without_error[stretch_static_zoom]",
|
| 220 |
+
"eval.tests.test_snap_rendering.test_orientation_permutations_yield_varied_frames",
|
| 221 |
+
"eval.tests.test_snap_rendering.test_snap_frame_uses_luminance_ramp_chars",
|
| 222 |
+
"eval.tests.test_snap_rendering.test_snap_frames_differ_across_angles",
|
| 223 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[-40_-10]",
|
| 224 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[0_-180]",
|
| 225 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[0_0]",
|
| 226 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[0_180]",
|
| 227 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[120_60]",
|
| 228 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[180_-45]",
|
| 229 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[200_100]",
|
| 230 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[270_15]",
|
| 231 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[30_-80]",
|
| 232 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[360_0]",
|
| 233 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[45_20]",
|
| 234 |
+
"eval.tests.test_snap_rendering.test_snap_produces_deterministic_frame[90_90]",
|
| 235 |
+
"eval.tests.test_snap_rendering.test_snap_produces_full_frame_dimensions[12x6]",
|
| 236 |
+
"eval.tests.test_snap_rendering.test_snap_produces_full_frame_dimensions[16x8]",
|
| 237 |
+
"eval.tests.test_snap_rendering.test_snap_produces_full_frame_dimensions[1x1]",
|
| 238 |
+
"eval.tests.test_snap_rendering.test_snap_produces_full_frame_dimensions[24x10]",
|
| 239 |
+
"eval.tests.test_snap_rendering.test_snap_produces_full_frame_dimensions[40x5]",
|
| 240 |
+
"eval.tests.test_snap_rendering.test_snap_produces_full_frame_dimensions[4x3]",
|
| 241 |
+
"eval.tests.test_snap_rendering.test_snap_produces_full_frame_dimensions[8x4]",
|
| 242 |
+
"eval.tests.test_snap_rendering.test_static_light_differs_from_dynamic_default",
|
| 243 |
+
"eval.tests.test_snap_rendering.test_stretch_option_changes_layout",
|
| 244 |
+
"eval.tests.test_snap_rendering.test_top_elevation_is_accepted_in_snap",
|
| 245 |
+
"eval.tests.test_snap_rendering.test_zoom_300_matches_golden",
|
| 246 |
+
"eval.tests.test_snap_rendering.test_zoom_changes_scale[z150]",
|
| 247 |
+
"eval.tests.test_snap_rendering.test_zoom_changes_scale[z25]",
|
| 248 |
+
"eval.tests.test_snap_rendering.test_zoom_changes_scale[z300]",
|
| 249 |
+
"eval.tests.test_snap_rendering.test_zoom_changes_scale[z500]",
|
| 250 |
+
"eval.tests.test_snap_rendering.test_zoom_changes_scale[z50]",
|
| 251 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w10_h10_a300_60]",
|
| 252 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w18_h7_a120_-20]",
|
| 253 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w20_h10_a15_30]",
|
| 254 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w24_h24_a210_-45]",
|
| 255 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w30_h15_a0_90]",
|
| 256 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w40_h20_a55_25]",
|
| 257 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w6_h9_a45_45]",
|
| 258 |
+
"eval.tests.test_surface_grid.test_surface_frame_matches_golden[w8_h12_a90_0]",
|
| 259 |
+
"eval.tests.test_surface_grid.test_surface_rows_all_render_nonempty_cube",
|
| 260 |
+
"eval.tests.test_tui_pty.test_default_loop_finite_termination_not_required",
|
| 261 |
+
"eval.tests.test_tui_pty.test_default_loop_terminal_resize_then_quit",
|
| 262 |
+
"eval.tests.test_tui_pty.test_default_loop_terminates_on_keypress",
|
| 263 |
+
"eval.tests.test_tui_pty.test_finite_duration_brief_runs_and_exits",
|
| 264 |
+
"eval.tests.test_tui_pty.test_finite_duration_with_flags",
|
| 265 |
+
"eval.tests.test_tui_pty.test_finite_duration_zero_exits_quickly",
|
| 266 |
+
"eval.tests.test_tui_pty.test_finite_loop_runs_many_frames_and_terminates[d0p1]",
|
| 267 |
+
"eval.tests.test_tui_pty.test_finite_loop_runs_many_frames_and_terminates[d0p3]",
|
| 268 |
+
"eval.tests.test_tui_pty.test_finite_loop_terminal_resize_continues",
|
| 269 |
+
"eval.tests.test_tui_pty.test_interactive_bounded_runtime_does_not_hang",
|
| 270 |
+
"eval.tests.test_tui_pty.test_interactive_flags_are_respected_without_error",
|
| 271 |
+
"eval.tests.test_tui_pty.test_interactive_high_zoom_still_bounded_initial[z450]",
|
| 272 |
+
"eval.tests.test_tui_pty.test_interactive_high_zoom_still_bounded_initial[z750]",
|
| 273 |
+
"eval.tests.test_tui_pty.test_interactive_hud_initial_angles_all_zero",
|
| 274 |
+
"eval.tests.test_tui_pty.test_interactive_hud_shows_initial_zoom_value[z150]",
|
| 275 |
+
"eval.tests.test_tui_pty.test_interactive_hud_shows_initial_zoom_value[z350]",
|
| 276 |
+
"eval.tests.test_tui_pty.test_interactive_hud_shows_initial_zoom_value[z7]",
|
| 277 |
+
"eval.tests.test_tui_pty.test_interactive_hud_shows_initial_zoom_value[z999]",
|
| 278 |
+
"eval.tests.test_tui_pty.test_interactive_hud_toggle_off_keeps_rendering",
|
| 279 |
+
"eval.tests.test_tui_pty.test_interactive_hud_toggle_still_exits_cleanly",
|
| 280 |
+
"eval.tests.test_tui_pty.test_interactive_other_frame_sizes_render[q]",
|
| 281 |
+
"eval.tests.test_tui_pty.test_interactive_quit_via_q_returns_zero",
|
| 282 |
+
"eval.tests.test_tui_pty.test_interactive_repeated_keys_drive_wrap_and_clamp[alt_clamp_high]",
|
| 283 |
+
"eval.tests.test_tui_pty.test_interactive_repeated_keys_drive_wrap_and_clamp[alt_clamp_low]",
|
| 284 |
+
"eval.tests.test_tui_pty.test_interactive_repeated_keys_drive_wrap_and_clamp[azim_wrap_over]",
|
| 285 |
+
"eval.tests.test_tui_pty.test_interactive_repeated_keys_drive_wrap_and_clamp[azim_wrap_under]",
|
| 286 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[alt_down]",
|
| 287 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[alt_up]",
|
| 288 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[azim_left]",
|
| 289 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[azim_right]",
|
| 290 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[zoom_alt_minus]",
|
| 291 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[zoom_alt_plus]",
|
| 292 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[zoom_minus]",
|
| 293 |
+
"eval.tests.test_tui_pty.test_interactive_single_control_key_processed[zoom_plus]",
|
| 294 |
+
"eval.tests.test_tui_pty.test_interactive_snap_combination_prefers_snap",
|
| 295 |
+
"eval.tests.test_tui_pty.test_interactive_terminal_resize_continues_rendering",
|
| 296 |
+
"eval.tests.test_tui_pty.test_interactive_with_rendering_flags_reaches_hud",
|
| 297 |
+
"eval.tests.test_tui_pty.test_interactive_zoom_clamp_max_and_min",
|
| 298 |
+
"eval.tests.test_tui_pty.test_snap_never_opens_interactive_loop"
|
| 299 |
+
]
|
| 300 |
+
},
|
| 301 |
+
"generated_module_02": {
|
| 302 |
+
"ignore_reason": "",
|
| 303 |
+
"ignored": false,
|
| 304 |
+
"ignored_tests": [],
|
| 305 |
+
"tests": [
|
| 306 |
+
"eval.tests.test_entry_points.test_dash_q_exits_with_usage",
|
| 307 |
+
"eval.tests.test_entry_points.test_double_extension_uses_last_suffix",
|
| 308 |
+
"eval.tests.test_entry_points.test_help_exits_with_usage",
|
| 309 |
+
"eval.tests.test_entry_points.test_invalid_options_prevent_loading[badflag0-Invalid width]",
|
| 310 |
+
"eval.tests.test_entry_points.test_invalid_options_prevent_loading[badflag1-Invalid width]",
|
| 311 |
+
"eval.tests.test_entry_points.test_invalid_options_prevent_loading[badflag2-Invalid height]",
|
| 312 |
+
"eval.tests.test_entry_points.test_invalid_options_prevent_loading[badflag3-Invalid FPS]",
|
| 313 |
+
"eval.tests.test_entry_points.test_invalid_options_prevent_loading[badflag4-Invalid duration]",
|
| 314 |
+
"eval.tests.test_entry_points.test_invalid_options_prevent_loading[badflag5-Invalid aspect-ratio]",
|
| 315 |
+
"eval.tests.test_entry_points.test_invalid_options_prevent_loading[badflag6-Invalid zoom]",
|
| 316 |
+
"eval.tests.test_entry_points.test_missing_luminance_characters_error[args0-3d-ascii-viewer -- an OBJ 3D model format viewer for the terminal]",
|
| 317 |
+
"eval.tests.test_entry_points.test_missing_luminance_characters_error[args1-At least one luminescence]",
|
| 318 |
+
"eval.tests.test_entry_points.test_no_arguments_prints_description",
|
| 319 |
+
"eval.tests.test_entry_points.test_obj_and_stl_load_distinct_content",
|
| 320 |
+
"eval.tests.test_entry_points.test_object_file_with_no_extension_errors",
|
| 321 |
+
"eval.tests.test_entry_points.test_supported_extensions_load[tri.stl]",
|
| 322 |
+
"eval.tests.test_entry_points.test_supported_extensions_load[triangle.obj]",
|
| 323 |
+
"eval.tests.test_entry_points.test_unexpected_second_input_argument_rejects",
|
| 324 |
+
"eval.tests.test_entry_points.test_unknown_option_rejected",
|
| 325 |
+
"eval.tests.test_entry_points.test_unsupported_extension_errors[3ds]",
|
| 326 |
+
"eval.tests.test_entry_points.test_unsupported_extension_errors[OFF]",
|
| 327 |
+
"eval.tests.test_entry_points.test_unsupported_extension_errors[ply]",
|
| 328 |
+
"eval.tests.test_entry_points.test_unsupported_extension_errors[txt]",
|
| 329 |
+
"eval.tests.test_entry_points.test_uppercase_extension_normalised",
|
| 330 |
+
"eval.tests.test_materials.test_color_on_non_color_terminal_errors_exact",
|
| 331 |
+
"eval.tests.test_materials.test_commented_mtl_skips_comments",
|
| 332 |
+
"eval.tests.test_materials.test_crlf_mtl_lines_parse",
|
| 333 |
+
"eval.tests.test_materials.test_kd_before_newmtl_warns_exact",
|
| 334 |
+
"eval.tests.test_materials.test_kd_with_missing_float_warns_exact",
|
| 335 |
+
"eval.tests.test_materials.test_mtllib_echoes_resolved_mtl_path",
|
| 336 |
+
"eval.tests.test_materials.test_mtllib_missing_companion_warns_exact",
|
| 337 |
+
"eval.tests.test_materials.test_newmtl_and_kd_loads_material",
|
| 338 |
+
"eval.tests.test_materials.test_newmtl_without_kd_uses_defaults",
|
| 339 |
+
"eval.tests.test_materials.test_usemtl_unknown_material_silent",
|
| 340 |
+
"eval.tests.test_materials.test_usemtl_with_loaded_material",
|
| 341 |
+
"eval.tests.test_materials.test_usemtl_without_mtllib_silent",
|
| 342 |
+
"eval.tests.test_obj_parsing.test_comment_only_obj_has_no_vertexes",
|
| 343 |
+
"eval.tests.test_obj_parsing.test_crlf_and_tab_renders_match_space_split",
|
| 344 |
+
"eval.tests.test_obj_parsing.test_crlf_terminated_lines_parse",
|
| 345 |
+
"eval.tests.test_obj_parsing.test_face_record_with_no_indices_errors",
|
| 346 |
+
"eval.tests.test_obj_parsing.test_face_references_vertex_defined_after_face",
|
| 347 |
+
"eval.tests.test_obj_parsing.test_face_with_fewer_than_three_indices_errors[bad_f_one.obj]",
|
| 348 |
+
"eval.tests.test_obj_parsing.test_face_with_fewer_than_three_indices_errors[bad_f_two.obj]",
|
| 349 |
+
"eval.tests.test_obj_parsing.test_face_with_slashes_ignores_texcoord_and_normal",
|
| 350 |
+
"eval.tests.test_obj_parsing.test_invalid_v_instruction_errors",
|
| 351 |
+
"eval.tests.test_obj_parsing.test_missing_input_file_errors[does_not_exist.obj]",
|
| 352 |
+
"eval.tests.test_obj_parsing.test_missing_input_file_errors[missing.stl]",
|
| 353 |
+
"eval.tests.test_obj_parsing.test_missing_input_file_errors[nope.obj]",
|
| 354 |
+
"eval.tests.test_obj_parsing.test_negative_coordinate_vertex_renders",
|
| 355 |
+
"eval.tests.test_obj_parsing.test_negative_indices_are_made_relative",
|
| 356 |
+
"eval.tests.test_obj_parsing.test_obj_with_vertexes_but_no_faces_rejected",
|
| 357 |
+
"eval.tests.test_obj_parsing.test_out_of_range_vertex_index_warns_and_recovers",
|
| 358 |
+
"eval.tests.test_obj_parsing.test_pentagon_face_triangularized",
|
| 359 |
+
"eval.tests.test_obj_parsing.test_quad_face_triangularized",
|
| 360 |
+
"eval.tests.test_obj_parsing.test_tab_separated_coordinates_parse",
|
| 361 |
+
"eval.tests.test_obj_parsing.test_tiny_geometry_still_fills_viewport",
|
| 362 |
+
"eval.tests.test_obj_parsing.test_valid_obj_renders[pentagon.obj]",
|
| 363 |
+
"eval.tests.test_obj_parsing.test_valid_obj_renders[quad.obj]",
|
| 364 |
+
"eval.tests.test_obj_parsing.test_valid_obj_renders[triangle.obj]",
|
| 365 |
+
"eval.tests.test_obj_parsing.test_vertex_only_line_short_aborts",
|
| 366 |
+
"eval.tests.test_obj_parsing.test_zero_vertex_index_rejected",
|
| 367 |
+
"eval.tests.test_read_line_long_lines.test_long_comment_line_then_more_content",
|
| 368 |
+
"eval.tests.test_read_line_long_lines.test_long_face_line_spans_buffer_boundary",
|
| 369 |
+
"eval.tests.test_read_line_long_lines.test_long_trailing_comment_ends_at_eof",
|
| 370 |
+
"eval.tests.test_read_line_long_lines.test_long_vertex_line_spanning_buffer_boundary",
|
| 371 |
+
"eval.tests.test_stl_parsing.test_ascii_stl_invalid_vertex_errors",
|
| 372 |
+
"eval.tests.test_stl_parsing.test_ascii_stl_multi_facet_renders",
|
| 373 |
+
"eval.tests.test_stl_parsing.test_ascii_stl_renders",
|
| 374 |
+
"eval.tests.test_stl_parsing.test_ascii_stl_vertex_block_below_triangle_warns",
|
| 375 |
+
"eval.tests.test_stl_parsing.test_binary_stl_facet_count_mismatch_warns",
|
| 376 |
+
"eval.tests.test_stl_parsing.test_binary_stl_header_solid_but_not_ascii",
|
| 377 |
+
"eval.tests.test_stl_parsing.test_binary_stl_multi_facet_renders",
|
| 378 |
+
"eval.tests.test_stl_parsing.test_binary_stl_renders",
|
| 379 |
+
"eval.tests.test_stl_parsing.test_binary_stl_truncated_facet_errors",
|
| 380 |
+
"eval.tests.test_stl_parsing.test_binary_stl_zero_facets_no_vertexes",
|
| 381 |
+
"eval.tests.test_stl_parsing.test_color_option_warns_unsupported_for_stl",
|
| 382 |
+
"eval.tests.test_stl_parsing.test_missing_stl_file_errors",
|
| 383 |
+
"eval.tests.test_transforms.test_axis_inversion_changes_render[-X]",
|
| 384 |
+
"eval.tests.test_transforms.test_axis_inversion_changes_render[-Y]",
|
| 385 |
+
"eval.tests.test_transforms.test_axis_inversion_changes_render[-Z]",
|
| 386 |
+
"eval.tests.test_transforms.test_combined_axis_inversion_changes_render",
|
| 387 |
+
"eval.tests.test_transforms.test_custom_luminance_characters_used",
|
| 388 |
+
"eval.tests.test_transforms.test_flip_faces_changes_render",
|
| 389 |
+
"eval.tests.test_transforms.test_nondefault_orientations_differ_from_default",
|
| 390 |
+
"eval.tests.test_transforms.test_orientation_orders_reorder_axes[-XYZ]",
|
| 391 |
+
"eval.tests.test_transforms.test_orientation_orders_reorder_axes[-XZY]",
|
| 392 |
+
"eval.tests.test_transforms.test_orientation_orders_reorder_axes[-YXZ]",
|
| 393 |
+
"eval.tests.test_transforms.test_orientation_orders_reorder_axes[-YZX]",
|
| 394 |
+
"eval.tests.test_transforms.test_orientation_orders_reorder_axes[-ZXY]",
|
| 395 |
+
"eval.tests.test_transforms.test_orientation_orders_reorder_axes[-ZYX]",
|
| 396 |
+
"eval.tests.test_transforms.test_single_custom_luminance_char",
|
| 397 |
+
"eval.tests.test_transforms.test_static_light_changes_render",
|
| 398 |
+
"eval.tests.test_transforms.test_zoom_changes_projection"
|
| 399 |
+
]
|
| 400 |
+
},
|
| 401 |
+
"generated_module_03": {
|
| 402 |
+
"ignore_reason": "",
|
| 403 |
+
"ignored": false,
|
| 404 |
+
"ignored_tests": [],
|
| 405 |
+
"tests": [
|
| 406 |
+
"eval.tests.test_mtl_color_and_render_options.test_aspect_ratio_changes_render[0.5]",
|
| 407 |
+
"eval.tests.test_mtl_color_and_render_options.test_aspect_ratio_changes_render[1.5]",
|
| 408 |
+
"eval.tests.test_mtl_color_and_render_options.test_aspect_ratio_changes_render[2.0]",
|
| 409 |
+
"eval.tests.test_mtl_color_and_render_options.test_aspect_ratio_changes_render[3.0]",
|
| 410 |
+
"eval.tests.test_mtl_color_and_render_options.test_color_mtllib_reads_material",
|
| 411 |
+
"eval.tests.test_mtl_color_and_render_options.test_color_mtllib_unknown_usemtl_still_loads",
|
| 412 |
+
"eval.tests.test_mtl_color_and_render_options.test_kd_before_newmtl_reports_warning",
|
| 413 |
+
"eval.tests.test_mtl_color_and_render_options.test_missing_mtl_file_notes_and_warns",
|
| 414 |
+
"eval.tests.test_mtl_color_and_render_options.test_mtllib_without_color_ignores_material",
|
| 415 |
+
"eval.tests.test_mtl_color_and_render_options.test_short_luminance_charset_changes_render[ .*]",
|
| 416 |
+
"eval.tests.test_mtl_color_and_render_options.test_short_luminance_charset_changes_render[*]",
|
| 417 |
+
"eval.tests.test_mtl_color_and_render_options.test_short_luminance_charset_changes_render[.#]",
|
| 418 |
+
"eval.tests.test_mtl_color_and_render_options.test_short_luminance_charset_changes_render[@]",
|
| 419 |
+
"eval.tests.test_normalization_trigonometry.test_bounding_center_negative_coords_invariant[shift0]",
|
| 420 |
+
"eval.tests.test_normalization_trigonometry.test_bounding_center_negative_coords_invariant[shift1]",
|
| 421 |
+
"eval.tests.test_normalization_trigonometry.test_centroid_of_extreme_coords[3.0]",
|
| 422 |
+
"eval.tests.test_normalization_trigonometry.test_centroid_of_extreme_coords[7.5]",
|
| 423 |
+
"eval.tests.test_normalization_trigonometry.test_concave_lshape_translate_scale_invariance[0.5-2.0--2.0--2.0]",
|
| 424 |
+
"eval.tests.test_normalization_trigonometry.test_concave_lshape_translate_scale_invariance[1.0-0.0-0.0-0.0]",
|
| 425 |
+
"eval.tests.test_normalization_trigonometry.test_concave_lshape_translate_scale_invariance[2.0-6.0-0.0-0.0]",
|
| 426 |
+
"eval.tests.test_normalization_trigonometry.test_concave_lshape_translate_scale_invariance[5.0--8.0-11.0-3.0]",
|
| 427 |
+
"eval.tests.test_normalization_trigonometry.test_degenerate_single_point_no_crash[-2.0--2.0--2.0]",
|
| 428 |
+
"eval.tests.test_normalization_trigonometry.test_degenerate_single_point_no_crash[0.0-0.0-0.0]",
|
| 429 |
+
"eval.tests.test_normalization_trigonometry.test_degenerate_single_point_no_crash[3.0-4.0-5.0]",
|
| 430 |
+
"eval.tests.test_normalization_trigonometry.test_far_vertex_scales_the_rest_down[2.0]",
|
| 431 |
+
"eval.tests.test_normalization_trigonometry.test_far_vertex_scales_the_rest_down[64.0]",
|
| 432 |
+
"eval.tests.test_normalization_trigonometry.test_far_vertex_scales_the_rest_down[8.0]",
|
| 433 |
+
"eval.tests.test_normalization_trigonometry.test_lone_vertex_dominates_bounding_box[single_out-100.0]",
|
| 434 |
+
"eval.tests.test_normalization_trigonometry.test_lone_vertex_dominates_bounding_box[single_out-20.0]",
|
| 435 |
+
"eval.tests.test_normalization_trigonometry.test_lone_vertex_dominates_bounding_box[single_out-6.0]",
|
| 436 |
+
"eval.tests.test_normalization_trigonometry.test_non_uniform_scale_changes_render[1.0-3.0]",
|
| 437 |
+
"eval.tests.test_normalization_trigonometry.test_non_uniform_scale_changes_render[3.0-1.0]",
|
| 438 |
+
"eval.tests.test_normalization_trigonometry.test_non_uniform_scale_changes_render[4.0-0.5]",
|
| 439 |
+
"eval.tests.test_normalization_trigonometry.test_plane_rotation_deterministic[30.0-False]",
|
| 440 |
+
"eval.tests.test_normalization_trigonometry.test_plane_rotation_deterministic[45.0-False]",
|
| 441 |
+
"eval.tests.test_normalization_trigonometry.test_plane_rotation_deterministic[90.0-True]",
|
| 442 |
+
"eval.tests.test_normalization_trigonometry.test_positive_and_negative_z_vertex_differ[-1.0]",
|
| 443 |
+
"eval.tests.test_normalization_trigonometry.test_positive_and_negative_z_vertex_differ[1.0]",
|
| 444 |
+
"eval.tests.test_normalization_trigonometry.test_quad_combined_translation_scale_invariance[0.25--4.0-7.0--1.0]",
|
| 445 |
+
"eval.tests.test_normalization_trigonometry.test_quad_combined_translation_scale_invariance[12.0-0.0-0.0-30.0]",
|
| 446 |
+
"eval.tests.test_normalization_trigonometry.test_quad_combined_translation_scale_invariance[3.0-10.0--5.0-2.0]",
|
| 447 |
+
"eval.tests.test_normalization_trigonometry.test_quad_translation_invariants[-9.0-5.0--4.0]",
|
| 448 |
+
"eval.tests.test_normalization_trigonometry.test_quad_translation_invariants[0.0-0.0-0.0]",
|
| 449 |
+
"eval.tests.test_normalization_trigonometry.test_quad_translation_invariants[1.5--0.5-0.25]",
|
| 450 |
+
"eval.tests.test_normalization_trigonometry.test_quad_translation_invariants[7.0--3.0-2.0]",
|
| 451 |
+
"eval.tests.test_normalization_trigonometry.test_quad_uniform_scale_invariance[0.25]",
|
| 452 |
+
"eval.tests.test_normalization_trigonometry.test_quad_uniform_scale_invariance[0.5]",
|
| 453 |
+
"eval.tests.test_normalization_trigonometry.test_quad_uniform_scale_invariance[10.0]",
|
| 454 |
+
"eval.tests.test_normalization_trigonometry.test_quad_uniform_scale_invariance[100.0]",
|
| 455 |
+
"eval.tests.test_normalization_trigonometry.test_quad_uniform_scale_invariance[2.0]",
|
| 456 |
+
"eval.tests.test_normalization_trigonometry.test_regular_polygon_normalization_stable[3]",
|
| 457 |
+
"eval.tests.test_normalization_trigonometry.test_regular_polygon_normalization_stable[4]",
|
| 458 |
+
"eval.tests.test_normalization_trigonometry.test_regular_polygon_normalization_stable[5]",
|
| 459 |
+
"eval.tests.test_normalization_trigonometry.test_regular_polygon_normalization_stable[6]",
|
| 460 |
+
"eval.tests.test_normalization_trigonometry.test_regular_polygon_normalization_stable[7]",
|
| 461 |
+
"eval.tests.test_normalization_trigonometry.test_regular_polygon_normalization_stable[8]",
|
| 462 |
+
"eval.tests.test_normalization_trigonometry.test_two_point_coincident_no_crash[0.0-0.0-0.0]",
|
| 463 |
+
"eval.tests.test_normalization_trigonometry.test_two_point_coincident_no_crash[5.0--5.0-5.0]",
|
| 464 |
+
"eval.tests.test_orientation_axes.test_far_vertex_close_to_origin_recenters_and_scales[coord0]",
|
| 465 |
+
"eval.tests.test_orientation_axes.test_far_vertex_close_to_origin_recenters_and_scales[coord1]",
|
| 466 |
+
"eval.tests.test_orientation_axes.test_far_vertex_close_to_origin_recenters_and_scales[coord2]",
|
| 467 |
+
"eval.tests.test_orientation_axes.test_far_vertex_close_to_origin_recenters_and_scales[coord3]",
|
| 468 |
+
"eval.tests.test_orientation_axes.test_nonidentity_permutation_changes_3d_render[-XZY]",
|
| 469 |
+
"eval.tests.test_orientation_axes.test_nonidentity_permutation_changes_3d_render[-YZX]",
|
| 470 |
+
"eval.tests.test_orientation_axes.test_nonidentity_permutation_changes_3d_render[-ZXY]",
|
| 471 |
+
"eval.tests.test_orientation_axes.test_nonidentity_permutation_changes_3d_render[-ZYX]",
|
| 472 |
+
"eval.tests.test_orientation_axes.test_permutation_noops_identity_xyz_yxz_3d",
|
| 473 |
+
"eval.tests.test_orientation_axes.test_square_with_out_of_plane_vertex_renders[-5.0]",
|
| 474 |
+
"eval.tests.test_orientation_axes.test_square_with_out_of_plane_vertex_renders[5.0]",
|
| 475 |
+
"eval.tests.test_orientation_axes.test_xzy_yzx_permutation_culls_flat_arm",
|
| 476 |
+
"eval.tests.test_orientation_axes.test_zxy_zyx_permutation_renders_filled_3d",
|
| 477 |
+
"eval.tests.test_reachability_cli.test_altitude_edge_on_culls_flat_square",
|
| 478 |
+
"eval.tests.test_reachability_cli.test_altitude_variation_changes_shading",
|
| 479 |
+
"eval.tests.test_reachability_cli.test_axis_inversion_changes_lshape_render[X--X]",
|
| 480 |
+
"eval.tests.test_reachability_cli.test_axis_inversion_changes_lshape_render[Y--Y]",
|
| 481 |
+
"eval.tests.test_reachability_cli.test_axis_inversion_z_culls_flat_lshape",
|
| 482 |
+
"eval.tests.test_reachability_cli.test_axis_inversion_z_culls_flat_model",
|
| 483 |
+
"eval.tests.test_reachability_cli.test_azimuth_period_360_is_identical",
|
| 484 |
+
"eval.tests.test_reachability_cli.test_azimuth_variation_changes_shading[0-90]",
|
| 485 |
+
"eval.tests.test_reachability_cli.test_azimuth_variation_changes_shading[20-70]",
|
| 486 |
+
"eval.tests.test_reachability_cli.test_azimuth_variation_changes_shading[45-135]",
|
| 487 |
+
"eval.tests.test_reachability_cli.test_binary_stl_loads_and_renders",
|
| 488 |
+
"eval.tests.test_reachability_cli.test_binary_stl_winding_present_or_culled",
|
| 489 |
+
"eval.tests.test_reachability_cli.test_custom_luminescence_chars_change_render",
|
| 490 |
+
"eval.tests.test_reachability_cli.test_empty_obj_rejected_no_vertices_or_faces",
|
| 491 |
+
"eval.tests.test_reachability_cli.test_help_mentions_snap_and_zoom_options",
|
| 492 |
+
"eval.tests.test_reachability_cli.test_help_prints_usage[--help]",
|
| 493 |
+
"eval.tests.test_reachability_cli.test_help_prints_usage[-?]",
|
| 494 |
+
"eval.tests.test_reachability_cli.test_help_prints_usage[-h]",
|
| 495 |
+
"eval.tests.test_reachability_cli.test_invalid_numeric_option_rejected[args0-ERROR: Invalid width: 0]",
|
| 496 |
+
"eval.tests.test_reachability_cli.test_invalid_numeric_option_rejected[args1-ERROR: Invalid height: -3]",
|
| 497 |
+
"eval.tests.test_reachability_cli.test_invalid_numeric_option_rejected[args2-ERROR: Invalid FPS: 0]",
|
| 498 |
+
"eval.tests.test_reachability_cli.test_invalid_numeric_option_rejected[args3-ERROR: Invalid duration: -1]",
|
| 499 |
+
"eval.tests.test_reachability_cli.test_invalid_numeric_option_rejected[args4-ERROR: Invalid aspect-ratio: 0]",
|
| 500 |
+
"eval.tests.test_reachability_cli.test_invalid_numeric_option_rejected[args5-ERROR: Invalid zoom: 0]",
|
| 501 |
+
"eval.tests.test_reachability_cli.test_invalid_numeric_option_rejected[args6-ERROR: At least one luminescence character must be provided.]",
|
| 502 |
+
"eval.tests.test_reachability_cli.test_invalid_option_rejected[--nope]",
|
| 503 |
+
"eval.tests.test_reachability_cli.test_invalid_option_rejected[-Q]",
|
| 504 |
+
"eval.tests.test_reachability_cli.test_invalid_option_rejected[-wxyz]",
|
| 505 |
+
"eval.tests.test_reachability_cli.test_invalid_vertex_index_reports_warning[-8-WARN: Invalid vertex index -8.]",
|
| 506 |
+
"eval.tests.test_reachability_cli.test_invalid_vertex_index_reports_warning[0-WARN: Invalid vertex index 0.]",
|
| 507 |
+
"eval.tests.test_reachability_cli.test_invalid_vertex_index_reports_warning[9-WARN: Invalid vertex index 8.]",
|
| 508 |
+
"eval.tests.test_reachability_cli.test_invalid_width_non_numeric[]",
|
| 509 |
+
"eval.tests.test_reachability_cli.test_invalid_width_non_numeric[abc]",
|
| 510 |
+
"eval.tests.test_reachability_cli.test_invalid_width_non_numeric[notANum]",
|
| 511 |
+
"eval.tests.test_reachability_cli.test_malformed_obj_face_rejected[v 0 0 5\\nv 4 0 5\\nf 1 2\\n-ERROR: invalid \"f\" instruction.]",
|
| 512 |
+
"eval.tests.test_reachability_cli.test_malformed_obj_face_rejected[v 0 0\\nv 1 1\\nv 2 2\\nf 1 2 3\\n-ERROR: invalid \"v\" instruction.]",
|
| 513 |
+
"eval.tests.test_reachability_cli.test_no_args_prints_program_description",
|
| 514 |
+
"eval.tests.test_reachability_cli.test_no_faces_rejected",
|
| 515 |
+
"eval.tests.test_reachability_cli.test_no_vertices_rejected",
|
| 516 |
+
"eval.tests.test_reachability_cli.test_option_missing_value_falls_back_to_usage",
|
| 517 |
+
"eval.tests.test_reachability_cli.test_orientation_identity_permutations[-XYZ]",
|
| 518 |
+
"eval.tests.test_reachability_cli.test_orientation_identity_permutations[-YXZ]",
|
| 519 |
+
"eval.tests.test_reachability_cli.test_rejects_non_model_extensions[model.txt-v 0 0 0\\n-ERROR: Input file has unsupported extension.]",
|
| 520 |
+
"eval.tests.test_reachability_cli.test_rejects_non_model_extensions[noext-# comment only\\n-ERROR: Input file has no extension.]",
|
| 521 |
+
"eval.tests.test_reachability_cli.test_static_light_changes_shading",
|
| 522 |
+
"eval.tests.test_reachability_cli.test_stl_uniform_scale_not_relevant_but_loads",
|
| 523 |
+
"eval.tests.test_reachability_cli.test_stretch_flag_changes_render",
|
| 524 |
+
"eval.tests.test_reachability_cli.test_surface_height_changes_output_size",
|
| 525 |
+
"eval.tests.test_reachability_cli.test_surface_width_changes_output_shape",
|
| 526 |
+
"eval.tests.test_reachability_cli.test_too_many_input_files_usage",
|
| 527 |
+
"eval.tests.test_reachability_cli.test_unsupported_extension_error",
|
| 528 |
+
"eval.tests.test_reachability_cli.test_zoom_changes_render[25-300]",
|
| 529 |
+
"eval.tests.test_reachability_cli.test_zoom_changes_render[50-100]",
|
| 530 |
+
"eval.tests.test_reachability_cli.test_zoom_changes_render[50-200]",
|
| 531 |
+
"eval.tests.test_reachability_cli.test_zoom_default_equals_explicit_100",
|
| 532 |
+
"eval.tests.test_reachability_cli.test_zoom_identity_is_length_preserving",
|
| 533 |
+
"eval.tests.test_triangularization.test_collinear_polygon_does_not_crash",
|
| 534 |
+
"eval.tests.test_triangularization.test_concave_arrow_shape_less_than_hull",
|
| 535 |
+
"eval.tests.test_triangularization.test_concave_lshape_concavity_persists_under_scale[0.5]",
|
| 536 |
+
"eval.tests.test_triangularization.test_concave_lshape_concavity_persists_under_scale[1.5]",
|
| 537 |
+
"eval.tests.test_triangularization.test_concave_lshape_concavity_persists_under_scale[3.0]",
|
| 538 |
+
"eval.tests.test_triangularization.test_concave_lshape_preserves_notch",
|
| 539 |
+
"eval.tests.test_triangularization.test_duplicate_vertices_does_not_crash",
|
| 540 |
+
"eval.tests.test_triangularization.test_flip_faces_flag_culls_forward_winding",
|
| 541 |
+
"eval.tests.test_triangularization.test_flip_faces_flag_redeems_reversed_winding",
|
| 542 |
+
"eval.tests.test_triangularization.test_high_vertex_concave_complexity_not_crash[6]",
|
| 543 |
+
"eval.tests.test_triangularization.test_high_vertex_concave_complexity_not_crash[8]",
|
| 544 |
+
"eval.tests.test_triangularization.test_mixed_positive_negative_indices_equivalent",
|
| 545 |
+
"eval.tests.test_triangularization.test_n_gon_not_filled_convex_hull_only[5]",
|
| 546 |
+
"eval.tests.test_triangularization.test_n_gon_not_filled_convex_hull_only[6]",
|
| 547 |
+
"eval.tests.test_triangularization.test_n_gon_not_filled_convex_hull_only[7]",
|
| 548 |
+
"eval.tests.test_triangularization.test_n_gon_not_filled_convex_hull_only[8]",
|
| 549 |
+
"eval.tests.test_triangularization.test_n_vertex_convex_polygon_renders[5]",
|
| 550 |
+
"eval.tests.test_triangularization.test_n_vertex_convex_polygon_renders[6]",
|
| 551 |
+
"eval.tests.test_triangularization.test_n_vertex_convex_polygon_renders[7]",
|
| 552 |
+
"eval.tests.test_triangularization.test_n_vertex_convex_polygon_renders[8]",
|
| 553 |
+
"eval.tests.test_triangularization.test_negative_faces_winding_and_flip",
|
| 554 |
+
"eval.tests.test_triangularization.test_negative_relative_indices_concave",
|
| 555 |
+
"eval.tests.test_triangularization.test_negative_relative_indices_equivalent",
|
| 556 |
+
"eval.tests.test_triangularization.test_ngon_winding_culls_when_reversed[5]",
|
| 557 |
+
"eval.tests.test_triangularization.test_ngon_winding_culls_when_reversed[6]",
|
| 558 |
+
"eval.tests.test_triangularization.test_ngon_winding_culls_when_reversed[7]",
|
| 559 |
+
"eval.tests.test_triangularization.test_quad_face_equals_manual_split",
|
| 560 |
+
"eval.tests.test_triangularization.test_quad_renders_fully_filled[verts0]",
|
| 561 |
+
"eval.tests.test_triangularization.test_quad_renders_fully_filled[verts1]",
|
| 562 |
+
"eval.tests.test_triangularization.test_quad_renders_fully_filled[verts2]",
|
| 563 |
+
"eval.tests.test_triangularization.test_quad_winding_orientation[winding0-True]",
|
| 564 |
+
"eval.tests.test_triangularization.test_quad_winding_orientation[winding1-False]",
|
| 565 |
+
"eval.tests.test_triangularization.test_triangle_face_renders_filled",
|
| 566 |
+
"eval.tests.test_triangulation_invariants.test_comb_serpentine_does_not_crash",
|
| 567 |
+
"eval.tests.test_triangulation_invariants.test_concave_chevron_preserves_notch",
|
| 568 |
+
"eval.tests.test_triangulation_invariants.test_concave_l_index_rotation_invariant[1]",
|
| 569 |
+
"eval.tests.test_triangulation_invariants.test_concave_l_index_rotation_invariant[2]",
|
| 570 |
+
"eval.tests.test_triangulation_invariants.test_concave_l_index_rotation_invariant[3]",
|
| 571 |
+
"eval.tests.test_triangulation_invariants.test_concave_w_shape_preserves_notches",
|
| 572 |
+
"eval.tests.test_triangulation_invariants.test_deep_recursion_concave_star_no_crash[10]",
|
| 573 |
+
"eval.tests.test_triangulation_invariants.test_deep_recursion_concave_star_no_crash[12]",
|
| 574 |
+
"eval.tests.test_triangulation_invariants.test_deep_recursion_concave_star_no_crash[14]",
|
| 575 |
+
"eval.tests.test_triangulation_invariants.test_deep_recursion_concave_star_no_crash[16]",
|
| 576 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[4-6.0-1]",
|
| 577 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[4-6.0-2]",
|
| 578 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[5-4.5-1]",
|
| 579 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[5-4.5-2]",
|
| 580 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[6-4.5-1]",
|
| 581 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[6-4.5-2]",
|
| 582 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[7-4.5-1]",
|
| 583 |
+
"eval.tests.test_triangulation_invariants.test_face_index_list_rotation_invariance[7-4.5-2]",
|
| 584 |
+
"eval.tests.test_triangulation_invariants.test_multiple_disjoint_faces_each_triangulated",
|
| 585 |
+
"eval.tests.test_triangulation_invariants.test_plus_cross_concave_shape_renders[False]",
|
| 586 |
+
"eval.tests.test_triangulation_invariants.test_plus_cross_concave_shape_renders[True]",
|
| 587 |
+
"eval.tests.test_triangulation_invariants.test_reversed_rotated_winding_culls[winding0]",
|
| 588 |
+
"eval.tests.test_triangulation_invariants.test_reversed_rotated_winding_culls[winding1]",
|
| 589 |
+
"eval.tests.test_triangulation_invariants.test_reversed_rotated_winding_culls[winding2]",
|
| 590 |
+
"eval.tests.test_triangulation_invariants.test_self_intersecting_bowtie_quad_no_crash"
|
| 591 |
+
]
|
| 592 |
+
},
|
| 593 |
+
"generated_module_04": {
|
| 594 |
+
"ignore_reason": "",
|
| 595 |
+
"ignored": false,
|
| 596 |
+
"ignored_tests": [],
|
| 597 |
+
"tests": [
|
| 598 |
+
"eval.tests.test_surface_args.test_empty_lum_chars_rejected",
|
| 599 |
+
"eval.tests.test_surface_args.test_extension_case_insensitive_stl_rejected",
|
| 600 |
+
"eval.tests.test_surface_args.test_help_prints_usage[cmd0]",
|
| 601 |
+
"eval.tests.test_surface_args.test_help_prints_usage[cmd1]",
|
| 602 |
+
"eval.tests.test_surface_args.test_invalid_option_rejected[--badopt]",
|
| 603 |
+
"eval.tests.test_surface_args.test_invalid_option_rejected[-Q]",
|
| 604 |
+
"eval.tests.test_surface_args.test_invalid_option_rejected[-unknown]",
|
| 605 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-a-0-Invalid aspect-ratio: 0]",
|
| 606 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-f-0-Invalid FPS: 0]",
|
| 607 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-h-0-Invalid height: 0]",
|
| 608 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-w--5-Invalid width: -5]",
|
| 609 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-w-0-Invalid width: 0]",
|
| 610 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-w-abc-Invalid width: abc]",
|
| 611 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-z--1-Invalid zoom: -1]",
|
| 612 |
+
"eval.tests.test_surface_args.test_invalid_surface_numeric_args_error[-z-0-Invalid zoom: 0]",
|
| 613 |
+
"eval.tests.test_surface_args.test_larger_surfaces_allocate_and_render[120-40]",
|
| 614 |
+
"eval.tests.test_surface_args.test_larger_surfaces_allocate_and_render[40-15]",
|
| 615 |
+
"eval.tests.test_surface_args.test_larger_surfaces_allocate_and_render[80-5]",
|
| 616 |
+
"eval.tests.test_surface_args.test_missing_input_file_reports_io_error",
|
| 617 |
+
"eval.tests.test_surface_args.test_no_args_prints_description",
|
| 618 |
+
"eval.tests.test_surface_args.test_no_extension_rejected",
|
| 619 |
+
"eval.tests.test_surface_args.test_snap_stdout_has_exact_number_of_newlines[\\n]",
|
| 620 |
+
"eval.tests.test_surface_args.test_stl_input_renders",
|
| 621 |
+
"eval.tests.test_surface_args.test_unsupported_extension_rejected[foo.bin]",
|
| 622 |
+
"eval.tests.test_surface_args.test_unsupported_extension_rejected[foo.png]",
|
| 623 |
+
"eval.tests.test_surface_args.test_unsupported_extension_rejected[foo.txt]",
|
| 624 |
+
"eval.tests.test_surface_args.test_unsupported_extension_rejected[foo.xyz]",
|
| 625 |
+
"eval.tests.test_surface_args.test_valid_snap_renders_for_good_args[box-in-box.obj]",
|
| 626 |
+
"eval.tests.test_surface_args.test_valid_snap_renders_for_good_args[fox.obj]",
|
| 627 |
+
"eval.tests.test_surface_color.test_box_inbox_uses_two_material_colors",
|
| 628 |
+
"eval.tests.test_surface_color.test_box_materials_emit_expected_rgb[mat_expected0]",
|
| 629 |
+
"eval.tests.test_surface_color.test_box_materials_emit_expected_rgb[mat_expected1]",
|
| 630 |
+
"eval.tests.test_surface_color.test_color_and_noncolor_grid_dimensions_match",
|
| 631 |
+
"eval.tests.test_surface_color.test_color_boost_low_material_sum_not_needed_for_full_sat",
|
| 632 |
+
"eval.tests.test_surface_color.test_color_on_model_without_materials_stays_plain",
|
| 633 |
+
"eval.tests.test_surface_color.test_color_render_is_deterministic",
|
| 634 |
+
"eval.tests.test_surface_color.test_color_requires_can_change_color",
|
| 635 |
+
"eval.tests.test_surface_color.test_color_requires_has_colors",
|
| 636 |
+
"eval.tests.test_surface_color.test_color_sequences_carry_reset_after_each_pixel",
|
| 637 |
+
"eval.tests.test_surface_color.test_noncolor_mode_emits_no_ansi_color",
|
| 638 |
+
"eval.tests.test_surface_color.test_nonconvex_gray_dominated_by_material",
|
| 639 |
+
"eval.tests.test_surface_combinations.test_model_color_escapes_deterministic[box-in-box.obj]",
|
| 640 |
+
"eval.tests.test_surface_combinations.test_model_color_escapes_deterministic[fox.obj]",
|
| 641 |
+
"eval.tests.test_surface_combinations.test_model_color_escapes_deterministic[non-convex.obj]",
|
| 642 |
+
"eval.tests.test_surface_combinations.test_model_lum_char_boundary[box-in-box.obj-ab-allowed1]",
|
| 643 |
+
"eval.tests.test_surface_combinations.test_model_lum_char_boundary[fox.obj-@-allowed0]",
|
| 644 |
+
"eval.tests.test_surface_combinations.test_model_lum_char_boundary[non-convex.obj-.x:-allowed2]",
|
| 645 |
+
"eval.tests.test_surface_combinations.test_model_render_silhouettes_differ_by_azimuth[box-in-box.obj]",
|
| 646 |
+
"eval.tests.test_surface_combinations.test_model_render_silhouettes_differ_by_azimuth[fox.obj]",
|
| 647 |
+
"eval.tests.test_surface_combinations.test_model_render_silhouettes_differ_by_azimuth[non-convex.obj]",
|
| 648 |
+
"eval.tests.test_surface_combinations.test_model_render_silhouettes_differ_by_azimuth[shiba-inu.obj]",
|
| 649 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[box-in-box.obj-20-10]",
|
| 650 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[box-in-box.obj-30-15]",
|
| 651 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[box-in-box.obj-40-20]",
|
| 652 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[box-in-box.obj-7-9]",
|
| 653 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[fox.obj-20-10]",
|
| 654 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[fox.obj-30-15]",
|
| 655 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[fox.obj-40-20]",
|
| 656 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[fox.obj-7-9]",
|
| 657 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[non-convex.obj-20-10]",
|
| 658 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[non-convex.obj-30-15]",
|
| 659 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[non-convex.obj-40-20]",
|
| 660 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[non-convex.obj-7-9]",
|
| 661 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[shiba-inu.obj-20-10]",
|
| 662 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[shiba-inu.obj-30-15]",
|
| 663 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[shiba-inu.obj-40-20]",
|
| 664 |
+
"eval.tests.test_surface_combinations.test_model_size_grid_height_matches_request[shiba-inu.obj-7-9]",
|
| 665 |
+
"eval.tests.test_surface_combinations.test_model_static_light_changes_frame[box-in-box.obj]",
|
| 666 |
+
"eval.tests.test_surface_combinations.test_model_static_light_changes_frame[fox.obj]",
|
| 667 |
+
"eval.tests.test_surface_combinations.test_model_static_light_changes_frame[non-convex.obj]",
|
| 668 |
+
"eval.tests.test_surface_combinations.test_model_static_light_changes_frame[shiba-inu.obj]",
|
| 669 |
+
"eval.tests.test_surface_combinations.test_model_zoom_monotone_fill[box-in-box.obj]",
|
| 670 |
+
"eval.tests.test_surface_combinations.test_model_zoom_monotone_fill[fox.obj]",
|
| 671 |
+
"eval.tests.test_surface_combinations.test_model_zoom_monotone_fill[non-convex.obj]",
|
| 672 |
+
"eval.tests.test_surface_combinations.test_model_zoom_monotone_fill[shiba-inu.obj]",
|
| 673 |
+
"eval.tests.test_surface_combinations.test_tiny_surface_with_large_zoom_does_not_crash[box-in-box.obj-4-8]",
|
| 674 |
+
"eval.tests.test_surface_combinations.test_tiny_surface_with_large_zoom_does_not_crash[fox.obj-3-3]",
|
| 675 |
+
"eval.tests.test_surface_combinations.test_tiny_surface_with_large_zoom_does_not_crash[fox.obj-5-5]",
|
| 676 |
+
"eval.tests.test_surface_combinations.test_tiny_surface_with_large_zoom_does_not_crash[non-convex.obj-8-4]",
|
| 677 |
+
"eval.tests.test_surface_golden.test_snap_matches_golden[fox_40x15_0_0.txt-args0]",
|
| 678 |
+
"eval.tests.test_surface_golden.test_snap_matches_golden[fox_40x15_0_45_stretch.txt-args3]",
|
| 679 |
+
"eval.tests.test_surface_golden.test_snap_matches_golden[fox_40x15_30_20.txt-args1]",
|
| 680 |
+
"eval.tests.test_surface_golden.test_snap_matches_golden[fox_40x15_30_20_cab.txt-args4]",
|
| 681 |
+
"eval.tests.test_surface_golden.test_snap_matches_golden[fox_40x15_90_0_X.txt-args2]",
|
| 682 |
+
"eval.tests.test_surface_grid.test_aspect_ratio_changes_render_but_keeps_grid_shape[0.5]",
|
| 683 |
+
"eval.tests.test_surface_grid.test_aspect_ratio_changes_render_but_keeps_grid_shape[1.0]",
|
| 684 |
+
"eval.tests.test_surface_grid.test_aspect_ratio_changes_render_but_keeps_grid_shape[1.8]",
|
| 685 |
+
"eval.tests.test_surface_grid.test_aspect_ratio_changes_render_but_keeps_grid_shape[3.0]",
|
| 686 |
+
"eval.tests.test_surface_grid.test_clean_surface_cleared_background_is_blank",
|
| 687 |
+
"eval.tests.test_surface_grid.test_custom_luminescence_chars_restrict_alphabet[#@-expected_allowed2]",
|
| 688 |
+
"eval.tests.test_surface_grid.test_custom_luminescence_chars_restrict_alphabet[.x-expected_allowed1]",
|
| 689 |
+
"eval.tests.test_surface_grid.test_custom_luminescence_chars_restrict_alphabet[01-expected_allowed4]",
|
| 690 |
+
"eval.tests.test_surface_grid.test_custom_luminescence_chars_restrict_alphabet[@-expected_allowed3]",
|
| 691 |
+
"eval.tests.test_surface_grid.test_custom_luminescence_chars_restrict_alphabet[ABC-expected_allowed5]",
|
| 692 |
+
"eval.tests.test_surface_grid.test_custom_luminescence_chars_restrict_alphabet[ab-expected_allowed0]",
|
| 693 |
+
"eval.tests.test_surface_grid.test_each_model_renders_nonempty_for_default_angle[box-in-box.obj]",
|
| 694 |
+
"eval.tests.test_surface_grid.test_each_model_renders_nonempty_for_default_angle[fox.obj]",
|
| 695 |
+
"eval.tests.test_surface_grid.test_each_model_renders_nonempty_for_default_angle[non-convex.obj]",
|
| 696 |
+
"eval.tests.test_surface_grid.test_lum_chars_count_affects_output[.-.,-.~]",
|
| 697 |
+
"eval.tests.test_surface_grid.test_lum_chars_count_affects_output[@-01-#$%&]",
|
| 698 |
+
"eval.tests.test_surface_grid.test_lum_chars_count_affects_output[X-ab-.:-=+*#%@]",
|
| 699 |
+
"eval.tests.test_surface_grid.test_render_dimensions_scale_filled_area",
|
| 700 |
+
"eval.tests.test_surface_grid.test_render_is_deterministic",
|
| 701 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[10-5]",
|
| 702 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[100-20]",
|
| 703 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[12-40]",
|
| 704 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[16-30]",
|
| 705 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[20-10]",
|
| 706 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[25-25]",
|
| 707 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[32-17]",
|
| 708 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[40-15]",
|
| 709 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[48-12]",
|
| 710 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[5-5]",
|
| 711 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[60-20]",
|
| 712 |
+
"eval.tests.test_surface_grid.test_snap_produces_height_rows_of_width_chars[80-10]",
|
| 713 |
+
"eval.tests.test_surface_printw_color.test_interactive_color_emits_sgr_pairs",
|
| 714 |
+
"eval.tests.test_surface_printw_color.test_printw_color_box_renders_both_material_pairs",
|
| 715 |
+
"eval.tests.test_surface_printw_color.test_printw_color_deterministic_across_runs",
|
| 716 |
+
"eval.tests.test_surface_printw_color.test_printw_color_emits_sgr_pairs_for_material_models[box-in-box.obj]",
|
| 717 |
+
"eval.tests.test_surface_printw_color.test_printw_color_emits_sgr_pairs_for_material_models[fox.obj]",
|
| 718 |
+
"eval.tests.test_surface_printw_color.test_printw_color_emits_sgr_pairs_for_material_models[non-convex.obj]",
|
| 719 |
+
"eval.tests.test_surface_printw_color.test_printw_color_fox_includes_foreground_pairs[\\x1b[31m]",
|
| 720 |
+
"eval.tests.test_surface_printw_color.test_printw_color_fox_includes_foreground_pairs[\\x1b[32m]",
|
| 721 |
+
"eval.tests.test_surface_printw_color.test_printw_color_fox_includes_foreground_pairs[\\x1b[33m]",
|
| 722 |
+
"eval.tests.test_surface_printw_color.test_printw_color_models_differ_in_material_pairs",
|
| 723 |
+
"eval.tests.test_surface_printw_color.test_printw_color_no_material_model_produces_no_real_pairs",
|
| 724 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra0]",
|
| 725 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra1]",
|
| 726 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra2]",
|
| 727 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra3]",
|
| 728 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra4]",
|
| 729 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra5]",
|
| 730 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra6]",
|
| 731 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameter_variants_render_with_color[extra7]",
|
| 732 |
+
"eval.tests.test_surface_printw_color.test_printw_color_parameters_produce_distinct_frames",
|
| 733 |
+
"eval.tests.test_surface_printw_color.test_printw_color_zoom_and_size_change_colored_pixel_count[probe0-compare0]",
|
| 734 |
+
"eval.tests.test_surface_printw_color.test_printw_color_zoom_and_size_change_colored_pixel_count[probe1-compare1]",
|
| 735 |
+
"eval.tests.test_surface_printw_color.test_printw_no_color_uses_plain_printw",
|
| 736 |
+
"eval.tests.test_surface_printw_color.test_snap_color_uses_surface_print_truecolor_not_printw",
|
| 737 |
+
"eval.tests.test_surface_rasterization.test_aspect_ratio_changes_rendered_frame[0.2]",
|
| 738 |
+
"eval.tests.test_surface_rasterization.test_aspect_ratio_changes_rendered_frame[0.5]",
|
| 739 |
+
"eval.tests.test_surface_rasterization.test_aspect_ratio_changes_rendered_frame[1.0]",
|
| 740 |
+
"eval.tests.test_surface_rasterization.test_aspect_ratio_changes_rendered_frame[3.0]",
|
| 741 |
+
"eval.tests.test_surface_rasterization.test_aspect_ratio_changes_rendered_frame[6.0]",
|
| 742 |
+
"eval.tests.test_surface_rasterization.test_axis_inversion_and_flip_changes_render[-F]",
|
| 743 |
+
"eval.tests.test_surface_rasterization.test_axis_inversion_and_flip_changes_render[-X]",
|
| 744 |
+
"eval.tests.test_surface_rasterization.test_axis_inversion_and_flip_changes_render[-Y]",
|
| 745 |
+
"eval.tests.test_surface_rasterization.test_axis_inversion_and_flip_changes_render[-Z]",
|
| 746 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[0-0]",
|
| 747 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[0-45]",
|
| 748 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[0-90]",
|
| 749 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[120-60]",
|
| 750 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[180-0]",
|
| 751 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[270-30]",
|
| 752 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[360-0]",
|
| 753 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[45-0]",
|
| 754 |
+
"eval.tests.test_surface_rasterization.test_azimuth_altitude_rotation_is_observable[90-0]",
|
| 755 |
+
"eval.tests.test_surface_rasterization.test_backfacing_triangle_is_culled_by_default",
|
| 756 |
+
"eval.tests.test_surface_rasterization.test_backfacing_triangle_renders_after_flip[-F]",
|
| 757 |
+
"eval.tests.test_surface_rasterization.test_backfacing_triangle_renders_after_flip[-Z]",
|
| 758 |
+
"eval.tests.test_surface_rasterization.test_combined_flags_render_consistently",
|
| 759 |
+
"eval.tests.test_surface_rasterization.test_distinct_flag_combos_render_distinct_frames[oldest0-newest0]",
|
| 760 |
+
"eval.tests.test_surface_rasterization.test_distinct_flag_combos_render_distinct_frames[oldest1-newest1]",
|
| 761 |
+
"eval.tests.test_surface_rasterization.test_distinct_flag_combos_render_distinct_frames[oldest2-newest2]",
|
| 762 |
+
"eval.tests.test_surface_rasterization.test_distinct_flag_combos_render_distinct_frames[oldest3-newest3]",
|
| 763 |
+
"eval.tests.test_surface_rasterization.test_distinct_flag_combos_render_distinct_frames[oldest4-newest4]",
|
| 764 |
+
"eval.tests.test_surface_rasterization.test_large_surface_rasterizes_fully[120-40]",
|
| 765 |
+
"eval.tests.test_surface_rasterization.test_large_surface_rasterizes_fully[150-60]",
|
| 766 |
+
"eval.tests.test_surface_rasterization.test_large_surface_rasterizes_fully[16-8]",
|
| 767 |
+
"eval.tests.test_surface_rasterization.test_large_surface_rasterizes_fully[40-60]",
|
| 768 |
+
"eval.tests.test_surface_rasterization.test_minimal_triangle_fills_region",
|
| 769 |
+
"eval.tests.test_surface_rasterization.test_models_render_at_multiple_zooms[box-in-box.obj]",
|
| 770 |
+
"eval.tests.test_surface_rasterization.test_models_render_at_multiple_zooms[non-convex.obj]",
|
| 771 |
+
"eval.tests.test_surface_rasterization.test_models_render_at_multiple_zooms[shiba-inu.obj]",
|
| 772 |
+
"eval.tests.test_surface_rasterization.test_nonconvex_face_fills_completely",
|
| 773 |
+
"eval.tests.test_surface_rasterization.test_nonidentity_axismaps_change_render[-XZY]",
|
| 774 |
+
"eval.tests.test_surface_rasterization.test_nonidentity_axismaps_change_render[-YXZ]",
|
| 775 |
+
"eval.tests.test_surface_rasterization.test_nonidentity_axismaps_change_render[-YZX]",
|
| 776 |
+
"eval.tests.test_surface_rasterization.test_nonidentity_axismaps_change_render[-ZXY]",
|
| 777 |
+
"eval.tests.test_surface_rasterization.test_nonidentity_axismaps_change_render[-ZYX]",
|
| 778 |
+
"eval.tests.test_surface_rasterization.test_rotation_across_full_azimuth_never_crashes[box-in-box.obj]",
|
| 779 |
+
"eval.tests.test_surface_rasterization.test_rotation_across_full_azimuth_never_crashes[fox.obj]",
|
| 780 |
+
"eval.tests.test_surface_rasterization.test_rotation_across_full_azimuth_never_crashes[non-convex.obj]",
|
| 781 |
+
"eval.tests.test_surface_rasterization.test_rotation_angles_produce_mostly_distinct_frames",
|
| 782 |
+
"eval.tests.test_surface_rasterization.test_static_light_changes_frame",
|
| 783 |
+
"eval.tests.test_surface_rasterization.test_stretch_keeps_grid_shape[-s]",
|
| 784 |
+
"eval.tests.test_surface_rasterization.test_xyz_default_orientation_is_noop",
|
| 785 |
+
"eval.tests.test_surface_rasterization.test_zoom_extremes_still_rasterize[box-in-box.obj-1000]",
|
| 786 |
+
"eval.tests.test_surface_rasterization.test_zoom_extremes_still_rasterize[box-in-box.obj-40]",
|
| 787 |
+
"eval.tests.test_surface_rasterization.test_zoom_extremes_still_rasterize[fox.obj-1500]",
|
| 788 |
+
"eval.tests.test_surface_rasterization.test_zoom_extremes_still_rasterize[fox.obj-20]",
|
| 789 |
+
"eval.tests.test_surface_rasterization.test_zoom_extremes_still_rasterize[non-convex.obj-60]",
|
| 790 |
+
"eval.tests.test_surface_rasterization.test_zoom_extremes_still_rasterize[shiba-inu.obj-500]",
|
| 791 |
+
"eval.tests.test_surface_rasterization.test_zoom_range_renders_without_crash[1000]",
|
| 792 |
+
"eval.tests.test_surface_rasterization.test_zoom_range_renders_without_crash[100]",
|
| 793 |
+
"eval.tests.test_surface_rasterization.test_zoom_range_renders_without_crash[200]",
|
| 794 |
+
"eval.tests.test_surface_rasterization.test_zoom_range_renders_without_crash[300]",
|
| 795 |
+
"eval.tests.test_surface_rasterization.test_zoom_range_renders_without_crash[30]",
|
| 796 |
+
"eval.tests.test_surface_rasterization.test_zoom_range_renders_without_crash[50]",
|
| 797 |
+
"eval.tests.test_surface_rasterization.test_zoom_scales_filled_pixels",
|
| 798 |
+
"eval.tests.test_surface_tui.test_auto_mode_renders_more_than_one_frame_for_duration",
|
| 799 |
+
"eval.tests.test_surface_tui.test_interactive_clean_exit_leaves_alt_screen",
|
| 800 |
+
"eval.tests.test_surface_tui.test_interactive_quit_key_terminates",
|
| 801 |
+
"eval.tests.test_surface_tui.test_interactive_zoom_keys_change_screen_state[+]",
|
| 802 |
+
"eval.tests.test_surface_tui.test_interactive_zoom_keys_change_screen_state[-]",
|
| 803 |
+
"eval.tests.test_surface_tui.test_tui_finite_duration_exits_cleanly",
|
| 804 |
+
"eval.tests.test_surface_tui.test_tui_lum_chars_change_rendered_frames",
|
| 805 |
+
"eval.tests.test_surface_tui.test_tui_mode_runs_and_enters_alt_screen[mode_flag0]",
|
| 806 |
+
"eval.tests.test_surface_tui.test_tui_mode_runs_and_enters_alt_screen[mode_flag1]",
|
| 807 |
+
"eval.tests.test_surface_tui.test_tui_zoom_alters_screen_state"
|
| 808 |
+
]
|
| 809 |
+
}
|
| 810 |
+
},
|
| 811 |
+
"commit": "d122eb600e58d79ced65ec20eb49a56fcdcf5693",
|
| 812 |
+
"data_source": "synthetic_programgym",
|
| 813 |
+
"difficulty": "easy",
|
| 814 |
+
"difficulty_score": 1.3571722577230334,
|
| 815 |
+
"eval_clean_hashes": [
|
| 816 |
+
"dd2c37f29f6817270063e209df791f156ae5a5b06bea34686f92d5c8e2ea97f0"
|
| 817 |
+
],
|
| 818 |
+
"input_record": {
|
| 819 |
+
"commit": "d122eb600e58d79ced65ec20eb49a56fcdcf5693",
|
| 820 |
+
"commits": 85,
|
| 821 |
+
"contributors": 3,
|
| 822 |
+
"difficulty": "easy",
|
| 823 |
+
"difficulty_code_lines": 2276,
|
| 824 |
+
"difficulty_has_tests": false,
|
| 825 |
+
"difficulty_product_code_lines": 2276,
|
| 826 |
+
"difficulty_runtime_deps": 0,
|
| 827 |
+
"difficulty_score": 1.3571722577230334,
|
| 828 |
+
"difficulty_test_code_lines": 0,
|
| 829 |
+
"full_name": "autopawn/3d-ascii-viewer",
|
| 830 |
+
"github_stars": 241,
|
| 831 |
+
"input_joern_zip": "c_joern/autopawn__3d-ascii-viewer.zip",
|
| 832 |
+
"joern_status": true,
|
| 833 |
+
"joern_time": 3.0508516050176695,
|
| 834 |
+
"language": "c",
|
| 835 |
+
"pb_match": [
|
| 836 |
+
{
|
| 837 |
+
"pb_fullname": "jqlang/jq",
|
| 838 |
+
"rank": 486,
|
| 839 |
+
"similarity": 0.379340261220932
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"pb_fullname": "doxygen/doxygen",
|
| 843 |
+
"rank": 910,
|
| 844 |
+
"similarity": 0.4127739667892456
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"pb_fullname": "abishekvashok/cmatrix",
|
| 848 |
+
"rank": 211,
|
| 849 |
+
"similarity": 0.5292565226554871
|
| 850 |
+
},
|
| 851 |
+
{
|
| 852 |
+
"pb_fullname": "cslarsen/jp2a",
|
| 853 |
+
"rank": 8,
|
| 854 |
+
"similarity": 0.5846302509307861
|
| 855 |
+
},
|
| 856 |
+
{
|
| 857 |
+
"pb_fullname": "jarun/nnn",
|
| 858 |
+
"rank": 874,
|
| 859 |
+
"similarity": 0.4748835861682892
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"pb_fullname": "FFmpeg/FFmpeg",
|
| 863 |
+
"rank": 957,
|
| 864 |
+
"similarity": 0.45748138427734375
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"pb_fullname": "cmatsuoka/figlet",
|
| 868 |
+
"rank": 15,
|
| 869 |
+
"similarity": 0.599073588848114
|
| 870 |
+
},
|
| 871 |
+
{
|
| 872 |
+
"pb_fullname": "lh3/seqtk",
|
| 873 |
+
"rank": 666,
|
| 874 |
+
"similarity": 0.391068696975708
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"pb_fullname": "hpjansson/chafa",
|
| 878 |
+
"rank": 38,
|
| 879 |
+
"similarity": 0.5613910555839539
|
| 880 |
+
},
|
| 881 |
+
{
|
| 882 |
+
"pb_fullname": "tukaani-project/xz",
|
| 883 |
+
"rank": 937,
|
| 884 |
+
"similarity": 0.41473039984703064
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"pb_fullname": "zevv/duc",
|
| 888 |
+
"rank": 377,
|
| 889 |
+
"similarity": 0.4813724756240845
|
| 890 |
+
}
|
| 891 |
+
],
|
| 892 |
+
"repo_age": 3.47,
|
| 893 |
+
"repo_path": "c/autopawn__3d-ascii-viewer",
|
| 894 |
+
"source": "commit:d122eb600e58d79ced65ec20eb49a56fcdcf5693",
|
| 895 |
+
"status": "done",
|
| 896 |
+
"url": "https://github.com/autopawn/3d-ascii-viewer"
|
| 897 |
+
},
|
| 898 |
+
"instance_id": "autopawn__3d-ascii-viewer.d122eb6",
|
| 899 |
+
"language": "c",
|
| 900 |
+
"module_iterations": [
|
| 901 |
+
{
|
| 902 |
+
"actual_iterations": 5,
|
| 903 |
+
"branch_name": "generated_module_01",
|
| 904 |
+
"iteration_limit": 5,
|
| 905 |
+
"module_index": 1,
|
| 906 |
+
"module_kind": "source",
|
| 907 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"actual_iterations": 2,
|
| 911 |
+
"branch_name": "generated_module_02",
|
| 912 |
+
"iteration_limit": 5,
|
| 913 |
+
"module_index": 2,
|
| 914 |
+
"module_kind": "source",
|
| 915 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"actual_iterations": 3,
|
| 919 |
+
"branch_name": "generated_module_03",
|
| 920 |
+
"iteration_limit": 5,
|
| 921 |
+
"module_index": 3,
|
| 922 |
+
"module_kind": "source",
|
| 923 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 924 |
+
},
|
| 925 |
+
{
|
| 926 |
+
"actual_iterations": 3,
|
| 927 |
+
"branch_name": "generated_module_04",
|
| 928 |
+
"iteration_limit": 5,
|
| 929 |
+
"module_index": 4,
|
| 930 |
+
"module_kind": "source",
|
| 931 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 932 |
+
}
|
| 933 |
+
],
|
| 934 |
+
"repository": "autopawn/3d-ascii-viewer"
|
| 935 |
+
}
|
autopawn--3d-ascii-viewer.d122eb/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
|
autopawn--3d-ascii-viewer.d122eb/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c500517adab42ee27c8314566bb729a7818f62a008837eeae39cf5fb18658040
|
| 3 |
+
size 14753
|
autotag-dev--autotag.d0176cb/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
|
autotag-dev--autotag.d0176cb/environment/download.sh
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Manually recovered and independently validated ProgramGym build contract.
|
| 3 |
+
set -euo pipefail
|
| 4 |
+
mkdir -p /workspace/.programgym_build_env/go-prefetch
|
| 5 |
+
export GOTOOLCHAIN=auto
|
| 6 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PB_MANUAL_GO_MOD_EOF'
|
| 7 |
+
module github.com/autotag-dev/autotag
|
| 8 |
+
|
| 9 |
+
go 1.24.0
|
| 10 |
+
|
| 11 |
+
require (
|
| 12 |
+
github.com/alecthomas/assert/v2 v2.11.0
|
| 13 |
+
github.com/gogs/git-module v1.8.5
|
| 14 |
+
github.com/hashicorp/go-version v1.8.0
|
| 15 |
+
github.com/jessevdk/go-flags v1.6.1
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
require (
|
| 19 |
+
github.com/alecthomas/repr v0.4.0 // indirect
|
| 20 |
+
github.com/hexops/gotextdiff v1.0.3 // indirect
|
| 21 |
+
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 // indirect
|
| 22 |
+
golang.org/x/sys v0.21.0 // indirect
|
| 23 |
+
)
|
| 24 |
+
PB_MANUAL_GO_MOD_EOF
|
| 25 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PB_MANUAL_GO_SUM_EOF'
|
| 26 |
+
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
|
| 27 |
+
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
| 28 |
+
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
|
| 29 |
+
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
| 30 |
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
| 31 |
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
| 32 |
+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
| 33 |
+
github.com/gogs/git-module v1.8.4 h1:oSt8sOL4NWOGrSo/CwbS+C4YXtk76QvxyPofem/ViTU=
|
| 34 |
+
github.com/gogs/git-module v1.8.4/go.mod h1:bQY0aoMK5Q5+NKgy4jXe3K1GFW+GnsSk0SJK0jh6yD0=
|
| 35 |
+
github.com/gogs/git-module v1.8.5 h1:+H1KWQYqdQcbwso6ip5r6EaqQHjUwc9eCnyQ/0v3Q5k=
|
| 36 |
+
github.com/gogs/git-module v1.8.5/go.mod h1:WwWjbU0HQJgQUimNcUHxT06zFEHkb/KC9Vx7Xdxa3Ag=
|
| 37 |
+
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
|
| 38 |
+
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
| 39 |
+
github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4=
|
| 40 |
+
github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
| 41 |
+
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
| 42 |
+
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
|
| 43 |
+
github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4=
|
| 44 |
+
github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc=
|
| 45 |
+
github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo=
|
| 46 |
+
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 h1:YocNLcTBdEdvY3iDK6jfWXvEaM5OCKkjxPKoJRdB3Gg=
|
| 47 |
+
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo=
|
| 48 |
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
| 49 |
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
| 50 |
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
| 51 |
+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
| 52 |
+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
| 53 |
+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
| 54 |
+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
| 55 |
+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
| 56 |
+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
| 57 |
+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
| 58 |
+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
| 59 |
+
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
|
| 60 |
+
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
| 61 |
+
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
| 62 |
+
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
| 63 |
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
| 64 |
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
| 65 |
+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
| 66 |
+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
| 67 |
+
PB_MANUAL_GO_SUM_EOF
|
| 68 |
+
cd /workspace/.programgym_build_env/go-prefetch
|
| 69 |
+
PB_RECOVERY_GOROOT="$(go env GOROOT)"
|
| 70 |
+
mkdir -p /opt/programgym-go-toolchain
|
| 71 |
+
cp -a "$PB_RECOVERY_GOROOT/." /opt/programgym-go-toolchain/
|
| 72 |
+
export GOROOT=/opt/programgym-go-toolchain
|
| 73 |
+
export PATH="$GOROOT/bin:$PATH"
|
| 74 |
+
export GOTOOLCHAIN=local
|
| 75 |
+
go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all
|
autotag-dev--autotag.d0176cb/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dec2950aed6fd2d1d83c8c90a488240b3d93e1b7b182103fa90a091532573963
|
| 3 |
+
size 6223374
|
autotag-dev--autotag.d0176cb/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
|
autotag-dev--autotag.d0176cb/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:224f18892f4c7e8511df2a7376da5e230ae05fb1e66668453ec325e20f9e19b4
|
| 3 |
+
size 5025
|
autotag-dev--autotag.d0176cb/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
|
autotag-dev--autotag.d0176cb/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
|