Datasets:
Add dataset patchers and remove redundant CrossCodeEval image manifest
Browse filesKeep image references embedded in task Parquets. Include required SWE-Lego repair assets and Scale SWE exclusion inputs so their patchers remain reproducible. Existing task payloads, archives and cached images are unchanged.
- EndlessTerminals_environment-reliable/patch.py +1746 -0
- bugsinpy-original_environment-reliable/patch.py +0 -0
- crosscodeeval_environment-reliable/images.json +0 -0
- crosscodeeval_environment-reliable/patch.py +1438 -0
- scaleswe_environment-reliable/archived_tasks.json +0 -0
- scaleswe_environment-reliable/patch.py +1489 -0
- swelego-real-data-verified_environment-reliable/assets/Leap_Second.dat +41 -0
- swelego-real-data-verified_environment-reliable/assets/base-environments.json +0 -0
- swelego-real-data-verified_environment-reliable/assets/build-backends.json +0 -0
- swelego-real-data-verified_environment-reliable/assets/conda-explicit-lock.json +0 -0
- swelego-real-data-verified_environment-reliable/assets/environment-repairs.json +296 -0
- swelego-real-data-verified_environment-reliable/assets/f5_test_imports.py +44 -0
- swelego-real-data-verified_environment-reliable/assets/sdss_verifier_clock.py +22 -0
- swelego-real-data-verified_environment-reliable/assets/setup.sh +67 -0
- swelego-real-data-verified_environment-reliable/assets/swelego_pytrakt_clock.py +19 -0
- swelego-real-data-verified_environment-reliable/assets/swelego_rope_workers.py +14 -0
- swelego-real-data-verified_environment-reliable/assets/swelego_rpyc_affinity.py +29 -0
- swelego-real-data-verified_environment-reliable/assets/swelego_sqlglot_workers.py +19 -0
- swelego-real-data-verified_environment-reliable/assets/swelego_sympy_pytest.py +9 -0
- swelego-real-data-verified_environment-reliable/assets/wheel-cache.json +1473 -0
- swelego-real-data-verified_environment-reliable/patch.py +0 -0
EndlessTerminals_environment-reliable/patch.py
ADDED
|
@@ -0,0 +1,1746 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Preserve ET build recipes while lowering Docker syntax for Harbor Apptainer.
|
| 2 |
+
|
| 3 |
+
Task transformations, pilot selection and read-only state probes live here.
|
| 4 |
+
Reviewed finite entrypoint initialization runs through task setup; dependencies stay in images.
|
| 5 |
+
No package unions. Source-bound oracle resource/pip repairs preserve verifier assertions.
|
| 6 |
+
"""
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
import argparse
|
| 10 |
+
import asyncio
|
| 11 |
+
import base64
|
| 12 |
+
import collections
|
| 13 |
+
import copy
|
| 14 |
+
import hashlib
|
| 15 |
+
import io
|
| 16 |
+
import json
|
| 17 |
+
import os
|
| 18 |
+
from pathlib import Path, PurePosixPath
|
| 19 |
+
import posixpath
|
| 20 |
+
import re
|
| 21 |
+
import shlex
|
| 22 |
+
import subprocess
|
| 23 |
+
import sys
|
| 24 |
+
import tarfile
|
| 25 |
+
import tomllib
|
| 26 |
+
|
| 27 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
| 28 |
+
|
| 29 |
+
REVISION = '26ecf78458e7f756e4d06780d5fbf3dd78e91815'
|
| 30 |
+
SOURCE_SHA256 = '9b4d72b139e235aa64335b6a4b2511b7e710864e0f48b4e6669d2a689ca65490'
|
| 31 |
+
VERSION = 'et-apptainer-build-v6'
|
| 32 |
+
STATIC_VERSION = 'et-static-repairs-v2'
|
| 33 |
+
JSONSCHEMA_SOURCE_SHA256 = '14d0e5189ed8001724d4eaaee202ee56b3c40299d38a13b6d5319b7d532cc8af'
|
| 34 |
+
PIN_REPAIRS = json.loads(r'''{
|
| 35 |
+
"evidence": [
|
| 36 |
+
"pilot-validation/submissions/1941f174284d/evidence.tar.gz",
|
| 37 |
+
"pin-followup-validation/submissions/0ca6f3556148/evidence.tar.gz",
|
| 38 |
+
"final-pilot-validation/submissions/865a72be0dbc/evidence.tar.gz"
|
| 39 |
+
],
|
| 40 |
+
"requirement": "reward-1 oracle followed by freeze --all; normal stage-4 rerun after generated pins",
|
| 41 |
+
"tasks": {
|
| 42 |
+
"task_000000_047019b5": {
|
| 43 |
+
"script_sha256": "cde44e3f0def2f6d66ee2a14dc87c2711ee46aa2e2642fe3f25c6e907388b1ae",
|
| 44 |
+
"edits": [
|
| 45 |
+
{
|
| 46 |
+
"requirement": "wheel",
|
| 47 |
+
"start": 316,
|
| 48 |
+
"end": 321,
|
| 49 |
+
"original": "wheel",
|
| 50 |
+
"file": "solution/solve.sh",
|
| 51 |
+
"replacement": "wheel==0.48.0"
|
| 52 |
+
}
|
| 53 |
+
]
|
| 54 |
+
},
|
| 55 |
+
"task_000000_3e17389f": {
|
| 56 |
+
"script_sha256": "92a66f5cbf881225bf2bde56c499cedbebdcfbee73e42df764c6691f564741a4",
|
| 57 |
+
"edits": [
|
| 58 |
+
{
|
| 59 |
+
"requirement": "pip",
|
| 60 |
+
"start": 3771,
|
| 61 |
+
"end": 3774,
|
| 62 |
+
"original": "pip",
|
| 63 |
+
"file": "solution/solve.sh",
|
| 64 |
+
"replacement": "pip==26.2.1"
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"requirement": "setuptools",
|
| 68 |
+
"start": 3775,
|
| 69 |
+
"end": 3785,
|
| 70 |
+
"original": "setuptools",
|
| 71 |
+
"file": "solution/solve.sh",
|
| 72 |
+
"replacement": "setuptools==84.0.0"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"requirement": "wheel",
|
| 76 |
+
"start": 3786,
|
| 77 |
+
"end": 3791,
|
| 78 |
+
"original": "wheel",
|
| 79 |
+
"file": "solution/solve.sh",
|
| 80 |
+
"replacement": "wheel==0.48.0"
|
| 81 |
+
}
|
| 82 |
+
]
|
| 83 |
+
},
|
| 84 |
+
"task_000000_9aa135c8": {
|
| 85 |
+
"script_sha256": "2dd3485a8ab55ba0d3609ee1acca470c2d2132ae7db305e461814aae423e73c8",
|
| 86 |
+
"edits": [
|
| 87 |
+
{
|
| 88 |
+
"requirement": "pip",
|
| 89 |
+
"start": 484,
|
| 90 |
+
"end": 487,
|
| 91 |
+
"original": "pip",
|
| 92 |
+
"file": "solution/solve.sh",
|
| 93 |
+
"replacement": "pip==26.2.1"
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"requirement": "setuptools",
|
| 97 |
+
"start": 488,
|
| 98 |
+
"end": 498,
|
| 99 |
+
"original": "setuptools",
|
| 100 |
+
"file": "solution/solve.sh",
|
| 101 |
+
"replacement": "setuptools==84.0.0"
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"requirement": "requests",
|
| 105 |
+
"start": 843,
|
| 106 |
+
"end": 851,
|
| 107 |
+
"original": "requests",
|
| 108 |
+
"file": "solution/solve.sh",
|
| 109 |
+
"replacement": "requests==2.34.2"
|
| 110 |
+
}
|
| 111 |
+
]
|
| 112 |
+
},
|
| 113 |
+
"task_000000_f4935f25": {
|
| 114 |
+
"script_sha256": "8286b9a57a6f152794b826a0bc3cb696a7d0938f0469997cfbe46efee6196156",
|
| 115 |
+
"edits": [
|
| 116 |
+
{
|
| 117 |
+
"requirement": "pulp",
|
| 118 |
+
"start": 65,
|
| 119 |
+
"end": 69,
|
| 120 |
+
"original": "pulp",
|
| 121 |
+
"file": "solution/solve.sh",
|
| 122 |
+
"replacement": "pulp==3.3.2"
|
| 123 |
+
}
|
| 124 |
+
]
|
| 125 |
+
},
|
| 126 |
+
"task_000000_1bb9cf9f": {
|
| 127 |
+
"script_sha256": "0ea7ab1b42e698d0add1e0053c257cb20571f19b7d2385d56cbf9e3152c1d226",
|
| 128 |
+
"edits": [
|
| 129 |
+
{
|
| 130 |
+
"requirement": "psutil",
|
| 131 |
+
"start": 1380,
|
| 132 |
+
"end": 1386,
|
| 133 |
+
"original": "psutil",
|
| 134 |
+
"file": "solution/solve.sh",
|
| 135 |
+
"replacement": "psutil==7.2.2"
|
| 136 |
+
}
|
| 137 |
+
]
|
| 138 |
+
},
|
| 139 |
+
"task_000000_ce45e6d1": {
|
| 140 |
+
"script_sha256": "da0c7278bdaaa13680cc53b7ce1ca6aba7b36f7539068844bf016cf575737e41",
|
| 141 |
+
"edits": [
|
| 142 |
+
{
|
| 143 |
+
"requirement": "pandas",
|
| 144 |
+
"start": 142,
|
| 145 |
+
"end": 148,
|
| 146 |
+
"original": "pandas",
|
| 147 |
+
"file": "solution/solve.sh",
|
| 148 |
+
"replacement": "pandas==2.3.3"
|
| 149 |
+
},
|
| 150 |
+
{
|
| 151 |
+
"requirement": "boto3",
|
| 152 |
+
"start": 149,
|
| 153 |
+
"end": 154,
|
| 154 |
+
"original": "boto3",
|
| 155 |
+
"file": "solution/solve.sh",
|
| 156 |
+
"replacement": "boto3==1.43.114"
|
| 157 |
+
}
|
| 158 |
+
]
|
| 159 |
+
},
|
| 160 |
+
"task_000000_efb4f0f7": {
|
| 161 |
+
"script_sha256": "85e83e999fb64cf7fcc6a15168be78aad684415c7a870fc0229ea1c87a08c606",
|
| 162 |
+
"edits": [
|
| 163 |
+
{
|
| 164 |
+
"requirement": "ping3",
|
| 165 |
+
"start": 191,
|
| 166 |
+
"end": 196,
|
| 167 |
+
"original": "ping3",
|
| 168 |
+
"file": "solution/solve.sh",
|
| 169 |
+
"replacement": "ping3==5.1.6"
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"requirement": "ping3",
|
| 173 |
+
"start": 1975,
|
| 174 |
+
"end": 1980,
|
| 175 |
+
"original": "ping3",
|
| 176 |
+
"file": "solution/solve.sh",
|
| 177 |
+
"replacement": "ping3==5.1.6"
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"requirement": "ping3",
|
| 181 |
+
"start": 3987,
|
| 182 |
+
"end": 3992,
|
| 183 |
+
"original": "ping3",
|
| 184 |
+
"file": "solution/solve.sh",
|
| 185 |
+
"replacement": "ping3==5.1.6"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"requirement": "ping3",
|
| 189 |
+
"start": 8612,
|
| 190 |
+
"end": 8617,
|
| 191 |
+
"original": "ping3",
|
| 192 |
+
"file": "solution/solve.sh",
|
| 193 |
+
"replacement": "ping3==5.1.6"
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"requirement": "ping3",
|
| 197 |
+
"start": 9146,
|
| 198 |
+
"end": 9151,
|
| 199 |
+
"original": "ping3",
|
| 200 |
+
"file": "solution/solve.sh",
|
| 201 |
+
"replacement": "ping3==5.1.6"
|
| 202 |
+
}
|
| 203 |
+
]
|
| 204 |
+
},
|
| 205 |
+
"task_000000_b5807114": {
|
| 206 |
+
"script_sha256": "14d0e5189ed8001724d4eaaee202ee56b3c40299d38a13b6d5319b7d532cc8af",
|
| 207 |
+
"edits": [
|
| 208 |
+
{
|
| 209 |
+
"requirement": "jsonschema",
|
| 210 |
+
"start": 852,
|
| 211 |
+
"end": 862,
|
| 212 |
+
"original": "jsonschema",
|
| 213 |
+
"file": "solution/solve.sh",
|
| 214 |
+
"replacement": "jsonschema==4.26.0"
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"requirement": "jsonschema",
|
| 218 |
+
"start": 3051,
|
| 219 |
+
"end": 3061,
|
| 220 |
+
"original": "jsonschema",
|
| 221 |
+
"file": "solution/solve.sh",
|
| 222 |
+
"replacement": "jsonschema==4.26.0"
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"requirement": "jsonschema",
|
| 226 |
+
"start": 5492,
|
| 227 |
+
"end": 5502,
|
| 228 |
+
"original": "jsonschema",
|
| 229 |
+
"file": "solution/solve.sh",
|
| 230 |
+
"replacement": "jsonschema==4.26.0"
|
| 231 |
+
}
|
| 232 |
+
]
|
| 233 |
+
}
|
| 234 |
+
}
|
| 235 |
+
}''')
|
| 236 |
+
# These are source-bound solution edits. They change resource selection only,
|
| 237 |
+
# preserving the commands which produce and verify the task's requested outputs.
|
| 238 |
+
CPU_REPAIRS = {
|
| 239 |
+
'task_000000_0b92c5c3': '8985fce1b8097c9bde8c2e44f53b91ac477932586f7178f6307624927fd80928',
|
| 240 |
+
'task_000000_27030ede': 'dc43dba54353cb7e997c80f815007136cee815bd89870eacf5cb8278b0e9d8fd',
|
| 241 |
+
'task_000000_b3ae7cf7': '4acc4b9d5212c5b4b03ead5e11f71761a804078ece9ca05b23fede475d0aabe6',
|
| 242 |
+
'task_000000_bffd5dd1': '0e13aa67639020670aa7cc5bad61b9ab9550bacaec229f61b7fbf989990871d2',
|
| 243 |
+
'task_000000_bc9c5a3e': 'f1df4fc2b9bb50808d832b113a7cfbe6b99ae33b0b28f9e8aeaea74e00f1993c',
|
| 244 |
+
}
|
| 245 |
+
REVIEWED_EXCLUSIONS = {
|
| 246 |
+
'task_000000_9719b9f3': {
|
| 247 |
+
'source_sha256': 'ab1c146763ad2acd0476342110a1c053db29157853f4cb8a5106b2ff4c7b949f',
|
| 248 |
+
'category': 'reference-solution-integrity',
|
| 249 |
+
'reason': ('The source oracle installs an empty yaml.py as PyYAML 5.4.1. The recorded oracle '
|
| 250 |
+
'trajectory executes this replacement and still receives reward 1. It does not '
|
| 251 |
+
'satisfy the instruction to install the actual PyYAML package; version-only grading '
|
| 252 |
+
'accepts a placeholder. Retain the original task in the archive for verifier/reference repair.'),
|
| 253 |
+
},
|
| 254 |
+
'task_000000_bc9c5a3e': {
|
| 255 |
+
'source_sha256': '6d68d66fb8a8b71e098ea0648200f211fab0d9c841c758bb3119b3f715f153f9',
|
| 256 |
+
'category': 'reference-solution-reward-zero',
|
| 257 |
+
'reason': ('On the tested Helma/Apptainer profile, exactly five ICMP requests to 8.8.8.8 '
|
| 258 |
+
'produce no latency sample. Both original and CPU-repaired references score 0: '
|
| 259 |
+
'the latency field is empty and the summary JSON is invalid. This is a '
|
| 260 |
+
'profile-specific exclusion, not a claim that the task is universally unsolvable.'),
|
| 261 |
+
},
|
| 262 |
+
}
|
| 263 |
+
BASE_PATH = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
| 264 |
+
OPS = set('FROM RUN ENV WORKDIR USER LABEL CMD ENTRYPOINT'.split())
|
| 265 |
+
CACHE_TARGETS = {'/var/cache/apt', '/var/lib/apt', '/root/.cache/pip'}
|
| 266 |
+
WORKDIR_BASE_ROOT = '/home'
|
| 267 |
+
VERIFIER_VERSION = 'et-offline-verifier-v1'
|
| 268 |
+
ORIGINAL_TEST_SH_SHA256 = '52d87e5cb768634d6a7bda203b72ea77c802fdb9e8700d3d7cdcf631080c3298'
|
| 269 |
+
REVIEWED_REPAIRS = json.loads(r'''{
|
| 270 |
+
"instructions": {
|
| 271 |
+
"task_000000_3a08bb12": {
|
| 272 |
+
"description_sha256": "0a129d48079da193c54a51abfc1e27f7e3aa42909712c816cb98306f185d7ed3",
|
| 273 |
+
"instruction_sha256": "a5bf7db83bbb192cbd1dad89129970caa07bf5b8d899fa04b418ea57088493fd"
|
| 274 |
+
},
|
| 275 |
+
"task_000000_84d4748a": {
|
| 276 |
+
"description_sha256": "861cdd02b2e583ae5efc110327f61556f72e7360fe7254d07e7c13b60d4c08d0",
|
| 277 |
+
"instruction_sha256": "75e295224630da03eab1acd79e624c1344e1d0809eb8915b6784430dfbc53e45"
|
| 278 |
+
},
|
| 279 |
+
"task_000000_c40b78a6": {
|
| 280 |
+
"description_sha256": "99faf2ba1dbcb1feccd02aba3071bc4a1881adaf5ef424d7021b00ebfa8a7703",
|
| 281 |
+
"instruction_sha256": "83a83a509eec61b4c7658820983e8d3dc6d4016e9491ca35bac09b286da55662"
|
| 282 |
+
},
|
| 283 |
+
"task_000000_e24cd12d": {
|
| 284 |
+
"description_sha256": "acb37e963b3ee578144105f5f588506d063b129ee3b76c0b0dcffc75ec3c8b8f",
|
| 285 |
+
"instruction_sha256": "365c16bea2fa4ca234db867960f18b81bec1501b55d59f1c5f7fca2c69351516"
|
| 286 |
+
},
|
| 287 |
+
"task_000000_e9aac96e": {
|
| 288 |
+
"description_sha256": "72ee9078822892887fae1a2c74fb95fbfe633a7cf28dc6bdb0de8ded889cb0b4",
|
| 289 |
+
"instruction_sha256": "8d39c133ecfd197c4083d60fb61fe0e212556ff638675a953c7488711f6c33aa"
|
| 290 |
+
}
|
| 291 |
+
},
|
| 292 |
+
"revision": "26ecf78458e7f756e4d06780d5fbf3dd78e91815",
|
| 293 |
+
"timestamps": {
|
| 294 |
+
"task_000000_44c20928": {
|
| 295 |
+
"commands": [
|
| 296 |
+
{
|
| 297 |
+
"cwd": "/",
|
| 298 |
+
"env": {
|
| 299 |
+
"HOME": "/root",
|
| 300 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 301 |
+
},
|
| 302 |
+
"script": "BASE=/home/user/storage && touch -d \"3 days ago\" ${BASE}/incoming/project1/keep.txt && touch -d \"2 days ago\" ${BASE}/incoming/project1/large.bak && touch -d \"15 days ago\" ${BASE}/incoming/project1/old.txt && touch -d \"12 days ago\" ${BASE}/incoming/project2/archive.txt && touch -d \"1 day ago\" ${BASE}/incoming/project2/temp2.bak",
|
| 303 |
+
"source_line": 13
|
| 304 |
+
}
|
| 305 |
+
],
|
| 306 |
+
"source_sha256": "0831fe61449aad85038dba7f925b93b116f1004942521fcd90aea6efe64547fe"
|
| 307 |
+
},
|
| 308 |
+
"task_000000_5cc0f6f2": {
|
| 309 |
+
"commands": [
|
| 310 |
+
{
|
| 311 |
+
"cwd": "/",
|
| 312 |
+
"env": {
|
| 313 |
+
"HOME": "/root",
|
| 314 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 315 |
+
},
|
| 316 |
+
"script": "OLD_TIMESTAMP=\"202001010000\" && touch -m -d '1 day ago' /home/user/audit_targets/webserver/newhttpd.conf && touch -m -d '1 day ago' /home/user/audit_targets/app/settings/recent.conf",
|
| 317 |
+
"source_line": 58
|
| 318 |
+
}
|
| 319 |
+
],
|
| 320 |
+
"source_sha256": "6018318699692c694629f159c8b82a5c26ccdff6463acdcb4837d9f16218175f"
|
| 321 |
+
},
|
| 322 |
+
"task_000000_6723c42c": {
|
| 323 |
+
"commands": [
|
| 324 |
+
{
|
| 325 |
+
"cwd": "/",
|
| 326 |
+
"env": {
|
| 327 |
+
"HOME": "/root",
|
| 328 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 329 |
+
},
|
| 330 |
+
"script": "touch -d \"1 hour ago\" /home/user/app/logs/serviceA.log",
|
| 331 |
+
"source_line": 19
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"cwd": "/",
|
| 335 |
+
"env": {
|
| 336 |
+
"HOME": "/root",
|
| 337 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 338 |
+
},
|
| 339 |
+
"script": "touch -d \"25 hours ago\" /home/user/app/logs/serviceB.log",
|
| 340 |
+
"source_line": 23
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"cwd": "/",
|
| 344 |
+
"env": {
|
| 345 |
+
"HOME": "/root",
|
| 346 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 347 |
+
},
|
| 348 |
+
"script": "touch -d \"9 days ago\" /home/user/app/logs/old/serviceC.log",
|
| 349 |
+
"source_line": 27
|
| 350 |
+
}
|
| 351 |
+
],
|
| 352 |
+
"source_sha256": "63f73cf6fd9eaf323291477c17d62c747986d2175a218195a9895d4cdd10e4ad"
|
| 353 |
+
},
|
| 354 |
+
"task_000000_87d17935": {
|
| 355 |
+
"commands": [
|
| 356 |
+
{
|
| 357 |
+
"cwd": "/",
|
| 358 |
+
"env": {
|
| 359 |
+
"HOME": "/root",
|
| 360 |
+
"PATH": "/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 361 |
+
},
|
| 362 |
+
"script": "TEN_DAYS_AGO=$(date -d '10 days ago' '+%Y%m%d%H%M.%S') && touch -t \"$TEN_DAYS_AGO\" /home/user/experiments/exp_alpha && touch -t \"$TEN_DAYS_AGO\" /home/user/experiments/exp_alpha/model.bin && touch -t \"$TEN_DAYS_AGO\" /home/user/experiments/exp_beta && touch -t \"$TEN_DAYS_AGO\" /home/user/experiments/exp_beta/model.chk && touch -t \"$TEN_DAYS_AGO\" /home/user/experiments/exp_gamma && touch -t \"$TEN_DAYS_AGO\" /home/user/experiments/exp_gamma/metrics.json",
|
| 363 |
+
"source_line": 39
|
| 364 |
+
}
|
| 365 |
+
],
|
| 366 |
+
"source_sha256": "77435bfa229063d1a7054961f1667d2b236c606c4c163b3693a9307d12c75b7d"
|
| 367 |
+
},
|
| 368 |
+
"task_000000_9ba2b0a3": {
|
| 369 |
+
"commands": [
|
| 370 |
+
{
|
| 371 |
+
"cwd": "/",
|
| 372 |
+
"env": {
|
| 373 |
+
"HOME": "/root",
|
| 374 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 375 |
+
},
|
| 376 |
+
"script": "touch -d '3 days ago' /home/user/apps/logs/app1.log && touch -d '3 days ago' /home/user/apps/logs/app2.log && touch -d '5 days ago' /home/user/apps/logs/old/old.log",
|
| 377 |
+
"source_line": 21
|
| 378 |
+
}
|
| 379 |
+
],
|
| 380 |
+
"source_sha256": "8d52db4d19f8e2df563d6eab03d5d3edbb0fd979262bd2fe0d1e38e8dd12c45d"
|
| 381 |
+
},
|
| 382 |
+
"task_000000_aac3d4dd": {
|
| 383 |
+
"commands": [
|
| 384 |
+
{
|
| 385 |
+
"cwd": "/",
|
| 386 |
+
"env": {
|
| 387 |
+
"HOME": "/root",
|
| 388 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 389 |
+
},
|
| 390 |
+
"script": "touch -d \"30 days ago\" /home/user/projects/microservices/serviceA/scripts/deploy.sh && touch -d \"20 days ago\" /home/user/projects/microservices/serviceB/scripts/restart.sh && touch -d \"91 days ago\" /home/user/projects/microservices/serviceC/scripts/cleanup.sh",
|
| 391 |
+
"source_line": 69
|
| 392 |
+
}
|
| 393 |
+
],
|
| 394 |
+
"source_sha256": "bd898e6a7c435932b701ff9e7007c1db81ee98294f8fbb887b0a98359054a240"
|
| 395 |
+
},
|
| 396 |
+
"task_000000_c0d576aa": {
|
| 397 |
+
"commands": [
|
| 398 |
+
{
|
| 399 |
+
"cwd": "/",
|
| 400 |
+
"env": {
|
| 401 |
+
"HOME": "/root",
|
| 402 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 403 |
+
},
|
| 404 |
+
"script": "touch -d \"10 days ago\" /home/user/repositories/repoA/nested/sample-archive.tar.gz && touch -d \"20 days ago\" /home/user/repositories/repoB/data-1.1.tar.gz",
|
| 405 |
+
"source_line": 39
|
| 406 |
+
}
|
| 407 |
+
],
|
| 408 |
+
"source_sha256": "29227f37b8fe593d13830d74382262900e2c008e405897f72e1f5fa139e15d42"
|
| 409 |
+
},
|
| 410 |
+
"task_000000_d314a7d5": {
|
| 411 |
+
"commands": [
|
| 412 |
+
{
|
| 413 |
+
"cwd": "/",
|
| 414 |
+
"env": {
|
| 415 |
+
"DEBIAN_FRONTEND": "noninteractive",
|
| 416 |
+
"HOME": "/root",
|
| 417 |
+
"PATH": "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
| 418 |
+
"PYTHONIOENCODING": "utf-8"
|
| 419 |
+
},
|
| 420 |
+
"script": "touch -d \"2 days ago\" /home/user/db/queries/daily/report.sql && touch -d \"10 days ago\" /home/user/db/queries/archive/old_report.sql && touch -d \"10 days ago\" /home/user/db/queries/maintenance/cleanup.sql",
|
| 421 |
+
"source_line": 48
|
| 422 |
+
}
|
| 423 |
+
],
|
| 424 |
+
"source_sha256": "0957ec33c28b59295ec76e9433f3d658beaf855d23600b6f812fc6157389f59e"
|
| 425 |
+
},
|
| 426 |
+
"task_000000_d3ad8877": {
|
| 427 |
+
"commands": [
|
| 428 |
+
{
|
| 429 |
+
"cwd": "/",
|
| 430 |
+
"env": {
|
| 431 |
+
"HOME": "/root",
|
| 432 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 433 |
+
},
|
| 434 |
+
"script": "touch -d '2 days ago' /home/user/configs/nginx/nginx.conf && touch -d '2 days ago' /home/user/configs/nginx/sites-available/default.conf && touch -d '2 days ago' /home/user/configs/app/app.conf && touch -d '2 days ago' /home/user/configs/app/db/database.conf && touch -d '90 days ago' /home/user/configs/obsolete/old.conf",
|
| 435 |
+
"source_line": 41
|
| 436 |
+
}
|
| 437 |
+
],
|
| 438 |
+
"source_sha256": "c2ff26b4d8a9625e68dd55b388abd5d1b7a4fd3c7c666985bd254b4f8419833b"
|
| 439 |
+
},
|
| 440 |
+
"task_000000_da9fb171": {
|
| 441 |
+
"commands": [
|
| 442 |
+
{
|
| 443 |
+
"cwd": "/",
|
| 444 |
+
"env": {
|
| 445 |
+
"HOME": "/root",
|
| 446 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 447 |
+
},
|
| 448 |
+
"script": "touch -d \"$(date -d '10 days ago')\" /home/user/mobile-build/logs/build-20230901.log && touch -d \"$(date -d '9 days ago')\" /home/user/mobile-build/logs/test-20230902.log",
|
| 449 |
+
"source_line": 32
|
| 450 |
+
}
|
| 451 |
+
],
|
| 452 |
+
"source_sha256": "96d5741a2be65d6207ac7f6f6d40b182e1d851995a458bfc7bf50074a5f3dbdd"
|
| 453 |
+
},
|
| 454 |
+
"task_000000_fba47f66": {
|
| 455 |
+
"commands": [
|
| 456 |
+
{
|
| 457 |
+
"cwd": "/",
|
| 458 |
+
"env": {
|
| 459 |
+
"HOME": "/root",
|
| 460 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 461 |
+
},
|
| 462 |
+
"script": "BASE=/home/user/workspace && BUILDS=${BASE}/builds && ARTIFACTS=${BUILDS}/artifacts && ARCHIVE=${BUILDS}/archive && touch -d '10 days ago' \"${ARTIFACTS}/app-core-1.0.0.jar\" \"${ARTIFACTS}/app-core-1.1.0.jar\" \"${ARTIFACTS}/lib-util-2.0.0.jar\"",
|
| 463 |
+
"source_line": 26
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"cwd": "/",
|
| 467 |
+
"env": {
|
| 468 |
+
"HOME": "/root",
|
| 469 |
+
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 470 |
+
},
|
| 471 |
+
"script": "touch -d '1 hour ago' /home/user/workspace/builds/artifacts/fresh-feature-9999.jar /home/user/workspace/builds/artifacts/README.txt",
|
| 472 |
+
"source_line": 53
|
| 473 |
+
}
|
| 474 |
+
],
|
| 475 |
+
"source_sha256": "68ddfd6a2462f3437a12099fd93c1f38c529fd1a0240e43c39a7852f587b40f6"
|
| 476 |
+
}
|
| 477 |
+
}
|
| 478 |
+
}''')
|
| 479 |
+
# Directory timestamp replay in 87d17935 regressed the archive oracle in the
|
| 480 |
+
# Apptainer pilot. All of its fixtures already exceed the seven-day cutoff.
|
| 481 |
+
# Keep its reviewed source record above, but do not apply the runtime refresh.
|
| 482 |
+
WITHHELD_TIMESTAMP_REPAIRS = {'task_000000_87d17935': 'directory timestamp refresh regressed the oracle pilot'}
|
| 483 |
+
for withheld in WITHHELD_TIMESTAMP_REPAIRS:
|
| 484 |
+
REVIEWED_REPAIRS['timestamps'].pop(withheld)
|
| 485 |
+
|
| 486 |
+
VERIFIER_INSTALL = (
|
| 487 |
+
'/usr/bin/python3 -m pip install --no-cache-dir --target /opt/et-verifier/uv uv==0.9.5 && '
|
| 488 |
+
'UV_PYTHON_PREFERENCE=only-managed UV_PYTHON_INSTALL_DIR=/opt/et-verifier/python '
|
| 489 |
+
'/opt/et-verifier/uv/bin/uv venv --no-cache --python 3.12 /opt/et-verifier/venv && '
|
| 490 |
+
'/opt/et-verifier/uv/bin/uv pip install --no-cache --python '
|
| 491 |
+
'/opt/et-verifier/venv/bin/python pytest==8.4.1 && '
|
| 492 |
+
'/bin/rm -rf /opt/et-verifier/uv && /bin/chmod -R a+rX /opt/et-verifier\n')
|
| 493 |
+
OFFLINE_TEST_SH = b'''#!/bin/bash
|
| 494 |
+
# et-offline-verifier-v1: same isolated Python/pytest; no grading-time downloads.
|
| 495 |
+
mkdir -p /logs/verifier || exit $?
|
| 496 |
+
rm -f /logs/verifier/reward.txt /logs/verifier/reward.json || exit $?
|
| 497 |
+
cd /home/user || exit $?
|
| 498 |
+
export PATH="/opt/et-verifier/venv/bin:$PATH"
|
| 499 |
+
/opt/et-verifier/venv/bin/pytest /tests/test_final_state.py -v
|
| 500 |
+
rc=$?
|
| 501 |
+
rm -f /logs/verifier/reward.txt /logs/verifier/reward.json || exit $?
|
| 502 |
+
case "$rc" in
|
| 503 |
+
0) echo 1 > /logs/verifier/reward.txt ;;
|
| 504 |
+
1) echo 0 > /logs/verifier/reward.txt ;;
|
| 505 |
+
*) echo "VERIFIER_ERROR pytest_exit=$rc" >&2; exit "$rc" ;;
|
| 506 |
+
esac
|
| 507 |
+
'''
|
| 508 |
+
PILOT = (
|
| 509 |
+
'task_000000_0033979a', # Quoted heredoc, file contents and modes.
|
| 510 |
+
'task_000000_12ddbd87', # FROM text inside a heredoc.
|
| 511 |
+
'task_000000_54d91f57', # All three BuildKit caches, mixed RUN.
|
| 512 |
+
'task_000000_31275728', # Changing WORKDIRs, git initialization.
|
| 513 |
+
'task_000000_16a4ec74', # Arithmetic expansion unsupported by the prior AST parser.
|
| 514 |
+
'task_000000_25cc9764', # PYTHONUSERBASE and explicit runtime cwd.
|
| 515 |
+
'task_000000_bed13ee1', # su, numeric ownership, SQLite initialization.
|
| 516 |
+
'task_000000_13fbab8c', # Explicit non-root USER, retained runtime limitation.
|
| 517 |
+
'task_000000_c6317e51', # Dummy curl package, preserve package and executable.
|
| 518 |
+
'task_000000_155368e9', # Exact pip version control.
|
| 519 |
+
)
|
| 520 |
+
# Reviewed finite entrypoints, bound to complete source Dockerfile bytes.
|
| 521 |
+
# Run their initialization with /bin/true as the payload instead of a long-lived shell.
|
| 522 |
+
STARTUP_REPAIRS = {
|
| 523 |
+
'task_000000_0119f5d7': '9321c4079e1f8ed8ae6dc7176143d5a37ef2cd3eb1f6cff060b5856e992bdeaa',
|
| 524 |
+
'task_000000_089a919e': '24898e7507f4290b6d5ddf171f1c80cdd3eb9f12794685a3d00f911c6b3d496a',
|
| 525 |
+
'task_000000_1925b899': '88674712612d4764d4eb6506911d546104d303b34b4852255f3187144e89dcc6',
|
| 526 |
+
'task_000000_4c58315f': '4cb548b2e208d87130ff3146744f2cca30f2ff21be6a60d3f35cbe65099391e8',
|
| 527 |
+
'task_000000_c66c3f8e': '54f837cadacae997f63503989e6d57556a9d84ee9ce4b53b934208e306adc978',
|
| 528 |
+
'task_000000_da9fb171': '96d5741a2be65d6207ac7f6f6d40b182e1d851995a458bfc7bf50074a5f3dbdd',
|
| 529 |
+
}
|
| 530 |
+
STARTUP_PILOT = tuple(STARTUP_REPAIRS)
|
| 531 |
+
|
| 532 |
+
# Reviewed directly against the pinned sample Dockerfiles, not their verifiers.
|
| 533 |
+
# These checks complement general observations, which cannot infer arbitrary
|
| 534 |
+
# shell/interpreter effects from static path matches.
|
| 535 |
+
PILOT_STATE = {
|
| 536 |
+
'task_000000_0119f5d7': {'/home/user': {'mode': '0o755', 'uid': 0, 'gid': 0}},
|
| 537 |
+
'task_000000_1925b899': {'/home/user': {'mode': '0o755', 'uid': 0, 'gid': 0}},
|
| 538 |
+
'task_000000_089a919e': {
|
| 539 |
+
'/home/user': {'mode': '0o755', 'uid': 0, 'gid': 0},
|
| 540 |
+
**{f'/home/user/cloud_costs/raw_costs_{month}.csv': {
|
| 541 |
+
'mode': '0o644', 'uid': 0, 'gid': 0,
|
| 542 |
+
'sha256': hashlib.sha256(b'cloud_costs_placeholder\n').hexdigest(),
|
| 543 |
+
} for month in ('Jan', 'Feb', 'Mar')},
|
| 544 |
+
'/home/user/cloud_costs/quarterly_2023_Q1': {'absent': True},
|
| 545 |
+
'/home/user/cloud_costs/permission_changes.log': {'absent': True},
|
| 546 |
+
},
|
| 547 |
+
'task_000000_0033979a': {
|
| 548 |
+
'/home/user': {'mode': '0o777', 'uid': 0, 'gid': 0},
|
| 549 |
+
'/home/user/insecure_config': {'mode': '0o755', 'uid': 0, 'gid': 0},
|
| 550 |
+
'/home/user/insecure_config/sshd_config': {'mode': '0o644', 'uid': 0, 'gid': 0},
|
| 551 |
+
},
|
| 552 |
+
'task_000000_bed13ee1': {
|
| 553 |
+
'/home/user': {'mode': '0o755', 'uid': 1000, 'gid': 1000},
|
| 554 |
+
'/home/user/pipelines': {'mode': '0o770', 'uid': 1000, 'gid': 1000},
|
| 555 |
+
'/home/user/pipelines/app_builds.db': {'mode': '0o660', 'uid': 1000, 'gid': 1000},
|
| 556 |
+
'/tmp/init_builds.sql': {'absent': True},
|
| 557 |
+
},
|
| 558 |
+
'task_000000_13fbab8c': {'/home/user': {'mode': '0o755', 'uid': 1000, 'gid': 1000}},
|
| 559 |
+
'task_000000_16a4ec74': {
|
| 560 |
+
'/home/user': {'mode': '0o755', 'uid': 0, 'gid': 0},
|
| 561 |
+
'/home/user/sample_db_data': {'mode': '0o755'},
|
| 562 |
+
'/home/user/sample_db_data/customers.csv': {
|
| 563 |
+
'mode': '0o755', 'sha256': hashlib.sha256(('id,name\n' + ''.join(
|
| 564 |
+
f'{i},Customer_{i}\n' for i in range(1, 50))).encode()).hexdigest()},
|
| 565 |
+
'/home/user/sample_db_data/orders.csv': {
|
| 566 |
+
'mode': '0o755', 'sha256': hashlib.sha256(('id,customer_id,total\n' + ''.join(
|
| 567 |
+
f'{i},{i % 49 + 1},{i * 10}\n' for i in range(1, 100))).encode()).hexdigest()},
|
| 568 |
+
'/home/user/sample_db_data/products.csv': {
|
| 569 |
+
'mode': '0o755', 'sha256': hashlib.sha256(('id,name,price\n' + ''.join(
|
| 570 |
+
f'{i},Product_{i},{i * 5}\n' for i in range(1, 30))).encode()).hexdigest()},
|
| 571 |
+
'/home/user/backup_benchmark': {'absent': True},
|
| 572 |
+
},
|
| 573 |
+
'task_000000_31275728': {
|
| 574 |
+
'/home/user': {'mode': '0o755', 'uid': 0, 'gid': 0},
|
| 575 |
+
'/home/user/projects/policy-docs/.git/HEAD': {
|
| 576 |
+
'sha256': hashlib.sha256(b'ref: refs/heads/master\n').hexdigest()},
|
| 577 |
+
'/home/user/projects/policy-docs/policy.md': {
|
| 578 |
+
'sha256': hashlib.sha256(b'# Company Security Policy\n\nThis repository contains security-related policies.\nPlease read carefully and follow all rules.\n\n').hexdigest()},
|
| 579 |
+
},
|
| 580 |
+
'task_000000_155368e9': {'/home/user': {'mode': '0o755', 'uid': 0, 'gid': 0}},
|
| 581 |
+
'task_000000_c6317e51': {
|
| 582 |
+
'/usr/bin/curl': {'link': '/bin/true', 'uid': 0, 'gid': 0},
|
| 583 |
+
'/home/user': {'mode': '0o777', 'uid': 0, 'gid': 0},
|
| 584 |
+
'/tmp/curlpkg': {'absent': True},
|
| 585 |
+
},
|
| 586 |
+
# Extra cleanup control, selected with prepare-pilot --task.
|
| 587 |
+
'task_000000_707e607e': {
|
| 588 |
+
'/tmp/auth.log.csv': {'absent': True},
|
| 589 |
+
'/tmp/network.log.csv': {'absent': True},
|
| 590 |
+
'/tmp/processes.json': {'absent': True},
|
| 591 |
+
'/home/user/ir_data/logs_bundle.zip': {'mode': '0o666', 'uid': 0, 'gid': 0},
|
| 592 |
+
},
|
| 593 |
+
}
|
| 594 |
+
|
| 595 |
+
|
| 596 |
+
def digest(data):
|
| 597 |
+
return hashlib.sha256(data).hexdigest()
|
| 598 |
+
|
| 599 |
+
|
| 600 |
+
def save(path, value):
|
| 601 |
+
path.write_text(json.dumps(value, indent=2, sort_keys=True) + '\n')
|
| 602 |
+
|
| 603 |
+
|
| 604 |
+
class Unsupported(ValueError):
|
| 605 |
+
"""Preserve and report source programs whose interpretation is unresolved."""
|
| 606 |
+
|
| 607 |
+
|
| 608 |
+
def heredocs(header):
|
| 609 |
+
"""Locate shell heredoc operators outside quotes, without parsing bodies."""
|
| 610 |
+
result, quote, index = [], None, 0
|
| 611 |
+
while index < len(header):
|
| 612 |
+
char = header[index]
|
| 613 |
+
if char == '\\' and quote != "'":
|
| 614 |
+
index += 2
|
| 615 |
+
continue
|
| 616 |
+
if quote:
|
| 617 |
+
if char == quote:
|
| 618 |
+
quote = None
|
| 619 |
+
index += 1
|
| 620 |
+
continue
|
| 621 |
+
if char in "'\"":
|
| 622 |
+
quote = char
|
| 623 |
+
index += 1
|
| 624 |
+
continue
|
| 625 |
+
if char == '#' and (index == 0 or header[index - 1].isspace()):
|
| 626 |
+
break
|
| 627 |
+
if header.startswith('<<<', index):
|
| 628 |
+
raise Unsupported('RUN uses a here-string outside the supported Docker /bin/sh grammar')
|
| 629 |
+
if header.startswith('<<', index):
|
| 630 |
+
match = re.match(r'''<<(?P<tabs>-?)\s*(?P<q>['"]?)(?P<name>[A-Za-z_][A-Za-z0-9_.-]*)(?P=q)(?=\s|[;&|<>]|$)''', header[index:])
|
| 631 |
+
if not match:
|
| 632 |
+
raise Unsupported('Unrecognized heredoc delimiter')
|
| 633 |
+
result.append({'delimiter': match['name'], 'strip_tabs': bool(match['tabs']),
|
| 634 |
+
'quoted': bool(match['q'])})
|
| 635 |
+
index += len(match[0])
|
| 636 |
+
continue
|
| 637 |
+
index += 1
|
| 638 |
+
return result
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
def parse_dockerfile(text):
|
| 642 |
+
"""Consume complete instructions before interpreting any directive."""
|
| 643 |
+
lines, index, result = text.splitlines(keepends=True), 0, []
|
| 644 |
+
while index < len(lines):
|
| 645 |
+
start = index
|
| 646 |
+
line = lines[index].rstrip('\r\n')
|
| 647 |
+
index += 1
|
| 648 |
+
if not line.strip() or line.lstrip().startswith('#'):
|
| 649 |
+
if line.lower().lstrip().startswith('# escape=') and not line.endswith('\\'):
|
| 650 |
+
raise Unsupported('Non-default Docker escape directive')
|
| 651 |
+
continue
|
| 652 |
+
parts = [line]
|
| 653 |
+
while parts[-1].rstrip().endswith('\\'):
|
| 654 |
+
parts[-1] = parts[-1].rstrip()[:-1]
|
| 655 |
+
while index < len(lines):
|
| 656 |
+
following = lines[index].rstrip('\r\n')
|
| 657 |
+
index += 1
|
| 658 |
+
if following.strip() and not following.lstrip().startswith('#'):
|
| 659 |
+
break
|
| 660 |
+
else:
|
| 661 |
+
raise Unsupported('Dangling Docker continuation')
|
| 662 |
+
parts.append(following)
|
| 663 |
+
header = ''.join(parts).strip()
|
| 664 |
+
match = re.fullmatch(r'([A-Za-z]+)(?:\s+(.*))?', header)
|
| 665 |
+
if not match or match[1].upper() not in OPS:
|
| 666 |
+
raise Unsupported(f'Unsupported Docker instruction at line {start + 1}: {header[:100]}')
|
| 667 |
+
op, value = match[1].upper(), match[2] or ''
|
| 668 |
+
docs, tail = heredocs(value) if op == 'RUN' else [], []
|
| 669 |
+
for doc in docs:
|
| 670 |
+
body = []
|
| 671 |
+
while index < len(lines):
|
| 672 |
+
raw = lines[index]
|
| 673 |
+
index += 1
|
| 674 |
+
tail.append(raw)
|
| 675 |
+
check = raw.rstrip('\r\n')
|
| 676 |
+
if doc['strip_tabs']:
|
| 677 |
+
check = check.lstrip('\t')
|
| 678 |
+
if check == doc['delimiter']:
|
| 679 |
+
break
|
| 680 |
+
body.append(raw)
|
| 681 |
+
else:
|
| 682 |
+
raise Unsupported('Unclosed heredoc: ' + doc['delimiter'])
|
| 683 |
+
doc['body'] = ''.join(body)
|
| 684 |
+
result.append({'op': op, 'value': value, 'line': start + 1,
|
| 685 |
+
'raw': ''.join(lines[start:index]), 'tail': ''.join(tail), 'heredocs': docs})
|
| 686 |
+
if not result or result[0]['op'] != 'FROM' or sum(i['op'] == 'FROM' for i in result) != 1:
|
| 687 |
+
raise Unsupported('Expected exactly one initial FROM')
|
| 688 |
+
if result[0]['value'] != 'ubuntu:22.04':
|
| 689 |
+
raise Unsupported('Only the pinned ET Ubuntu 22.04 source is supported')
|
| 690 |
+
return result
|
| 691 |
+
|
| 692 |
+
|
| 693 |
+
def docker_words(value, env):
|
| 694 |
+
"""Docker ENV quoting/expansion, with no shell evaluation or command substitution.
|
| 695 |
+
|
| 696 |
+
The ET source uses simple $name/${name}; other parameter operators fail closed.
|
| 697 |
+
All assignments in one ENV instruction expand against the preceding environment.
|
| 698 |
+
"""
|
| 699 |
+
words, word, quote, index, active = [], '', None, 0, False
|
| 700 |
+
while index < len(value):
|
| 701 |
+
char = value[index]
|
| 702 |
+
if char == '\\' and quote != "'":
|
| 703 |
+
index += 1
|
| 704 |
+
if index == len(value):
|
| 705 |
+
raise Unsupported('Trailing ENV escape')
|
| 706 |
+
word += value[index]
|
| 707 |
+
active = True
|
| 708 |
+
elif char in "'\"" and (quote is None or char == quote):
|
| 709 |
+
quote = None if quote else char
|
| 710 |
+
active = True
|
| 711 |
+
elif char.isspace() and quote is None:
|
| 712 |
+
if active:
|
| 713 |
+
words.append(word)
|
| 714 |
+
word, active = '', False
|
| 715 |
+
elif char == '$' and quote != "'":
|
| 716 |
+
match = re.match(r'\$(?:\{([A-Za-z_][A-Za-z0-9_]*)\}|([A-Za-z_][A-Za-z0-9_]*))', value[index:])
|
| 717 |
+
if match:
|
| 718 |
+
word += env.get(match[1] or match[2], '')
|
| 719 |
+
index += len(match[0]) - 1
|
| 720 |
+
elif value[index:index + 2] == '${':
|
| 721 |
+
raise Unsupported('Unsupported Docker variable expansion')
|
| 722 |
+
else:
|
| 723 |
+
word += char # Docker ENV does not evaluate $(commands).
|
| 724 |
+
active = True
|
| 725 |
+
else:
|
| 726 |
+
word += char
|
| 727 |
+
active = True
|
| 728 |
+
index += 1
|
| 729 |
+
if quote:
|
| 730 |
+
raise Unsupported('Unclosed Docker quote')
|
| 731 |
+
if active:
|
| 732 |
+
words.append(word)
|
| 733 |
+
return words
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
def shell_command(script, env, cwd, keys):
|
| 737 |
+
"""Transport complete shell bytes through the line-oriented converter.
|
| 738 |
+
|
| 739 |
+
RUN shells remain separate. env -u prevents final Docker ENV settings being
|
| 740 |
+
injected into earlier RUNs by the existing builder. Never add shell -e to the
|
| 741 |
+
source program: a source RUN's own final exit status determines success.
|
| 742 |
+
"""
|
| 743 |
+
encoded = base64.b64encode(script.encode()).decode()
|
| 744 |
+
assignments = ['-u ' + shlex.quote(key) for key in sorted(keys)]
|
| 745 |
+
assignments += [shlex.quote(key + '=' + value) for key, value in sorted(env.items())]
|
| 746 |
+
return (f'cd {shlex.quote(cwd)} && /usr/bin/env ' + ' '.join(assignments)
|
| 747 |
+
+ ' /bin/sh -c "$(/usr/bin/printf %s ' + encoded + ' | /usr/bin/base64 -d)"')
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def cache_script(command, targets, root):
|
| 751 |
+
"""Emulate the three observed disposable cache mounts within one image build.
|
| 752 |
+
|
| 753 |
+
Cache contents persist across mounted RUNs, but underlying image directories
|
| 754 |
+
are restored after each RUN. In particular, never delete /var/lib/apt wholesale
|
| 755 |
+
as a substitute for unmounting it. No shared/host cache is used.
|
| 756 |
+
"""
|
| 757 |
+
lines = ['set -eu']
|
| 758 |
+
for index, target in enumerate(targets):
|
| 759 |
+
key = digest(target.encode())[:16]
|
| 760 |
+
cache, backup = f'{root}/{key}.cache', f'{root}/{key}.original'
|
| 761 |
+
q, c, b = map(shlex.quote, (target, cache, backup))
|
| 762 |
+
lines += [f'test ! -L {q}', f'mkdir -p {shlex.quote(root)} {shlex.quote(posixpath.dirname(target))}',
|
| 763 |
+
f'if test -e {q}; then test -d {q}; mv {q} {b}; fi',
|
| 764 |
+
f'if test -d {c}; then mv {c} {q}; else mkdir -m 0755 {q}; fi']
|
| 765 |
+
lines += ['set +e', '/bin/sh -c ' + shlex.quote(command), 'et_status=$?', 'set -e']
|
| 766 |
+
for target in reversed(targets):
|
| 767 |
+
key = digest(target.encode())[:16]
|
| 768 |
+
q, c, b = map(shlex.quote, (target, f'{root}/{key}.cache', f'{root}/{key}.original'))
|
| 769 |
+
lines += [f'if test -d {q}; then mv {q} {c}; fi',
|
| 770 |
+
f'if test -d {b}; then mv {b} {q}; else mkdir -p {q}; fi']
|
| 771 |
+
lines.append('exit "$et_status"')
|
| 772 |
+
return '\n'.join(lines) + '\n'
|
| 773 |
+
|
| 774 |
+
|
| 775 |
+
def split_mounts(value):
|
| 776 |
+
targets = []
|
| 777 |
+
while value.startswith('--'):
|
| 778 |
+
option, separator, value = value.partition(' ')
|
| 779 |
+
if not separator or not option.startswith('--mount='):
|
| 780 |
+
raise Unsupported('Unsupported RUN option: ' + option)
|
| 781 |
+
pairs = [part.split('=', 1) for part in option[8:].split(',')]
|
| 782 |
+
if any(len(pair) != 2 for pair in pairs):
|
| 783 |
+
raise Unsupported('Unsupported cache mount option')
|
| 784 |
+
spec = dict(pairs)
|
| 785 |
+
target = spec.get('target')
|
| 786 |
+
if (len(spec) != len(pairs) or spec.get('type') != 'cache' or target not in CACHE_TARGETS
|
| 787 |
+
or set(spec) - {'type', 'target', 'sharing'}
|
| 788 |
+
or spec.get('sharing', 'shared') not in ('locked', 'shared') or target in targets):
|
| 789 |
+
raise Unsupported('Unreviewed mount: ' + option)
|
| 790 |
+
targets.append(target)
|
| 791 |
+
value = value.lstrip()
|
| 792 |
+
return value, targets
|
| 793 |
+
|
| 794 |
+
|
| 795 |
+
def compile_dockerfile(text):
|
| 796 |
+
instructions = parse_dockerfile(text)
|
| 797 |
+
env, cwd, user = {'PATH': BASE_PATH}, '/', 'root'
|
| 798 |
+
keys = {'PATH', 'HOME'}
|
| 799 |
+
for item in instructions:
|
| 800 |
+
if item['op'] == 'ENV':
|
| 801 |
+
for token in shlex.split(item['value']):
|
| 802 |
+
key = token.partition('=')[0]
|
| 803 |
+
if not re.fullmatch(r'[A-Za-z_][A-Za-z0-9_]*', key) or '=' not in token:
|
| 804 |
+
raise Unsupported('Only ENV key=value syntax is supported')
|
| 805 |
+
keys.add(key)
|
| 806 |
+
output = ['# ' + VERSION, 'FROM ubuntu:22.04']
|
| 807 |
+
details = {'version': VERSION, 'runs': [], 'cache_mounts': [], 'source_sha256': digest(text.encode()),
|
| 808 |
+
'runtime_review': [], 'literal_files': {}, 'probe_paths': ['/home/user']}
|
| 809 |
+
cache_root = '/var/tmp/.ot-et-cache-' + details['source_sha256'][:20]
|
| 810 |
+
if cache_root in text:
|
| 811 |
+
raise Unsupported('Generated cache path collides with source')
|
| 812 |
+
for item in instructions[1:]:
|
| 813 |
+
op, value = item['op'], item['value']
|
| 814 |
+
if op == 'RUN':
|
| 815 |
+
if user not in ('root', '0'):
|
| 816 |
+
raise Unsupported('Build-time USER requires a supported identity mapping')
|
| 817 |
+
command, targets = split_mounts(value)
|
| 818 |
+
if command.startswith(('[', '<<')):
|
| 819 |
+
raise Unsupported('Unsupported RUN exec or standalone heredoc form')
|
| 820 |
+
script = command + ('\n' + item['tail'] if item['tail'] else '')
|
| 821 |
+
for path in list(details['literal_files']):
|
| 822 |
+
# A later command may remove or replace a parent directory,
|
| 823 |
+
# without naming the literal fixture itself (dummy curl does).
|
| 824 |
+
references = [path, *(str(p) for p in PurePosixPath(path).parents if str(p) != '/')]
|
| 825 |
+
references += [relative for ref in list(references)
|
| 826 |
+
if (relative := posixpath.relpath(ref, cwd)) not in ('.', '..')]
|
| 827 |
+
if (any(ref in script for ref in references)
|
| 828 |
+
and not re.fullmatch(r'\s*(?:(?:chmod|chown|chgrp)\b[^;&|]*\s*(?:&&\s*)?)+', command)):
|
| 829 |
+
del details['literal_files'][path]
|
| 830 |
+
syntax = subprocess.run(['/bin/sh', '-n'], input=script, text=True, capture_output=True)
|
| 831 |
+
if syntax.returncode:
|
| 832 |
+
raise Unsupported(f'Original RUN shell syntax at line {item["line"]}: {syntax.stderr.strip()}')
|
| 833 |
+
run_env = {'HOME': '/root', **env}
|
| 834 |
+
lowered = shell_command(script, run_env, cwd, keys)
|
| 835 |
+
if targets:
|
| 836 |
+
lowered = shell_command(cache_script(lowered, targets, cache_root),
|
| 837 |
+
{'PATH': BASE_PATH, 'HOME': '/root'}, '/', keys)
|
| 838 |
+
details['cache_mounts'].append({'line': item['line'], 'targets': targets})
|
| 839 |
+
output.append("RUN /usr/bin/printf 'ET_RUN source-line=%s\\n' " + str(item['line'])
|
| 840 |
+
+ ' >&2 && ' + lowered)
|
| 841 |
+
details['runs'].append({'line': item['line'], 'script': script, 'script_sha256': digest(script.encode()),
|
| 842 |
+
'cwd': cwd, 'env': dict(env), 'heredocs': len(item['heredocs'])})
|
| 843 |
+
# Literal quoted fixtures provide source-derived checks independent of the compiler.
|
| 844 |
+
match = re.fullmatch(r"cat\s*>\s*([A-Za-z0-9_./-]+)\s*<<(['\"])([A-Za-z0-9_.-]+)\2", command)
|
| 845 |
+
if match and len(item['heredocs']) == 1:
|
| 846 |
+
path = posixpath.normpath(posixpath.join(cwd, match[1]))
|
| 847 |
+
details['literal_files'][path] = digest(item['heredocs'][0]['body'].encode())
|
| 848 |
+
details['probe_paths'].append(path)
|
| 849 |
+
details['probe_paths'] += re.findall(r'(?<![A-Za-z0-9_./-])(/(?:home/user|tmp)(?:/[A-Za-z0-9_.-]+)+)', command)
|
| 850 |
+
elif op == 'ENV':
|
| 851 |
+
updated = dict(token.split('=', 1) for token in docker_words(value, env))
|
| 852 |
+
env.update(updated)
|
| 853 |
+
elif op == 'WORKDIR':
|
| 854 |
+
words = docker_words(value, env)
|
| 855 |
+
if len(words) != 1 or not words[0]:
|
| 856 |
+
raise Unsupported('Unresolved WORKDIR')
|
| 857 |
+
cwd = posixpath.normpath(posixpath.join(cwd, words[0]))
|
| 858 |
+
output.append('RUN ' + shell_command('mkdir -p ' + shlex.quote(cwd),
|
| 859 |
+
{'HOME': '/root', **env}, '/', keys))
|
| 860 |
+
elif op == 'USER':
|
| 861 |
+
words = docker_words(value, env)
|
| 862 |
+
if len(words) != 1:
|
| 863 |
+
raise Unsupported('Unresolved USER')
|
| 864 |
+
user = words[0]
|
| 865 |
+
output.append('USER ' + user)
|
| 866 |
+
details['runtime_review'].append('worker-ignores-USER')
|
| 867 |
+
elif op in ('CMD', 'ENTRYPOINT'):
|
| 868 |
+
# Preserve declarations. Exec-based Harbor startup does not implement them.
|
| 869 |
+
output.append(op + ' ' + value)
|
| 870 |
+
details['runtime_review'].append('startup-command-needs-review')
|
| 871 |
+
elif op == 'LABEL':
|
| 872 |
+
output.append(op + ' ' + value)
|
| 873 |
+
if details['cache_mounts']:
|
| 874 |
+
output.append('RUN /bin/rm -rf ' + shlex.quote(cache_root))
|
| 875 |
+
# Resolve ENV at the Docker instruction where it was declared, not via a
|
| 876 |
+
# later shell. Quoting is parsed by both Docker and the current shlex bridge.
|
| 877 |
+
for key, value in sorted(env.items()):
|
| 878 |
+
if '\n' in value or '\r' in value:
|
| 879 |
+
raise Unsupported('Multiline runtime ENV')
|
| 880 |
+
output.append(f'ENV {key}={shlex.quote(value)}')
|
| 881 |
+
output.append('WORKDIR ' + cwd)
|
| 882 |
+
undo = undo_precreated_workdir(cwd)
|
| 883 |
+
if undo:
|
| 884 |
+
output.insert(2, 'RUN ' + undo)
|
| 885 |
+
details['workdir_timing'] = {'final_cwd': cwd, 'undo': undo}
|
| 886 |
+
details['expected'] = {'cwd': cwd, 'user': user, 'env': env}
|
| 887 |
+
details['runtime_review'].append('worker-overrides-PATH')
|
| 888 |
+
if any(path.startswith('/tmp/') for path in details['probe_paths']):
|
| 889 |
+
details['runtime_review'].append('tmp-bind-may-mask-image-state')
|
| 890 |
+
details['runtime_review'] = sorted(set(details['runtime_review']))
|
| 891 |
+
details['probe_paths'] = sorted(set(details['probe_paths']))
|
| 892 |
+
details['status'] = 'build-recipe-patched-runtime-unvalidated'
|
| 893 |
+
return '\n'.join(output) + '\n', details
|
| 894 |
+
|
| 895 |
+
|
| 896 |
+
# Image sharing is a separate transformation over the original instructions.
|
| 897 |
+
# The compatibility compiler remains the fallback and the comparison baseline.
|
| 898 |
+
SHARING_VERSION = 'et-reviewed-recipes-v4'
|
| 899 |
+
SHARING_STATE_DIR = '/var/lib/ot-et-image-sharing-v2'
|
| 900 |
+
SOURCE_CONTEXT = {'container.def', 'task.json', 'test_initial_state.py'}
|
| 901 |
+
|
| 902 |
+
|
| 903 |
+
def undo_precreated_workdir(cwd):
|
| 904 |
+
"""Undo the builder's early mkdir only below the reviewed Ubuntu /home root.
|
| 905 |
+
|
| 906 |
+
rmdir never deletes files or nonempty directories. Source-position mkdir RUNs
|
| 907 |
+
recreate the directories before they are used. Other roots are not reviewed.
|
| 908 |
+
"""
|
| 909 |
+
if not cwd.startswith(WORKDIR_BASE_ROOT.rstrip('/') + '/'):
|
| 910 |
+
return None
|
| 911 |
+
paths = [str(p) for p in [PurePosixPath(cwd), *PurePosixPath(cwd).parents]
|
| 912 |
+
if str(p).startswith(WORKDIR_BASE_ROOT.rstrip('/') + '/')]
|
| 913 |
+
return '/bin/rmdir -- ' + ' '.join(map(shlex.quote, paths)) + ' 2>/dev/null || true'
|
| 914 |
+
|
| 915 |
+
|
| 916 |
+
def simple_command_prefix(value):
|
| 917 |
+
"""Read one flat && operand without interpreting quotes or substitutions.
|
| 918 |
+
|
| 919 |
+
Return its original bytes, remaining bytes, and whether shell operators make
|
| 920 |
+
it unsuitable for literal dependency normalization. The opaque initialization
|
| 921 |
+
suffix is never reconstructed from these tokens.
|
| 922 |
+
"""
|
| 923 |
+
quote, index, complex_shell = None, 0, False
|
| 924 |
+
while index < len(value):
|
| 925 |
+
char = value[index]
|
| 926 |
+
if char == '\\' and quote != "'":
|
| 927 |
+
index += 2
|
| 928 |
+
continue
|
| 929 |
+
if quote:
|
| 930 |
+
if char == quote:
|
| 931 |
+
quote = None
|
| 932 |
+
elif quote == '"' and char in '$`':
|
| 933 |
+
complex_shell = True
|
| 934 |
+
elif char in "'\"":
|
| 935 |
+
quote = char
|
| 936 |
+
elif value.startswith('&&', index):
|
| 937 |
+
return value[:index].strip(), value[index + 2:].lstrip(), complex_shell
|
| 938 |
+
elif char in '$`|;<>()[*?~\n#' or char == '&':
|
| 939 |
+
complex_shell = True
|
| 940 |
+
index += 1
|
| 941 |
+
return value.strip(), '', complex_shell or quote is not None
|
| 942 |
+
|
| 943 |
+
|
| 944 |
+
def normalize_apt_args(args):
|
| 945 |
+
"""Canonicalize a closed set of independent apt options, not package policy.
|
| 946 |
+
|
| 947 |
+
Unknown options, config overrides, combined short flags and interspersed
|
| 948 |
+
package/options retain their original argv. In particular, quiet level two
|
| 949 |
+
implies assume-yes during installation and must never be erased there.
|
| 950 |
+
"""
|
| 951 |
+
yes = {'-y', '--yes', '--assume-yes'}
|
| 952 |
+
quiet = {'-q', '--quiet'}
|
| 953 |
+
if args.count('update') == 1 and all(a == 'update' or a in yes | quiet for a in args):
|
| 954 |
+
return ['update']
|
| 955 |
+
allowed = yes | {'--no-install-recommends'}
|
| 956 |
+
flags, packages, action = [], [], False
|
| 957 |
+
for arg in args:
|
| 958 |
+
if arg == 'install' and not action and not packages:
|
| 959 |
+
action = True
|
| 960 |
+
elif arg in allowed and not packages:
|
| 961 |
+
flags.append('-y' if arg in yes else arg)
|
| 962 |
+
elif action and re.fullmatch(r'[a-z0-9][a-z0-9+.:=-]*', arg):
|
| 963 |
+
packages.append(arg)
|
| 964 |
+
else:
|
| 965 |
+
return args
|
| 966 |
+
if not action or not packages:
|
| 967 |
+
return args
|
| 968 |
+
# Keep package order, pins and duplicates; only independent boolean options
|
| 969 |
+
# move. Do not remove even duplicate flags, to keep the rule narrow.
|
| 970 |
+
return ['install', *sorted(flags, key=lambda flag: (flag != '-y', flag)), *packages]
|
| 971 |
+
|
| 972 |
+
|
| 973 |
+
def dependency_operand(value):
|
| 974 |
+
"""Normalize literal argv and reviewed apt options; preserve shell state."""
|
| 975 |
+
raw, rest, complex_shell = simple_command_prefix(value)
|
| 976 |
+
if re.fullmatch(r'rm\s+-(?:rf|fr)\s+/var/lib/apt/lists/\*', raw):
|
| 977 |
+
return {'command': 'rm -rf /var/lib/apt/lists/*', 'replay': False, 'installs': False, 'rest': rest}
|
| 978 |
+
if complex_shell:
|
| 979 |
+
return None
|
| 980 |
+
try:
|
| 981 |
+
words = shlex.split(raw)
|
| 982 |
+
except ValueError:
|
| 983 |
+
return None
|
| 984 |
+
if not words:
|
| 985 |
+
return None
|
| 986 |
+
assignments = []
|
| 987 |
+
while words and re.fullmatch(r'[A-Za-z_][A-Za-z0-9_]*=[^\s]*', words[0]):
|
| 988 |
+
assignments.append(words.pop(0))
|
| 989 |
+
if not words:
|
| 990 |
+
return None
|
| 991 |
+
command, args = words[0], words[1:]
|
| 992 |
+
replay, installs = False, False
|
| 993 |
+
if command == 'set':
|
| 994 |
+
if assignments or not args or any(not re.fullmatch(r'-[eux]+', arg) for arg in args):
|
| 995 |
+
return None
|
| 996 |
+
replay = True
|
| 997 |
+
elif command == 'export':
|
| 998 |
+
if assignments or not args or any(not re.fullmatch(r'[A-Za-z_][A-Za-z0-9_]*=.*', arg) for arg in args):
|
| 999 |
+
return None
|
| 1000 |
+
replay = True
|
| 1001 |
+
elif command in ('apt-get', 'apt'):
|
| 1002 |
+
if not args or not any(x in ('update', 'install', 'clean', 'autoclean') for x in args):
|
| 1003 |
+
return None
|
| 1004 |
+
if any(x in ('remove', 'purge', 'upgrade', 'dist-upgrade', 'autoremove') for x in args):
|
| 1005 |
+
return None
|
| 1006 |
+
installs = 'install' in args
|
| 1007 |
+
elif command in ('pip', 'pip3') or (command in ('python', 'python3') and args[:2] == ['-m', 'pip']):
|
| 1008 |
+
pip_args = args[2:] if command in ('python', 'python3') else args
|
| 1009 |
+
if not pip_args or pip_args[0] != 'install':
|
| 1010 |
+
return None
|
| 1011 |
+
# Relative/local requirements can depend on task state, unlike named packages.
|
| 1012 |
+
if any(x in ('-r', '--requirement', '-e', '--editable') or x.startswith(('.', '/', 'file:', 'git+'))
|
| 1013 |
+
or x.startswith(('-r', '--requirement=', '-e', '--editable=')) for x in pip_args[1:]):
|
| 1014 |
+
return None
|
| 1015 |
+
installs = True
|
| 1016 |
+
else:
|
| 1017 |
+
return None
|
| 1018 |
+
original = shlex.join([*assignments, command, *args])
|
| 1019 |
+
if command in ('apt-get', 'apt'):
|
| 1020 |
+
args = normalize_apt_args(args)
|
| 1021 |
+
normalized = shlex.join([*assignments, command, *args])
|
| 1022 |
+
return {'command': normalized, 'replay': replay, 'installs': installs, 'rest': rest,
|
| 1023 |
+
'normalization': {'source': original, 'normalized': normalized} if original != normalized else None}
|
| 1024 |
+
|
| 1025 |
+
|
| 1026 |
+
def dependency_records(prefix, context):
|
| 1027 |
+
"""Flatten successful literal && chains with their exact effective environment.
|
| 1028 |
+
|
| 1029 |
+
No command contains expansion/substitution. set -e/-u therefore adds no failure
|
| 1030 |
+
cases beyond a failing operand; set -x only affects build diagnostics. Explicit
|
| 1031 |
+
export and inline assignments are captured without leaking into another RUN.
|
| 1032 |
+
"""
|
| 1033 |
+
env = dict(context['env'])
|
| 1034 |
+
result = []
|
| 1035 |
+
for command in prefix:
|
| 1036 |
+
words = shlex.split(command)
|
| 1037 |
+
if words[0] == 'set':
|
| 1038 |
+
continue
|
| 1039 |
+
if words[0] == 'export':
|
| 1040 |
+
env.update(dict(word.split('=', 1) for word in words[1:]))
|
| 1041 |
+
continue
|
| 1042 |
+
local = {}
|
| 1043 |
+
while words and re.fullmatch(r'[A-Za-z_][A-Za-z0-9_]*=.*', words[0]):
|
| 1044 |
+
key, value = words.pop(0).split('=', 1)
|
| 1045 |
+
local[key] = value
|
| 1046 |
+
# Preserve the one reviewed glob; quoting it would disable expansion.
|
| 1047 |
+
program = command if words[:2] == ['rm', '-rf'] else shlex.join(words)
|
| 1048 |
+
result.append(dict(context, script=program, env={**env, **local}))
|
| 1049 |
+
return result
|
| 1050 |
+
|
| 1051 |
+
|
| 1052 |
+
def inert_startup(item):
|
| 1053 |
+
"""Only empty, bare-shell and literal diagnostic startup declarations."""
|
| 1054 |
+
value = item['value']
|
| 1055 |
+
try:
|
| 1056 |
+
argv = json.loads(value) if value.startswith('[') else shlex.split(value)
|
| 1057 |
+
except ValueError:
|
| 1058 |
+
return False
|
| 1059 |
+
if not isinstance(argv, list) or not all(isinstance(v, str) for v in argv):
|
| 1060 |
+
return False
|
| 1061 |
+
if not argv:
|
| 1062 |
+
return True
|
| 1063 |
+
if item['op'] == 'ENTRYPOINT':
|
| 1064 |
+
return False
|
| 1065 |
+
if argv[0] in ('bash', '/bin/bash', 'sh', '/bin/sh') and argv[1:] in ([], ['-l'], ['--login']):
|
| 1066 |
+
return True
|
| 1067 |
+
return (argv[0] in ('echo', '/bin/echo') and
|
| 1068 |
+
not any(any(c in word for c in '$`;&|<>\n') for word in argv[1:]))
|
| 1069 |
+
|
| 1070 |
+
|
| 1071 |
+
def initialization_plan(text, details, *, repaired_startup=False):
|
| 1072 |
+
"""Separate a literal dependency prefix from complete initialization programs.
|
| 1073 |
+
|
| 1074 |
+
A split inside RUN is restricted to flat && chains of literal installation,
|
| 1075 |
+
set and export operands. The remaining program is byte-preserved, with shell
|
| 1076 |
+
flags/exports replayed. No later installation or cache mount is moved to setup.
|
| 1077 |
+
Unresolved cases keep the compatibility-only task, with an individual reason.
|
| 1078 |
+
"""
|
| 1079 |
+
if details['expected']['user'] not in ('root', '0'):
|
| 1080 |
+
raise Unsupported('non-root USER retained in compatibility image')
|
| 1081 |
+
instructions = parse_dockerfile(text)
|
| 1082 |
+
for item in instructions:
|
| 1083 |
+
if item['op'] in ('CMD', 'ENTRYPOINT') and not (repaired_startup or inert_startup(item)):
|
| 1084 |
+
raise Unsupported('startup declaration needs sharing-specific review')
|
| 1085 |
+
keys = sorted(set(details['expected']['env']) | {'HOME', 'PATH'})
|
| 1086 |
+
run_by_line = {r['line']: r for r in details['runs']}
|
| 1087 |
+
env, cwd = {'PATH': BASE_PATH}, '/'
|
| 1088 |
+
build, setup, boundaries, normalizations = [], [], [], []
|
| 1089 |
+
phase, installed = 'build', False
|
| 1090 |
+
for item in instructions[1:]:
|
| 1091 |
+
op, value = item['op'], item['value']
|
| 1092 |
+
if op == 'ENV':
|
| 1093 |
+
env.update(dict(token.split('=', 1) for token in docker_words(value, env)))
|
| 1094 |
+
elif op == 'WORKDIR':
|
| 1095 |
+
cwd = posixpath.normpath(posixpath.join(cwd, docker_words(value, env)[0]))
|
| 1096 |
+
record = {'script': 'mkdir -p ' + shlex.quote(cwd), 'env': {'HOME': '/root', **env},
|
| 1097 |
+
'cwd': '/', 'targets': []}
|
| 1098 |
+
(build if phase == 'build' else setup).append(record)
|
| 1099 |
+
elif op == 'RUN':
|
| 1100 |
+
command, targets = split_mounts(value)
|
| 1101 |
+
run = run_by_line[item['line']]
|
| 1102 |
+
context = {'env': {'HOME': '/root', **run['env']}, 'cwd': run['cwd'], 'targets': targets}
|
| 1103 |
+
remaining, prefix, replay = command, [], []
|
| 1104 |
+
if phase == 'build':
|
| 1105 |
+
while remaining and (part := dependency_operand(remaining)) is not None:
|
| 1106 |
+
prefix.append(part['command'])
|
| 1107 |
+
if part.get('normalization'):
|
| 1108 |
+
normalizations.append(dict(part['normalization'], line=item['line']))
|
| 1109 |
+
if part['replay']:
|
| 1110 |
+
replay.append(part['command'])
|
| 1111 |
+
installed |= part['installs']
|
| 1112 |
+
remaining = part['rest']
|
| 1113 |
+
if not remaining:
|
| 1114 |
+
if item['tail']:
|
| 1115 |
+
raise Unsupported('dependency heredoc requires review')
|
| 1116 |
+
build.extend(dependency_records(prefix, context))
|
| 1117 |
+
continue
|
| 1118 |
+
if not installed:
|
| 1119 |
+
raise Unsupported('initialization precedes a reviewed dependency prefix')
|
| 1120 |
+
if targets:
|
| 1121 |
+
raise Unsupported('cache-mounted mixed initialization retained in image')
|
| 1122 |
+
if prefix:
|
| 1123 |
+
build.extend(dependency_records(prefix, context))
|
| 1124 |
+
boundaries.append({'line': item['line'], 'dependency_operands': len(prefix), 'replay': replay})
|
| 1125 |
+
else:
|
| 1126 |
+
remaining = command
|
| 1127 |
+
script = (' && '.join(replay) + ' && ' if replay else '') + remaining
|
| 1128 |
+
if item['tail']:
|
| 1129 |
+
script += '\n' + item['tail']
|
| 1130 |
+
# Fail closed on later installers, identity operations, mount-sensitive
|
| 1131 |
+
# state and dynamically executed shell/interpreter initialization.
|
| 1132 |
+
review = re.sub(r'(?<![\w/])apt(?:-get)?\s+(?:clean|autoclean)\b', '', script)
|
| 1133 |
+
if re.search(r'(?<![/\w-])(?:apt(?:-get)?|pip[23]?|dpkg|npm|yarn|conda|curl|wget|make|cmake|ninja|gcc|cargo|rustup|gem|bundle|composer|uv|uvx|useradd|adduser|groupadd|addgroup|chown|chgrp|sudo|su)\b', review):
|
| 1134 |
+
raise Unsupported('initializer contains installation, identity or download operations')
|
| 1135 |
+
mounted_path = r'(?<![\w/])/(?:tmp|root|proc|sys|dev)(?:/|\b)'
|
| 1136 |
+
referenced_env = [value for key, value in context['env'].items()
|
| 1137 |
+
if re.search(r'\$(?:' + re.escape(key) + r'\b|\{' + re.escape(key) + r'\})', script)]
|
| 1138 |
+
if any(re.search(mounted_path, value) for value in [script, run['cwd'], *referenced_env]):
|
| 1139 |
+
raise Unsupported('initializer references a runtime-mounted system path')
|
| 1140 |
+
if re.search(r'\b(?:python[23]?|perl|ruby|node|eval|bash|sh)\s+(?:-[^\n ]*c\b|<<|/)', remaining):
|
| 1141 |
+
raise Unsupported('interpreter initialization needs individual review')
|
| 1142 |
+
if (details['expected']['env'].get('HOME') == '/home/user'
|
| 1143 |
+
and re.search(r'\bchmod\s+(?:-[^\s]*R[^\s]*\s+|--recursive\s+)[^;&\n]*\s/home/user(?:\s|$|;|&)', script)):
|
| 1144 |
+
raise Unsupported('recursive home permissions would touch runtime-created package caches')
|
| 1145 |
+
phase = 'setup'
|
| 1146 |
+
setup.append(dict(context, script=script))
|
| 1147 |
+
if not setup:
|
| 1148 |
+
raise Unsupported('no task initialization to separate')
|
| 1149 |
+
seed_home = any('/home/user' in c['script'] for c in setup) or cwd.startswith('/home/user')
|
| 1150 |
+
profile = {'version': SHARING_VERSION, 'base': 'ubuntu:22.04', 'build': build,
|
| 1151 |
+
'initialization_defaults': {'state_dir': SHARING_STATE_DIR, 'home': '/home/user' if seed_home else None},
|
| 1152 |
+
'runtime': details['expected'], 'environment_keys': keys}
|
| 1153 |
+
identity = digest(json.dumps(profile, sort_keys=True, separators=(',', ':')).encode())
|
| 1154 |
+
root = '/var/tmp/.ot-et-cache-' + identity[:20]
|
| 1155 |
+
lines = ['# ' + SHARING_VERSION, 'FROM ubuntu:22.04']
|
| 1156 |
+
if undo := undo_precreated_workdir(details['expected']['cwd']):
|
| 1157 |
+
lines.append('RUN ' + undo)
|
| 1158 |
+
for command in build:
|
| 1159 |
+
lowered = shell_command(command['script'], command['env'], command['cwd'], keys)
|
| 1160 |
+
if command['targets']:
|
| 1161 |
+
lowered = shell_command(cache_script(lowered, command['targets'], root),
|
| 1162 |
+
{'PATH': BASE_PATH, 'HOME': '/root'}, '/', keys)
|
| 1163 |
+
lines.append('RUN ' + lowered)
|
| 1164 |
+
if any(command['targets'] for command in build):
|
| 1165 |
+
lines.append('RUN /bin/rm -rf ' + shlex.quote(root))
|
| 1166 |
+
# Capture the builder's defaults rather than inheriting the runtime shell's
|
| 1167 |
+
# different umask. Seed the common home and preserve its mode across the
|
| 1168 |
+
# worker's empty-WORKDIR bind, before source initialization applies its modes.
|
| 1169 |
+
state = shlex.quote(SHARING_STATE_DIR)
|
| 1170 |
+
lines.append(f'RUN /bin/mkdir -p {state} && umask > {state}/umask')
|
| 1171 |
+
if seed_home:
|
| 1172 |
+
lines.append(f'RUN /bin/mkdir -p /home/user && /usr/bin/stat -c %a /home/user > {state}/home-mode')
|
| 1173 |
+
# Startup requires this cwd before setup files can be uploaded/executed.
|
| 1174 |
+
lines.append('RUN /bin/mkdir -p ' + shlex.quote(details['expected']['cwd']))
|
| 1175 |
+
for key, value in sorted(details['expected']['env'].items()):
|
| 1176 |
+
lines.append(f'ENV {key}={shlex.quote(value)}')
|
| 1177 |
+
lines.append('WORKDIR ' + details['expected']['cwd'])
|
| 1178 |
+
commands = ([f'/bin/chmod "$(/bin/cat {state}/home-mode)" /home/user'] if seed_home else [])
|
| 1179 |
+
commands += [f'umask "$(/bin/cat {state}/umask)" && ' +
|
| 1180 |
+
shell_command(c['script'], c['env'], c['cwd'], keys) for c in setup]
|
| 1181 |
+
return {'identity': identity, 'dockerfile': '\n'.join(lines) + '\n', 'commands': commands,
|
| 1182 |
+
'profile': profile, 'initialization': setup, 'split_boundaries': boundaries,
|
| 1183 |
+
'dependency_normalizations': normalizations}
|
| 1184 |
+
|
| 1185 |
+
|
| 1186 |
+
def relocate_source_context(members):
|
| 1187 |
+
"""Keep source truth and unused recipes outside build and agent-upload paths."""
|
| 1188 |
+
result, moved = [], []
|
| 1189 |
+
names = {info.name for info, _ in members}
|
| 1190 |
+
for original, data in members:
|
| 1191 |
+
info = copy.copy(original)
|
| 1192 |
+
if info.name.startswith('environment/') and info.name != 'environment/Dockerfile':
|
| 1193 |
+
relative = info.name.removeprefix('environment/')
|
| 1194 |
+
if info.isdir() or relative not in SOURCE_CONTEXT:
|
| 1195 |
+
raise Unsupported('unreviewed extra build-context member: ' + info.name)
|
| 1196 |
+
info.name = 'source_metadata/environment/' + relative
|
| 1197 |
+
if info.name in names:
|
| 1198 |
+
raise Unsupported('source metadata destination already exists')
|
| 1199 |
+
moved.append({'source': original.name, 'destination': info.name, 'sha256': digest(data)})
|
| 1200 |
+
result.append((info, data))
|
| 1201 |
+
return result, moved
|
| 1202 |
+
|
| 1203 |
+
|
| 1204 |
+
def read_task(binary):
|
| 1205 |
+
members, seen = [], set()
|
| 1206 |
+
with tarfile.open(fileobj=io.BytesIO(binary), mode='r:*') as archive:
|
| 1207 |
+
for info in archive:
|
| 1208 |
+
path = PurePosixPath(info.name)
|
| 1209 |
+
if path.is_absolute() or '..' in path.parts or info.name in seen:
|
| 1210 |
+
raise ValueError('Unsafe or duplicate task archive entry')
|
| 1211 |
+
seen.add(info.name)
|
| 1212 |
+
members.append((info, archive.extractfile(info).read() if info.isfile() else None))
|
| 1213 |
+
return members
|
| 1214 |
+
|
| 1215 |
+
|
| 1216 |
+
def write_task(members):
|
| 1217 |
+
buffer = io.BytesIO()
|
| 1218 |
+
with tarfile.open(fileobj=buffer, mode='w', format=tarfile.PAX_FORMAT) as archive:
|
| 1219 |
+
for original, data in sorted(members, key=lambda item: item[0].name):
|
| 1220 |
+
info = copy.copy(original)
|
| 1221 |
+
info.mtime, info.uid, info.gid, info.uname, info.gname = 0, 0, 0, '', ''
|
| 1222 |
+
info.pax_headers = {}
|
| 1223 |
+
if data is not None:
|
| 1224 |
+
info.size = len(data)
|
| 1225 |
+
archive.addfile(info, io.BytesIO(data) if data is not None else None)
|
| 1226 |
+
return buffer.getvalue()
|
| 1227 |
+
|
| 1228 |
+
|
| 1229 |
+
def setup_script(commands, source_sha256):
|
| 1230 |
+
"""Run reviewed initialization once per instance, never reset an oracle trial."""
|
| 1231 |
+
return ('#!/bin/bash\nset -eu\n'
|
| 1232 |
+
'setup_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)\n'
|
| 1233 |
+
'marker="$setup_dir/.ot-et-' + source_sha256 + '.done"\n'
|
| 1234 |
+
'[ ! -f "$marker" ] || exit 0\n' + '\n'.join('/bin/sh -c ' + shlex.quote(command) for command in commands)
|
| 1235 |
+
+ '\n: > "$marker"\n')
|
| 1236 |
+
|
| 1237 |
+
|
| 1238 |
+
def with_setup(members, commands, source_sha256):
|
| 1239 |
+
names = {info.name for info, _ in members}
|
| 1240 |
+
if any(name == 'setup_files' or name.startswith('setup_files/') for name in names):
|
| 1241 |
+
raise Unsupported('Existing task setup requires individual review')
|
| 1242 |
+
solution = next(((i, info, data) for i, (info, data) in enumerate(members)
|
| 1243 |
+
if info.name == 'solution/solve.sh'), None)
|
| 1244 |
+
if solution is None or not solution[2]:
|
| 1245 |
+
raise Unsupported('Task setup requires an existing solution script')
|
| 1246 |
+
index, info, original = solution
|
| 1247 |
+
call = b'bash /setup_files/setup.sh || exit $?\n'
|
| 1248 |
+
if original.startswith(b'#!'):
|
| 1249 |
+
first, separator, rest = original.partition(b'\n')
|
| 1250 |
+
if not separator:
|
| 1251 |
+
raise Unsupported('Solution shebang has no body')
|
| 1252 |
+
updated = first + separator + call + rest
|
| 1253 |
+
else:
|
| 1254 |
+
updated = call + original
|
| 1255 |
+
members[index] = (info, updated)
|
| 1256 |
+
script = setup_script(commands, source_sha256).encode()
|
| 1257 |
+
info = tarfile.TarInfo('setup_files/setup.sh')
|
| 1258 |
+
info.mode = 0o755
|
| 1259 |
+
members.append((info, script))
|
| 1260 |
+
return members
|
| 1261 |
+
|
| 1262 |
+
|
| 1263 |
+
def patch_task(task_id, binary, *, task_setup=True, share_images=False, offline_verifier=False,
|
| 1264 |
+
reviewed_repairs=True):
|
| 1265 |
+
members = read_task(binary)
|
| 1266 |
+
source = next(data for info, data in members if info.name == 'environment/Dockerfile')
|
| 1267 |
+
try:
|
| 1268 |
+
repair = STARTUP_REPAIRS.get(task_id) if task_setup else None
|
| 1269 |
+
if repair and digest(source) != repair:
|
| 1270 |
+
raise Unsupported('Reviewed startup source digest differs')
|
| 1271 |
+
converted, details = compile_dockerfile(source.decode())
|
| 1272 |
+
commands = []
|
| 1273 |
+
if share_images:
|
| 1274 |
+
try:
|
| 1275 |
+
plan = initialization_plan(source.decode(), details, repaired_startup=bool(repair))
|
| 1276 |
+
relocated, moves = relocate_source_context(members)
|
| 1277 |
+
if any(info.name.startswith('setup_files/') for info, _ in members):
|
| 1278 |
+
raise Unsupported('existing setup requires composition review')
|
| 1279 |
+
except Unsupported as exc:
|
| 1280 |
+
details['sharing'] = {'status': 'retained', 'reason': str(exc)}
|
| 1281 |
+
else:
|
| 1282 |
+
members = relocated
|
| 1283 |
+
converted = plan.pop('dockerfile')
|
| 1284 |
+
commands.extend(plan.pop('commands'))
|
| 1285 |
+
details['sharing'] = dict(plan, status='separated', relocated=moves)
|
| 1286 |
+
timestamp = REVIEWED_REPAIRS['timestamps'].get(task_id) if reviewed_repairs and task_setup else None
|
| 1287 |
+
if timestamp:
|
| 1288 |
+
if digest(source) != timestamp['source_sha256']:
|
| 1289 |
+
raise Unsupported('Reviewed timestamp source digest differs')
|
| 1290 |
+
# Shared initialization already replays these original RUN programs.
|
| 1291 |
+
in_setup = details.get('sharing', {}).get('status') == 'separated'
|
| 1292 |
+
if not in_setup:
|
| 1293 |
+
keys = sorted(set(details['expected']['env']) | {'HOME', 'PATH'})
|
| 1294 |
+
commands.extend(shell_command(c['script'], c['env'], c['cwd'], keys)
|
| 1295 |
+
for c in timestamp['commands'])
|
| 1296 |
+
details['timestamp_refresh'] = {'kind': 'source-initialization' if in_setup else 'reviewed-touch',
|
| 1297 |
+
'commands': timestamp['commands']}
|
| 1298 |
+
if repair:
|
| 1299 |
+
if details['expected']['user'] not in ('root', '0'):
|
| 1300 |
+
raise Unsupported('Task setup cannot implement a non-root runtime identity')
|
| 1301 |
+
entrypoints = [i['value'] for i in parse_dockerfile(source.decode()) if i['op'] == 'ENTRYPOINT']
|
| 1302 |
+
try:
|
| 1303 |
+
argv = json.loads(entrypoints[-1])
|
| 1304 |
+
except (IndexError, ValueError) as exc:
|
| 1305 |
+
raise Unsupported('Reviewed startup requires an exec-form ENTRYPOINT') from exc
|
| 1306 |
+
if not isinstance(argv, list) or not argv or not all(isinstance(v, str) for v in argv):
|
| 1307 |
+
raise Unsupported('Reviewed startup requires nonempty string arguments')
|
| 1308 |
+
command = shlex.join([*argv, '/bin/true'])
|
| 1309 |
+
commands.append(command)
|
| 1310 |
+
details['startup_command'] = command
|
| 1311 |
+
if commands:
|
| 1312 |
+
members = with_setup(members, commands, details['source_sha256'])
|
| 1313 |
+
details['task_setup'] = {'kind': 'initialization-and-startup' if details.get('sharing', {}).get('status') == 'separated'
|
| 1314 |
+
else 'reviewed-entrypoint', 'commands': len(commands),
|
| 1315 |
+
'completion_marker': '.ot-et-' + details['source_sha256'] + '.done'}
|
| 1316 |
+
instruction = REVIEWED_REPAIRS['instructions'].get(task_id) if reviewed_repairs else None
|
| 1317 |
+
if instruction:
|
| 1318 |
+
original = next(data for info, data in members if info.name == 'instruction.md')
|
| 1319 |
+
metadata = next(data for info, data in members
|
| 1320 |
+
if info.name in ('environment/task.json', 'source_metadata/environment/task.json'))
|
| 1321 |
+
restored = json.loads(metadata)['description'].encode()
|
| 1322 |
+
if digest(original) != instruction['instruction_sha256'] or digest(restored) != instruction['description_sha256']:
|
| 1323 |
+
raise Unsupported('Reviewed instruction source digest differs')
|
| 1324 |
+
members = [(info, restored if info.name == 'instruction.md' else data) for info, data in members]
|
| 1325 |
+
details['instruction_restoration'] = dict(instruction, original_chars=len(original.decode()),
|
| 1326 |
+
restored_chars=len(restored.decode()))
|
| 1327 |
+
if offline_verifier:
|
| 1328 |
+
wrapper = next(data for info, data in members if info.name == 'tests/test.sh')
|
| 1329 |
+
if digest(wrapper) != ORIGINAL_TEST_SH_SHA256:
|
| 1330 |
+
raise Unsupported('Reviewed verifier wrapper digest differs')
|
| 1331 |
+
install = shell_command(VERIFIER_INSTALL, {'HOME': '/root', 'PATH': BASE_PATH}, '/',
|
| 1332 |
+
sorted(set(details['expected']['env']) | {'HOME', 'PATH'}))
|
| 1333 |
+
user = details['expected']['user']
|
| 1334 |
+
converted += ('USER root\n' if user not in ('root', '0') else '') + 'RUN ' + install + '\n'
|
| 1335 |
+
if user not in ('root', '0'):
|
| 1336 |
+
converted += 'USER ' + user + '\n'
|
| 1337 |
+
members = [(info, OFFLINE_TEST_SH if info.name == 'tests/test.sh' else data) for info, data in members]
|
| 1338 |
+
details['offline_verifier'] = {'version': VERIFIER_VERSION, 'source_sha256': ORIGINAL_TEST_SH_SHA256,
|
| 1339 |
+
'python': '3.12', 'pytest': '8.4.1', 'uv': '0.9.5'}
|
| 1340 |
+
except Unsupported as exc:
|
| 1341 |
+
return binary, {'task_id': task_id, 'status': 'held-unchanged', 'reason': str(exc)}
|
| 1342 |
+
details['reviewed_state'] = PILOT_STATE.get(task_id, {})
|
| 1343 |
+
details['probe_paths'] = sorted(set(details['probe_paths']) | set(details['reviewed_state']))
|
| 1344 |
+
# Flag possible identity/ownership operations for review, without changing
|
| 1345 |
+
# runtime behavior or treating a static match as a host-capability failure.
|
| 1346 |
+
identity_ops = re.compile(r'\b(?:useradd|adduser|groupadd|addgroup|chown|chgrp|su|sudo)\b|\binstall\s+[^;&\n]*\s-[og]\b')
|
| 1347 |
+
if (details['expected']['user'] not in ('root', '0')
|
| 1348 |
+
or any(identity_ops.search(run['script']) for run in details['runs'])):
|
| 1349 |
+
details['runtime_review'].append('identity-and-ownership-needs-review')
|
| 1350 |
+
for index, (info, data) in enumerate(members):
|
| 1351 |
+
if info.name == 'environment/Dockerfile':
|
| 1352 |
+
members[index] = (info, converted.encode())
|
| 1353 |
+
return write_task(members), dict(details, task_id=task_id)
|
| 1354 |
+
|
| 1355 |
+
|
| 1356 |
+
def rows(source):
|
| 1357 |
+
import pyarrow.parquet as pq
|
| 1358 |
+
# Dictionary decoding of task_binary is expensive with multiple Arrow threads.
|
| 1359 |
+
for batch in pq.ParquetFile(source).iter_batches(batch_size=16, use_threads=False):
|
| 1360 |
+
yield from batch.to_pylist()
|
| 1361 |
+
|
| 1362 |
+
|
| 1363 |
+
def context_digest(binary):
|
| 1364 |
+
"""The worker's full build-context hash, excluding task setup and provenance."""
|
| 1365 |
+
result = hashlib.sha256()
|
| 1366 |
+
for info, data in sorted(read_task(binary), key=lambda pair: pair[0].name):
|
| 1367 |
+
if info.isfile() and info.name.startswith('environment/'):
|
| 1368 |
+
relative = info.name.removeprefix('environment/').encode()
|
| 1369 |
+
result.update(len(relative).to_bytes(4, 'big'))
|
| 1370 |
+
result.update(relative)
|
| 1371 |
+
result.update(len(data).to_bytes(4, 'big'))
|
| 1372 |
+
result.update(data)
|
| 1373 |
+
return result.hexdigest()
|
| 1374 |
+
|
| 1375 |
+
|
| 1376 |
+
def static_repairs(task_id, original, binary):
|
| 1377 |
+
"""Reuse suffix normalization and apply the reviewed CPU edits, with evidence."""
|
| 1378 |
+
from validation.checks.instruction_suffix import suffix
|
| 1379 |
+
members = read_task(binary)
|
| 1380 |
+
files = {info.name: data for info, data in members}
|
| 1381 |
+
edits = {}
|
| 1382 |
+
instruction = suffix(files['instruction.md'], files['task.toml'])
|
| 1383 |
+
if instruction != files['instruction.md']:
|
| 1384 |
+
edits['instruction.md'] = instruction
|
| 1385 |
+
if task_id in PIN_REPAIRS['tasks']:
|
| 1386 |
+
recipe = PIN_REPAIRS['tasks'][task_id]
|
| 1387 |
+
source = {info.name: data for info, data in read_task(original)}['solution/solve.sh']
|
| 1388 |
+
if digest(source) != recipe['script_sha256']:
|
| 1389 |
+
raise ValueError(f'{task_id}: reviewed pip source changed')
|
| 1390 |
+
first, separator, body = source.partition(b'\n')
|
| 1391 |
+
setup_call = b'bash /setup_files/setup.sh || exit $?\n'
|
| 1392 |
+
if files['solution/solve.sh'] not in (source, first + separator + setup_call + body):
|
| 1393 |
+
raise ValueError(f'{task_id}: unexpected changes before pip repairs')
|
| 1394 |
+
script = files['solution/solve.sh'].decode()
|
| 1395 |
+
delta = len(script) - len(source.decode())
|
| 1396 |
+
for edit in sorted(recipe['edits'], key=lambda e: e['start'], reverse=True):
|
| 1397 |
+
start, end = edit['start'] + delta, edit['end'] + delta
|
| 1398 |
+
if script[start:end] != edit['original']:
|
| 1399 |
+
raise ValueError(f'{task_id}: stale package-pin evidence')
|
| 1400 |
+
script = script[:start] + edit['replacement'] + script[end:]
|
| 1401 |
+
edits['solution/solve.sh'] = script.encode()
|
| 1402 |
+
if task_id == 'task_000000_b5807114' and files['tests/test.sh'] == OFFLINE_TEST_SH:
|
| 1403 |
+
source = {info.name: data for info, data in read_task(original)}['solution/solve.sh']
|
| 1404 |
+
if digest(source) != JSONSCHEMA_SOURCE_SHA256:
|
| 1405 |
+
raise ValueError('Reviewed JSON-schema solution changed')
|
| 1406 |
+
# pytest is already invoked by absolute path. Its subprocess must find
|
| 1407 |
+
# the task Python (with jsonschema), not the isolated grading Python.
|
| 1408 |
+
edits['tests/test.sh'] = OFFLINE_TEST_SH.replace(b'export PATH="/opt/et-verifier/venv/bin:$PATH"\n', b'')
|
| 1409 |
+
if task_id in CPU_REPAIRS:
|
| 1410 |
+
source = {info.name: data for info, data in read_task(original)}['solution/solve.sh']
|
| 1411 |
+
if digest(source) != CPU_REPAIRS[task_id]:
|
| 1412 |
+
raise ValueError(f'{task_id}: reviewed CPU source changed')
|
| 1413 |
+
script = files['solution/solve.sh'].decode()
|
| 1414 |
+
if task_id == 'task_000000_bc9c5a3e':
|
| 1415 |
+
# This task measures the host; the audit must log the command used.
|
| 1416 |
+
script = script.replace('cpu_cmd="nproc"', 'cpu_cmd="nproc --all"')
|
| 1417 |
+
script = script.replace('cpu=$(nproc)', 'cpu=$(nproc --all)')
|
| 1418 |
+
else:
|
| 1419 |
+
cpus = tomllib.loads(files['task.toml'].decode())['environment']['cpus']
|
| 1420 |
+
if isinstance(cpus, bool) or not isinstance(cpus, int) or cpus <= 0:
|
| 1421 |
+
raise ValueError(f'{task_id}: expected positive integer CPU budget')
|
| 1422 |
+
script, count = re.subn(
|
| 1423 |
+
r'\$\((?:command -v nproc >/dev/null && nproc \|\| echo 4|nproc 2>/dev/null \|\| echo 4|nproc)\)',
|
| 1424 |
+
str(cpus), script)
|
| 1425 |
+
if count != (3 if task_id == 'task_000000_27030ede' else 1):
|
| 1426 |
+
raise ValueError(f'{task_id}: reviewed CPU replacement count changed')
|
| 1427 |
+
edits['solution/solve.sh'] = script.encode()
|
| 1428 |
+
result = [(info, edits.get(info.name, data)) for info, data in members]
|
| 1429 |
+
evidence = {'version': STATIC_VERSION, 'edits': [
|
| 1430 |
+
{'file': name, 'before_sha256': digest(files[name]), 'after_sha256': digest(data)}
|
| 1431 |
+
for name, data in sorted(edits.items())]}
|
| 1432 |
+
return write_task(result), evidence
|
| 1433 |
+
|
| 1434 |
+
|
| 1435 |
+
def patch_main(args):
|
| 1436 |
+
import pyarrow as pa
|
| 1437 |
+
import pyarrow.parquet as pq
|
| 1438 |
+
pa.set_cpu_count(2)
|
| 1439 |
+
pa.set_io_thread_count(2)
|
| 1440 |
+
if digest(args.source.read_bytes()) != SOURCE_SHA256:
|
| 1441 |
+
raise ValueError('Source checksum differs from the unmodified pinned ET Parquet')
|
| 1442 |
+
if args.output.resolve().is_relative_to(Path(__file__).resolve().parent):
|
| 1443 |
+
raise ValueError('Generated artifacts must live outside data/endless_terminals')
|
| 1444 |
+
args.output.mkdir(parents=True, exist_ok=False)
|
| 1445 |
+
records, labels, reasons, dropped = [], {}, {}, {}
|
| 1446 |
+
target = args.output / 'tasks.parquet'
|
| 1447 |
+
temporary = target.with_suffix('.parquet.tmp')
|
| 1448 |
+
schema = pq.ParquetFile(args.source).schema_arrow
|
| 1449 |
+
# Plan first, so singleton recipes keep the byte-identical compatibility task.
|
| 1450 |
+
planned, sizes = [], collections.Counter()
|
| 1451 |
+
for row in rows(args.source):
|
| 1452 |
+
if args.filter_reviewed and row['path'] in REVIEWED_EXCLUSIONS:
|
| 1453 |
+
exclusion = REVIEWED_EXCLUSIONS[row['path']]
|
| 1454 |
+
if digest(row['task_binary']) != exclusion['source_sha256']:
|
| 1455 |
+
raise ValueError(f"{row['path']}: reviewed exclusion source changed")
|
| 1456 |
+
dropped[row['path']] = {k: exclusion[k] for k in ('category', 'reason')}
|
| 1457 |
+
continue
|
| 1458 |
+
new, details = patch_task(row['path'], row['task_binary'], task_setup=not args.no_task_setup,
|
| 1459 |
+
share_images=not args.no_share_images, offline_verifier=not args.no_offline_verifier,
|
| 1460 |
+
reviewed_repairs=not args.no_reviewed_repairs)
|
| 1461 |
+
sharing = details.get('sharing', {})
|
| 1462 |
+
if sharing.get('status') == 'separated':
|
| 1463 |
+
sizes[sharing['identity']] += 1
|
| 1464 |
+
planned.append((row, new, details))
|
| 1465 |
+
if len(planned) % 100 == 0:
|
| 1466 |
+
print(f'Planned {len(planned)}/2492', flush=True)
|
| 1467 |
+
image_groups = {}
|
| 1468 |
+
with pq.ParquetWriter(temporary, schema, compression='zstd', use_dictionary=False) as writer:
|
| 1469 |
+
for row, new, details in planned:
|
| 1470 |
+
sharing = details.get('sharing', {})
|
| 1471 |
+
if sharing.get('status') == 'separated' and sizes[sharing['identity']] == 1:
|
| 1472 |
+
identity = sharing['identity']
|
| 1473 |
+
new, details = patch_task(row['path'], row['task_binary'], task_setup=not args.no_task_setup,
|
| 1474 |
+
offline_verifier=not args.no_offline_verifier,
|
| 1475 |
+
reviewed_repairs=not args.no_reviewed_repairs)
|
| 1476 |
+
details['sharing'] = {'status': 'retained', 'reason': 'no matching dependency recipe',
|
| 1477 |
+
'candidate_identity': identity}
|
| 1478 |
+
sharing = details['sharing']
|
| 1479 |
+
if not args.no_static_repairs:
|
| 1480 |
+
new, details['static_repairs'] = static_repairs(row['path'], row['task_binary'], new)
|
| 1481 |
+
key = context_digest(new)
|
| 1482 |
+
details['environment_sha256'] = key
|
| 1483 |
+
if sharing.get('status') == 'separated':
|
| 1484 |
+
group = image_groups.setdefault(key, {'identity': sharing['identity'], 'tasks': [],
|
| 1485 |
+
'profile': sharing['profile']})
|
| 1486 |
+
group['tasks'].append(row['path'])
|
| 1487 |
+
if new != row['task_binary']:
|
| 1488 |
+
labels[row['path']] = ['apptainer-build-compatibility']
|
| 1489 |
+
reasons[row['path']] = ('Preserve ordered build environment/cwd; lower heredocs and emulate '
|
| 1490 |
+
'reviewed disposable cache mounts. Shared runtime behavior is unchanged.')
|
| 1491 |
+
if details.get('startup_command'):
|
| 1492 |
+
labels[row['path']] = ['apptainer-build-and-startup-compatibility']
|
| 1493 |
+
reasons[row['path']] += (' Invoke the reviewed finite source ENTRYPOINT after container mounts, '
|
| 1494 |
+
'with /bin/true as payload, through guarded task setup.')
|
| 1495 |
+
if sharing.get('status') == 'separated':
|
| 1496 |
+
labels[row['path']] = ['shared-dependency-image-and-task-setup']
|
| 1497 |
+
reasons[row['path']] += (' Share a dependency execution recipe and runtime declarations after '
|
| 1498 |
+
'normalizing reviewed redundant apt update flags and equivalent install option spelling/order. '
|
| 1499 |
+
'Keep installation in the image; replay task initialization with its original shell context '
|
| 1500 |
+
'before any repaired entrypoint. Preserve unused context metadata outside the image and '
|
| 1501 |
+
'agent-visible setup. Add one guarded setup call before the unchanged solution body.')
|
| 1502 |
+
if details.get('workdir_timing'):
|
| 1503 |
+
reasons[row['path']] += ' Undo early empty WORKDIR creation before source RUN steps.'
|
| 1504 |
+
if details.get('timestamp_refresh'):
|
| 1505 |
+
labels[row['path']].append('fresh-instance-timestamps')
|
| 1506 |
+
reasons[row['path']] += ' Refresh reviewed relative timestamps once per fresh instance, preserving source touch commands.'
|
| 1507 |
+
if details.get('instruction_restoration'):
|
| 1508 |
+
labels[row['path']].append('restored-truncated-instruction')
|
| 1509 |
+
reasons[row['path']] += ' Restore the complete original description from task metadata after source-hash review.'
|
| 1510 |
+
if details.get('offline_verifier'):
|
| 1511 |
+
labels[row['path']].append('offline-verifier')
|
| 1512 |
+
reasons[row['path']] += (' Install isolated Python 3.12/pytest 8.4.1 grading tools in the image; '
|
| 1513 |
+
'preserve test assertions and task dependencies. Grading uses no bootstrap downloads; '
|
| 1514 |
+
'pytest assertion failure scores zero, infrastructure/collection errors receive no reward.')
|
| 1515 |
+
if details.get('static_repairs'):
|
| 1516 |
+
labels[row['path']].append('instruction-suffix')
|
| 1517 |
+
reasons[row['path']] += ' Append the canonical timeout/anti-cheating sentence using the declared agent timeout.'
|
| 1518 |
+
if row['path'] in CPU_REPAIRS:
|
| 1519 |
+
labels[row['path']].append('cpu-resource-portability')
|
| 1520 |
+
reasons[row['path']] += (' Bound solution workers by the declared CPU budget, or explicitly measure '
|
| 1521 |
+
'host CPUs with nproc --all and record that exact command.')
|
| 1522 |
+
if row['path'] in PIN_REPAIRS['tasks']:
|
| 1523 |
+
labels[row['path']].append('dependency-pinning')
|
| 1524 |
+
reasons[row['path']] += ' Pin reviewed literal installs to versions captured after a reward-1 oracle, then rerun normal validation.'
|
| 1525 |
+
if any(e['file'] == 'tests/test.sh' for e in details['static_repairs']['edits']):
|
| 1526 |
+
labels[row['path']].append('verifier-subprocess-path')
|
| 1527 |
+
reasons[row['path']] += ' Preserve the task PATH for verifier subprocesses while invoking isolated pytest by absolute path; assertions are unchanged.'
|
| 1528 |
+
writer.write_table(pa.Table.from_pylist([dict(row, task_binary=new)], schema=schema))
|
| 1529 |
+
records.append(details)
|
| 1530 |
+
temporary.replace(target)
|
| 1531 |
+
from data.utils.patch_reporting import write_patch_report
|
| 1532 |
+
write_patch_report(args.source, target, source={'dataset': 'obiwan96/endless-terminals',
|
| 1533 |
+
'url': 'https://huggingface.co/datasets/obiwan96/endless-terminals', 'revision': REVISION},
|
| 1534 |
+
dropped=dropped, change_labels=labels, change_reasons=reasons, patcher=__file__)
|
| 1535 |
+
(args.output / 'build-manifest.jsonl').write_text(''.join(json.dumps(r, sort_keys=True) + '\n' for r in records))
|
| 1536 |
+
save(args.output / 'image-groups.json', image_groups)
|
| 1537 |
+
summary = {'version': VERSION, 'sharing_version': None if args.no_share_images else SHARING_VERSION,
|
| 1538 |
+
'static_repairs_version': None if args.no_static_repairs else STATIC_VERSION,
|
| 1539 |
+
'source_sha256': SOURCE_SHA256, 'source_revision': REVISION, 'tasks': len(records),
|
| 1540 |
+
'reviewed_exclusions': dropped, 'source_tasks': len(records) + len(dropped),
|
| 1541 |
+
'statuses': dict(collections.Counter(r['status'] for r in records)),
|
| 1542 |
+
'runtime_validated': 0, 'task_setup': sum(bool(r.get('task_setup')) for r in records),
|
| 1543 |
+
'shared_tasks': sum(len(group['tasks']) for group in image_groups.values()),
|
| 1544 |
+
'shared_images': len(image_groups), 'unique_build_contexts': len({r['environment_sha256'] for r in records}),
|
| 1545 |
+
'normalized_shared_tasks': sum(bool(r.get('sharing', {}).get('dependency_normalizations')) for r in records),
|
| 1546 |
+
'offline_verifiers': sum(bool(r.get('offline_verifier')) for r in records),
|
| 1547 |
+
'timestamp_refreshes': sum(bool(r.get('timestamp_refresh')) for r in records),
|
| 1548 |
+
'restored_instructions': sum(bool(r.get('instruction_restoration')) for r in records),
|
| 1549 |
+
'workdir_timing_repairs': sum(bool(r.get('workdir_timing')) for r in records),
|
| 1550 |
+
'sharing_retained_reasons': dict(collections.Counter(r['sharing']['reason'] for r in records
|
| 1551 |
+
if r.get('sharing', {}).get('status') == 'retained')),
|
| 1552 |
+
'oracle_and_nop': 'not-run-by-patcher',
|
| 1553 |
+
'patcher_sha256': digest(Path(__file__).read_bytes()), 'output_sha256': digest(target.read_bytes())}
|
| 1554 |
+
save(args.output / 'summary.json', summary)
|
| 1555 |
+
print(json.dumps(summary, indent=2))
|
| 1556 |
+
|
| 1557 |
+
|
| 1558 |
+
def pilot_main(args):
|
| 1559 |
+
import pyarrow as pa
|
| 1560 |
+
import pyarrow.parquet as pq
|
| 1561 |
+
args.output.mkdir(parents=True, exist_ok=False)
|
| 1562 |
+
selected = set(args.task or PILOT)
|
| 1563 |
+
kept = [row for row in rows(args.source) if row['path'] in selected]
|
| 1564 |
+
if {row['path'] for row in kept} != selected:
|
| 1565 |
+
raise ValueError('Pilot IDs missing from source')
|
| 1566 |
+
pq.write_table(pa.Table.from_pylist(kept), args.output / 'tasks.parquet', compression='zstd', use_dictionary=False)
|
| 1567 |
+
save(args.output / 'selection.json', {'source_sha256': digest(args.source.read_bytes()),
|
| 1568 |
+
'tasks': sorted(selected), 'purpose': 'build and initial-state pilot; no oracle/no-op'})
|
| 1569 |
+
print(args.output / 'tasks.parquet')
|
| 1570 |
+
|
| 1571 |
+
|
| 1572 |
+
def probe_command(details):
|
| 1573 |
+
"""Observe the actual worker shell; never repair its environment in the probe."""
|
| 1574 |
+
config = {'paths': details['probe_paths'], 'env': sorted(set(details['expected']['env']) | {'HOME', 'PATH'}),
|
| 1575 |
+
'user': details['expected']['user']}
|
| 1576 |
+
script = '''import hashlib,json,os,pwd,stat,subprocess
|
| 1577 |
+
c=json.loads(CONFIG)
|
| 1578 |
+
result={"id":subprocess.check_output(["/usr/bin/id"],text=True).strip(),"uid":os.getuid(),"gid":os.getgid(),"cwd":os.getcwd(),"env":{k:os.environ.get(k) for k in c["env"]},"paths":{}}
|
| 1579 |
+
try: result["expected_uid"]=int(c["user"]) if c["user"].isdigit() else pwd.getpwnam(c["user"]).pw_uid
|
| 1580 |
+
except KeyError: result["expected_uid"]=None
|
| 1581 |
+
for path in c["paths"]:
|
| 1582 |
+
try:
|
| 1583 |
+
s=os.lstat(path); item={"mode":oct(stat.S_IMODE(s.st_mode)),"uid":s.st_uid,"gid":s.st_gid,"size":s.st_size,"link":os.readlink(path) if stat.S_ISLNK(s.st_mode) else None}
|
| 1584 |
+
if stat.S_ISREG(s.st_mode) and s.st_size <= 16*1024*1024:
|
| 1585 |
+
with open(path,"rb") as f: item["sha256"]=hashlib.file_digest(f,"sha256").hexdigest()
|
| 1586 |
+
result["paths"][path]=item
|
| 1587 |
+
except OSError as e: result["paths"][path]={"error":str(e),"errno":e.errno}
|
| 1588 |
+
print("ET_STATE_JSON="+json.dumps(result,sort_keys=True))
|
| 1589 |
+
'''.replace('CONFIG', repr(json.dumps(config)))
|
| 1590 |
+
# Jammy Python 3.10 lacks hashlib.file_digest.
|
| 1591 |
+
script = script.replace('hashlib.file_digest(f,"sha256").hexdigest()', 'hashlib.sha256(f.read()).hexdigest()')
|
| 1592 |
+
paths = ' '.join(shlex.quote(p) for p in details['probe_paths'])
|
| 1593 |
+
return ('/usr/bin/id; pwd; printf "PATH=%s\\n" "$PATH"; '
|
| 1594 |
+
'/bin/ls -la /home/user; /bin/ls -ld -- ' + paths + '; '
|
| 1595 |
+
'/usr/bin/python3 -c ' + shlex.quote(script))
|
| 1596 |
+
|
| 1597 |
+
|
| 1598 |
+
def state_failures(details, actual):
|
| 1599 |
+
"""Compare recorded observations with source expectations, without executing code."""
|
| 1600 |
+
failures = []
|
| 1601 |
+
if actual['uid'] != actual['expected_uid']:
|
| 1602 |
+
failures.append('user-mismatch')
|
| 1603 |
+
if actual['cwd'] != details['expected']['cwd']:
|
| 1604 |
+
failures.append('cwd-mismatch')
|
| 1605 |
+
for key, expected in details['expected']['env'].items():
|
| 1606 |
+
if actual['env'].get(key) != expected:
|
| 1607 |
+
failures.append('env-mismatch:' + key)
|
| 1608 |
+
for path, expected in details['literal_files'].items():
|
| 1609 |
+
if actual['paths'].get(path, {}).get('sha256') != expected:
|
| 1610 |
+
failures.append('literal-fixture-mismatch:' + path)
|
| 1611 |
+
for path, checks in details.get('reviewed_state', {}).items():
|
| 1612 |
+
observed = actual['paths'].get(path, {})
|
| 1613 |
+
for key, expected in checks.items():
|
| 1614 |
+
found = observed.get('errno') == 2 if key == 'absent' else observed.get(key)
|
| 1615 |
+
if found != expected:
|
| 1616 |
+
failures.append(f'path-{key}-mismatch:{path}')
|
| 1617 |
+
return failures
|
| 1618 |
+
|
| 1619 |
+
|
| 1620 |
+
async def terminal_probe(env, command):
|
| 1621 |
+
"""Observe a real Harbor interactive terminal, without its install fallback."""
|
| 1622 |
+
from uuid import uuid4
|
| 1623 |
+
from harbor.agents.terminus_2.tmux_session import TmuxSession
|
| 1624 |
+
name = 'et-state-' + uuid4().hex[:12]
|
| 1625 |
+
output = '/run/ot-harbor-tmux/' + name
|
| 1626 |
+
session = TmuxSession(session_name=name, environment=env)
|
| 1627 |
+
start = session._tmux_start_session
|
| 1628 |
+
launched = await env.exec(start, timeout_sec=30)
|
| 1629 |
+
if launched.return_code:
|
| 1630 |
+
return {'status': 'error', 'start_command': start, 'stderr': launched.stderr}
|
| 1631 |
+
script = (command + ' > ' + shlex.quote(output) + ' 2>&1; '
|
| 1632 |
+
'/usr/bin/touch ' + shlex.quote(output + '.done'))
|
| 1633 |
+
# Capture output to a private infrastructure path to avoid terminal wrapping
|
| 1634 |
+
# corrupting JSON. Checked task files are only read, and artifacts are removed.
|
| 1635 |
+
encoded = base64.b64encode(script.encode()).decode()
|
| 1636 |
+
line = '/bin/bash --noprofile -c "$(/usr/bin/printf %s ' + encoded + ' | /usr/bin/base64 -d)"'
|
| 1637 |
+
try:
|
| 1638 |
+
sent = await env.exec('/usr/bin/tmux send-keys -t ' + name + ' -l -- ' + shlex.quote(line)
|
| 1639 |
+
+ ' && /usr/bin/tmux send-keys -t ' + name + ' Enter', timeout_sec=30)
|
| 1640 |
+
if sent.return_code:
|
| 1641 |
+
return {'status': 'error', 'start_command': start, 'stderr': sent.stderr}
|
| 1642 |
+
for _ in range(60):
|
| 1643 |
+
value = await env.exec('test -f ' + shlex.quote(output + '.done')
|
| 1644 |
+
+ ' && /bin/cat ' + shlex.quote(output), timeout_sec=10)
|
| 1645 |
+
if value.return_code == 0:
|
| 1646 |
+
return {'status': 'observed', 'start_command': start, 'command': command,
|
| 1647 |
+
'stdout': value.stdout, 'stderr': value.stderr}
|
| 1648 |
+
await asyncio.sleep(0.2)
|
| 1649 |
+
return {'status': 'error', 'start_command': start, 'stderr': 'Terminal state probe timed out'}
|
| 1650 |
+
finally:
|
| 1651 |
+
await env.exec('/usr/bin/tmux kill-session -t ' + name + '; /bin/rm -f '
|
| 1652 |
+
+ shlex.quote(output) + ' ' + shlex.quote(output + '.done'), timeout_sec=30)
|
| 1653 |
+
|
| 1654 |
+
|
| 1655 |
+
async def probe_main(args):
|
| 1656 |
+
"""Add ET observations to the existing stage-3 lifecycle in this process only."""
|
| 1657 |
+
from validation.stages import harbor as runtime
|
| 1658 |
+
from validation.stages.runner import parser
|
| 1659 |
+
from validation.checks import environment as inspection
|
| 1660 |
+
from validation.data.materialize import materialize
|
| 1661 |
+
args.output.mkdir(parents=True, exist_ok=False)
|
| 1662 |
+
tasks = materialize(args.source, args.output / 'tasks')
|
| 1663 |
+
records = {r['task_id']: r for r in map(json.loads, args.manifest.read_text().splitlines())}
|
| 1664 |
+
settings = parser().parse_args([str(args.source), '--no-fix-instruction-paths', '--no-fix-pip-pins',
|
| 1665 |
+
'--no-fix-instruction-suffix', '--submit', 'never'])
|
| 1666 |
+
settings.dry_run = False
|
| 1667 |
+
settings.environment_kwargs = {'bridge_url': args.bridge_url, 'sif_cache': str(args.images)}
|
| 1668 |
+
original = inspection.inspect_environment
|
| 1669 |
+
results = []
|
| 1670 |
+
|
| 1671 |
+
async def inspect(env, task, context, label):
|
| 1672 |
+
ordinary = await original(env, task, context, label)
|
| 1673 |
+
details = records[task.paths.task_dir.name]
|
| 1674 |
+
if 'expected' not in details:
|
| 1675 |
+
return dict(ordinary, et_state={'status': 'not_checked', 'reason': details.get('reason')})
|
| 1676 |
+
command = probe_command(details)
|
| 1677 |
+
value = await env.exec(command, timeout_sec=60)
|
| 1678 |
+
evidence = {'command': command, 'stdout': value.stdout, 'stderr': value.stderr,
|
| 1679 |
+
'return_code': value.return_code, 'expected': details['expected']}
|
| 1680 |
+
matches = [line.partition('=')[2] for line in (value.stdout or '').splitlines() if line.startswith('ET_STATE_JSON=')]
|
| 1681 |
+
failures = []
|
| 1682 |
+
if value.return_code or len(matches) != 1:
|
| 1683 |
+
failures.append('state-probe-failed')
|
| 1684 |
+
else:
|
| 1685 |
+
actual = json.loads(matches[0])
|
| 1686 |
+
evidence['actual'] = actual
|
| 1687 |
+
failures = state_failures(details, actual)
|
| 1688 |
+
terminal = await terminal_probe(env, command)
|
| 1689 |
+
lines = [line.partition('=')[2] for line in terminal.get('stdout', '').splitlines()
|
| 1690 |
+
if line.startswith('ET_STATE_JSON=')]
|
| 1691 |
+
if terminal['status'] != 'observed' or len(lines) != 1:
|
| 1692 |
+
failures.append('terminal-state-probe-failed')
|
| 1693 |
+
else:
|
| 1694 |
+
terminal['actual'] = json.loads(lines[0])
|
| 1695 |
+
terminal['failures'] = state_failures(details, terminal['actual'])
|
| 1696 |
+
terminal['status'] = 'failed' if terminal['failures'] else 'passed'
|
| 1697 |
+
failures += ['terminal:' + f for f in terminal['failures']]
|
| 1698 |
+
evidence['terminal'] = terminal
|
| 1699 |
+
evidence.update(status='failed' if failures else 'passed', failures=failures,
|
| 1700 |
+
limitations='Ownership and nonliteral file state require source-specific review; startup commands are not certified.')
|
| 1701 |
+
return dict(ordinary, et_state=evidence, status='failed' if failures else ordinary['status'])
|
| 1702 |
+
|
| 1703 |
+
inspection.inspect_environment = inspect
|
| 1704 |
+
try:
|
| 1705 |
+
for task in tasks:
|
| 1706 |
+
result = await runtime.build_task(task, args.output / task.name, settings)
|
| 1707 |
+
results.append({'task_id': task.name, **result})
|
| 1708 |
+
save(args.output / 'state-probes.json', results)
|
| 1709 |
+
print(task.name, result['status'], flush=True)
|
| 1710 |
+
finally:
|
| 1711 |
+
inspection.inspect_environment = original
|
| 1712 |
+
return 0 if results and all(r['status'] == 'passed' for r in results) else 1
|
| 1713 |
+
|
| 1714 |
+
|
| 1715 |
+
def main():
|
| 1716 |
+
if len(sys.argv) > 1 and sys.argv[1] in ('prepare-pilot', 'probe'):
|
| 1717 |
+
command = sys.argv.pop(1)
|
| 1718 |
+
else:
|
| 1719 |
+
command = 'patch'
|
| 1720 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 1721 |
+
parser.add_argument('--source', required=True, type=Path)
|
| 1722 |
+
parser.add_argument('--output', required=True, type=Path)
|
| 1723 |
+
if command == 'patch':
|
| 1724 |
+
parser.add_argument('--no-share-images', action='store_true', help='Reproduce the completed compatibility-only patch')
|
| 1725 |
+
parser.add_argument('--no-task-setup', action='store_true', help='Build-only control for repair comparisons')
|
| 1726 |
+
parser.add_argument('--no-offline-verifier', action='store_true', help='Keep the original online grading wrapper')
|
| 1727 |
+
parser.add_argument('--no-reviewed-repairs', action='store_true', help='Keep original instructions and build-relative timestamps')
|
| 1728 |
+
parser.add_argument('--no-static-repairs', action='store_true', help='Reproduce historical output without suffix and reviewed CPU repairs')
|
| 1729 |
+
parser.add_argument('--filter-reviewed', action='store_true', help='Archive the two source-bound exclusions reviewed under the recorded Helma/Apptainer profile')
|
| 1730 |
+
if command == 'prepare-pilot':
|
| 1731 |
+
parser.add_argument('--task', action='append')
|
| 1732 |
+
if command == 'probe':
|
| 1733 |
+
parser.add_argument('--manifest', required=True, type=Path)
|
| 1734 |
+
parser.add_argument('--bridge-url', required=True)
|
| 1735 |
+
parser.add_argument('--images', required=True, type=Path)
|
| 1736 |
+
args = parser.parse_args()
|
| 1737 |
+
if command == 'patch':
|
| 1738 |
+
patch_main(args)
|
| 1739 |
+
elif command == 'prepare-pilot':
|
| 1740 |
+
pilot_main(args)
|
| 1741 |
+
else:
|
| 1742 |
+
raise SystemExit(asyncio.run(probe_main(args)))
|
| 1743 |
+
|
| 1744 |
+
|
| 1745 |
+
if __name__ == '__main__':
|
| 1746 |
+
main()
|
bugsinpy-original_environment-reliable/patch.py
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
crosscodeeval_environment-reliable/images.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
crosscodeeval_environment-reliable/patch.py
ADDED
|
@@ -0,0 +1,1438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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parquet:
|
| 5 |
+
1. Match it to the pinned upstream record (amazon-science/cceval 40c68d2b) by
|
| 6 |
+
prompt and groundtruth. Unmatched or ambiguous rows keep their files and only
|
| 7 |
+
get steps 4-5.
|
| 8 |
+
2. Keep the task only if every identifier of its graded reference is knowable.
|
| 9 |
+
A name is knowable when it occurs in what the agent sees (instruction,
|
| 10 |
+
context excerpts or their file names) as a whole word or by all its
|
| 11 |
+
camelCase/snake_case parts, or is a literal, a python standard-library name,
|
| 12 |
+
a name in KNOWN_NAMES, or a name used in API position by tasks from
|
| 13 |
+
COMMON_REPOS other repositories. Context comes from the first retrieval
|
| 14 |
+
(BM25, UniXcoder, OpenAI; before-cursor only) that makes every name
|
| 15 |
+
knowable; tasks with no such retrieval, or with no identifier at all, are
|
| 16 |
+
dropped.
|
| 17 |
+
3. Write that retrieval's excerpts to setup_files/context/, minus empty ones,
|
| 18 |
+
ones from the target file and ones containing the reference.
|
| 19 |
+
4. Replace tests/test.sh with the benchmark scorer (VERIFIER, written as
|
| 20 |
+
tests/cceval_verifier.py; python tasks also get tests/prompt.txt) and remove
|
| 21 |
+
the legacy grading bullet from instruction.md.
|
| 22 |
+
5. Add an oracle (solution/solve.sh) that writes the reference.
|
| 23 |
+
|
| 24 |
+
The report (<output>.report.json) lists kept, dropped and unmatched task IDs,
|
| 25 |
+
the retrieval used per task and the unknowable names per tried retrieval.
|
| 26 |
+
Beside the output it writes review/dropped.jsonl (every dropped task with the
|
| 27 |
+
reason and the names that were not inferable) and review/sample.md (40 of them
|
| 28 |
+
with their code, to read): the filter and its audit are one script, so they
|
| 29 |
+
cannot disagree.
|
| 30 |
+
The standard-library list comes from the running interpreter (python_version
|
| 31 |
+
in the report).
|
| 32 |
+
"""
|
| 33 |
+
from __future__ import annotations
|
| 34 |
+
|
| 35 |
+
# Support both direct execution and python -m data.<source>.patch.
|
| 36 |
+
import sys
|
| 37 |
+
from pathlib import Path
|
| 38 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
import argparse
|
| 42 |
+
import hashlib
|
| 43 |
+
import io
|
| 44 |
+
import json
|
| 45 |
+
import os
|
| 46 |
+
import re
|
| 47 |
+
import sys
|
| 48 |
+
import tarfile
|
| 49 |
+
import types
|
| 50 |
+
from pathlib import Path, PurePosixPath
|
| 51 |
+
|
| 52 |
+
import pyarrow as pa
|
| 53 |
+
import pyarrow.parquet as pq
|
| 54 |
+
|
| 55 |
+
PATCH_EXPLANATION = (
|
| 56 |
+
"Issue: TaskTrove omitted the benchmark's cross-file context. Its C#, Python and "
|
| 57 |
+
"TypeScript verifiers gave 0.25 reward for short code-like answers and could give "
|
| 58 |
+
"full reward for prefix or leading-identifier matches without a correct completion. "
|
| 59 |
+
"Java used a whole-answer diff that rejected different indentation. Fix: Replace this scoring "
|
| 60 |
+
"with normalized exact match of the first statement, add a reference solution, "
|
| 61 |
+
"and pin verifier dependencies. For uniquely matched upstream tasks, restore retrieved "
|
| 62 |
+
"cross-file excerpts after removing target-file and answer-containing excerpts. "
|
| 63 |
+
"Exclude tasks when the supplied code and known library names do not give the agent "
|
| 64 |
+
"enough information to infer names required by the expected answer. Also exclude "
|
| 65 |
+
"tasks whose scored answer contains no variable, function or other code names."
|
| 66 |
+
)
|
| 67 |
+
MISSING_NAMES_LABEL = 'Required code names cannot be inferred'
|
| 68 |
+
MISSING_NAMES_EXPLANATION = (
|
| 69 |
+
"The expected answer uses names, such as methods or variables, that the agent "
|
| 70 |
+
"cannot infer from the prompt, the available excerpts from other files, or the "
|
| 71 |
+
"filter's list of known library names. None of the available sets of excerpts "
|
| 72 |
+
"provides enough information. The agent would have to guess these names to match "
|
| 73 |
+
"the expected answer."
|
| 74 |
+
)
|
| 75 |
+
NO_NAMES_LABEL = 'Expected completion contains no code names'
|
| 76 |
+
NO_NAMES_EXPLANATION = (
|
| 77 |
+
"The part of the expected answer that is scored contains no variable, function, "
|
| 78 |
+
"class or other code names (identifiers). These tasks were excluded by the "
|
| 79 |
+
"patcher's rule requiring at least one such name in the scored completion."
|
| 80 |
+
)
|
| 81 |
+
CHANGE_FILE_LABELS = {name: 'context-and-verifier-repaired' for name in
|
| 82 |
+
('instruction.md', 'tests/', 'solution/', 'environment/', 'setup_files/context/')}
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
def change_explanation(context_restored):
|
| 86 |
+
return PATCH_EXPLANATION + ("" if context_restored else
|
| 87 |
+
" Cross-file excerpts were not added for this task.")
|
| 88 |
+
|
| 89 |
+
CONTEXT_NOTE = ("\n\nAdditional read-only cross-file context is available under:\n"
|
| 90 |
+
" /setup_files/context/\n\n"
|
| 91 |
+
"These files are retrieved excerpts from related repository files.\n"
|
| 92 |
+
"They may be incomplete and may begin or end in the middle of a file.\n"
|
| 93 |
+
"Inspect them when deciding the missing continuation.\n")
|
| 94 |
+
|
| 95 |
+
# Written into every task as tests/cceval_verifier.py (python3 standard library only).
|
| 96 |
+
VERIFIER = r'''#!/usr/bin/env python3
|
| 97 |
+
"""Score one CrossCodeEval task with the benchmark's own metric code.
|
| 98 |
+
|
| 99 |
+
Port of amazon-science/cceval 40c68d2b (scripts/eval_metric.py,
|
| 100 |
+
scripts/eval_utils.py, scripts/keywords). Plumbing differences: keyword files
|
| 101 |
+
inlined, nltk's word tokenizer is re.findall(r"\\w+"), fuzz.ratio is its
|
| 102 |
+
difflib path, and python statement boundaries use ast.parse instead of
|
| 103 |
+
tree-sitter.
|
| 104 |
+
|
| 105 |
+
Reward = exact match of the first statement: truncate, remove comments, strip
|
| 106 |
+
each line, drop empty lines, compare the line lists. Edit similarity and
|
| 107 |
+
identifier EM/precision/recall/F1 are reported next to it.
|
| 108 |
+
|
| 109 |
+
Deviations from the benchmark, each applied to prediction and reference alike:
|
| 110 |
+
- the reference is truncated too (the benchmark truncates only the prediction,
|
| 111 |
+
so a reference with a second statement could never match);
|
| 112 |
+
- csharp/java/typescript: ';', '{', '}' and '//' inside string or template
|
| 113 |
+
literals do not end a statement or start a comment; '#' is a comment only in
|
| 114 |
+
python;
|
| 115 |
+
- a bracket with only whitespace before it does not end the statement (the
|
| 116 |
+
benchmark's `if end_idx` skipped index 0);
|
| 117 |
+
- typescript: a '{ ... }' group closed on the same line belongs to the statement;
|
| 118 |
+
- a final line that is only '{' is ignored.
|
| 119 |
+
"""
|
| 120 |
+
from __future__ import annotations
|
| 121 |
+
|
| 122 |
+
import argparse
|
| 123 |
+
import ast
|
| 124 |
+
import difflib
|
| 125 |
+
import json
|
| 126 |
+
import keyword
|
| 127 |
+
import re
|
| 128 |
+
import sys
|
| 129 |
+
from pathlib import Path
|
| 130 |
+
|
| 131 |
+
CCEVAL_COMMIT = "40c68d2b7ca2a8eae95d901ac80e6a540a84a53d"
|
| 132 |
+
|
| 133 |
+
# --- scripts/keywords/*.txt (keywordlist.py: python uses keyword.kwlist) ---
|
| 134 |
+
KEYWORDS = {
|
| 135 |
+
"java": """abstract assert boolean break byte case catch char class continue
|
| 136 |
+
default do double else enum extends final finally float for if implements
|
| 137 |
+
import instanceof int interface long native new package private protected
|
| 138 |
+
public return short static strictfp super switch synchronized this throw
|
| 139 |
+
throws transient try void volatile while var const goto""",
|
| 140 |
+
"csharp": """abstract as base bool break byte case catch char checked class
|
| 141 |
+
const continue decimal default delegate do double else enum event explicit
|
| 142 |
+
extern finally fixed float for foreach goto if implicit in int interface
|
| 143 |
+
internal is lock long namespace new null object operator out override params
|
| 144 |
+
private protected public readonly ref return sbyte sealed short sizeof
|
| 145 |
+
stackalloc static string struct switch this throw try typeof uint ulong
|
| 146 |
+
unchecked unsafe ushort using virtual void volatile while""",
|
| 147 |
+
"typescript": """break case catch class const continue debugger default delete
|
| 148 |
+
do else export extends finally for function if import in instanceof new
|
| 149 |
+
return super switch this throw try typeof var void while with yield enum
|
| 150 |
+
implements interface let package private protected public static""",
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
def get_language_keywords(language):
|
| 155 |
+
language = language.lower()
|
| 156 |
+
if language == "python":
|
| 157 |
+
return frozenset(k for k in keyword.kwlist if k != "True" and k != "False")
|
| 158 |
+
return frozenset(KEYWORDS[language].split())
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
# --- scripts/eval_utils.py ---
|
| 162 |
+
IDENTIFIER_REGEX = re.compile("[_a-zA-Z][_a-zA-Z0-9]*")
|
| 163 |
+
REGEX_TEXT = ("(?<=[a-z0-9])(?=[A-Z])|"
|
| 164 |
+
"(?<=[A-Z0-9])(?=[A-Z][a-z])|"
|
| 165 |
+
"(?<=[0-9])(?=[a-zA-Z])|"
|
| 166 |
+
"(?<=[A-Za-z])(?=[0-9])|"
|
| 167 |
+
"(?<=[@$.'\"])(?=[a-zA-Z0-9])|"
|
| 168 |
+
"(?<=[a-zA-Z0-9])(?=[@$.'\"])|"
|
| 169 |
+
"_|\\s+")
|
| 170 |
+
string_pattern = r'"([^"\\]*(\\.[^"\\]*)*)"|\'([^\'\\]*(\\.[^\'\\]*)*)\''
|
| 171 |
+
|
| 172 |
+
SPLIT_REGEX = re.compile(REGEX_TEXT)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def code_tokenize(text):
|
| 176 |
+
"""nltk RegexpTokenizer(r'\\w+').tokenize"""
|
| 177 |
+
return re.findall(r"\w+", text)
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
def fuzz_ratio(s1, s2):
|
| 181 |
+
"""fuzzywuzzy.fuzz.ratio without python-Levenshtein (the benchmark's install)."""
|
| 182 |
+
if s1 is None or s2 is None:
|
| 183 |
+
return 0
|
| 184 |
+
if s1 == s2:
|
| 185 |
+
return 100
|
| 186 |
+
return int(round(100 * difflib.SequenceMatcher(None, s1, s2).ratio()))
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
def cal_edit_sim(references, hypotheses):
|
| 190 |
+
total = len(references)
|
| 191 |
+
edit_sim = 0.0
|
| 192 |
+
for pred, gt in zip(hypotheses, references):
|
| 193 |
+
pred = pred.strip()
|
| 194 |
+
gt = gt.strip()
|
| 195 |
+
edit_sim += fuzz_ratio(pred, gt)
|
| 196 |
+
return edit_sim / total
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
def split_identifier_into_parts(identifier):
|
| 200 |
+
"""
|
| 201 |
+
Split a single identifier into parts on snake_case and camelCase
|
| 202 |
+
"""
|
| 203 |
+
identifier_parts = list(s for s in SPLIT_REGEX.split(identifier) if len(s) > 0)
|
| 204 |
+
|
| 205 |
+
if len(identifier_parts) == 0:
|
| 206 |
+
return [identifier]
|
| 207 |
+
if "_" in identifier: # We consider "_" as part of identifier and add it back in between each semantic part
|
| 208 |
+
# if snake_case, we only split identifiers based on "_", ignore the mixed camelCase or other special symbols
|
| 209 |
+
# this helps us avoid splitting identifiers like "get_2d_array" into ["get", "2", "d", "array"]
|
| 210 |
+
# also avoid many other corner cases
|
| 211 |
+
identifier_parts = identifier.split("_")
|
| 212 |
+
tmp = [identifier_parts[0]]
|
| 213 |
+
for i in identifier_parts[1:]:
|
| 214 |
+
tmp.append("_")
|
| 215 |
+
tmp.append(i)
|
| 216 |
+
identifier_parts = tmp
|
| 217 |
+
|
| 218 |
+
return identifier_parts
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
def is_identifier(token, lang=None):
|
| 222 |
+
return True if IDENTIFIER_REGEX.match(token) \
|
| 223 |
+
and (lang is None or token not in get_language_keywords(lang)) \
|
| 224 |
+
else False
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
def extract_identifiers(source_code, lang):
|
| 228 |
+
# the main idea is to remove String from a source code
|
| 229 |
+
# then, tokenize the code to get all words and match with identifier regular expression
|
| 230 |
+
# check if it is a language specific keyword, it not, then it is an identifier
|
| 231 |
+
source_code_without_strings = re.sub(string_pattern, '', source_code)
|
| 232 |
+
_ids = [t for t in code_tokenize(source_code_without_strings) if is_identifier(t, lang)]
|
| 233 |
+
return _ids
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
def code_chars(s):
|
| 237 |
+
"""(index, char) outside string and template literals; ${...} parts are code."""
|
| 238 |
+
i, n, state = 0, len(s), []
|
| 239 |
+
while i < n:
|
| 240 |
+
c = s[i]
|
| 241 |
+
top = state[-1] if state else None
|
| 242 |
+
if top in ('"', "'", '`'):
|
| 243 |
+
if c == '\\':
|
| 244 |
+
i += 2
|
| 245 |
+
continue
|
| 246 |
+
if c == top:
|
| 247 |
+
state.pop()
|
| 248 |
+
elif top == '`' and s.startswith('${', i):
|
| 249 |
+
state.append('${')
|
| 250 |
+
i += 2
|
| 251 |
+
continue
|
| 252 |
+
i += 1
|
| 253 |
+
continue
|
| 254 |
+
if c in ('"', "'", '`'):
|
| 255 |
+
state.append(c)
|
| 256 |
+
elif top == '${' and c == '}':
|
| 257 |
+
state.pop()
|
| 258 |
+
else:
|
| 259 |
+
yield i, c
|
| 260 |
+
i += 1
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
def get_bracket_lang_statement(completion, inline_groups=False):
|
| 264 |
+
chars = list(code_chars(completion))
|
| 265 |
+
end_idx = None
|
| 266 |
+
k = 0
|
| 267 |
+
while k < len(chars):
|
| 268 |
+
i, c = chars[k]
|
| 269 |
+
if c in [";", "}", "{"]:
|
| 270 |
+
# A leading bracket (`} as Thread;`, `});`) is not a statement by itself.
|
| 271 |
+
if not completion[:i].strip():
|
| 272 |
+
k += 1
|
| 273 |
+
continue
|
| 274 |
+
if c == "{" and inline_groups:
|
| 275 |
+
# A group closed on the same line (object literal, destructuring)
|
| 276 |
+
# belongs to the statement; only a `{` left open starts a block.
|
| 277 |
+
depth, j, closed = 0, k, None
|
| 278 |
+
while j < len(chars):
|
| 279 |
+
if chars[j][1] == "{":
|
| 280 |
+
depth += 1
|
| 281 |
+
elif chars[j][1] == "}":
|
| 282 |
+
depth -= 1
|
| 283 |
+
if depth == 0:
|
| 284 |
+
closed = j
|
| 285 |
+
break
|
| 286 |
+
j += 1
|
| 287 |
+
if closed is not None and "\n" not in completion[i:chars[closed][0]]:
|
| 288 |
+
k = closed + 1
|
| 289 |
+
continue
|
| 290 |
+
end_idx = i
|
| 291 |
+
break
|
| 292 |
+
k += 1
|
| 293 |
+
return completion[:end_idx + 1] if end_idx is not None else completion
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def remove_comments(code, lang=None):
|
| 297 |
+
"""'#' comments for python, '//' comments outside strings otherwise."""
|
| 298 |
+
if lang == "python":
|
| 299 |
+
return re.sub(r'#.*', '', code)
|
| 300 |
+
out, last = [], 0
|
| 301 |
+
for i, c in code_chars(code):
|
| 302 |
+
if c == '/' and code.startswith('//', i):
|
| 303 |
+
j = code.find('\n', i)
|
| 304 |
+
j = len(code) if j < 0 else j
|
| 305 |
+
out.append(code[last:i])
|
| 306 |
+
last = j
|
| 307 |
+
out.append(code[last:])
|
| 308 |
+
return ''.join(out)
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
def is_parse_valid(parser, code):
|
| 312 |
+
"""Benchmark: tree-sitter parse tree without ERROR nodes. Here: ast.parse."""
|
| 313 |
+
try:
|
| 314 |
+
ast.parse(code)
|
| 315 |
+
return True
|
| 316 |
+
except (SyntaxError, ValueError, RecursionError, MemoryError):
|
| 317 |
+
return False
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
def get_python_one_statement(prompt, completion, parser):
|
| 321 |
+
for i in range(len(completion)):
|
| 322 |
+
code = prompt + completion[:i + 1]
|
| 323 |
+
if not is_parse_valid(parser, code):
|
| 324 |
+
continue
|
| 325 |
+
if completion[i + 1] == "\n":
|
| 326 |
+
return completion[:i + 1].rstrip()
|
| 327 |
+
|
| 328 |
+
return completion
|
| 329 |
+
|
| 330 |
+
|
| 331 |
+
def postprocess_code_lines(prompt, completion, parser, lang):
|
| 332 |
+
try:
|
| 333 |
+
if lang in ["java", "csharp", "typescript"]:
|
| 334 |
+
return get_bracket_lang_statement(completion, inline_groups=(lang == "typescript"))
|
| 335 |
+
elif lang == "python":
|
| 336 |
+
return get_python_one_statement(prompt, completion, parser)
|
| 337 |
+
except Exception as e:
|
| 338 |
+
return completion
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
# --- scripts/eval_metric.py ---
|
| 342 |
+
def compute_id_match(pred_ids, target_ids):
|
| 343 |
+
pred_ids = list(set(pred_ids))
|
| 344 |
+
target_ids = list(set(target_ids))
|
| 345 |
+
tp = 0
|
| 346 |
+
fp = 0
|
| 347 |
+
fn = 0
|
| 348 |
+
for pid in pred_ids:
|
| 349 |
+
if pid in target_ids:
|
| 350 |
+
tp += 1
|
| 351 |
+
else:
|
| 352 |
+
fp += 1
|
| 353 |
+
for tid in target_ids:
|
| 354 |
+
if tid not in pred_ids:
|
| 355 |
+
fn += 1
|
| 356 |
+
return tp, fp, fn
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
def normalized_lines(code):
|
| 360 |
+
return [l.strip() for l in code.split("\n") if l.strip()]
|
| 361 |
+
|
| 362 |
+
|
| 363 |
+
def score(prompt, pred, groundtruth, lang):
|
| 364 |
+
"""process_examples plus the per-sample block of compute_metric_stmt."""
|
| 365 |
+
prediction = remove_comments(postprocess_code_lines(prompt, pred, None, lang), lang)
|
| 366 |
+
target = remove_comments(postprocess_code_lines(prompt, groundtruth, None, lang), lang)
|
| 367 |
+
target_truncated = normalized_lines(target) != normalized_lines(remove_comments(groundtruth, lang))
|
| 368 |
+
|
| 369 |
+
pred_lines = normalized_lines(prediction)
|
| 370 |
+
gt_lines = normalized_lines(target)
|
| 371 |
+
# A trailing lone "{" (C# method headers) carries no information.
|
| 372 |
+
if len(pred_lines) > 1 and pred_lines[-1] == "{":
|
| 373 |
+
pred_lines = pred_lines[:-1]
|
| 374 |
+
if len(gt_lines) > 1 and gt_lines[-1] == "{":
|
| 375 |
+
gt_lines = gt_lines[:-1]
|
| 376 |
+
em_label = int(pred_lines == gt_lines)
|
| 377 |
+
|
| 378 |
+
pred_ids = extract_identifiers(prediction, lang)
|
| 379 |
+
target_ids = extract_identifiers(target, lang)
|
| 380 |
+
|
| 381 |
+
identifier_em = int(pred_ids == target_ids)
|
| 382 |
+
es = cal_edit_sim([target], [prediction])
|
| 383 |
+
id_tp, id_fp, id_fn = compute_id_match(pred_ids, target_ids)
|
| 384 |
+
return {
|
| 385 |
+
"em": em_label,
|
| 386 |
+
"es": es,
|
| 387 |
+
"id_em": identifier_em,
|
| 388 |
+
"id_precision": id_tp / (id_tp + id_fp) if (id_tp + id_fp) != 0 else 0,
|
| 389 |
+
"id_recall": id_tp / (id_tp + id_fn) if (id_tp + id_fn) != 0 else 0,
|
| 390 |
+
"id_f1": 2 * id_tp / (2 * id_tp + id_fp + id_fn) if (2 * id_tp + id_fp + id_fn) != 0 else 0,
|
| 391 |
+
}, {"pred": prediction, "target": target, "pred_ids": pred_ids, "target_ids": target_ids,
|
| 392 |
+
"pred_lines": pred_lines, "gt_lines": gt_lines, "target_truncated": target_truncated}
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
# --- plumbing ---
|
| 396 |
+
def read_text(path):
|
| 397 |
+
return Path(path).read_bytes().decode("utf-8", "replace")
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
def main(argv=None):
|
| 401 |
+
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
| 402 |
+
ap.add_argument("--language", required=True, choices=["csharp", "java", "python", "typescript"])
|
| 403 |
+
ap.add_argument("--prediction", required=True, help="the agent's answer file")
|
| 404 |
+
ap.add_argument("--reference", required=True, help="the task's groundtruth file")
|
| 405 |
+
ap.add_argument("--prompt", default=None, help="code before the cursor (python truncation)")
|
| 406 |
+
ap.add_argument("--out", required=True, help="verifier output directory")
|
| 407 |
+
a = ap.parse_args(argv)
|
| 408 |
+
out = Path(a.out)
|
| 409 |
+
out.mkdir(parents=True, exist_ok=True)
|
| 410 |
+
groundtruth = read_text(a.reference)
|
| 411 |
+
missing = not Path(a.prediction).is_file()
|
| 412 |
+
pred = "" if missing else read_text(a.prediction)
|
| 413 |
+
prompt = read_text(a.prompt) if a.prompt and Path(a.prompt).is_file() else ""
|
| 414 |
+
metrics, detail = score(prompt, pred, groundtruth, a.language)
|
| 415 |
+
rewards = {"reward": metrics["em"], "es": metrics["es"], "id_em": metrics["id_em"],
|
| 416 |
+
"id_precision": metrics["id_precision"], "id_recall": metrics["id_recall"], "id_f1": metrics["id_f1"]}
|
| 417 |
+
(out / "reward.json").write_text(json.dumps(rewards) + "\n")
|
| 418 |
+
(out / "reward.txt").write_text(f"{metrics['em']}\n")
|
| 419 |
+
detail.update(language=a.language, cceval_commit=CCEVAL_COMMIT, prediction_missing=missing,
|
| 420 |
+
prompt_chars=len(prompt))
|
| 421 |
+
(out / "metrics.json").write_text(json.dumps(detail, indent=2) + "\n")
|
| 422 |
+
lines = [f"{'PASS' if metrics['em'] else 'FAIL'}[cceval-em] es={metrics['es']} id_f1={metrics['id_f1']:.3f}"]
|
| 423 |
+
if missing:
|
| 424 |
+
lines.append(f"no prediction file: {a.prediction}")
|
| 425 |
+
if detail["target_truncated"]:
|
| 426 |
+
lines.append("reference truncated to its first statement (the benchmark would not truncate it)")
|
| 427 |
+
if not metrics["em"]:
|
| 428 |
+
lines += list(difflib.unified_diff(detail["gt_lines"], detail["pred_lines"], "reference", "prediction", lineterm=""))
|
| 429 |
+
(out / "test_output.txt").write_text("\n".join(lines) + "\n")
|
| 430 |
+
print("\n".join(lines))
|
| 431 |
+
return 0 if metrics["em"] else 1
|
| 432 |
+
|
| 433 |
+
|
| 434 |
+
if __name__ == "__main__":
|
| 435 |
+
sys.exit(main())
|
| 436 |
+
'''
|
| 437 |
+
|
| 438 |
+
|
| 439 |
+
# The pinned upstream: which TaskTrove files this patch reads, at which revision,
|
| 440 |
+
# and the name each repaired set is published under. --all fetches and patches
|
| 441 |
+
# every one of them, so "run the patcher on the pinned upstream" is one command.
|
| 442 |
+
UPSTREAM_REPO = 'open-thoughts/TaskTrove'
|
| 443 |
+
UPSTREAM_REVISION = '96567362fa3c41208e0954317c53767023b420eb'
|
| 444 |
+
SOURCES = {
|
| 445 |
+
'csharp': ('deprecated/laion__exp_rpt_crosscodeeval-csharp-v4', 'laion__exp_rpt_crosscodeeval-csharp-v5'),
|
| 446 |
+
'java': ('laion__exp_rpt_crosscodeeval-java-v3', 'laion__exp_rpt_crosscodeeval-java-v4'),
|
| 447 |
+
'python': ('deprecated/laion__exp_rpt_crosscodeeval-python-v2', 'laion__exp_rpt_crosscodeeval-python-v3'),
|
| 448 |
+
'typescript': ('deprecated/laion__exp_rpt_crosscodeeval-typescript-v2', 'laion__exp_rpt_crosscodeeval-typescript-v3'),
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
RETRIEVERS = ('rg1_bm25', 'rg1_unixcoder_cosine_sim', 'rg1_openai_cosine_sim')
|
| 452 |
+
COMMON_REPOS = 3
|
| 453 |
+
LITERALS = frozenset('true false null undefined None True False this self super NaN Infinity void'.split())
|
| 454 |
+
VERBS = frozenset("""get set is has to from load build create make add remove update find read
|
| 455 |
+
write parse init new on handle compute check fetch put with use apply run do try can should
|
| 456 |
+
validate convert render register resolve format open close start stop enable disable reset
|
| 457 |
+
clear delete save send receive emit ensure as into for by of at""".split())
|
| 458 |
+
# Known without context: keywords missing from the benchmark's keyword lists,
|
| 459 |
+
# language globals, standard and dominant framework APIs (from a review of
|
| 460 |
+
# names that alone blocked dropped tasks).
|
| 461 |
+
KNOWN_NAMES = {
|
| 462 |
+
'csharp': frozenset("""where var async await dynamic partial yield nameof
|
| 463 |
+
System Console Convert Math String Guid DateTime TimeSpan Enumerable Dictionary List HashSet
|
| 464 |
+
Exception ArgumentNullException ArgumentException InvalidOperationException NotImplementedException
|
| 465 |
+
Environment Path File Directory Regex Encoding CancellationToken Task IEnumerable Func Action
|
| 466 |
+
StringComparer StringComparison StringBuilder Nullable Tuple KeyValuePair
|
| 467 |
+
Rigidbody Collider Collision AudioClip AudioSource Material Transform GameObject Vector2 Vector3
|
| 468 |
+
Quaternion MonoBehaviour Debug Instantiate Destroy Time Mathf Input Camera Color Animator Physics
|
| 469 |
+
Renderer SpriteRenderer Texture2D Sprite Coroutine WaitForSeconds Resources Random
|
| 470 |
+
HarmonyPatch HarmonyPrefix HarmonyPostfix HarmonyBefore HarmonyAfter HarmonyPriority
|
| 471 |
+
__instance __result __state""".split()),
|
| 472 |
+
'java': frozenset("""record sealed permits yield
|
| 473 |
+
System Integer Long Double Float Boolean Character Byte Short String Math Collections Arrays Objects
|
| 474 |
+
Optional List Map Set HashMap ArrayList LinkedList HashSet TreeMap Collectors Stream Thread Runnable
|
| 475 |
+
Exception RuntimeException IllegalArgumentException IllegalStateException NullPointerException
|
| 476 |
+
StringBuilder Files Paths Path UUID Duration Instant LocalDate LocalDateTime TimeUnit Logger Random
|
| 477 |
+
singleton singletonList emptyList emptyMap unmodifiableList containsValue relativize drawOval
|
| 478 |
+
currentTimeMillis nanoTime printStackTrace parseInt valueOf toString equals hashCode format
|
| 479 |
+
requireNonNull assertEquals assertTrue assertFalse assertNotNull assertNull
|
| 480 |
+
getAndIncrement getDeclaredConstructor""".split()),
|
| 481 |
+
'python': frozenset("""assertEqual assertEquals assertTrue assertFalse assertIn assertIsNone assertRaises
|
| 482 |
+
asarray zeros ones reshape flat ndarray iloc loc DataFrame Series
|
| 483 |
+
requires_grad_ no_grad tensor cuda device vmap jit grad""".split()),
|
| 484 |
+
'typescript': frozenset("""unknown keyof never readonly infer satisfies declare override namespace as is asserts
|
| 485 |
+
type of get set
|
| 486 |
+
JSON Math Object Array Promise Number String Boolean Date Map Set WeakMap Symbol Error TypeError RegExp
|
| 487 |
+
console window document navigator globalThis process Buffer setTimeout setInterval clearTimeout
|
| 488 |
+
fetch Response Request Headers URL URLSearchParams Iterable Iterator IterableIterator
|
| 489 |
+
Partial Record Pick Omit Required Readonly ReturnType Parameters Awaited NonNullable
|
| 490 |
+
Uint8Array ArrayBuffer TextEncoder TextDecoder byteLength GPUBufferUsage GPUDevice GPUBuffer mappedAtCreation
|
| 491 |
+
closest querySelector querySelectorAll addEventListener getBoundingClientRect
|
| 492 |
+
lstatSync statSync readFileSync writeFileSync existsSync readdirSync mkdirSync
|
| 493 |
+
join resolve dirname basename tap""".split()),
|
| 494 |
+
}
|
| 495 |
+
# API position: after '.', 'new ' or '::', or before '(' or '<' (not prose in comments/strings).
|
| 496 |
+
API_USE = re.compile(r'(?:(?<=\.)|(?<=\bnew )|(?<=::))[A-Za-z_][A-Za-z0-9_]*|[A-Za-z_][A-Za-z0-9_]*(?=\s*[(<])')
|
| 497 |
+
|
| 498 |
+
|
| 499 |
+
def gold_path(language):
|
| 500 |
+
return 'tests/expected.txt' if language == 'java' else 'tests/solution.txt'
|
| 501 |
+
|
| 502 |
+
|
| 503 |
+
def load_verifier():
|
| 504 |
+
module = types.ModuleType('cceval_verifier')
|
| 505 |
+
exec(compile(VERIFIER, 'cceval_verifier.py', 'exec'), module.__dict__)
|
| 506 |
+
return module
|
| 507 |
+
|
| 508 |
+
|
| 509 |
+
_verifier = None
|
| 510 |
+
|
| 511 |
+
|
| 512 |
+
def verifier_module():
|
| 513 |
+
global _verifier
|
| 514 |
+
if _verifier is None:
|
| 515 |
+
_verifier = load_verifier()
|
| 516 |
+
return _verifier
|
| 517 |
+
|
| 518 |
+
|
| 519 |
+
def key(lang, prompt_text, gold):
|
| 520 |
+
return hashlib.sha256(json.dumps([lang, prompt_text, gold], ensure_ascii=False).encode()).hexdigest()
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
def norm(s):
|
| 524 |
+
return re.sub(r"\s+", " ", s).strip()
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
def unpack(blob):
|
| 528 |
+
with tarfile.open(fileobj=io.BytesIO(blob), mode="r:*") as t:
|
| 529 |
+
return {m.name.removeprefix("./"): t.extractfile(m).read() for m in t if m.isfile()}
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
def pack(files):
|
| 533 |
+
b = io.BytesIO()
|
| 534 |
+
with tarfile.open(fileobj=b, mode="w:gz") as t:
|
| 535 |
+
for name, data in files.items():
|
| 536 |
+
info = tarfile.TarInfo(name)
|
| 537 |
+
info.size = len(data)
|
| 538 |
+
info.mode = 0o755 if name.endswith('.sh') else 0o644
|
| 539 |
+
t.addfile(info, io.BytesIO(data))
|
| 540 |
+
return b.getvalue()
|
| 541 |
+
|
| 542 |
+
|
| 543 |
+
def prompt(files):
|
| 544 |
+
"""The code to complete. Source comments can contain Markdown fences, so the
|
| 545 |
+
fence before "## Your Task" ends the block, not the first one."""
|
| 546 |
+
s = files.get('instruction.md', b'').decode('utf8', 'replace')
|
| 547 |
+
m = re.search(r"## Context \(Code to Complete\)\s*\n```[^\n]*\n(.*?)\n```[ \t]*(?=\n+## Your Task(?:\n|$)|\s*\Z)", s, re.S)
|
| 548 |
+
return m.group(1) if m else None
|
| 549 |
+
|
| 550 |
+
|
| 551 |
+
def correct_grading_instruction(instruction):
|
| 552 |
+
"""Drop the legacy grading bullet and its partial-credit promises."""
|
| 553 |
+
before, separator, task = instruction.rpartition("\n## Your Task")
|
| 554 |
+
if not separator:
|
| 555 |
+
return instruction
|
| 556 |
+
task = re.sub(r"\s+It\s+also accepts[^\n]*(?:\n(?![ \t]*\n)[^\n]*)*", "", task)
|
| 557 |
+
task = re.sub(r"\n- The verifier byte-compares your fragment to a reference[^\n]*(?:\n(?![ \t]*\n)[^\n]*)*", "", task)
|
| 558 |
+
return before + separator + task
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
def add_oracle(files, language, original=None):
|
| 562 |
+
"""solution/solve.sh copies the reference (upstream groundtruth when matched)."""
|
| 563 |
+
reference = files[gold_path(language)]
|
| 564 |
+
source = 'packaged_gold'
|
| 565 |
+
if original is not None:
|
| 566 |
+
reference = original['groundtruth'].encode('utf-8')
|
| 567 |
+
if reference != files[gold_path(language)]:
|
| 568 |
+
raise ValueError('Upstream groundtruth differs from the verifier reference')
|
| 569 |
+
source = 'upstream'
|
| 570 |
+
if not reference.strip():
|
| 571 |
+
raise ValueError(f'Empty oracle reference: {gold_path(language)}')
|
| 572 |
+
files['solution/solution_snippet.txt'] = reference
|
| 573 |
+
files['solution/solve.sh'] = b'#!/bin/bash\nset -euo pipefail\nmkdir -p /app\ncp /solution/solution_snippet.txt /app/solution.txt\n'
|
| 574 |
+
return source
|
| 575 |
+
|
| 576 |
+
|
| 577 |
+
# Versions installed when the images were built and oracle/no-answer were validated
|
| 578 |
+
# (python:3.10-slim, Python 3.10.21, 2026-09-29). Packages they pull in are not pinned.
|
| 579 |
+
PIP_PINS = {'pytest': '9.1.1', 'pytest-timeout': '2.4.0'}
|
| 580 |
+
|
| 581 |
+
|
| 582 |
+
def pin_pip_installs(files):
|
| 583 |
+
"""Pin the packages named in the Dockerfile's pip installs; an unknown one is an error."""
|
| 584 |
+
name = 'environment/Dockerfile'
|
| 585 |
+
if name not in files:
|
| 586 |
+
return False
|
| 587 |
+
def pin(line):
|
| 588 |
+
words = line.group(0).split()
|
| 589 |
+
for i, word in enumerate(words[3:], 3):
|
| 590 |
+
if word.startswith('-') or '==' in word:
|
| 591 |
+
continue
|
| 592 |
+
if word not in PIP_PINS:
|
| 593 |
+
raise ValueError(f'No pinned version for pip package {word!r}; add it to PIP_PINS')
|
| 594 |
+
words[i] = f'{word}=={PIP_PINS[word]}'
|
| 595 |
+
return ' '.join(words)
|
| 596 |
+
before = files[name].decode('utf-8')
|
| 597 |
+
after = re.sub(r'^RUN pip install [^\n]*$', pin, before, flags=re.M)
|
| 598 |
+
files[name] = after.encode('utf-8')
|
| 599 |
+
return after != before
|
| 600 |
+
|
| 601 |
+
|
| 602 |
+
def benchmark_verifier(files, language, prompt_text=None):
|
| 603 |
+
"""Install the scorer and return the new tests/test.sh."""
|
| 604 |
+
files['tests/cceval_verifier.py'] = VERIFIER.encode('utf-8')
|
| 605 |
+
if language == 'python' and prompt_text is not None:
|
| 606 |
+
files['tests/prompt.txt'] = prompt_text.encode('utf-8')
|
| 607 |
+
return (f'#!/bin/bash\nmkdir -p /logs/verifier\n'
|
| 608 |
+
f'exec python3 /tests/cceval_verifier.py --language {language} --prediction /app/solution.txt'
|
| 609 |
+
f' --reference /{gold_path(language)} --prompt /tests/prompt.txt --out /logs/verifier\n').encode()
|
| 610 |
+
|
| 611 |
+
|
| 612 |
+
def context_file_name(name):
|
| 613 |
+
"""Repository paths become one file name: '/' -> '__'. Other characters stay as
|
| 614 |
+
they are; the static checks work on a renamed copy when a name needs it."""
|
| 615 |
+
return name.replace('/', '__')
|
| 616 |
+
|
| 617 |
+
|
| 618 |
+
def whole_word(ident, text):
|
| 619 |
+
return re.search(r'(?<![A-Za-z0-9_])' + re.escape(ident) + r'(?![A-Za-z0-9_])', text) is not None
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
def parts_of(ident):
|
| 623 |
+
parts = [p for p in verifier_module().split_identifier_into_parts(ident) if p and p != '_']
|
| 624 |
+
if len(parts) > 1 and parts[0].lower() in VERBS:
|
| 625 |
+
parts = parts[1:]
|
| 626 |
+
return [p.lower() for p in parts if len(p) >= 2 and not p.isdigit()]
|
| 627 |
+
|
| 628 |
+
|
| 629 |
+
_stdlib_names = None
|
| 630 |
+
|
| 631 |
+
|
| 632 |
+
def python_stdlib_names():
|
| 633 |
+
"""Attribute names of builtins and of every importable stdlib module and its classes."""
|
| 634 |
+
global _stdlib_names
|
| 635 |
+
if _stdlib_names is None:
|
| 636 |
+
import builtins, importlib, inspect, warnings
|
| 637 |
+
names = set(dir(builtins))
|
| 638 |
+
skip = {'antigravity', 'this', 'idlelib', 'turtledemo', 'tkinter.tix', '__main__'}
|
| 639 |
+
with warnings.catch_warnings():
|
| 640 |
+
warnings.simplefilter('ignore')
|
| 641 |
+
for mod in sorted(sys.stdlib_module_names - skip):
|
| 642 |
+
try:
|
| 643 |
+
m = importlib.import_module(mod)
|
| 644 |
+
except Exception:
|
| 645 |
+
continue
|
| 646 |
+
names.update(dir(m))
|
| 647 |
+
for _, cls in inspect.getmembers(m, inspect.isclass):
|
| 648 |
+
names.update(dir(cls))
|
| 649 |
+
_stdlib_names = frozenset(n for n in names if not n.startswith('_'))
|
| 650 |
+
return _stdlib_names
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def classify(ident, text, is_common=lambda ident: False, stdlib=frozenset(), known=frozenset()):
|
| 654 |
+
"""'word' | 'parts' | 'trivial' | 'literal' | 'stdlib' | 'known' | 'common' | 'missing'"""
|
| 655 |
+
if whole_word(ident, text):
|
| 656 |
+
return 'word'
|
| 657 |
+
parts = parts_of(ident)
|
| 658 |
+
if not parts:
|
| 659 |
+
return 'trivial'
|
| 660 |
+
if all(p in text.lower() for p in parts):
|
| 661 |
+
return 'parts'
|
| 662 |
+
if ident in LITERALS:
|
| 663 |
+
return 'literal'
|
| 664 |
+
if ident in stdlib:
|
| 665 |
+
return 'stdlib'
|
| 666 |
+
if ident in known:
|
| 667 |
+
return 'known'
|
| 668 |
+
return 'common' if is_common(ident) else 'missing'
|
| 669 |
+
|
| 670 |
+
|
| 671 |
+
def reference_identifiers(gold, lang, prompt_text=''):
|
| 672 |
+
"""Identifiers of the graded reference, computed exactly as the verifier does."""
|
| 673 |
+
v = verifier_module()
|
| 674 |
+
target = v.remove_comments(v.postprocess_code_lines(prompt_text, gold, None, lang), lang)
|
| 675 |
+
return sorted(set(v.extract_identifiers(target, lang)))
|
| 676 |
+
|
| 677 |
+
|
| 678 |
+
def reference_verdicts(gold, lang, text, is_common=lambda ident: False, stdlib=frozenset(), prompt_text=''):
|
| 679 |
+
known = KNOWN_NAMES.get(lang, frozenset())
|
| 680 |
+
return {i: classify(i, text, is_common, stdlib, known) for i in reference_identifiers(gold, lang, prompt_text)}
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def recoverable(verdicts):
|
| 684 |
+
return 'missing' not in verdicts.values()
|
| 685 |
+
|
| 686 |
+
|
| 687 |
+
def context_chunks(record, gold):
|
| 688 |
+
"""Retrieved excerpts minus empty ones, target-file ones and ones containing the reference."""
|
| 689 |
+
target = PurePosixPath(record.get('metadata', {}).get('file', '')).as_posix()
|
| 690 |
+
counts = dict.fromkeys(('context_chunks', 'kept_chunks', 'dropped_empty', 'dropped_target', 'dropped_gold'), 0)
|
| 691 |
+
kept = []
|
| 692 |
+
for c in (record.get('crossfile_context') or {}).get('list', []):
|
| 693 |
+
text = c.get('retrieved_chunk', '')
|
| 694 |
+
name = PurePosixPath(c.get('filename', '')).as_posix()
|
| 695 |
+
counts['context_chunks'] += 1
|
| 696 |
+
if not text.strip():
|
| 697 |
+
counts['dropped_empty'] += 1
|
| 698 |
+
elif name == target:
|
| 699 |
+
counts['dropped_target'] += 1
|
| 700 |
+
elif gold.strip() and (gold.strip() in text or norm(gold) in norm(text)):
|
| 701 |
+
counts['dropped_gold'] += 1
|
| 702 |
+
else:
|
| 703 |
+
kept.append((name, text))
|
| 704 |
+
counts['kept_chunks'] += 1
|
| 705 |
+
return kept, counts
|
| 706 |
+
|
| 707 |
+
|
| 708 |
+
def load_original(archive, retrievers=RETRIEVERS):
|
| 709 |
+
"""{retriever: {key: [records]}} from the pinned upstream archive."""
|
| 710 |
+
idx = {r: {} for r in retrievers}
|
| 711 |
+
with tarfile.open(archive, 'r:*') as t:
|
| 712 |
+
for m in t:
|
| 713 |
+
name = PurePosixPath(m.name).name
|
| 714 |
+
retriever = name[len('line_completion_'):-len('.jsonl')]
|
| 715 |
+
if not (m.isfile() and name.startswith('line_completion_') and name.endswith('.jsonl') and retriever in idx):
|
| 716 |
+
continue
|
| 717 |
+
lang = PurePosixPath(m.name).parts[0]
|
| 718 |
+
for line in t.extractfile(m):
|
| 719 |
+
r = json.loads(line)
|
| 720 |
+
idx[retriever].setdefault(key(lang, r['prompt'], r['groundtruth']), []).append(r)
|
| 721 |
+
return idx
|
| 722 |
+
|
| 723 |
+
|
| 724 |
+
def choose_context(files, lang, prompt_text, gold, k, matches, originals, is_common, stdlib):
|
| 725 |
+
"""First retrieval whose excerpts make every reference name knowable, plus the
|
| 726 |
+
unknowable names per tried retrieval (None: no unique record there)."""
|
| 727 |
+
instruction = files['instruction.md'].decode('utf8', 'replace')
|
| 728 |
+
missing = {}
|
| 729 |
+
for retriever in RETRIEVERS:
|
| 730 |
+
candidates = matches if retriever == 'rg1_bm25' else originals[retriever].get(k, [])
|
| 731 |
+
if len(candidates) != 1:
|
| 732 |
+
missing[retriever] = None
|
| 733 |
+
continue
|
| 734 |
+
kept, counts = context_chunks(candidates[0], gold)
|
| 735 |
+
visible = instruction + '\n' + '\n'.join(n for n, _ in kept) + '\n' + '\n'.join(t for _, t in kept)
|
| 736 |
+
verdicts = reference_verdicts(gold, lang, visible, is_common, stdlib, prompt_text)
|
| 737 |
+
if recoverable(verdicts):
|
| 738 |
+
return (retriever, kept, counts, verdicts), missing
|
| 739 |
+
missing[retriever] = [i for i, v in verdicts.items() if v == 'missing']
|
| 740 |
+
return None, missing
|
| 741 |
+
|
| 742 |
+
|
| 743 |
+
def graded_reference(gold, lang, prompt_text=''):
|
| 744 |
+
"""The part of the reference the verifier actually compares."""
|
| 745 |
+
return verifier_module().postprocess_code_lines(prompt_text, gold, None, lang)
|
| 746 |
+
|
| 747 |
+
|
| 748 |
+
def write_review(out, records, sample=40, seed=20260916):
|
| 749 |
+
"""Why each dropped task was dropped, plus a sample of them to read.
|
| 750 |
+
|
| 751 |
+
Only the dropped ones are written out: the kept tasks are the output parquet,
|
| 752 |
+
and their verdicts are counted in the report.
|
| 753 |
+
"""
|
| 754 |
+
out.mkdir(parents=True, exist_ok=True)
|
| 755 |
+
dropped = [r for r in records if not r['kept']]
|
| 756 |
+
with open(out / 'dropped.jsonl', 'w') as f:
|
| 757 |
+
for r in dropped:
|
| 758 |
+
f.write(json.dumps(r) + '\n')
|
| 759 |
+
import random
|
| 760 |
+
picked = random.Random(seed).sample(dropped, min(sample, len(dropped)))
|
| 761 |
+
md = ['# Dropped tasks, sampled for review', '',
|
| 762 |
+
f'{len(dropped)} of {len(records)} tasks were dropped; {len(picked)} shown.', '']
|
| 763 |
+
for r in picked:
|
| 764 |
+
md += [f"## {r['task']} ({r['language']}) - {r['reason']}", '',
|
| 765 |
+
'```', r['graded_reference'].strip(), '```', '',
|
| 766 |
+
f"unknowable names: {', '.join(r['missing_names']) or '(none)'}", '']
|
| 767 |
+
(out / 'sample.md').write_text('\n'.join(md))
|
| 768 |
+
return len(dropped)
|
| 769 |
+
|
| 770 |
+
|
| 771 |
+
def fetch_upstream(dest):
|
| 772 |
+
"""The pinned upstream parquets, downloaded once into <dest>/<source name>/."""
|
| 773 |
+
from huggingface_hub import hf_hub_download
|
| 774 |
+
out = {}
|
| 775 |
+
for lang, (src, published) in SOURCES.items():
|
| 776 |
+
path = Path(hf_hub_download(UPSTREAM_REPO, f'{src}/tasks.parquet', repo_type='dataset',
|
| 777 |
+
revision=UPSTREAM_REVISION, local_dir=dest))
|
| 778 |
+
out[lang] = (path, published)
|
| 779 |
+
print(f'{src}/tasks.parquet -> {path}', file=sys.stderr)
|
| 780 |
+
return out
|
| 781 |
+
|
| 782 |
+
|
| 783 |
+
def main():
|
| 784 |
+
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
| 785 |
+
ap.add_argument('--input', help='one upstream parquet')
|
| 786 |
+
ap.add_argument('--output', help='where the repaired parquet goes')
|
| 787 |
+
ap.add_argument('--all', action='store_true',
|
| 788 |
+
help=f'fetch and patch every source of {UPSTREAM_REPO} at {UPSTREAM_REVISION[:8]}')
|
| 789 |
+
ap.add_argument('--upstream', type=Path, default=Path(os.environ.get('OT_WORKSPACE', '.')) / 'upstream',
|
| 790 |
+
help='where --all downloads the pinned parquets')
|
| 791 |
+
ap.add_argument('--outdir', type=Path, default=Path(os.environ.get('OT_WORKSPACE', '.')) / 'patched',
|
| 792 |
+
help='where --all writes the repaired parquets')
|
| 793 |
+
ap.add_argument('--archive', help='the upstream cceval archive; not needed with --pin-only')
|
| 794 |
+
ap.add_argument('--pin-only', action='store_true',
|
| 795 |
+
help='only pin the pip installs of an already patched parquet (--input, --output)')
|
| 796 |
+
a = ap.parse_args()
|
| 797 |
+
if a.pin_only:
|
| 798 |
+
if not (a.input and a.output):
|
| 799 |
+
raise SystemExit('--pin-only needs --input and --output')
|
| 800 |
+
print(json.dumps(pin_parquet(Path(a.input), Path(a.output))))
|
| 801 |
+
return
|
| 802 |
+
if not a.archive:
|
| 803 |
+
raise SystemExit('--archive is required')
|
| 804 |
+
if a.all:
|
| 805 |
+
originals = load_original(a.archive)
|
| 806 |
+
for lang, (src, published) in fetch_upstream(a.upstream).items():
|
| 807 |
+
out = a.outdir / published / 'tasks.parquet'
|
| 808 |
+
print(f'\n=== {lang}: {src} -> {out}', file=sys.stderr)
|
| 809 |
+
patch_parquet(src, out, originals)
|
| 810 |
+
return
|
| 811 |
+
if not (a.input and a.output):
|
| 812 |
+
raise SystemExit('pass --all, or both --input and --output')
|
| 813 |
+
patch_parquet(Path(a.input), Path(a.output), load_original(a.archive))
|
| 814 |
+
|
| 815 |
+
|
| 816 |
+
def pin_parquet(input_path, output_path):
|
| 817 |
+
"""Pin the pip installs of every task; all other files keep their bytes."""
|
| 818 |
+
parent_manifest = input_path.with_suffix('.manifest.json')
|
| 819 |
+
provenance = json.loads(parent_manifest.read_text()) if parent_manifest.exists() else None
|
| 820 |
+
if provenance:
|
| 821 |
+
original = provenance.get('original_parquet')
|
| 822 |
+
if not original:
|
| 823 |
+
raise ValueError('pin-only reporting needs a manifest with original_parquet; rerun the full patcher')
|
| 824 |
+
with Path(original['path']).open('rb') as stream:
|
| 825 |
+
if hashlib.file_digest(stream, 'sha256').hexdigest() != original['sha256']:
|
| 826 |
+
raise ValueError('original Parquet changed since the full patch run')
|
| 827 |
+
for artifact in (output_path.with_suffix('.archive.parquet'), output_path.with_suffix('.manifest.json')):
|
| 828 |
+
if artifact.exists():
|
| 829 |
+
raise ValueError(f'Use a new output location; reporting artifact exists: {artifact}')
|
| 830 |
+
table = pq.read_table(input_path)
|
| 831 |
+
rows = {n: [] for n in table.column_names}
|
| 832 |
+
pinned = 0
|
| 833 |
+
for row in table.to_pylist():
|
| 834 |
+
files = unpack(row['task_binary'])
|
| 835 |
+
if pin_pip_installs(files):
|
| 836 |
+
pinned += 1
|
| 837 |
+
row['task_binary'] = pack(files)
|
| 838 |
+
for n in rows:
|
| 839 |
+
rows[n].append(row[n])
|
| 840 |
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
| 841 |
+
pq.write_table(pa.table(rows, schema=table.schema), output_path)
|
| 842 |
+
if provenance:
|
| 843 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
| 844 |
+
from data.utils.patch_reporting import write_patch_report
|
| 845 |
+
write_patch_report(original['path'], output_path, patcher=__file__, source=provenance['source'],
|
| 846 |
+
dropped={task['task_id']: {'category': task['labels'][0], 'reason': task['reason']}
|
| 847 |
+
for task in provenance['tasks'] if task['action'] == 'dropped'},
|
| 848 |
+
file_labels=CHANGE_FILE_LABELS,
|
| 849 |
+
change_reasons={task['task_id']: task.get('reason') or change_explanation(
|
| 850 |
+
any(name.startswith('setup_files/context/') for name in task['changed_files']))
|
| 851 |
+
for task in provenance['tasks'] if task['action'] == 'changed'},
|
| 852 |
+
patches=[*provenance.get('patches', []), {'operation': 'pin-only', 'pins': PIP_PINS}])
|
| 853 |
+
return {'input': str(input_path), 'input_sha256': hashlib.sha256(input_path.read_bytes()).hexdigest(),
|
| 854 |
+
'output': str(output_path), 'output_sha256': hashlib.sha256(output_path.read_bytes()).hexdigest(),
|
| 855 |
+
'tasks': table.num_rows, 'pinned': pinned, 'pins': PIP_PINS}
|
| 856 |
+
|
| 857 |
+
|
| 858 |
+
def patch_parquet(input_path, output_path, originals):
|
| 859 |
+
for artifact in (output_path.with_suffix('.archive.parquet'), output_path.with_suffix('.manifest.json')):
|
| 860 |
+
if artifact.exists():
|
| 861 |
+
raise ValueError(f'Use a new output location; reporting artifact exists: {artifact}')
|
| 862 |
+
table = pq.read_table(input_path)
|
| 863 |
+
stats = dict.fromkeys(('rows', 'unique', 'unmatched', 'ambiguous', 'kept', 'dropped', 'dropped_no_identifiers',
|
| 864 |
+
'oracle_upstream', 'oracle_packaged_gold', 'context_chunks', 'kept_chunks',
|
| 865 |
+
'dropped_empty', 'dropped_target', 'dropped_gold', 'pinned_pip_installs'), 0)
|
| 866 |
+
stats.update(unmatched_task_ids=[], ambiguous_task_ids=[], dropped_task_ids=[], dropped_no_identifiers_task_ids=[],
|
| 867 |
+
context_source={r: 0 for r in RETRIEVERS}, context_source_task_ids={r: [] for r in RETRIEVERS},
|
| 868 |
+
missing_by_retriever={}, identifier_verdicts={}, common_repos=COMMON_REPOS,
|
| 869 |
+
python_version=sys.version.split()[0])
|
| 870 |
+
|
| 871 |
+
# Pass 1: match rows; per repository, the names used in API position in its BM25 view.
|
| 872 |
+
prepared, repos_with = [], {}
|
| 873 |
+
for row in table.to_pylist():
|
| 874 |
+
files = unpack(row['task_binary'])
|
| 875 |
+
lang = re.search(r'crosscodeeval-(\w+)-', row['path']).group(1)
|
| 876 |
+
p = prompt(files)
|
| 877 |
+
gold = files.get('tests/solution.txt', files.get('tests/expected.txt', b'')).decode('utf8', 'replace')
|
| 878 |
+
k = key(lang, p, gold) if p is not None else None
|
| 879 |
+
matches = originals['rg1_bm25'].get(k, []) if k else []
|
| 880 |
+
match = matches[0] if len(matches) == 1 else None
|
| 881 |
+
repo = match['metadata'].get('repository', row['path']) if match else row['path']
|
| 882 |
+
text = files['instruction.md'].decode('utf8', 'replace')
|
| 883 |
+
if match:
|
| 884 |
+
text += '\n' + '\n'.join(t for _, t in context_chunks(match, gold)[0])
|
| 885 |
+
for name in set(API_USE.findall(text)):
|
| 886 |
+
repos_with.setdefault(name, set()).add(repo)
|
| 887 |
+
prepared.append((row, files, lang, p, gold, k, matches, match, repo))
|
| 888 |
+
stdlib = python_stdlib_names() if any(x[2] == 'python' for x in prepared) else frozenset()
|
| 889 |
+
|
| 890 |
+
review_dir = output_path.parent / 'review'
|
| 891 |
+
rows = {n: [] for n in table.column_names}
|
| 892 |
+
review = []
|
| 893 |
+
|
| 894 |
+
def record(row, lang, gold, p, kept, reason, retriever=None, verdicts=None, missing=None):
|
| 895 |
+
review.append({'task': row['path'], 'language': lang, 'kept': kept, 'reason': reason,
|
| 896 |
+
'retriever': retriever, 'verdicts': verdicts or {},
|
| 897 |
+
'missing_names': sorted({n for names in (missing or {}).values()
|
| 898 |
+
for n in (names or [])}),
|
| 899 |
+
'graded_reference': graded_reference(gold, lang, p or '')})
|
| 900 |
+
|
| 901 |
+
for row, files, lang, p, gold, k, matches, match, repo in prepared:
|
| 902 |
+
stats['rows'] += 1
|
| 903 |
+
if not reference_identifiers(gold, lang, p or ''):
|
| 904 |
+
stats['dropped_no_identifiers'] += 1
|
| 905 |
+
stats['dropped_no_identifiers_task_ids'].append(row['path'])
|
| 906 |
+
record(row, lang, gold, p, False, NO_NAMES_EXPLANATION)
|
| 907 |
+
continue
|
| 908 |
+
if match is None:
|
| 909 |
+
stats['unmatched' if not matches else 'ambiguous'] += 1
|
| 910 |
+
stats['unmatched_task_ids' if not matches else 'ambiguous_task_ids'].append(row['path'])
|
| 911 |
+
else:
|
| 912 |
+
stats['unique'] += 1
|
| 913 |
+
is_common = lambda ident, repo=repo: len(repos_with.get(ident, set()) - {repo}) >= COMMON_REPOS
|
| 914 |
+
chosen, missing = choose_context(files, lang, p or '', gold, k, matches, originals, is_common, stdlib)
|
| 915 |
+
if missing:
|
| 916 |
+
stats['missing_by_retriever'][row['path']] = missing
|
| 917 |
+
if chosen is None:
|
| 918 |
+
stats['dropped'] += 1
|
| 919 |
+
stats['dropped_task_ids'].append(row['path'])
|
| 920 |
+
names = sorted({name for values in missing.values() for name in (values or [])})
|
| 921 |
+
record(row, lang, gold, p, False,
|
| 922 |
+
MISSING_NAMES_EXPLANATION + ' Names missing from one or more sets of excerpts: '
|
| 923 |
+
+ ', '.join(names), missing=missing)
|
| 924 |
+
continue
|
| 925 |
+
retriever, kept, counts, verdicts = chosen
|
| 926 |
+
record(row, lang, gold, p, True, 'kept', retriever, verdicts, missing)
|
| 927 |
+
stats['context_source'][retriever] += 1
|
| 928 |
+
stats['context_source_task_ids'][retriever].append(row['path'])
|
| 929 |
+
for n, c in counts.items():
|
| 930 |
+
stats[n] += c
|
| 931 |
+
for v in verdicts.values():
|
| 932 |
+
stats['identifier_verdicts'][v] = stats['identifier_verdicts'].get(v, 0) + 1
|
| 933 |
+
for i, (name, text) in enumerate(kept):
|
| 934 |
+
files[f'setup_files/context/{i:03d}_{context_file_name(name) or f"context_{i}.txt"}'] = text.encode()
|
| 935 |
+
instruction = files['instruction.md'].decode('utf8', 'replace')
|
| 936 |
+
if kept and '/setup_files/context/' not in instruction:
|
| 937 |
+
files['instruction.md'] = (instruction.rstrip() + CONTEXT_NOTE).encode()
|
| 938 |
+
if match is None:
|
| 939 |
+
record(row, lang, gold, p, True, 'kept without context (no unique upstream match)')
|
| 940 |
+
stats['kept'] += 1
|
| 941 |
+
if 'tests/test.sh' in files:
|
| 942 |
+
files['tests/test.sh'] = benchmark_verifier(files, lang, p)
|
| 943 |
+
files['instruction.md'] = correct_grading_instruction(files['instruction.md'].decode('utf-8')).encode('utf-8')
|
| 944 |
+
stats[f'oracle_{add_oracle(files, lang, match)}'] += 1
|
| 945 |
+
stats['pinned_pip_installs'] += pin_pip_installs(files)
|
| 946 |
+
row['task_binary'] = pack(files)
|
| 947 |
+
for n in rows:
|
| 948 |
+
rows[n].append(row[n])
|
| 949 |
+
|
| 950 |
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
| 951 |
+
pq.write_table(pa.table(rows, schema=table.schema), output_path)
|
| 952 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
| 953 |
+
from data.utils.patch_reporting import write_patch_report
|
| 954 |
+
write_patch_report(input_path, output_path, patcher=__file__,
|
| 955 |
+
file_labels=CHANGE_FILE_LABELS,
|
| 956 |
+
change_reasons={entry['task']: change_explanation(entry['retriever'] is not None)
|
| 957 |
+
for entry in review if entry['kept']},
|
| 958 |
+
source={'dataset': UPSTREAM_REPO, 'revision': UPSTREAM_REVISION,
|
| 959 |
+
'url': f'https://huggingface.co/datasets/{UPSTREAM_REPO}/tree/{UPSTREAM_REVISION}'},
|
| 960 |
+
dropped={entry['task']: {
|
| 961 |
+
'category': (NO_NAMES_LABEL if entry['task'] in stats['dropped_no_identifiers_task_ids']
|
| 962 |
+
else MISSING_NAMES_LABEL),
|
| 963 |
+
'reason': entry['reason']} for entry in review if not entry['kept']},
|
| 964 |
+
patches=[{'patcher': 'data/crosscodeeval/patch.py',
|
| 965 |
+
'sha256': hashlib.sha256(Path(__file__).read_bytes()).hexdigest()}])
|
| 966 |
+
report = json.dumps(stats, indent=2)
|
| 967 |
+
output_path.with_suffix('.report.json').write_text(report + '\n')
|
| 968 |
+
print(report)
|
| 969 |
+
n = write_review(review_dir, review)
|
| 970 |
+
# stdout stays the report as JSON, so it can be piped; notes go to stderr.
|
| 971 |
+
print(f'review: {n} dropped tasks in {review_dir}/dropped.jsonl, sample in {review_dir}/sample.md',
|
| 972 |
+
file=sys.stderr)
|
| 973 |
+
|
| 974 |
+
|
| 975 |
+
# Prepare
|
| 976 |
+
"""Download the published repair at its immutable revision, then apply pip pins."""
|
| 977 |
+
import argparse
|
| 978 |
+
import json
|
| 979 |
+
import os
|
| 980 |
+
from pathlib import Path
|
| 981 |
+
import sys
|
| 982 |
+
|
| 983 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
| 984 |
+
from huggingface_hub import hf_hub_download
|
| 985 |
+
import pyarrow as pa
|
| 986 |
+
import pyarrow.parquet as pq
|
| 987 |
+
|
| 988 |
+
REVISION = '12df4483fe99c79ccbb4c923d76ab5a2b042e64a'
|
| 989 |
+
prepare_SOURCES = {'csharp-v5': 1353, 'java-v4': 1895, 'python-v3': 432, 'typescript-v3': 3030}
|
| 990 |
+
|
| 991 |
+
|
| 992 |
+
def prepare_main(root):
|
| 993 |
+
root = root.resolve()
|
| 994 |
+
os.environ.setdefault('HF_HOME', str(root / 'cache/huggingface'))
|
| 995 |
+
records, sample = [], []
|
| 996 |
+
for family, count in prepare_SOURCES.items():
|
| 997 |
+
source = f'laion__exp_rpt_crosscodeeval-{family}/tasks.parquet'
|
| 998 |
+
original = hf_hub_download('open-thoughts/TaskTrove', source,
|
| 999 |
+
repo_type='dataset', revision=REVISION,
|
| 1000 |
+
local_dir=root / 'published', cache_dir=root / 'cache/huggingface/hub')
|
| 1001 |
+
output = root / 'parquets-pinned' / f'{family}.parquet'
|
| 1002 |
+
record = pin_parquet(Path(original), output)
|
| 1003 |
+
if record['tasks'] != count:
|
| 1004 |
+
raise ValueError(f'Unexpected coverage: {record}')
|
| 1005 |
+
records.append(record)
|
| 1006 |
+
table = pq.read_table(output)
|
| 1007 |
+
sample.append(table.slice(0, 3 if family.startswith(('csharp', 'java')) else 2))
|
| 1008 |
+
print(json.dumps(record), flush=True)
|
| 1009 |
+
provenance = {'dataset': 'open-thoughts/TaskTrove', 'revision': REVISION, 'files': records}
|
| 1010 |
+
(root / 'parquets-pinned/source.json').write_text(json.dumps(provenance, indent=2) + '\n')
|
| 1011 |
+
(root / 'sample').mkdir(exist_ok=True)
|
| 1012 |
+
pq.write_table(pa.concat_tables(sample), root / 'sample/tasks.parquet')
|
| 1013 |
+
|
| 1014 |
+
|
| 1015 |
+
def prepare_cli():
|
| 1016 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 1017 |
+
parser.add_argument('root', type=Path)
|
| 1018 |
+
prepare_main(parser.parse_args().root)
|
| 1019 |
+
|
| 1020 |
+
|
| 1021 |
+
# Warmup
|
| 1022 |
+
"""Warm distinct CrossCodeEval environments and benchmark cached container I/O.
|
| 1023 |
+
|
| 1024 |
+
Uses the real Harbor bridge and stages 3 -> 5 -> 4, without publishing or
|
| 1025 |
+
changing production caches. Inputs are already patched/materialized tasks;
|
| 1026 |
+
cross-file excerpts are supplied in setup_files, not downloaded Git checkouts.
|
| 1027 |
+
Explicit paths also allow use outside ZIH. Run only inside a CPU allocation.
|
| 1028 |
+
"""
|
| 1029 |
+
|
| 1030 |
+
import argparse
|
| 1031 |
+
import asyncio
|
| 1032 |
+
from contextlib import contextmanager
|
| 1033 |
+
import hashlib
|
| 1034 |
+
import json
|
| 1035 |
+
import os
|
| 1036 |
+
from pathlib import Path
|
| 1037 |
+
import shutil
|
| 1038 |
+
import signal
|
| 1039 |
+
import subprocess
|
| 1040 |
+
import sys
|
| 1041 |
+
import time
|
| 1042 |
+
|
| 1043 |
+
ROOT = Path(__file__).resolve().parents[2]
|
| 1044 |
+
sys.path.insert(0, str(ROOT))
|
| 1045 |
+
|
| 1046 |
+
|
| 1047 |
+
def save(path, value):
|
| 1048 |
+
tmp = path.with_suffix('.tmp')
|
| 1049 |
+
tmp.write_text(json.dumps(value, indent=2) + '\n')
|
| 1050 |
+
tmp.replace(path)
|
| 1051 |
+
|
| 1052 |
+
|
| 1053 |
+
def fingerprint(directory):
|
| 1054 |
+
"""Same file-name/content digest as the patched bridge (not just Dockerfile)."""
|
| 1055 |
+
digest = hashlib.sha256()
|
| 1056 |
+
for path in sorted(directory.rglob('*')):
|
| 1057 |
+
if path.is_file():
|
| 1058 |
+
name, content = str(path.relative_to(directory)).encode(), path.read_bytes()
|
| 1059 |
+
digest.update(len(name).to_bytes(4, 'big')); digest.update(name)
|
| 1060 |
+
digest.update(len(content).to_bytes(4, 'big')); digest.update(content)
|
| 1061 |
+
return digest.hexdigest()[:12]
|
| 1062 |
+
|
| 1063 |
+
|
| 1064 |
+
def inventory(tasks):
|
| 1065 |
+
groups, languages = {}, {}
|
| 1066 |
+
for task in sorted(tasks.iterdir()):
|
| 1067 |
+
if not (task / 'task.toml').is_file():
|
| 1068 |
+
continue
|
| 1069 |
+
if not task.name.startswith('crosscodeeval-'):
|
| 1070 |
+
raise ValueError(f'Expected patched CrossCodeEval tasks: {task}')
|
| 1071 |
+
if not (task / 'environment/Dockerfile').is_file():
|
| 1072 |
+
raise ValueError(f'Missing Dockerfile: {task}')
|
| 1073 |
+
key = fingerprint(task / 'environment')
|
| 1074 |
+
groups.setdefault(key, []).append(task)
|
| 1075 |
+
languages.setdefault(task.name.rsplit('-', 1)[0], task)
|
| 1076 |
+
if not groups:
|
| 1077 |
+
raise ValueError('No materialized CrossCodeEval tasks found')
|
| 1078 |
+
representatives = sorted(set(languages.values()) | {v[0] for v in groups.values()})
|
| 1079 |
+
return groups, representatives
|
| 1080 |
+
|
| 1081 |
+
|
| 1082 |
+
def cache_files(cache, keys):
|
| 1083 |
+
"""Resolve symlinks; copy SIF and the adjacent deferred build companions."""
|
| 1084 |
+
result = {}
|
| 1085 |
+
for key in keys:
|
| 1086 |
+
matches = sorted(cache.glob(f'*-{key}.sif'))
|
| 1087 |
+
if not matches:
|
| 1088 |
+
continue
|
| 1089 |
+
source = matches[0].resolve(strict=True)
|
| 1090 |
+
result[f'build_warmup-{key}.sif'] = source
|
| 1091 |
+
for suffix in ('.deferred.json', '.overlay.img'):
|
| 1092 |
+
companion = source.with_suffix(suffix)
|
| 1093 |
+
if companion.exists():
|
| 1094 |
+
result[f'build_warmup-{key}{suffix}'] = companion
|
| 1095 |
+
return result
|
| 1096 |
+
|
| 1097 |
+
|
| 1098 |
+
def copy_cache(files, destination):
|
| 1099 |
+
destination.mkdir(parents=True, exist_ok=True)
|
| 1100 |
+
for name, source in files.items():
|
| 1101 |
+
# Preserve sparse overlays; dereference shared-cache symlinks.
|
| 1102 |
+
subprocess.run(['cp', '--sparse=always', '--reflink=auto', '--',
|
| 1103 |
+
str(source), str(destination / name)], check=True)
|
| 1104 |
+
|
| 1105 |
+
|
| 1106 |
+
@contextmanager
|
| 1107 |
+
def bridge(cache, scratch, out):
|
| 1108 |
+
from hpc.validation_worker import free_port, wait_ready
|
| 1109 |
+
import harbor
|
| 1110 |
+
scratch.mkdir(parents=True)
|
| 1111 |
+
out.mkdir(parents=True, exist_ok=True)
|
| 1112 |
+
previous = os.environ.copy()
|
| 1113 |
+
processes, logs = [], []
|
| 1114 |
+
for key in ('APPTAINER_BIND', 'APPTAINER_BINDPATH', 'SINGULARITY_BIND', 'SINGULARITY_BINDPATH'):
|
| 1115 |
+
os.environ.pop(key, None)
|
| 1116 |
+
os.environ.update(TMPDIR=str(scratch), APPTAINER_TMPDIR=str(scratch / 'build'),
|
| 1117 |
+
APPTAINER_NO_MOUNT='hostfs,bind-paths,cwd', APPTAINER_BINDPATH='/etc/resolv.conf:/etc/resolv.conf:ro',
|
| 1118 |
+
BRIDGE_USE_FAKEROOT='1', BRIDGE_INSTANCE_REUSE='0', BRIDGE_START_CONCURRENCY='1',
|
| 1119 |
+
BRIDGE_START_INTERVAL='0.25', OT_NET_ISOLATION='0', HARBOR_SIF_CACHE=str(cache),
|
| 1120 |
+
OT_NETWORK_STATUS_PATH=str(out / 'network.json'))
|
| 1121 |
+
(scratch / 'build').mkdir()
|
| 1122 |
+
port = free_port(40000 + os.getpid() % 10000)
|
| 1123 |
+
url = f'http://127.0.0.1:{port}'
|
| 1124 |
+
os.environ['APPTAINER_BRIDGE_URL'] = url
|
| 1125 |
+
launcher = ROOT / 'validation/stages/service_entrypoint.py'
|
| 1126 |
+
server = Path(harbor.__file__).parent / 'environments/apptainer/server.py'
|
| 1127 |
+
try:
|
| 1128 |
+
commands = [
|
| 1129 |
+
('server', [str(server), '--host', '127.0.0.1', '--port', str(port)]),
|
| 1130 |
+
('worker', [str(ROOT / 'harbor_patches/bridge_worker.py'), '--bridge-url', url,
|
| 1131 |
+
'--sif-cache', str(cache), '--staging-base', str(scratch / 'instances'), '--num-workers', '2'])]
|
| 1132 |
+
for name, command in commands:
|
| 1133 |
+
log = (out / f'{name}.log').open('w'); logs.append(log)
|
| 1134 |
+
processes.append(subprocess.Popen([sys.executable, '-u', str(launcher), *command],
|
| 1135 |
+
stdout=log, stderr=subprocess.STDOUT, start_new_session=True))
|
| 1136 |
+
wait_ready(url + '/status', processes, timeout=600, workers=name == 'worker')
|
| 1137 |
+
yield url
|
| 1138 |
+
finally:
|
| 1139 |
+
for process in reversed(processes):
|
| 1140 |
+
if process.poll() is None:
|
| 1141 |
+
os.killpg(process.pid, signal.SIGTERM)
|
| 1142 |
+
for process in processes:
|
| 1143 |
+
try:
|
| 1144 |
+
process.wait(timeout=20)
|
| 1145 |
+
except subprocess.TimeoutExpired:
|
| 1146 |
+
os.killpg(process.pid, signal.SIGKILL); process.wait()
|
| 1147 |
+
for log in logs:
|
| 1148 |
+
log.close()
|
| 1149 |
+
os.environ.clear(); os.environ.update(previous)
|
| 1150 |
+
|
| 1151 |
+
|
| 1152 |
+
async def measure(task, out, cache, url, journal, label, build_only=False):
|
| 1153 |
+
from validation.stages import harbor as runtime
|
| 1154 |
+
from validation.stages.runner import parser
|
| 1155 |
+
from validation.stages.container_reuse import ReuseScope
|
| 1156 |
+
from harbor.trial.trial import Trial
|
| 1157 |
+
args = parser().parse_args([str(task), '--backend', 'apptainer', '--submit', 'never',
|
| 1158 |
+
'--trial-cpus', '1', '--trial-memory-mb', '2048'])
|
| 1159 |
+
args.environment_kwargs = dict(bridge_url=url, sif_cache=str(cache))
|
| 1160 |
+
# Instrument the actual harness copy, not a stand-in filesystem benchmark.
|
| 1161 |
+
upload = Trial._upload_setup_files
|
| 1162 |
+
upload_times = []
|
| 1163 |
+
async def timed_upload(self):
|
| 1164 |
+
started = time.monotonic()
|
| 1165 |
+
try:
|
| 1166 |
+
return await upload(self)
|
| 1167 |
+
finally:
|
| 1168 |
+
upload_times.append(time.monotonic() - started)
|
| 1169 |
+
Trial._upload_setup_files = timed_upload
|
| 1170 |
+
try:
|
| 1171 |
+
async with ReuseScope() as scope:
|
| 1172 |
+
for stage in ([3] if build_only else [3, 5, 4]):
|
| 1173 |
+
stage_out = out / f'stage-{stage}'
|
| 1174 |
+
stage_out.mkdir(parents=True)
|
| 1175 |
+
if stage != 3:
|
| 1176 |
+
await scope.clear_logs()
|
| 1177 |
+
upload_times.clear()
|
| 1178 |
+
started = time.monotonic()
|
| 1179 |
+
if stage == 3:
|
| 1180 |
+
result = await runtime.build_task(task, stage_out, args)
|
| 1181 |
+
else:
|
| 1182 |
+
config = runtime.job_config(task, stage_out / 'jobs', args,
|
| 1183 |
+
'nop' if stage == 5 else 'oracle')
|
| 1184 |
+
job_dir = await runtime.execute_job(config)
|
| 1185 |
+
result = runtime.assess_trials(runtime.trial_results(job_dir), 1, 0 if stage == 5 else 1)
|
| 1186 |
+
record = dict(layout=label, task=task.name, stage=stage,
|
| 1187 |
+
seconds=time.monotonic() - started, setup_upload_seconds=list(upload_times),
|
| 1188 |
+
result=result, starts=scope.starts, reuses=scope.reuses)
|
| 1189 |
+
journal.write(json.dumps(record) + '\n'); journal.flush(); os.fsync(journal.fileno())
|
| 1190 |
+
print(json.dumps(record), flush=True)
|
| 1191 |
+
if result['status'] not in ('passed', 'completed'):
|
| 1192 |
+
raise RuntimeError(f'{label} {task.name} stage {stage} failed; see durable outcomes.jsonl')
|
| 1193 |
+
cleanup_started = time.monotonic()
|
| 1194 |
+
journal.write(json.dumps(dict(layout=label, task=task.name, phase='container_cleanup',
|
| 1195 |
+
seconds=time.monotonic() - cleanup_started)) + '\n')
|
| 1196 |
+
journal.flush(); os.fsync(journal.fileno())
|
| 1197 |
+
finally:
|
| 1198 |
+
Trial._upload_setup_files = upload
|
| 1199 |
+
|
| 1200 |
+
|
| 1201 |
+
def warmup_main():
|
| 1202 |
+
ap = argparse.ArgumentParser(description='Warm distinct CrossCodeEval environments and benchmark cached container I/O.\n\nUses the real Harbor bridge and stages 3 -> 5 -> 4, without publishing or\nchanging production caches. Inputs are already patched/materialized tasks;\ncross-file excerpts are supplied in setup_files, not downloaded Git checkouts.\nExplicit paths also allow use outside ZIH. Run only inside a CPU allocation.')
|
| 1203 |
+
ap.add_argument('--tasks', type=Path, required=True)
|
| 1204 |
+
ap.add_argument('--cache', type=Path, required=True, help='existing source image cache (read only)')
|
| 1205 |
+
ap.add_argument('--out', type=Path, required=True, help='new durable run directory')
|
| 1206 |
+
ap.add_argument('--local-root', type=Path, required=True, help='private scratch selected by cluster mapping')
|
| 1207 |
+
ap.add_argument('--max-local-gib', type=float, default=8)
|
| 1208 |
+
ap.add_argument('--repeats', type=int, default=2)
|
| 1209 |
+
ap.add_argument('--warmup-only', action='store_true')
|
| 1210 |
+
args = ap.parse_args()
|
| 1211 |
+
if not os.environ.get('SLURM_JOB_ID'):
|
| 1212 |
+
ap.error('Run in a Slurm CPU allocation')
|
| 1213 |
+
if args.repeats < 1 or args.max_local_gib <= 0:
|
| 1214 |
+
ap.error('repeats and max-local-gib must be positive')
|
| 1215 |
+
args.out = args.out.resolve(); args.local_root = args.local_root.resolve()
|
| 1216 |
+
if args.out.is_relative_to(Path.home()) or args.local_root.is_relative_to(Path.home()):
|
| 1217 |
+
ap.error('Data and scratch must be outside home')
|
| 1218 |
+
args.out.mkdir(parents=True, exist_ok=False)
|
| 1219 |
+
groups, representatives = inventory(args.tasks)
|
| 1220 |
+
save(args.out / 'inventory.json', dict(groups={k: [p.name for p in v] for k, v in groups.items()},
|
| 1221 |
+
representatives=[p.name for p in representatives], source=str(args.tasks.resolve()),
|
| 1222 |
+
cluster=os.environ.get('SLURM_CLUSTER_NAME'), partition=os.environ.get('SLURM_JOB_PARTITION'),
|
| 1223 |
+
local_root=str(args.local_root), note='Cached-image starts, not cold builds; OS page cache is not flushed.'))
|
| 1224 |
+
cache = args.out / 'images'
|
| 1225 |
+
started = time.monotonic()
|
| 1226 |
+
copy_cache(cache_files(args.cache, groups), cache)
|
| 1227 |
+
save(args.out / 'cache-seed.json', dict(seconds=time.monotonic() - started))
|
| 1228 |
+
with (args.out / 'outcomes.jsonl').open('x') as journal:
|
| 1229 |
+
with bridge(cache, args.out / 'warmup-scratch', args.out / 'warmup-services') as url:
|
| 1230 |
+
for key, tasks in groups.items():
|
| 1231 |
+
asyncio.run(measure(tasks[0], args.out / 'warmup' / key, cache, url, journal, 'warmup', True))
|
| 1232 |
+
if args.warmup_only:
|
| 1233 |
+
return
|
| 1234 |
+
files = cache_files(cache, groups)
|
| 1235 |
+
if len([n for n in files if n.endswith('.sif')]) != len(groups):
|
| 1236 |
+
raise RuntimeError('Warmup did not cache every distinct environment')
|
| 1237 |
+
task_bytes = sum(p.stat().st_size for task in representatives for p in task.rglob('*') if p.is_file())
|
| 1238 |
+
# Conservative apparent size (including sparse overlays) plus writable
|
| 1239 |
+
# instance/build headroom. Only one task is live in this initial pilot.
|
| 1240 |
+
needed = sum(p.stat().st_size for p in files.values()) + task_bytes + 4 * 2**30
|
| 1241 |
+
args.local_root.mkdir(parents=True, exist_ok=True)
|
| 1242 |
+
mount = subprocess.check_output(['findmnt', '-T', str(args.local_root), '-no', 'FSTYPE'], text=True).strip()
|
| 1243 |
+
if mount == 'tmpfs':
|
| 1244 |
+
memory_mb = int(os.environ.get('SLURM_MEM_PER_NODE', '0'))
|
| 1245 |
+
if not memory_mb:
|
| 1246 |
+
memory_mb = int(os.environ.get('SLURM_MEM_PER_CPU', '0')) * int(os.environ.get('SLURM_CPUS_PER_TASK', '1'))
|
| 1247 |
+
if args.max_local_gib * 1024 > memory_mb / 4:
|
| 1248 |
+
raise RuntimeError('RAM scratch budget must fit within one quarter of allocated job memory')
|
| 1249 |
+
if needed > args.max_local_gib * 2**30 or needed > shutil.disk_usage(args.local_root).free:
|
| 1250 |
+
raise RuntimeError(f'Local pilot needs at least {needed} bytes; exceeds budget/free space')
|
| 1251 |
+
local = args.local_root / f'cce-warmup-{os.getpid()}'
|
| 1252 |
+
local.mkdir()
|
| 1253 |
+
try:
|
| 1254 |
+
started = time.monotonic()
|
| 1255 |
+
copy_cache(files, local / 'images')
|
| 1256 |
+
image_seconds = time.monotonic() - started
|
| 1257 |
+
started = time.monotonic()
|
| 1258 |
+
for task in representatives:
|
| 1259 |
+
shutil.copytree(task, local / 'tasks' / task.name)
|
| 1260 |
+
save(args.out / 'staging.json', dict(image_seconds=image_seconds,
|
| 1261 |
+
task_seconds=time.monotonic() - started, estimated_peak_bytes=needed, filesystem=mount))
|
| 1262 |
+
layouts = [('horse', cache, args.out / 'scratch', False),
|
| 1263 |
+
('local-images', local / 'images', args.out / 'scratch', False),
|
| 1264 |
+
('local-work', cache, local / 'scratch', True),
|
| 1265 |
+
('local-both', local / 'images', local / 'scratch', True)]
|
| 1266 |
+
for repeat in range(args.repeats):
|
| 1267 |
+
# Reverse order on alternate repetitions to expose warm-cache/order effects.
|
| 1268 |
+
for name, images, scratch, local_tasks in (layouts if repeat % 2 == 0 else layouts[::-1]):
|
| 1269 |
+
label = f'{repeat}-{name}'
|
| 1270 |
+
output = args.out / label
|
| 1271 |
+
with bridge(images, scratch / label, output / 'services') as url:
|
| 1272 |
+
for task in representatives:
|
| 1273 |
+
source = local / 'tasks' / task.name if local_tasks else task
|
| 1274 |
+
asyncio.run(measure(source, output / task.name, images, url, journal, label))
|
| 1275 |
+
save(args.out / 'complete.json', dict(status='passed', repeats=args.repeats,
|
| 1276 |
+
tasks=len(representatives), layouts=len(layouts)))
|
| 1277 |
+
finally:
|
| 1278 |
+
shutil.rmtree(local)
|
| 1279 |
+
|
| 1280 |
+
|
| 1281 |
+
def warmup_cli():
|
| 1282 |
+
warmup_main()
|
| 1283 |
+
|
| 1284 |
+
|
| 1285 |
+
# Rewards
|
| 1286 |
+
#!/usr/bin/env python3
|
| 1287 |
+
"""How to grade a CrossCodeEval answer locally, and which wrong answers are worth
|
| 1288 |
+
trying. tests/test_dataset_reward_plugins.py imports this module as
|
| 1289 |
+
`data.<dataset>.patch`; register new reward contracts in that test.
|
| 1290 |
+
"""
|
| 1291 |
+
import contextlib
|
| 1292 |
+
import importlib.util
|
| 1293 |
+
import io
|
| 1294 |
+
import json
|
| 1295 |
+
import re
|
| 1296 |
+
import tempfile
|
| 1297 |
+
from pathlib import Path
|
| 1298 |
+
|
| 1299 |
+
# Where a trial's answer has to be for the task's tests/test.sh to grade it.
|
| 1300 |
+
ANSWER_PATH = '/app/solution.txt'
|
| 1301 |
+
|
| 1302 |
+
|
| 1303 |
+
def language(task: Path) -> str:
|
| 1304 |
+
return re.search(r'-(\w+)-\d+$', task.name).group(1)
|
| 1305 |
+
|
| 1306 |
+
|
| 1307 |
+
def reference(task: Path) -> str:
|
| 1308 |
+
"""The graded reference solution, as shipped in the task."""
|
| 1309 |
+
lang = language(task)
|
| 1310 |
+
return (task / 'tests' / ('expected.txt' if lang == 'java' else 'solution.txt')).read_text()
|
| 1311 |
+
|
| 1312 |
+
|
| 1313 |
+
def grade(task: Path, answer: str) -> float:
|
| 1314 |
+
"""Reward for `answer`, using this task's own verifier, in this process."""
|
| 1315 |
+
lang = language(task)
|
| 1316 |
+
spec = importlib.util.spec_from_file_location('v', task / 'tests/cceval_verifier.py')
|
| 1317 |
+
v = importlib.util.module_from_spec(spec)
|
| 1318 |
+
spec.loader.exec_module(v)
|
| 1319 |
+
gold_file = task / 'tests' / ('expected.txt' if lang == 'java' else 'solution.txt')
|
| 1320 |
+
prompt = task / 'tests/prompt.txt'
|
| 1321 |
+
with tempfile.TemporaryDirectory() as d:
|
| 1322 |
+
pred = Path(d) / 'solution.txt'
|
| 1323 |
+
pred.write_text(answer)
|
| 1324 |
+
args = ['--language', lang, '--prediction', str(pred), '--reference', str(gold_file),
|
| 1325 |
+
'--out', d + '/out']
|
| 1326 |
+
if prompt.exists():
|
| 1327 |
+
args += ['--prompt', str(prompt)]
|
| 1328 |
+
with contextlib.redirect_stdout(io.StringIO()):
|
| 1329 |
+
v.main(args)
|
| 1330 |
+
return json.loads((Path(d) / 'out/reward.json').read_text())['reward']
|
| 1331 |
+
|
| 1332 |
+
|
| 1333 |
+
def extra_variants(task: Path, gold: str) -> dict[str, tuple[str, float]]:
|
| 1334 |
+
"""{label: (answer, expected reward)} beyond the generic reference/empty pair.
|
| 1335 |
+
|
| 1336 |
+
Each of these caught a real verifier defect:
|
| 1337 |
+
re-indented reference whitespace must not matter (Java's old diff failed this)
|
| 1338 |
+
lone } ; { what the retired TaskTrove verifier paid partial credit for
|
| 1339 |
+
return null; the most common trivial first statement
|
| 1340 |
+
one identifier renamed catches a verifier rewarding a prefix or first-token match
|
| 1341 |
+
"""
|
| 1342 |
+
spec = importlib.util.spec_from_file_location('v', task / 'tests/cceval_verifier.py')
|
| 1343 |
+
v = importlib.util.module_from_spec(spec)
|
| 1344 |
+
spec.loader.exec_module(v)
|
| 1345 |
+
ids = v.extract_identifiers(gold, language(task))
|
| 1346 |
+
near = gold.replace(ids[0], ids[0] + 'Wrong', 1) if ids else gold + ' wrong'
|
| 1347 |
+
reindented = '\n'.join(' ' + l.strip() for l in gold.splitlines()) + '\n'
|
| 1348 |
+
return {'reference re-indented': (reindented, 1),
|
| 1349 |
+
'garbage call': ('__PILOT_WRONG_ANSWER__();', 0),
|
| 1350 |
+
'lone }': ('}', 0), 'lone ;': (';', 0), 'lone {': ('{', 0),
|
| 1351 |
+
'return null;': ('return null;', 0),
|
| 1352 |
+
'one identifier renamed': (near, 0)}
|
| 1353 |
+
|
| 1354 |
+
|
| 1355 |
+
def rewards_cli():
|
| 1356 |
+
import argparse
|
| 1357 |
+
parser = argparse.ArgumentParser(description="Grade one task with its own verifier")
|
| 1358 |
+
parser.add_argument("task", type=Path)
|
| 1359 |
+
task = parser.parse_args().task
|
| 1360 |
+
gold = reference(task)
|
| 1361 |
+
for label, (answer, want) in {"reference": (gold, 1), "empty answer": ("", 0), **extra_variants(task, gold)}.items():
|
| 1362 |
+
print(label, grade(task, answer), "expected", want)
|
| 1363 |
+
|
| 1364 |
+
|
| 1365 |
+
|
| 1366 |
+
def prepare_release(root):
|
| 1367 |
+
"""Repackage the existing release, preserving every retained task byte."""
|
| 1368 |
+
from collections import Counter
|
| 1369 |
+
root = Path(root)
|
| 1370 |
+
output = root / 'prepared'
|
| 1371 |
+
output.mkdir(exist_ok=False)
|
| 1372 |
+
images = json.loads((root / 'input/pr-5/images/crosscodeeval.json').read_text())
|
| 1373 |
+
tables, archives, audit = [], [], []
|
| 1374 |
+
original_images, retained_images = set(), set()
|
| 1375 |
+
totals = Counter()
|
| 1376 |
+
for lang, (source, patched) in SOURCES.items():
|
| 1377 |
+
published = patched.removeprefix('laion__exp_rpt_')
|
| 1378 |
+
original = {r['path']: r for r in pq.read_table(root / 'input/original' / source / 'tasks.parquet').to_pylist()}
|
| 1379 |
+
table = pq.read_table(root / 'input/pr-5' / published / 'tasks.parquet')
|
| 1380 |
+
historical = pq.read_table(root / 'input/pr-14' / published / 'tasks.parquet')
|
| 1381 |
+
assert table.replace_schema_metadata(None).equals(historical.replace_schema_metadata(None))
|
| 1382 |
+
regenerated = root / 'reconstructed' / patched
|
| 1383 |
+
manifest = json.loads((regenerated / 'tasks.manifest.json').read_text())
|
| 1384 |
+
kept = set(table['path'].to_pylist())
|
| 1385 |
+
assert kept == {r['task_id'] for r in manifest['tasks'] if r['action'] != 'dropped'}
|
| 1386 |
+
archive = pq.read_table(regenerated / 'tasks.archive.parquet')
|
| 1387 |
+
assert set(archive['path'].to_pylist()) == set(original) - kept
|
| 1388 |
+
for row in archive.to_pylist():
|
| 1389 |
+
assert row['task_binary'] == original[row['path']]['task_binary']
|
| 1390 |
+
counts = Counter()
|
| 1391 |
+
for row in original.values():
|
| 1392 |
+
original_images.add(unpack(row['task_binary'])['environment/Dockerfile'])
|
| 1393 |
+
for row in table.to_pylist():
|
| 1394 |
+
files = unpack(row['task_binary'])
|
| 1395 |
+
before = unpack(original[row['path']]['task_binary'])
|
| 1396 |
+
retained_images.add(files['environment/Dockerfile'])
|
| 1397 |
+
assert row['stages_passed'] == '1,3,4,5'
|
| 1398 |
+
assert images['tasks'][row['path']]['content_sha256'] == row['content_sha256']
|
| 1399 |
+
counts['changed'] += files != before
|
| 1400 |
+
counts['dependency_pins'] += files['environment/Dockerfile'] != before['environment/Dockerfile']
|
| 1401 |
+
counts['context'] += any(k.startswith('setup_files/context/') for k in files)
|
| 1402 |
+
counts['oracle'] += files.get('solution/solve.sh') != before.get('solution/solve.sh')
|
| 1403 |
+
counts['verifier'] += files.get('tests/test.sh') != before.get('tests/test.sh')
|
| 1404 |
+
counts['instructions'] += files['instruction.md'] != before['instruction.md']
|
| 1405 |
+
reasons = Counter(r['labels'][0] for r in manifest['tasks'] if r['action'] == 'dropped')
|
| 1406 |
+
totals.update(counts)
|
| 1407 |
+
audit.append(dict(language=lang, original=len(original), kept=len(kept), archived=archive.num_rows,
|
| 1408 |
+
changes=dict(counts), exclusions=dict(reasons)))
|
| 1409 |
+
tables.append(table.replace_schema_metadata(None))
|
| 1410 |
+
archives.append(archive.replace_schema_metadata(None))
|
| 1411 |
+
tasks = pa.concat_tables(tables)
|
| 1412 |
+
archive = pa.concat_tables(archives)
|
| 1413 |
+
assert tasks.num_rows == 6710 and archive.num_rows == 1053
|
| 1414 |
+
assert totals['changed'] == 6710
|
| 1415 |
+
summary = dict(original=7763, kept=6710, archived=1053, unchanged=0, changes=dict(totals),
|
| 1416 |
+
original_image_definitions=len(original_images), retained_image_definitions=len(retained_images),
|
| 1417 |
+
cached_images=len(images['bundles']), languages=audit,
|
| 1418 |
+
task_payloads_unchanged_from_pr14=True, all_existing_instruction_changes_preserved=True,
|
| 1419 |
+
source_revision=UPSTREAM_REVISION,
|
| 1420 |
+
release_revision=json.loads((root / 'input/files-14.json').read_text())['revision'],
|
| 1421 |
+
image_release_revision=json.loads((root / 'input/files-5.json').read_text())['revision'])
|
| 1422 |
+
metadata = {b'ot.images.v1': json.dumps(images).encode(), b'ot.release.v1': json.dumps(summary).encode()}
|
| 1423 |
+
pq.write_table(tasks.replace_schema_metadata(metadata), output / 'tasks.parquet')
|
| 1424 |
+
pq.write_table(archive.replace_schema_metadata({b'ot.release.v1': json.dumps(summary).encode()}), output / 'archive.parquet')
|
| 1425 |
+
(output / 'summary.json').write_text(json.dumps(summary, indent=2) + '\n')
|
| 1426 |
+
print(json.dumps(summary, indent=2))
|
| 1427 |
+
|
| 1428 |
+
|
| 1429 |
+
def prepare_release_cli():
|
| 1430 |
+
parser = argparse.ArgumentParser(description='Preserve and reorganize the reviewed CrossCodeEval release')
|
| 1431 |
+
parser.add_argument('root', type=Path)
|
| 1432 |
+
prepare_release(parser.parse_args().root)
|
| 1433 |
+
|
| 1434 |
+
|
| 1435 |
+
if __name__ == '__main__':
|
| 1436 |
+
from data.utils.cli import dispatch
|
| 1437 |
+
dispatch({'prepare-release': prepare_release_cli, 'prepare': prepare_cli, 'warmup': warmup_cli, 'rewards': rewards_cli})
|
| 1438 |
+
main()
|
scaleswe_environment-reliable/archived_tasks.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scaleswe_environment-reliable/patch.py
ADDED
|
@@ -0,0 +1,1489 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Apply reviewed instruction and verifier repairs to pinned Scale-SWE tasks."""
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
# Support both direct execution and python -m data.<source>.patch.
|
| 5 |
+
import sys
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
import argparse
|
| 11 |
+
import copy
|
| 12 |
+
import hashlib
|
| 13 |
+
import io
|
| 14 |
+
import inspect
|
| 15 |
+
import json
|
| 16 |
+
from pathlib import Path, PurePosixPath
|
| 17 |
+
import re
|
| 18 |
+
import tarfile
|
| 19 |
+
|
| 20 |
+
import pyarrow as pa
|
| 21 |
+
import pyarrow.parquet as pq
|
| 22 |
+
|
| 23 |
+
from data.utils.patch_reporting import write_patch_report
|
| 24 |
+
from data.utils.resolve_absolute_paths import apply_reviewed_replacements, collect_reports
|
| 25 |
+
from validation.contract import files_digest
|
| 26 |
+
|
| 27 |
+
REVISION = '8935f8e55244fd56080cdb8dcd0819a57e8a003c'
|
| 28 |
+
HERE = Path(__file__).resolve().parent
|
| 29 |
+
|
| 30 |
+
APPIUM_IMPORT_TASKS = frozenset({
|
| 31 |
+
'appium_python-client_pr446',
|
| 32 |
+
'appium_python-client_pr521',
|
| 33 |
+
'appium_python-client_pr594',
|
| 34 |
+
})
|
| 35 |
+
|
| 36 |
+
VERIFIER_IMPORT_TASKS = {
|
| 37 |
+
**{task: ('python-client', 'Expose Appium repository test helpers when grading through /tests/score.py.')
|
| 38 |
+
for task in APPIUM_IMPORT_TASKS},
|
| 39 |
+
'dbcli_pgcli_pr942': ('pgcli', 'Expose the repository root so restored tests.utils imports resolve after the reference removes tests/__init__.py.'),
|
| 40 |
+
'sbdchd_flake8-pie_pr93': ('flake8-pie', 'Import flake8_pie from the task checkout instead of the installed package, which lacks the selected feature modules.'),
|
| 41 |
+
**{f'sbdchd_flake8-pie_pr{pr}': ('flake8-pie', 'Import flake8_pie from the task checkout: the image installs a non-editable copy of a later commit in site-packages, so the unchanged checkout also scored 1 under no-op.')
|
| 42 |
+
for pr in (40, 42, 44, 54)},
|
| 43 |
+
'joseph-roitman_pytest-snapshot_pr30': ('pytest-snapshot', 'Load the pytest_snapshot plugin from the task checkout: the image installs a non-editable copy of a later commit in site-packages, so the unchanged checkout also scored 1 under no-op.'),
|
| 44 |
+
# No-op reward 1 in the 2026-10-08 full run: the selected tests imported the package installed in
|
| 45 |
+
# site-packages instead of the task checkout, so the unchanged checkout passed. Confirmed by the
|
| 46 |
+
# 2026-10-10 rerun (job 963978): with the repository root first on PYTHONPATH every reference scores 1
|
| 47 |
+
# and every no-op scores 0.
|
| 48 |
+
'ethereum_eth-utils_pr78': ('eth-utils', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 49 |
+
'ethereum_eth-utils_pr84': ('eth-utils', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 50 |
+
'hussein-awala_spark-on-k8s_pr1': ('spark-on-k8s', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 51 |
+
'hussein-awala_spark-on-k8s_pr11': ('spark-on-k8s', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 52 |
+
'hussein-awala_spark-on-k8s_pr12': ('spark-on-k8s', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 53 |
+
'hussein-awala_spark-on-k8s_pr13': ('spark-on-k8s', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 54 |
+
'joseph-roitman_pytest-snapshot_pr10': ('pytest-snapshot', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 55 |
+
'joseph-roitman_pytest-snapshot_pr13': ('pytest-snapshot', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 56 |
+
'joseph-roitman_pytest-snapshot_pr32': ('pytest-snapshot', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 57 |
+
'joseph-roitman_pytest-snapshot_pr34': ('pytest-snapshot', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 58 |
+
'joseph-roitman_pytest-snapshot_pr36': ('pytest-snapshot', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 59 |
+
'lasp_cdflib_pr38': ('cdflib', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 60 |
+
'lasp_cdflib_pr49': ('cdflib', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 61 |
+
'onnx_tensorflow-onnx_pr832': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 62 |
+
'onnx_tensorflow-onnx_pr839': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 63 |
+
'onnx_tensorflow-onnx_pr850': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 64 |
+
'onnx_tensorflow-onnx_pr867': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 65 |
+
'onnx_tensorflow-onnx_pr882': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 66 |
+
'onnx_tensorflow-onnx_pr949': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 67 |
+
'onnx_tensorflow-onnx_pr968': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 68 |
+
'onnx_tensorflow-onnx_pr974': ('tensorflow-onnx', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 69 |
+
'pytest-dev_pytest-bdd_pr335': ('pytest-bdd', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 70 |
+
'pytest-dev_pytest-bdd_pr398': ('pytest-bdd', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 71 |
+
'pytransitions_transitions_pr73': ('transitions', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 72 |
+
's4v4g3_otel-extensions-python_pr4': ('otel-extensions-python', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 73 |
+
'stephrdev_pytest-isort_pr40': ('pytest-isort', 'Import the package under test from the task checkout instead of the installed site-packages copy, which made the unchanged checkout score 1 under no-op.'),
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
# Tasks archived after the 2026-10-10 recheck (reference, no-op and environment evidence per task); see archived_tasks.json.
|
| 77 |
+
RECHECK_ARCHIVE = json.loads((HERE / 'archived_tasks.json').read_text()) if (HERE / 'archived_tasks.json').is_file() else {}
|
| 78 |
+
|
| 79 |
+
ARCHIVED_TASKS = {
|
| 80 |
+
**{f'matan1008_pykdebugparser_pr{pr}': {
|
| 81 |
+
'category': 'image-missing-test-dependency',
|
| 82 |
+
'reason': 'The task image lacks the construct package that the test modules import, so neither the reference nor the no-op run can collect a single test, even with the repository on the import path. Installing it at verification time would make the verifier depend on PyPI; archived until the image is fixed.'}
|
| 83 |
+
for pr in (5, 6)},
|
| 84 |
+
'biocommons_hgvs_pr699': {
|
| 85 |
+
'category': 'verifier-external-dependency',
|
| 86 |
+
'reason': 'The reference verifier requires a connection to the external UTA database at uta.biocommons.org:5432. The service timed out during validation, so test results depend on an unavailable external database. Archived at user request because this verifier dependency is not reliable.'},
|
| 87 |
+
'biocommons_hgvs_pr775': {
|
| 88 |
+
'category': 'verifier-external-dependency',
|
| 89 |
+
'reason': 'The reference verifier requires a connection to the external UTA database at uta.biocommons.org:5432. The service timed out during validation, so test results depend on an unavailable external database. Archived at user request because this verifier dependency is not reliable.'},
|
| 90 |
+
'kurtbrose_pyjks_pr19': {
|
| 91 |
+
'category': 'reference-solution-reward-zero',
|
| 92 |
+
'reason': 'Reference scores 0 because verifier baseline restoration deletes the new tests/expected/custom_entry_passwords.py helper while leaving its import in tests/expected/__init__.py. Pytest fails during collection before executing tests. This is a verifier preparation defect, not evidence of a broken reference implementation. Archived without repair at user request.'},
|
| 93 |
+
'turner-townsend_flask-pydantic-spec_pr78': {
|
| 94 |
+
'category': 'verifier-execution-error',
|
| 95 |
+
'reason': 'Verifier test patch omits tests/common.py defining DemoModelV1, causing no-op collection failure. Reference executes 38 passing tests but scores zero because expected unparameterized selectors do not match parameterized results. Archived without repair at user request.'},
|
| 96 |
+
'meerk40t_svgelements_pr24': {
|
| 97 |
+
'category': 'verifier-execution-error',
|
| 98 |
+
'reason': 'Verifier test patch deletes test/test_distance.py and moves tests to test/test_length.py, but selected test IDs still reference the deleted file. Reference and no-op both execute zero tests. Archived without repair at user request.'},
|
| 99 |
+
}
|
| 100 |
+
ARCHIVED_TASKS = {**RECHECK_ARCHIVE, **ARCHIVED_TASKS}
|
| 101 |
+
|
| 102 |
+
# Reference failures from the 2026-10-08 full run whose gold patch adds or modifies test-support files that the
|
| 103 |
+
# verifier reset discards (2026-10-10 static scan of gold.patch against f2p.patch). The restoration repair applies
|
| 104 |
+
# only to these tasks and to TEST_FIXTURE_REPAIRS; previously validated tasks keep their verifiers unchanged.
|
| 105 |
+
FIXTURE_RESTORATION_TASKS = frozenset({
|
| 106 |
+
'appium_python-client_pr531',
|
| 107 |
+
'ariebovenberg_slotscheck_pr93',
|
| 108 |
+
'audreyr_cookiecutter_pr1419',
|
| 109 |
+
'audreyr_cookiecutter_pr1468',
|
| 110 |
+
'audreyr_cookiecutter_pr1874',
|
| 111 |
+
'audreyr_cookiecutter_pr1981',
|
| 112 |
+
'audreyr_cookiecutter_pr1995',
|
| 113 |
+
'audreyr_cookiecutter_pr839',
|
| 114 |
+
'bottlepy_bottle_pr787',
|
| 115 |
+
'burnash_gspread_pr1010',
|
| 116 |
+
'burnash_gspread_pr1012',
|
| 117 |
+
'burnash_gspread_pr1013',
|
| 118 |
+
'burnash_gspread_pr1021',
|
| 119 |
+
'burnash_gspread_pr1030',
|
| 120 |
+
'burnash_gspread_pr1063',
|
| 121 |
+
'burnash_gspread_pr1095',
|
| 122 |
+
'burnash_gspread_pr1138',
|
| 123 |
+
'burnash_gspread_pr1207',
|
| 124 |
+
'burnash_gspread_pr1215',
|
| 125 |
+
'burnash_gspread_pr1225',
|
| 126 |
+
'burnash_gspread_pr1233',
|
| 127 |
+
'burnash_gspread_pr1299',
|
| 128 |
+
'burnash_gspread_pr1305',
|
| 129 |
+
'burnash_gspread_pr1308',
|
| 130 |
+
'burnash_gspread_pr1364',
|
| 131 |
+
'burnash_gspread_pr1392',
|
| 132 |
+
'burnash_gspread_pr1402',
|
| 133 |
+
'burnash_gspread_pr1404',
|
| 134 |
+
'burnash_gspread_pr1417',
|
| 135 |
+
'burnash_gspread_pr1498',
|
| 136 |
+
'burnash_gspread_pr945',
|
| 137 |
+
'businho_pytest-ruff_pr25',
|
| 138 |
+
'clemense_yourdfpy_pr4',
|
| 139 |
+
'clld_clldutils_pr93',
|
| 140 |
+
'cloudtools_troposphere_pr2069',
|
| 141 |
+
'cookiecutter_cookiecutter_pr1200',
|
| 142 |
+
'cookiecutter_cookiecutter_pr1468',
|
| 143 |
+
'cookiecutter_cookiecutter_pr1493',
|
| 144 |
+
'cookiecutter_cookiecutter_pr1981',
|
| 145 |
+
'cookiecutter_cookiecutter_pr1995',
|
| 146 |
+
'dantebben_nox-uv_pr4',
|
| 147 |
+
'dapr_python-sdk_pr89',
|
| 148 |
+
'drgarcia1986_simple-settings_pr11',
|
| 149 |
+
'drgarcia1986_simple-settings_pr8',
|
| 150 |
+
'eerkunt_terraform-compliance_pr352',
|
| 151 |
+
'eerkunt_terraform-compliance_pr448',
|
| 152 |
+
'eerkunt_terraform-compliance_pr563',
|
| 153 |
+
'executablebooks_myst-nb_pr604',
|
| 154 |
+
'executablebooks_sphinx-design_pr13',
|
| 155 |
+
'fonttools_fonttools_pr1970',
|
| 156 |
+
'fonttools_fonttools_pr2080',
|
| 157 |
+
'fonttools_fonttools_pr3912',
|
| 158 |
+
'fortran-lang_fortls_pr49',
|
| 159 |
+
'globus_globus-sdk-python_pr1179',
|
| 160 |
+
'globus_globus-sdk-python_pr903',
|
| 161 |
+
'google_flatbuffers_pr5631',
|
| 162 |
+
'googleapis_proto-plus-python_pr112',
|
| 163 |
+
'googleapis_proto-plus-python_pr118',
|
| 164 |
+
'googlefonts_ufo2ft_pr866',
|
| 165 |
+
'googlefonts_ufo2ft_pr870',
|
| 166 |
+
'gorakhargosh_watchdog_pr968',
|
| 167 |
+
'hadialqattan_pycln_pr120',
|
| 168 |
+
'hakancelikdev_unimport_pr289',
|
| 169 |
+
'hhatto_autopep8_pr288',
|
| 170 |
+
'iterative_gto_pr148',
|
| 171 |
+
'iterative_gto_pr309',
|
| 172 |
+
'jackdewinter_pymarkdown_pr1413',
|
| 173 |
+
'jackdewinter_pymarkdown_pr1414',
|
| 174 |
+
'jackdewinter_pymarkdown_pr279',
|
| 175 |
+
'jackdewinter_pymarkdown_pr280',
|
| 176 |
+
'jackdewinter_pymarkdown_pr455',
|
| 177 |
+
'jackdewinter_pymarkdown_pr559',
|
| 178 |
+
'jackdewinter_pymarkdown_pr636',
|
| 179 |
+
'jackdewinter_pymarkdown_pr80',
|
| 180 |
+
'jsh9_pydoclint_pr155',
|
| 181 |
+
'jsh9_pydoclint_pr188',
|
| 182 |
+
'jsh9_pydoclint_pr192',
|
| 183 |
+
'jsh9_pydoclint_pr199',
|
| 184 |
+
'jsh9_pydoclint_pr205',
|
| 185 |
+
'jsh9_pydoclint_pr206',
|
| 186 |
+
'jsh9_pydoclint_pr207',
|
| 187 |
+
'jsh9_pydoclint_pr225',
|
| 188 |
+
'jsh9_pydoclint_pr227',
|
| 189 |
+
'jsh9_pydoclint_pr230',
|
| 190 |
+
'jsh9_pydoclint_pr259',
|
| 191 |
+
'jsh9_pydoclint_pr260',
|
| 192 |
+
'jsh9_pydoclint_pr271',
|
| 193 |
+
'jsh9_pydoclint_pr277',
|
| 194 |
+
'jxtech_wechatpy_pr328',
|
| 195 |
+
'jxtech_wechatpy_pr333',
|
| 196 |
+
'jxtech_wechatpy_pr66',
|
| 197 |
+
'jxtech_wechatpy_pr69',
|
| 198 |
+
'jxtech_wechatpy_pr74',
|
| 199 |
+
'jxtech_wechatpy_pr94',
|
| 200 |
+
'keboola_python-component_pr63',
|
| 201 |
+
'localstack_plux_pr28',
|
| 202 |
+
'ludeeus_awesomeversion_pr290',
|
| 203 |
+
'mesonbuild_meson-python_pr177',
|
| 204 |
+
'mesonbuild_meson-python_pr467',
|
| 205 |
+
'mesonbuild_meson-python_pr569',
|
| 206 |
+
'mesonbuild_meson-python_pr96',
|
| 207 |
+
'mitmproxy_mitmproxy_pr4860',
|
| 208 |
+
'neovim_python-client_pr534',
|
| 209 |
+
'olofk_fusesoc_pr711',
|
| 210 |
+
'p1c2u_jsonschema-spec_pr6',
|
| 211 |
+
'pdm-project_pdm-backend_pr105',
|
| 212 |
+
'pepkit_peppy_pr489',
|
| 213 |
+
'pepkit_peppy_pr495',
|
| 214 |
+
'praw-dev_praw_pr563',
|
| 215 |
+
'praw-dev_praw_pr575',
|
| 216 |
+
'praw-dev_praw_pr602',
|
| 217 |
+
'praw-dev_praw_pr612',
|
| 218 |
+
'praw-dev_prawcore_pr112',
|
| 219 |
+
'praw-dev_prawcore_pr116',
|
| 220 |
+
'praw-dev_prawcore_pr119',
|
| 221 |
+
'praw-dev_prawcore_pr13',
|
| 222 |
+
'praw-dev_prawcore_pr15',
|
| 223 |
+
'praw-dev_prawcore_pr206',
|
| 224 |
+
'praw-dev_prawcore_pr25',
|
| 225 |
+
'praw-dev_prawcore_pr26',
|
| 226 |
+
'praw-dev_prawcore_pr32',
|
| 227 |
+
'praw-dev_prawcore_pr4',
|
| 228 |
+
'praw-dev_prawcore_pr42',
|
| 229 |
+
'praw-dev_prawcore_pr57',
|
| 230 |
+
'praw-dev_prawcore_pr59',
|
| 231 |
+
'praw-dev_prawcore_pr61',
|
| 232 |
+
'praw-dev_prawcore_pr62',
|
| 233 |
+
'praw-dev_prawcore_pr66',
|
| 234 |
+
'pydantic_bump-pydantic_pr90',
|
| 235 |
+
'pyinfra-dev_pyinfra_pr192',
|
| 236 |
+
'pyinfra-dev_pyinfra_pr194',
|
| 237 |
+
'pyinfra-dev_pyinfra_pr196',
|
| 238 |
+
'pypa_pyproject-metadata_pr206',
|
| 239 |
+
'pypa_pyproject-metadata_pr232',
|
| 240 |
+
'pypa_twine_pr83',
|
| 241 |
+
'python-distro_distro_pr106',
|
| 242 |
+
'python-distro_distro_pr247',
|
| 243 |
+
'python-distro_distro_pr30',
|
| 244 |
+
'python-poetry_poetry-core_pr101',
|
| 245 |
+
'python-poetry_poetry-core_pr108',
|
| 246 |
+
'python-poetry_poetry-core_pr221',
|
| 247 |
+
'python-poetry_poetry-core_pr228',
|
| 248 |
+
'python-poetry_poetry-core_pr368',
|
| 249 |
+
'python-poetry_poetry-core_pr462',
|
| 250 |
+
'python-poetry_poetry-core_pr469',
|
| 251 |
+
'python-poetry_poetry-core_pr57',
|
| 252 |
+
'python-poetry_poetry-core_pr578',
|
| 253 |
+
'python-poetry_poetry-core_pr620',
|
| 254 |
+
'python-poetry_poetry-core_pr629',
|
| 255 |
+
'python-poetry_poetry-core_pr634',
|
| 256 |
+
'python-poetry_poetry-core_pr661',
|
| 257 |
+
'python-poetry_poetry-core_pr666',
|
| 258 |
+
'python-poetry_poetry-core_pr675',
|
| 259 |
+
'python-poetry_poetry-core_pr710',
|
| 260 |
+
'python-poetry_poetry-core_pr734',
|
| 261 |
+
'python-poetry_poetry-core_pr81',
|
| 262 |
+
'python-poetry_poetry-core_pr830',
|
| 263 |
+
'python-poetry_poetry-core_pr874',
|
| 264 |
+
'python-trio_flake8-async_pr100',
|
| 265 |
+
'python-trio_flake8-async_pr22',
|
| 266 |
+
'python-trio_flake8-async_pr34',
|
| 267 |
+
'python-trio_flake8-async_pr98',
|
| 268 |
+
'radish-bdd_radish_pr447',
|
| 269 |
+
'ros-infrastructure_rosdep_pr789',
|
| 270 |
+
'sigmavirus24_github3.py_pr1199',
|
| 271 |
+
'sphinx-contrib_confluencebuilder_pr1044',
|
| 272 |
+
'sphinx-contrib_confluencebuilder_pr769',
|
| 273 |
+
'sphinx-doc_sphinx-argparse_pr49',
|
| 274 |
+
'spulec_freezegun_pr119',
|
| 275 |
+
'tconbeer_sqlfmt_pr16',
|
| 276 |
+
'tconbeer_sqlfmt_pr221',
|
| 277 |
+
'tconbeer_sqlfmt_pr25',
|
| 278 |
+
'tefra_xsdata_pr653',
|
| 279 |
+
'tlambert03_mkdocs-api-autonav_pr12',
|
| 280 |
+
'ultrabug_mkdocs-static-i18n_pr183',
|
| 281 |
+
})
|
| 282 |
+
|
| 283 |
+
# Fixture paths confirmed from failure logs in the 2026-10-09 audit; the repair below must still restore each of them.
|
| 284 |
+
TEST_FIXTURE_REPAIRS = {
|
| 285 |
+
'andialbrecht_sqlparse_pr317': ('tests/files/encoding_utf8.sql',),
|
| 286 |
+
'audreyr_cookiecutter_pr1692': ('tests/test-generate-context/nested_dict.json',),
|
| 287 |
+
'audreyr_cookiecutter_pr2010': ('tests/test-generate-context/nested_dict_additional.json',),
|
| 288 |
+
'awslabs_serverless-application-model_pr1756': ('tests/translator/input/http_api_lambda_auth.yaml',),
|
| 289 |
+
'awslabs_serverless-application-model_pr2242': ('tests/translator/input/function_with_event_filtering.yaml',),
|
| 290 |
+
'awslabs_serverless-application-model_pr2261': ('tests/translator/input/http_api_multiple_authorizers.yaml',),
|
| 291 |
+
'beetbox_beets_pr3641': ('test/rsrc/lyrics/geniuscom/Wutangclancreamlyrics.txt',),
|
| 292 |
+
'beetbox_beets_pr5352': ('test/rsrc/lyrics/geniuscom/2pacalleyezonmelyrics.txt',),
|
| 293 |
+
'best-doctor_flake8-class-attributes-order_pr13': ('tests/test_files/special_method.py',),
|
| 294 |
+
'best-doctor_flake8-functions_pr5': ('tests/test_files/file_pure_function.py',),
|
| 295 |
+
'bufbuild_protovalidate-python_pr308': ('tests/testdata/string_ext_supplemental.textproto',),
|
| 296 |
+
'buriy_python-readability_pr190': ('tests/samples/summary-keep-all-images.sample.html',),
|
| 297 |
+
'butler54_mdformat-frontmatter_pr5': ('tests/simple-md-test.md',),
|
| 298 |
+
'c4deszes_ldfparser_pr106': ('tests/ldf/ldf_with_sporadic_frames.ldf',),
|
| 299 |
+
'c4deszes_ldfparser_pr116': ('tests/ldf/j2602_1.ldf',),
|
| 300 |
+
'c4deszes_ldfparser_pr80': ('tests/ldf/lin_schedules.ldf',),
|
| 301 |
+
'canonical_operator_pr800': ('test/charms/test_smoke/charmcraft.yaml',),
|
| 302 |
+
'censys_censys-python_pr312': ('tests/cli/test.xml',),
|
| 303 |
+
'cookiecutter_cookiecutter_pr1692': ('tests/test-generate-context/nested_dict.json',),
|
| 304 |
+
'cookiecutter_cookiecutter_pr2010': ('tests/test-generate-context/nested_dict_additional.json',),
|
| 305 |
+
'cthoyt_pystow_pr17': ('tests/resources/test_1.tsv',),
|
| 306 |
+
'demisto_demisto-sdk_pr102': ('tests/test_files/indicator-field-exact-scheme.json',),
|
| 307 |
+
'django-crispy-forms_crispy-bootstrap5_pr151': ('tests/results/modal.html',),
|
| 308 |
+
'django-crispy-forms_crispy-bootstrap5_pr44': ('tests/results/field_with_buttons.html',),
|
| 309 |
+
'django-crispy-forms_crispy-bootstrap5_pr81': ('tests/results/alert.html',),
|
| 310 |
+
'drgarcia1986_simple-settings_pr19': ('tests/samples/simple_yaml_file.yaml',),
|
| 311 |
+
'fastavro_fastavro_pr482': ('tests/load_schema_test_3/A.avsc',),
|
| 312 |
+
'fastavro_fastavro_pr491': ('tests/load_schema_test_7/A.avsc',),
|
| 313 |
+
'fastavro_fastavro_pr492': ('tests/load_schema_test_8/A.avsc',),
|
| 314 |
+
'fastavro_fastavro_pr497': ('tests/load_schema_test_12/com/namespace/E.avsc',),
|
| 315 |
+
'fonttools_fonttools_pr1460': ('Tests/feaLib/data/bug1459.fea',),
|
| 316 |
+
'fonttools_fonttools_pr1669': ('Tests/cffLib/data/TestCFF2Widths.ttx',),
|
| 317 |
+
'fonttools_fonttools_pr1752': ('Tests/varLib/data/SingleMaster.designspace',),
|
| 318 |
+
'fonttools_fonttools_pr1827': ('Tests/varLib/data/VarLibLocationTest.designspace',),
|
| 319 |
+
'fonttools_fonttools_pr1876': ('Tests/feaLib/data/GSUB_error.fea',),
|
| 320 |
+
'fonttools_fonttools_pr1878': ('Tests/feaLib/data/aalt_chain_contextual_subst.fea',),
|
| 321 |
+
'fonttools_fonttools_pr1905': ('Tests/feaLib/data/MultipleLookupsPerGlyph2.fea',),
|
| 322 |
+
'fonttools_fonttools_pr1944': ('Tests/subset/data/TestContextSubstFormat3.ttx',),
|
| 323 |
+
'fonttools_fonttools_pr1957': ('Tests/varLib/data/FeatureVarsWholeRange.designspace',),
|
| 324 |
+
'fonttools_fonttools_pr1973': ('Tests/feaLib/data/include/test.ufo/features.fea',),
|
| 325 |
+
'fonttools_fonttools_pr2112': ('Tests/subset/data/layout_scripts.ttx',),
|
| 326 |
+
'fonttools_fonttools_pr2161': ('Tests/ttLib/data/woff2_overlap_offcurve_in.ttx',),
|
| 327 |
+
'fonttools_fonttools_pr2170': ('Tests/feaLib/data/delete_glyph.fea',),
|
| 328 |
+
'fonttools_fonttools_pr2277': ('Tests/feaLib/data/bug2276.fea',),
|
| 329 |
+
'fonttools_fonttools_pr2313': ('Tests/subset/data/GPOS_SinglePos_no_value_issue_2312.ttx',),
|
| 330 |
+
'fonttools_fonttools_pr2432': ('Tests/feaLib/data/variable_scalar_anchor.fea',),
|
| 331 |
+
'fonttools_fonttools_pr2447': ('Tests/merge/data/CFFFont1.ttx',),
|
| 332 |
+
'fonttools_fonttools_pr2462': ('Tests/subset/data/BungeeColor-Regular.ttx',),
|
| 333 |
+
'fonttools_fonttools_pr2555': ('Tests/varLib/instancer/data/SinglePos.ttx',),
|
| 334 |
+
'fonttools_fonttools_pr2660': ('Tests/varLib/data/TestVariableCOLR.designspace',),
|
| 335 |
+
'fonttools_fonttools_pr2673': ('Tests/varLib/instancer/data/STATInstancerTest.ttx',),
|
| 336 |
+
'fonttools_fonttools_pr2684': ('Tests/designspaceLib/data/DS5BreakTest.designspace',),
|
| 337 |
+
'fonttools_fonttools_pr2776': ('Tests/feaLib/data/variable_bug2772.fea',),
|
| 338 |
+
'fonttools_fonttools_pr2789': ('Tests/ttLib/data/TestTTF_normalizeLocation.ttx',),
|
| 339 |
+
'fonttools_fonttools_pr3024': ('Tests/varLib/data/master_no_overwrite_stat/Test-CondensedThin.ttx',),
|
| 340 |
+
'fonttools_fonttools_pr3027': ('Tests/ttLib/tables/data/COLRv1-clip-boxes-glyf.ttx',),
|
| 341 |
+
'fonttools_fonttools_pr3034': ('Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_diff.ttx',),
|
| 342 |
+
'fonttools_fonttools_pr3075': ('Tests/varLib/data/SparseMasters_ufo.designspace',),
|
| 343 |
+
'fonttools_fonttools_pr3092': ('Tests/ttLib/tables/data/_g_l_y_f_instructions.ttx',),
|
| 344 |
+
'fonttools_fonttools_pr3115': ('Tests/ttx/data/roundtrip_DSIG_split_at_XML_parse_buffer_size.ttx',),
|
| 345 |
+
'fonttools_fonttools_pr3305': ('Tests/subset/data/NotoSansCJKjp-Regular.subset.ttx',),
|
| 346 |
+
'fonttools_fonttools_pr3330': ('Tests/feaLib/data/variable_mark_anchor.fea',),
|
| 347 |
+
'fonttools_fonttools_pr3506': ('Tests/varLib/instancer/data/CFF2Instancer-VF-1.ttx',),
|
| 348 |
+
'fonttools_fonttools_pr3520': ('Tests/feaLib/data/duplicate_lookup_reference.fea',),
|
| 349 |
+
'fonttools_fonttools_pr3559': ('Tests/feaLib/data/contextual_inline_multi_sub_format_2.fea',),
|
| 350 |
+
'fonttools_fonttools_pr3672': ('Tests/subset/data/cmap14_font1.ttx',),
|
| 351 |
+
'fonttools_fonttools_pr3726': ('Tests/feaLib/data/contextual_inline_format_4.fea',),
|
| 352 |
+
'fonttools_fonttools_pr3783': ('Tests/feaLib/data/spec9a2.fea',),
|
| 353 |
+
'fonttools_fonttools_pr3800': ('Tests/feaLib/data/CursivePosSubtable.fea',),
|
| 354 |
+
'fonttools_fonttools_pr3803': ('Tests/feaLib/data/single_pos_NULL.fea',),
|
| 355 |
+
'fonttools_fonttools_pr3804': ('Tests/feaLib/data/class_pair_pos_duplicates.fea',),
|
| 356 |
+
'fonttools_fonttools_pr3811': ('Tests/feaLib/data/spec8a_2.fea',),
|
| 357 |
+
'fonttools_fonttools_pr3838': ('Tests/varLib/data/test_results/FeatureVars_latn_dflt_var.ttx',),
|
| 358 |
+
'fonttools_fonttools_pr3849': ('Tests/feaLib/data/bug3846_1.fea',),
|
| 359 |
+
'fonttools_fonttools_pr3853': ('Tests/subset/data/PreserveSillyNamesTest.ttx',),
|
| 360 |
+
'fonttools_fonttools_pr3874': ('Tests/feaLib/data/combo_mult_and_lig_sub.fea',),
|
| 361 |
+
'fonttools_fonttools_pr3895': ('Tests/feaLib/data/identical_feature_lookups.fea',),
|
| 362 |
+
'frictionlessdata_frictionless-py_pr1052': ('tests/fixtures/output-markdown/package.md',),
|
| 363 |
+
'goodmami_wn_pr264': ('tests/data/mini-lmf-1.4.xml',),
|
| 364 |
+
'google_flatbuffers_pr6217': ('tests/optional_scalars/ScalarStuff.cs',),
|
| 365 |
+
'googlefonts_ufo2ft_pr289': ('tests/data/TestFont-NoOptimize-CFF.ttx',),
|
| 366 |
+
'googlefonts_ufo2ft_pr318': ('tests/data/IncompatibleMasters/NewFont-Regular.ufo/metainfo.plist',),
|
| 367 |
+
'googlefonts_ufo2ft_pr335': ('tests/data/Instructions.ufo/metainfo.plist',),
|
| 368 |
+
'googlefonts_ufo2ft_pr359': ('tests/data/ColorTest.ufo/metainfo.plist',),
|
| 369 |
+
'googlefonts_ufo2ft_pr816': ('tests/data/TestVarFont.designspace',),
|
| 370 |
+
'googlefonts_ufo2ft_pr817': ('tests/data/OTestFont.designspace',),
|
| 371 |
+
'googlefonts_ufo2ft_pr869': ('tests/data/ContextualAnchorsTest-Regular.ufo/metainfo.plist',),
|
| 372 |
+
'googlefonts_ufo2ft_pr909': ('tests/data/Bug908.ufo/metainfo.plist',),
|
| 373 |
+
'googlefonts_ufo2ft_pr942': ('tests/data/BagelFatOne-Regular.designspace',),
|
| 374 |
+
'goose3_goose3_pr157': ('tests/data/publishdate/test_publish_date_unix_milliseconds.json',),
|
| 375 |
+
'goose3_goose3_pr180': ('tests/data/title/test_title_sitename_list.json',),
|
| 376 |
+
'goose3_goose3_pr25': ('tests/data/images/test_base64_image.json',),
|
| 377 |
+
'goose3_goose3_pr54': ('tests/data/metas/test_meta_encoding.json',),
|
| 378 |
+
'goose3_goose3_pr60': ('tests/data/title/test_title_splitter.json',),
|
| 379 |
+
'goose3_goose3_pr64': ('tests/data/opengraph/test_opengraph_type.json',),
|
| 380 |
+
'goose3_goose3_pr66': ('tests/data/content/test_retry_top_node.json',),
|
| 381 |
+
'goose3_goose3_pr90': ('tests/data/opengraph/test_opengraph_types_mult.json',),
|
| 382 |
+
'gruebel_pycep_pr151': ('tests/test_function/examples/array/flatten/result.json',),
|
| 383 |
+
'gruebel_pycep_pr181': ('tests/examples/basic/06-type/result.json',),
|
| 384 |
+
'gruebel_pycep_pr320': ('tests/examples/complex/10-extension/result.json',),
|
| 385 |
+
'gruebel_pycep_pr321': ('tests/examples/complex/11-typed-var/result.json',),
|
| 386 |
+
'gruebel_pycep_pr322': ('tests/examples/complex/12-nullable-type/result.json',),
|
| 387 |
+
'gruebel_pycep_pr323': ('tests/examples/complex/13-import/result.json',),
|
| 388 |
+
'gruebel_pycep_pr326': ('tests/examples/complex/14-type-decorator/result.json',),
|
| 389 |
+
'gruebel_pycep_pr43': ('tests/test_function/examples/date/date_time_to_epoch/result.json',),
|
| 390 |
+
'gruebel_pycep_pr52': ('tests/test_function/examples/file/load_json_content/result.json',),
|
| 391 |
+
'home-assistant-libs_python-supervisor-client_pr152': ('tests/fixtures/host_disk_usage.json',),
|
| 392 |
+
'iterative_gto_pr269': ('tests/resources/sample_remote_repo_expected_registry.json',),
|
| 393 |
+
'jackdewinter_pymarkdown_pr1050': ('test/resources/rules/md010/issue-1015.md',),
|
| 394 |
+
'jacksmith15_json-ref-dict_pr13': ('tests/schemas/slash-key.yaml',),
|
| 395 |
+
'jacksmith15_json-ref-dict_pr4': ('tests/schemas/bad-circular.yaml',),
|
| 396 |
+
'jacksmith15_json-ref-dict_pr9': ('tests/schemas/with-tabs.json',),
|
| 397 |
+
'jazzband_icalevents_pr133': ('test/test_data/google_2024.ics',),
|
| 398 |
+
'jazzband_icalevents_pr140': ('test/test_data/regression_offset_native.ics',),
|
| 399 |
+
'jazzband_icalevents_pr79': ('test/test_data/google_tz.ics',),
|
| 400 |
+
'jazzband_icalevents_pr80': ('test/test_data/cest.ics',),
|
| 401 |
+
'jazzband_icalevents_pr88': ('test/test_data/rrule_until_only_date.ics',),
|
| 402 |
+
'jazzband_icalevents_pr91': ('test/test_data/empty.ics',),
|
| 403 |
+
'jazzband_icalevents_pr92': ('test/test_data/status_and_url.ics',),
|
| 404 |
+
'jazzband_icalevents_pr95': ('test/test_data/multi_attendee_response.ics',),
|
| 405 |
+
'jazzband_icalevents_pr97': ('test/test_data/multi_exdate_same_line_ms.ics',),
|
| 406 |
+
'jazzband_tablib_pr534': ('tests/files/issue_524.yaml',),
|
| 407 |
+
'joshtemple_lkml_pr10': ('tests/resources/duplicate_top_level_keys.view.lkml',),
|
| 408 |
+
'jsh9_pydoclint_pr123': ('tests/data/edge_cases/09_double_quotes_in_Literal/google.py',),
|
| 409 |
+
'jsh9_pydoclint_pr129': ('tests/data/edge_cases/10_absent_return_anno/numpy.py',),
|
| 410 |
+
'jsh9_pydoclint_pr130': ('tests/data/google/class_attributes/cases.py',),
|
| 411 |
+
'jsh9_pydoclint_pr153': ('tests/data/edge_cases/12_property_methods_as_class_attr/google.py',),
|
| 412 |
+
'jsh9_pydoclint_pr86': ('tests/data/edge_cases/06_no_type_hints_in_doc/numpy.py',),
|
| 413 |
+
'jsh9_pydoclint_pr89': ('tests/data/edge_cases/07_underscore_args/google.py',),
|
| 414 |
+
'jxtech_wechatpy_pr381': ('tests/fixtures/changeopenid.json',),
|
| 415 |
+
'jxtech_wechatpy_pr412': ('tests/fixtures/sns_jscode2session.json',),
|
| 416 |
+
'jxtech_wechatpy_pr456': ('tests/fixtures/enterprise/user_list.json',),
|
| 417 |
+
'lovesegfault_beautysh_pr36': ('tests/indent_test1_raw.sh',),
|
| 418 |
+
'marshallward_f90nml_pr120': ('tests/long_string.nml',),
|
| 419 |
+
'marshallward_f90nml_pr180': ('tests/null_target_end_comma.nml',),
|
| 420 |
+
'mattijn_topojson_pr141': ('tests/files_topojson/gm.topo.json',),
|
| 421 |
+
'maxb2_typer-config_pr15': ('tests/config.env',),
|
| 422 |
+
'maxb2_typer-config_pr17': ('tests/config.ini',),
|
| 423 |
+
'meeb_whoisit_pr7': ('tests/data_rdap_response_domain3.json',),
|
| 424 |
+
'meeb_whoisit_pr8': ('tests/data_rdap_response_ip_v4_2.json',),
|
| 425 |
+
'mesonbuild_meson-python_pr219': ('tests/packages/unknown-user-args-top-level/pyproject.toml',),
|
| 426 |
+
'mesonbuild_meson-python_pr377': ('tests/packages/purelib-platlib-split/pyproject.toml',),
|
| 427 |
+
'mesonbuild_meson-python_pr455': ('tests/packages/missing-meson-version/pyproject.toml',),
|
| 428 |
+
'mesonbuild_meson-python_pr71': ('tests/packages/unsupported-python-version/pyproject.toml',),
|
| 429 |
+
'mhe_pynrrd_pr40': ('tests/test1d_ascii.nrrd',),
|
| 430 |
+
'mirumee_ariadne-codegen_pr106': ('tests/main/graphql_schemas/example/pyproject.toml',),
|
| 431 |
+
'mirumee_ariadne-codegen_pr264': ('tests/main/graphql_schemas/example/pyproject-schema-graphql.toml',),
|
| 432 |
+
'ncclient_ncclient_pr299': ('test/unit/ssh_config',),
|
| 433 |
+
'ncclient_ncclient_pr628': ('test/unit/transport/certs/id_ed25519_test.pub',),
|
| 434 |
+
'nicklambourne_slackblocks_pr32': ('test/samples/blocks/section_block_empty_text_field_value.json',),
|
| 435 |
+
'nicklambourne_slackblocks_pr49': ('test/samples/messages/message_with_optional_arguments.json',),
|
| 436 |
+
'olofk_fusesoc_pr645': ('tests/capi2_cores/parser/inheritance.core',),
|
| 437 |
+
'pappasam_toml-sort_pr91': ('tests/examples/gradle-version-catalog.toml',),
|
| 438 |
+
'pdm-project_pdm-backend_pr14': ('tests/fixtures/projects/demo-package-include-old/pyproject.toml',),
|
| 439 |
+
'pdm-project_pdm-backend_pr20': ('tests/fixtures/projects/demo-package-with-deep-path/pyproject.toml',),
|
| 440 |
+
'pdm-project_pdm-backend_pr21': ('tests/fixtures/projects/demo-cextension/pyproject.toml',),
|
| 441 |
+
'pdm-project_pdm-backend_pr49': ('tests/fixtures/projects/demo-no-name-nor-version/pyproject.toml',),
|
| 442 |
+
'pdm-project_pdm-backend_pr5': ('tests/fixtures/projects/demo-legacy/pyproject.toml',),
|
| 443 |
+
'pdm-project_pdm-backend_pr65': ('tests/fixtures/projects/demo-purelib-with-build/pyproject.toml',),
|
| 444 |
+
'pdm-project_pdm-backend_pr8': ('tests/fixtures/projects/demo-explicit-package-dir/pyproject.toml',),
|
| 445 |
+
'python-poetry_poetry-core_pr118': ('tests/fixtures/with_readme_files/README-1.rst',),
|
| 446 |
+
'python-poetry_poetry-core_pr248': ('tests/fixtures/with_readme_files/README-1.rst',),
|
| 447 |
+
'radish-bdd_radish_pr457': ('tests/output/unix/filter-when-using-tags-with-args.txt',),
|
| 448 |
+
'salesforce_cloudsplaining_pr90': ('test/files/shared/test_exclusions_for_service_roles_expected.json',),
|
| 449 |
+
'sayanarijit_expandvars_pr18': ('tests/data/foo.txt',),
|
| 450 |
+
'snowflakedb_snowflake-cli_pr505': ('tests/test_data/projects/snowpark_procedures/snowflake.yml',),
|
| 451 |
+
'spdx_tools-python_pr236': ('tests/data/formats/SPDXSBOMExample.tag',),
|
| 452 |
+
'stac-utils_stac-pydantic_pr108': ('tests/example_stac/example-item_geometry-null.json',),
|
| 453 |
+
'stac-utils_stac-pydantic_pr81': ('tests/example_stac/example-collection-list.json',),
|
| 454 |
+
'tconbeer_sqlfmt_pr126': ('tests/data/unformatted/110_other_identifiers.sql',),
|
| 455 |
+
'tconbeer_sqlfmt_pr127': ('tests/data/unformatted/111_chained_boolean_between.sql',),
|
| 456 |
+
'tconbeer_sqlfmt_pr143': ('tests/data/unformatted/201_basic_snapshot.sql',),
|
| 457 |
+
'tconbeer_sqlfmt_pr146': ('tests/data/preformatted/301_multiline_jinjafmt.sql',),
|
| 458 |
+
'tconbeer_sqlfmt_pr21': ('tests/data/unit_tests/test_parser/test_multiline_wrapping.sql',),
|
| 459 |
+
'tconbeer_sqlfmt_pr210': ('tests/data/unformatted/116_chained_booleans.sql',),
|
| 460 |
+
'tconbeer_sqlfmt_pr216': ('tests/data/unformatted/213_gitlab_fct_sales_funnel_target.sql',),
|
| 461 |
+
'tconbeer_sqlfmt_pr228': ('tests/data/unformatted/118_within_group.sql',),
|
| 462 |
+
'tconbeer_sqlfmt_pr233': ('tests/data/unformatted/119_psycopg_placeholders.sql',),
|
| 463 |
+
'tconbeer_sqlfmt_pr238': ('tests/data/unformatted/120_array_literals.sql',),
|
| 464 |
+
'tconbeer_sqlfmt_pr47': ('tests/data/unit_tests/test_splitter/test_comment_split_impact_on_open_brackets.sql',),
|
| 465 |
+
'tilezen_mapbox-vector-tile_pr70': ('tests/error_nested_multipolygon.wkt',),
|
| 466 |
+
'twitterdev_twitter-python-ads-sdk_pr212': ('tests/fixtures/promoted_tweets_attach.json',),
|
| 467 |
+
'valohai_valohai-yaml_pr118': ('tests/warning_examples/override-with-extra-fields-warning.yaml',),
|
| 468 |
+
'valohai_valohai-yaml_pr94': ('tests/error_examples/invalid-indentation-with-valid-YAML.yaml',),
|
| 469 |
+
'wbond_asn1crypto_pr79': ('tests/fixtures/ocsp-with-pkup.pem',),
|
| 470 |
+
'xmunoz_sodapy_pr17': ('tests/test_data/successblobres.txt',),
|
| 471 |
+
'xmunoz_sodapy_pr23': ('tests/test_data/update_song_metadata.txt',),
|
| 472 |
+
'yu-iskw_dbt-artifacts-parser_pr19': ('tests/resources/v7/jaffle_shop/manifest.json',),
|
| 473 |
+
'zapier_email-reply-parser_pr14': ('test/emails/email_headers_no_delimiter.txt',),
|
| 474 |
+
'zapier_email-reply-parser_pr31': ('test/emails/email_2_3.txt',),
|
| 475 |
+
'zheller_flake8-quotes_pr52': ('test/data/multiline_string.py',),
|
| 476 |
+
'zheller_flake8-quotes_pr78': ('test/data/doubles_escaped.py',),
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
NETWORK_TIMEOUT_GROUPS = {
|
| 480 |
+
'swagger-api_swagger-codegen': ((2765, 2796, 2801, 2831, 2863, 2878, 2899, 2929, 2987, 3015, 3031, 3034, 3075, 3090, 3126, 3130), 'public Petstore API'),
|
| 481 |
+
'elastic_elastic-transport-python': ((26, 55, 127), 'httpbin.org test service'),
|
| 482 |
+
'developmentseed_rio-stac': ((65, 71), 'remote STAC schemas'),
|
| 483 |
+
'richardkiss_pycoin': ((392, 400), 'public blockchain transaction services'),
|
| 484 |
+
}
|
| 485 |
+
for _repo, (_prs, _dependency) in NETWORK_TIMEOUT_GROUPS.items():
|
| 486 |
+
for _pr in _prs:
|
| 487 |
+
ARCHIVED_TASKS[f'{_repo}_pr{_pr}'] = {
|
| 488 |
+
'category': 'verifier-network-dependency',
|
| 489 |
+
'reason': f'Original reference and no-op verifiers hit the 1800-second limit. Diagnostics on a representative task from this repository confirmed blocking access to {_dependency}. Archived at user request as part of this network-dependent timeout group; this task was not individually diagnosed unless included in the diagnostic sample.'}
|
| 490 |
+
|
| 491 |
+
EXACT_ID_SCORING_TASKS = frozenset({
|
| 492 |
+
'comtravo_ctparse_pr129',
|
| 493 |
+
'falconry_falcon_pr2366',
|
| 494 |
+
'falconry_falcon_pr2503',
|
| 495 |
+
'falconry_falcon_pr2572',
|
| 496 |
+
'falconry_falcon_pr2581',
|
| 497 |
+
})
|
| 498 |
+
|
| 499 |
+
|
| 500 |
+
class ExactPytestResults:
|
| 501 |
+
"""Record actual pytest identities without rewriting parameter text."""
|
| 502 |
+
def __init__(self, expected):
|
| 503 |
+
self.expected = set(expected)
|
| 504 |
+
self.collected = set()
|
| 505 |
+
self.coverage = {}
|
| 506 |
+
self.phases = {}
|
| 507 |
+
self.failed = False
|
| 508 |
+
|
| 509 |
+
def pytest_collection_finish(self, session):
|
| 510 |
+
self.collected = {item.nodeid for item in session.items}
|
| 511 |
+
for selector in self.expected:
|
| 512 |
+
self.coverage[selector] = ({selector} if selector in self.collected else {
|
| 513 |
+
node for node in self.collected
|
| 514 |
+
if node.startswith(selector + '[') or node.startswith(selector + '::')})
|
| 515 |
+
|
| 516 |
+
def pytest_collectreport(self, report):
|
| 517 |
+
if report.failed:
|
| 518 |
+
self.failed = True
|
| 519 |
+
|
| 520 |
+
def pytest_runtest_logreport(self, report):
|
| 521 |
+
if not report.passed:
|
| 522 |
+
self.failed = True
|
| 523 |
+
self.phases.setdefault(report.nodeid, set()).add(report.when)
|
| 524 |
+
|
| 525 |
+
def all_passed(self, exitcode):
|
| 526 |
+
return (exitcode == 0 and not self.failed and bool(self.expected)
|
| 527 |
+
and set(self.coverage) == self.expected
|
| 528 |
+
and all(self.coverage.values())
|
| 529 |
+
and set().union(*self.coverage.values()) == self.collected
|
| 530 |
+
and all(self.phases.get(node, set()) >= {'setup', 'call', 'teardown'}
|
| 531 |
+
for node in self.collected))
|
| 532 |
+
|
| 533 |
+
|
| 534 |
+
def exact_pytest_score_main():
|
| 535 |
+
import json
|
| 536 |
+
import sys
|
| 537 |
+
import pytest
|
| 538 |
+
with open(sys.argv[1]) as stream:
|
| 539 |
+
expected = json.load(stream)
|
| 540 |
+
if not expected:
|
| 541 |
+
print('<score>0.0</score>', flush=True)
|
| 542 |
+
return
|
| 543 |
+
results = ExactPytestResults(expected)
|
| 544 |
+
exitcode = pytest.main(['-vv', '-o', 'addopts=', '--rootdir=.', *expected], plugins=[results])
|
| 545 |
+
print('<score>1.0</score>' if results.all_passed(exitcode) else '<score>0.0</score>', flush=True)
|
| 546 |
+
|
| 547 |
+
|
| 548 |
+
def repair_exact_test_scoring(contents, task_id):
|
| 549 |
+
if task_id not in EXACT_ID_SCORING_TASKS:
|
| 550 |
+
return []
|
| 551 |
+
replacement = ('"""Score exact pytest identities; require complete successful execution."""\n\n'
|
| 552 |
+
+ inspect.getsource(ExactPytestResults) + '\n'
|
| 553 |
+
+ inspect.getsource(exact_pytest_score_main)
|
| 554 |
+
+ '\nif __name__ == "__main__":\n exact_pytest_score_main()\n')
|
| 555 |
+
text = contents['tests/score.py'].decode()
|
| 556 |
+
if text == replacement:
|
| 557 |
+
return []
|
| 558 |
+
if 'def all_passed(xml_content: str, expected: list[str])' not in text:
|
| 559 |
+
raise ValueError('ScaleSWE scorer changed since exact-ID review')
|
| 560 |
+
contents['tests/score.py'] = replacement.encode()
|
| 561 |
+
return [{'file': 'tests/score.py', 'phase': 'verifier-exact-test-ids',
|
| 562 |
+
'reason': 'Replace lossy JUnit name reconstruction with exact pytest collection and execution identities. Preserve parameter text, require every selected test and all setup/call/teardown phases to pass, and reject skipped tests, collection failures and unsuccessful pytest exit.'}]
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
JSONARGPARSE_DEBUG_TASKS = frozenset(
|
| 566 |
+
f'omni-us_jsonargparse_pr{pr}' for pr in
|
| 567 |
+
(162, 164, 176, 177, 186, 190, 194, 197, 198, 210, 211, 214, 216,
|
| 568 |
+
218, 222, 223, 233, 239, 242, 253, 266, 267, 268, 270, 272, 273))
|
| 569 |
+
|
| 570 |
+
JSONARGPARSE_DEBUG_FIXTURE = '''
|
| 571 |
+
|
| 572 |
+
# ScaleSWE verifier: completion tests must not take ownership of pytest's fd 9.
|
| 573 |
+
import pytest as _scaleswe_pytest
|
| 574 |
+
|
| 575 |
+
@_scaleswe_pytest.fixture(autouse=True)
|
| 576 |
+
def _scaleswe_argcomplete_debug_stream(monkeypatch):
|
| 577 |
+
import io
|
| 578 |
+
import sys
|
| 579 |
+
import argcomplete.io as completion_io
|
| 580 |
+
from argcomplete.finders import CompletionFinder
|
| 581 |
+
class DebugStream(io.StringIO):
|
| 582 |
+
target = None
|
| 583 |
+
def write(self, text):
|
| 584 |
+
self.target.write(text)
|
| 585 |
+
return super().write(text)
|
| 586 |
+
def flush(self):
|
| 587 |
+
self.target.flush()
|
| 588 |
+
return super().flush()
|
| 589 |
+
with DebugStream() as debug_stream:
|
| 590 |
+
def init_debug_stream(self):
|
| 591 |
+
debug_stream.target = sys.stderr
|
| 592 |
+
with monkeypatch.context() as patch:
|
| 593 |
+
patch.setattr(completion_io, 'debug_stream', debug_stream)
|
| 594 |
+
patch.setattr(CompletionFinder, '_init_debug_stream', init_debug_stream)
|
| 595 |
+
yield
|
| 596 |
+
'''
|
| 597 |
+
|
| 598 |
+
|
| 599 |
+
def repair_argcomplete_test_fixture(fixture):
|
| 600 |
+
from pathlib import Path
|
| 601 |
+
path = Path('jsonargparse_tests/test_argcomplete.py')
|
| 602 |
+
text = path.read_text()
|
| 603 |
+
if 'class ArgcompleteTests(' not in text:
|
| 604 |
+
raise ValueError('Jsonargparse completion tests changed since review')
|
| 605 |
+
if 'def _scaleswe_argcomplete_debug_stream(' not in text:
|
| 606 |
+
path.write_text(text + fixture)
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def repair_argcomplete_debug_stream(contents, task_id):
|
| 610 |
+
if task_id not in JSONARGPARSE_DEBUG_TASKS:
|
| 611 |
+
return []
|
| 612 |
+
name = 'tests/score.py'
|
| 613 |
+
text = contents[name].decode()
|
| 614 |
+
if 'def repair_argcomplete_test_fixture(' in text:
|
| 615 |
+
return []
|
| 616 |
+
entry = 'if __name__ == "__main__":\n main()'
|
| 617 |
+
if text.count(entry) != 1:
|
| 618 |
+
raise ValueError('Jsonargparse scorer entrypoint changed since review')
|
| 619 |
+
replacement = inspect.getsource(repair_argcomplete_test_fixture) + '\n' + entry.replace(
|
| 620 |
+
' main()', ' repair_argcomplete_test_fixture(' + repr(JSONARGPARSE_DEBUG_FIXTURE) + ')\n main()')
|
| 621 |
+
contents[name] = text.replace(entry, replacement).encode()
|
| 622 |
+
return [{'file': name, 'phase': 'verifier-debug-stream-isolation',
|
| 623 |
+
'reason': 'Jsonargparse completion tests invoke argcomplete in the pytest process. Argcomplete wraps fixed descriptor 9 as its debug stream; replacing that owning wrapper closes pytest faulthandler\'s descriptor and crashes after passing tests. Give completion tests an isolated in-memory debug stream that forwards warnings to the stderr selected at autocomplete entry without owning its descriptor, and restore original state after each test. Preserve assertions, selectors, dependency versions, scoring and pytest cleanup.'}]
|
| 624 |
+
|
| 625 |
+
|
| 626 |
+
def repair_werkzeug_request_test():
|
| 627 |
+
from pathlib import Path
|
| 628 |
+
path = Path('tests/test_test.py')
|
| 629 |
+
text = path.read_text()
|
| 630 |
+
old = (' req = builder.get_request()\n'
|
| 631 |
+
' strict_eq(req.form["foo"], u"bar")\n'
|
| 632 |
+
' strict_eq(req.files["blafasel"].read(), b"foo")\n')
|
| 633 |
+
new = (' req = builder.get_request()\n'
|
| 634 |
+
' try:\n'
|
| 635 |
+
' strict_eq(req.form["foo"], u"bar")\n'
|
| 636 |
+
' strict_eq(req.files["blafasel"].read(), b"foo")\n'
|
| 637 |
+
' finally:\n'
|
| 638 |
+
' req.close() # ScaleSWE: release the uploaded temporary file.\n')
|
| 639 |
+
if text.count(new) == 1:
|
| 640 |
+
return
|
| 641 |
+
if text.count(old) != 1:
|
| 642 |
+
raise ValueError('Werkzeug multipart request test changed since review')
|
| 643 |
+
path.write_text(text.replace(old, new, 1))
|
| 644 |
+
|
| 645 |
+
|
| 646 |
+
def repair_werkzeug_request_cleanup(contents, task_id):
|
| 647 |
+
if task_id != 'pallets_werkzeug_pr1694':
|
| 648 |
+
return []
|
| 649 |
+
name = 'tests/score.py'
|
| 650 |
+
text = contents[name].decode()
|
| 651 |
+
if 'def repair_werkzeug_request_test(' in text:
|
| 652 |
+
return []
|
| 653 |
+
entry = 'if __name__ == "__main__":\n main()'
|
| 654 |
+
if text.count(entry) != 1:
|
| 655 |
+
raise ValueError('Werkzeug scorer entrypoint changed since review')
|
| 656 |
+
replacement = inspect.getsource(repair_werkzeug_request_test) + '\n' + entry.replace(
|
| 657 |
+
' main()', ' repair_werkzeug_request_test()\n main()')
|
| 658 |
+
contents[name] = text.replace(entry, replacement).encode()
|
| 659 |
+
return [{'file': name, 'phase': 'verifier-request-cleanup',
|
| 660 |
+
'reason': 'Werkzeug test_environ_builder_content_type leaves its multipart request open, leaking an uploaded SpooledTemporaryFile. Pytest promotes the resulting unraisable ResourceWarning to an error during shutdown after all 211 reference tests pass. Close that request in a finally block after its existing assertions. Preserve assertions, selectors, scoring, dependency versions and warning checks.'}]
|
| 661 |
+
|
| 662 |
+
|
| 663 |
+
PYOUT_CLEANUP_TASKS = frozenset(f'pyout_pyout_pr{pr}' for pr in (108, 109, 111))
|
| 664 |
+
|
| 665 |
+
PYOUT_CLEANUP_FIXTURE = '''
|
| 666 |
+
|
| 667 |
+
# ScaleSWE verifier: release delayed test work after assertions, then join pools.
|
| 668 |
+
@pytest.fixture(autouse=True)
|
| 669 |
+
def _scaleswe_cleanup_delayed_workers(monkeypatch):
|
| 670 |
+
import pyout.interface as interface
|
| 671 |
+
delays, pools = [], []
|
| 672 |
+
original_init = Delayed.__init__
|
| 673 |
+
original_pool = interface.Pool
|
| 674 |
+
|
| 675 |
+
def tracked_init(self, *args, **kwargs):
|
| 676 |
+
original_init(self, *args, **kwargs)
|
| 677 |
+
delays.append(self)
|
| 678 |
+
|
| 679 |
+
class TrackedPool(original_pool):
|
| 680 |
+
def __init__(self, *args, **kwargs):
|
| 681 |
+
super().__init__(*args, **kwargs)
|
| 682 |
+
pools.append(self)
|
| 683 |
+
|
| 684 |
+
monkeypatch.setattr(Delayed, '__init__', tracked_init)
|
| 685 |
+
monkeypatch.setattr(interface, 'Pool', TrackedPool)
|
| 686 |
+
try:
|
| 687 |
+
yield
|
| 688 |
+
finally:
|
| 689 |
+
for delay in delays:
|
| 690 |
+
delay.now = True
|
| 691 |
+
for pool in pools:
|
| 692 |
+
pool.shutdown(wait=True)
|
| 693 |
+
'''
|
| 694 |
+
|
| 695 |
+
|
| 696 |
+
def repair_pyout_test_cleanup(fixture):
|
| 697 |
+
from pathlib import Path
|
| 698 |
+
path = Path('pyout/tests/test_tabular.py')
|
| 699 |
+
text = path.read_text()
|
| 700 |
+
if 'class Delayed(' not in text or 'def test_tabular_write_callable_kb_interrupt_in_exit(' not in text:
|
| 701 |
+
raise ValueError('Pyout delayed-work tests changed since review')
|
| 702 |
+
if 'def _scaleswe_cleanup_delayed_workers(' not in text:
|
| 703 |
+
path.write_text(text + fixture)
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def repair_flask_worker_fixtures():
|
| 707 |
+
"""Size test-owned pools from the container CPU affinity, then join them."""
|
| 708 |
+
import os
|
| 709 |
+
from pathlib import Path
|
| 710 |
+
try:
|
| 711 |
+
workers = max(1, len(os.sched_getaffinity(0)))
|
| 712 |
+
except (AttributeError, OSError):
|
| 713 |
+
workers = 1
|
| 714 |
+
path = Path('tests/conftest.py')
|
| 715 |
+
text = path.read_text()
|
| 716 |
+
if '# ScaleSWE affinity-aware fixture pools' in text:
|
| 717 |
+
return
|
| 718 |
+
if text.count(' return app') != 2:
|
| 719 |
+
raise ValueError('Flask-executor app fixtures changed since review')
|
| 720 |
+
replacement = """ # ScaleSWE affinity-aware fixture pools
|
| 721 |
+
app.config['EXECUTOR_MAX_WORKERS'] = {workers}
|
| 722 |
+
try:
|
| 723 |
+
yield app
|
| 724 |
+
finally:
|
| 725 |
+
for value in app.extensions.values():
|
| 726 |
+
if isinstance(value, Executor):
|
| 727 |
+
value.shutdown(wait=True)""".format(workers=workers)
|
| 728 |
+
path.write_text(text.replace(' return app', replacement))
|
| 729 |
+
print('ScaleSWE fixture worker count from CPU affinity:', workers, flush=True)
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
def run_joblib_with_available_cpus(main):
|
| 733 |
+
"""Give the old multiprocessing API the verifier's allowed CPU count."""
|
| 734 |
+
import multiprocessing
|
| 735 |
+
import os
|
| 736 |
+
original = multiprocessing.cpu_count
|
| 737 |
+
|
| 738 |
+
def available_cpus():
|
| 739 |
+
try:
|
| 740 |
+
return max(1, len(os.sched_getaffinity(0)))
|
| 741 |
+
except (AttributeError, OSError):
|
| 742 |
+
return 1
|
| 743 |
+
|
| 744 |
+
multiprocessing.cpu_count = available_cpus
|
| 745 |
+
try:
|
| 746 |
+
print('ScaleSWE available verifier CPUs:', available_cpus(), flush=True)
|
| 747 |
+
return main()
|
| 748 |
+
finally:
|
| 749 |
+
multiprocessing.cpu_count = original
|
| 750 |
+
|
| 751 |
+
|
| 752 |
+
RECHUNKER_CPU_TASKS = frozenset(f'pangeo-data_rechunker_pr{pr}' for pr in (22, 27, 30, 48))
|
| 753 |
+
|
| 754 |
+
|
| 755 |
+
def run_dask_with_available_cpus(main):
|
| 756 |
+
import os
|
| 757 |
+
import dask
|
| 758 |
+
try:
|
| 759 |
+
cpus = max(1, len(os.sched_getaffinity(0)))
|
| 760 |
+
except (AttributeError, OSError):
|
| 761 |
+
cpus = 1
|
| 762 |
+
print('ScaleSWE available verifier CPUs:', cpus, flush=True)
|
| 763 |
+
with dask.config.set(num_workers=cpus):
|
| 764 |
+
return main()
|
| 765 |
+
|
| 766 |
+
|
| 767 |
+
def repair_timeout_verifiers(contents, task_id):
|
| 768 |
+
edits = []
|
| 769 |
+
if task_id in ('joblib_joblib_pr449', 'joblib_joblib_pr541'):
|
| 770 |
+
name = 'tests/score.py'
|
| 771 |
+
text = contents[name].decode()
|
| 772 |
+
entry = 'if __name__ == "__main__":\n main()'
|
| 773 |
+
if 'def run_joblib_with_available_cpus(' not in text:
|
| 774 |
+
if text.count(entry) != 1:
|
| 775 |
+
raise ValueError('Joblib score entrypoint changed since review')
|
| 776 |
+
replacement = inspect.getsource(run_joblib_with_available_cpus) + '\n' + entry.replace(
|
| 777 |
+
' main()', ' run_joblib_with_available_cpus(main)')
|
| 778 |
+
contents[name] = text.replace(entry, replacement).encode()
|
| 779 |
+
edits.append({'file': name, 'phase': 'verifier-cpu-affinity' if task_id == 'joblib_joblib_pr541' else 'verifier-worker-cleanup',
|
| 780 |
+
'reason': 'Host CPU discovery can size pools for 384 CPUs despite only four allocated CPUs, causing out-of-memory termination. Use process CPU affinity for multiprocessing.cpu_count during verification, falling back to one CPU; preserve Joblib negative n_jobs semantics, explicit worker counts, tests, scoring and the 4096 MB memory limit'})
|
| 781 |
+
if task_id in RECHUNKER_CPU_TASKS:
|
| 782 |
+
name = 'tests/score.py'
|
| 783 |
+
text = contents[name].decode()
|
| 784 |
+
entry = 'if __name__ == "__main__":\n main()'
|
| 785 |
+
if 'def run_dask_with_available_cpus(' not in text:
|
| 786 |
+
if text.count(entry) != 1:
|
| 787 |
+
raise ValueError('Rechunker score entrypoint changed since review')
|
| 788 |
+
replacement = inspect.getsource(run_dask_with_available_cpus) + '\n' + entry.replace(
|
| 789 |
+
' main()', ' run_dask_with_available_cpus(main)')
|
| 790 |
+
contents[name] = text.replace(entry, replacement).encode()
|
| 791 |
+
edits.append({'file': name, 'phase': 'verifier-cpu-affinity',
|
| 792 |
+
'reason': 'Dask defaults to 384 host CPUs despite only four allocated CPUs, causing out-of-memory termination. Set verifier Dask num_workers from process CPU affinity, falling back to one CPU, and restore configuration afterward. Preserve tests, assertions, selectors, scoring and the 4096 MB memory limit.'})
|
| 793 |
+
if task_id == 'dchevell_flask-executor_pr12':
|
| 794 |
+
name = 'tests/score.py'
|
| 795 |
+
text = contents[name].decode()
|
| 796 |
+
entry = 'if __name__ == "__main__":\n main()'
|
| 797 |
+
if 'def repair_flask_worker_fixtures(' not in text:
|
| 798 |
+
if text.count(entry) != 1:
|
| 799 |
+
raise ValueError('Flask-executor score entrypoint changed since review')
|
| 800 |
+
replacement = inspect.getsource(repair_flask_worker_fixtures) + '\n' + entry.replace(
|
| 801 |
+
' main()', ' repair_flask_worker_fixtures()\n main()')
|
| 802 |
+
contents[name] = text.replace(entry, replacement).encode()
|
| 803 |
+
edits.append({'file': name, 'phase': 'verifier-worker-cleanup',
|
| 804 |
+
'reason': 'Set test fixture default workers from container CPU affinity (one worker if unavailable) and join fixture executors after each test; preserve explicit worker-count tests, assertions, scoring and the 4096 MB task memory limit'})
|
| 805 |
+
if task_id in PYOUT_CLEANUP_TASKS:
|
| 806 |
+
name = 'tests/score.py'
|
| 807 |
+
text = contents[name].decode()
|
| 808 |
+
entry = 'if __name__ == "__main__":\n main()'
|
| 809 |
+
if 'def repair_pyout_test_cleanup(' not in text:
|
| 810 |
+
if text.count(entry) != 1:
|
| 811 |
+
raise ValueError('Pyout score entrypoint changed since review')
|
| 812 |
+
replacement = inspect.getsource(repair_pyout_test_cleanup) + '\n' + entry.replace(
|
| 813 |
+
' main()', ' repair_pyout_test_cleanup(' + repr(PYOUT_CLEANUP_FIXTURE) + ')\n main()')
|
| 814 |
+
contents[name] = text.replace(entry, replacement).encode()
|
| 815 |
+
edits.append({'file': name, 'phase': 'verifier-worker-cleanup',
|
| 816 |
+
'reason': 'Release delayed test helper work after assertions and join test-created pools; preserve selected tests and assertions'})
|
| 817 |
+
if task_id == 'rom1504_embedding-reader_pr9':
|
| 818 |
+
name = 'tests/f2p.patch'
|
| 819 |
+
if 'diff --git a/tests/fixtures.py b/tests/fixtures.py' not in contents[name].decode():
|
| 820 |
+
chunks = contents['solution/gold.patch'].decode().split('diff --git ')
|
| 821 |
+
chunk = next(c for c in chunks if c.startswith('a/tests/fixtures.py b/tests/fixtures.py\n'))
|
| 822 |
+
contents[name] += ('\ndiff --git ' + chunk).encode()
|
| 823 |
+
script = contents['tests/test.sh'].decode()
|
| 824 |
+
anchor = 'if [ -s /tests/f2p.patch ]; then'
|
| 825 |
+
if script.count(anchor) != 1:
|
| 826 |
+
raise ValueError('Embedding-reader test preparation changed since review')
|
| 827 |
+
contents['tests/test.sh'] = script.replace(anchor, 'git checkout "$base" -- tests/fixtures.py || exit $?\n' + anchor).encode()
|
| 828 |
+
score = contents['tests/score.py'].decode()
|
| 829 |
+
anchor = 'pytest.main(["-vv",'
|
| 830 |
+
if score.count(anchor) != 1:
|
| 831 |
+
raise ValueError('Embedding-reader grader changed since review')
|
| 832 |
+
contents['tests/score.py'] = score.replace(anchor, 'pytest.main(["-vv", "--forked", "--timeout=60", "--timeout-method=thread",').encode()
|
| 833 |
+
edits.append({'file': 'tests', 'phase': 'verifier-worker-cleanup',
|
| 834 |
+
'reason': 'Include and consistently restore the missing id2 fixture update; isolate each selected test with pytest-forked and a 60-second test timeout so broken reader worker shutdown cannot wedge the verifier; preserve assertions and reward rules'})
|
| 835 |
+
return edits
|
| 836 |
+
|
| 837 |
+
DEFERRED_IMPORTS = {
|
| 838 |
+
'keboola_python-component_pr39': {'tests/test_base.py': {'keboola.component.base': ['sync_action']}},
|
| 839 |
+
'bluetooth-devices_cached-ipaddress_pr26': {'tests/test_ipaddress.py': {'cached_ipaddress': ['*'], 'cached_ipaddress.ipaddress': ['*']}},
|
| 840 |
+
'semuconsulting_pynmeagps_pr84': {'tests/test_static.py': {'pynmeagps.nmeahelpers': ['leapsecond']}},
|
| 841 |
+
'semuconsulting_pynmeagps_pr78': {
|
| 842 |
+
'tests/test_static.py': {'pynmeagps.nmeatypes_decodes': ['*']},
|
| 843 |
+
'tests/test_stream.py': {'pynmeagps': ['FMI_STATUS']}},
|
| 844 |
+
'ouhammmourachid_mermaid-py_pr105': {
|
| 845 |
+
'mermaid/tests/test_flowchart.py': {'mermaid': ['Direction'], 'mermaid.style': ['Style']},
|
| 846 |
+
'mermaid/tests/test_statediagram.py': {'mermaid': ['Direction'], 'mermaid.style': ['Style']},
|
| 847 |
+
'mermaid/tests/test_style.py': {'mermaid.style': ['Style']}},
|
| 848 |
+
}
|
| 849 |
+
|
| 850 |
+
|
| 851 |
+
def defer_test_imports(plan):
|
| 852 |
+
"""Move reviewed module imports into their consuming functions, preserving test bodies."""
|
| 853 |
+
import ast
|
| 854 |
+
from pathlib import Path
|
| 855 |
+
|
| 856 |
+
for filename, modules in plan.items():
|
| 857 |
+
path = Path(filename)
|
| 858 |
+
source = path.read_text()
|
| 859 |
+
tree = ast.parse(source)
|
| 860 |
+
lines = source.splitlines(keepends=True)
|
| 861 |
+
moved = {}
|
| 862 |
+
edits = []
|
| 863 |
+
for node in tree.body:
|
| 864 |
+
if not isinstance(node, ast.ImportFrom) or node.level or node.module not in modules:
|
| 865 |
+
continue
|
| 866 |
+
selected = modules[node.module]
|
| 867 |
+
remaining = []
|
| 868 |
+
for alias in node.names:
|
| 869 |
+
if '*' in selected or alias.name in selected:
|
| 870 |
+
if alias.name == '*':
|
| 871 |
+
raise ValueError('Cannot defer a wildcard import: ' + filename)
|
| 872 |
+
name = alias.asname or alias.name
|
| 873 |
+
moved[name] = 'from ' + node.module + ' import ' + alias.name + (' as ' + alias.asname if alias.asname else '')
|
| 874 |
+
else:
|
| 875 |
+
remaining.append(alias)
|
| 876 |
+
if len(remaining) != len(node.names):
|
| 877 |
+
replacement = ast.unparse(ast.ImportFrom(module=node.module, names=remaining, level=0)) + '\n' if remaining else ''
|
| 878 |
+
edits.append((node.lineno - 1, node.end_lineno, replacement))
|
| 879 |
+
if not moved:
|
| 880 |
+
raise ValueError('Reviewed imports missing from ' + filename)
|
| 881 |
+
|
| 882 |
+
def visit_scope(nodes):
|
| 883 |
+
for node in nodes:
|
| 884 |
+
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
| 885 |
+
headers = [*node.decorator_list, node.args, *([node.returns] if node.returns else [])]
|
| 886 |
+
if any(isinstance(n, ast.Name) and n.id in moved for h in headers for n in ast.walk(h)):
|
| 887 |
+
raise ValueError('Deferred import used in function signature: ' + filename)
|
| 888 |
+
used = {n.id for stmt in node.body for n in ast.walk(stmt)
|
| 889 |
+
if isinstance(n, ast.Name) and isinstance(n.ctx, ast.Load)} & moved.keys()
|
| 890 |
+
if used:
|
| 891 |
+
first = node.body[0]
|
| 892 |
+
if isinstance(first, ast.Expr) and isinstance(first.value, ast.Constant) and isinstance(first.value.value, str):
|
| 893 |
+
first = node.body[1]
|
| 894 |
+
indent = ' ' * first.col_offset
|
| 895 |
+
edits.append((first.lineno - 1, first.lineno - 1,
|
| 896 |
+
''.join(indent + moved[name] + '\n' for name in sorted(used))))
|
| 897 |
+
elif isinstance(node, ast.ClassDef):
|
| 898 |
+
if any(isinstance(n, ast.Name) and n.id in moved for h in [*node.bases, *node.keywords, *node.decorator_list] for n in ast.walk(h)):
|
| 899 |
+
raise ValueError('Deferred import used in class definition: ' + filename)
|
| 900 |
+
visit_scope(node.body)
|
| 901 |
+
elif not isinstance(node, (ast.Import, ast.ImportFrom)):
|
| 902 |
+
if any(isinstance(n, ast.Name) and isinstance(n.ctx, ast.Load) and n.id in moved for n in ast.walk(node)):
|
| 903 |
+
raise ValueError('Deferred import used outside a function: ' + filename)
|
| 904 |
+
visit_scope(tree.body)
|
| 905 |
+
for start, end, replacement in sorted(edits, reverse=True):
|
| 906 |
+
lines[start:end] = [replacement]
|
| 907 |
+
updated = ''.join(lines)
|
| 908 |
+
ast.parse(updated)
|
| 909 |
+
path.write_text(updated)
|
| 910 |
+
|
| 911 |
+
|
| 912 |
+
def repair_collection_imports(contents, task_id):
|
| 913 |
+
if task_id not in DEFERRED_IMPORTS:
|
| 914 |
+
return []
|
| 915 |
+
filename = 'tests/score.py'
|
| 916 |
+
text = contents[filename].decode()
|
| 917 |
+
marker = '# ScaleSWE reviewed call-time test imports v1\n'
|
| 918 |
+
if marker in text:
|
| 919 |
+
return []
|
| 920 |
+
entry = 'if __name__ == "__main__":\n main()'
|
| 921 |
+
if text.count(entry) != 1:
|
| 922 |
+
raise ValueError('ScaleSWE score entrypoint changed since review')
|
| 923 |
+
replacement = marker + inspect.getsource(defer_test_imports) + '\n' + entry.replace(' main()', ' defer_test_imports(' + repr(DEFERRED_IMPORTS[task_id]) + ')\n main()')
|
| 924 |
+
contents[filename] = text.replace(entry, replacement).encode()
|
| 925 |
+
return [{'file': filename, 'phase': 'verifier-call-time-imports',
|
| 926 |
+
'reason': 'Defer reviewed feature imports to consuming test functions; preserve selected tests, assertions and reward rules',
|
| 927 |
+
'imports': DEFERRED_IMPORTS[task_id]}]
|
| 928 |
+
|
| 929 |
+
|
| 930 |
+
def repair_verifier_imports(contents, task_id):
|
| 931 |
+
if task_id not in VERIFIER_IMPORT_TASKS:
|
| 932 |
+
return []
|
| 933 |
+
name = 'tests/test.sh'
|
| 934 |
+
text = contents[name].decode()
|
| 935 |
+
command = 'python /tests/score.py /tests/test_ids.json | tee /logs/verifier/score.txt'
|
| 936 |
+
prefix = 'export PYTHONPATH="$PWD${PYTHONPATH:+:$PYTHONPATH}"\n'
|
| 937 |
+
if prefix + command in text:
|
| 938 |
+
return []
|
| 939 |
+
repo, reason = VERIFIER_IMPORT_TASKS[task_id]
|
| 940 |
+
if text.count(command) != 1 or f'cd /workspace/{repo} || exit 1' not in text:
|
| 941 |
+
raise ValueError('Verifier changed since import-path review')
|
| 942 |
+
contents[name] = text.replace(command, prefix + command, 1).encode()
|
| 943 |
+
return [{'file': name, 'old': command, 'new': prefix + command,
|
| 944 |
+
'phase': 'verifier-import-path',
|
| 945 |
+
'reason': reason + ' Prepend the repository root to PYTHONPATH; preserve assertions, selectors and reward rules.'}]
|
| 946 |
+
|
| 947 |
+
|
| 948 |
+
SKIPPED_REQUIRED_TESTS = {
|
| 949 |
+
# dimod's test_nocpp_error checks the fallback used when the C++ extension is absent and skips
|
| 950 |
+
# itself when the extension is present. Scale's images build the extension, so the test can never
|
| 951 |
+
# pass there, yet Scale lists it among the required tests; the scorer treats a skip as not passed.
|
| 952 |
+
**{f'dwavesystems_dimod_pr{pr}': ('tests/test_fixedvariablecomposite.py::TestRoofDualityComposite::test_nocpp_error',)
|
| 953 |
+
for pr in (432, 445, 462, 471, 512)},
|
| 954 |
+
}
|
| 955 |
+
SKIPPED_REQUIRED_TEST_REASON = ('Remove a required test that the task image can never run: it checks the fallback used when the dimod C++ '
|
| 956 |
+
'extension is absent and skips itself because the image builds the extension. The scorer counts a skip as '
|
| 957 |
+
'not passed, so the reference solution scored 0 although every other required test passed. The remaining '
|
| 958 |
+
'required tests still cover the change; tests, assertions and the scorer are unchanged.')
|
| 959 |
+
|
| 960 |
+
|
| 961 |
+
def repair_skipped_required_tests(contents, task_id):
|
| 962 |
+
"""Drop required test IDs that are skipped by design in the task image."""
|
| 963 |
+
remove = SKIPPED_REQUIRED_TESTS.get(task_id)
|
| 964 |
+
if not remove or 'tests/test_ids.json' not in contents:
|
| 965 |
+
return []
|
| 966 |
+
ids = json.loads(contents['tests/test_ids.json'].decode())
|
| 967 |
+
missing = [t for t in remove if t not in ids]
|
| 968 |
+
if missing:
|
| 969 |
+
raise ValueError(f'Required test list changed since review for {task_id}: {missing}')
|
| 970 |
+
kept = [t for t in ids if t not in remove]
|
| 971 |
+
if not kept:
|
| 972 |
+
raise ValueError(f'No required tests would remain for {task_id}')
|
| 973 |
+
contents['tests/test_ids.json'] = json.dumps(kept).encode()
|
| 974 |
+
return [{'file': 'tests/test_ids.json', 'phase': 'verifier-required-test-skipped', 'removed': list(remove),
|
| 975 |
+
'reason': SKIPPED_REQUIRED_TEST_REASON}]
|
| 976 |
+
|
| 977 |
+
|
| 978 |
+
RESET_TEST_DIRS = ('test', 'tests', 'Test', 'Tests')
|
| 979 |
+
FIXTURE_RESTORATION_REASON = (
|
| 980 |
+
'Scoring resets the test directories to the base commit and then applies tests/f2p.patch, the tests that verify '
|
| 981 |
+
'the fix. The pull request also added or changed test-support files under those directories (fixtures, recorded '
|
| 982 |
+
'cassettes, sample inputs) that f2p.patch leaves out, so the reset removes them and the selected tests fail even '
|
| 983 |
+
'with the reference solution. Append the pull request\'s own diff for exactly these files to f2p.patch so the '
|
| 984 |
+
'verifier restores the complete post-PR test tree. Source files, other tests and the reset itself are unchanged.')
|
| 985 |
+
TEST_MODULE_RE = re.compile(r'(^|/)(test_[^/]*\.py|[^/]*_test\.py|conftest\.py)$')
|
| 986 |
+
|
| 987 |
+
|
| 988 |
+
def _diff_chunks(patch):
|
| 989 |
+
"""Map each same-path file diff in a git patch to its chunk text."""
|
| 990 |
+
chunks = {}
|
| 991 |
+
for chunk in patch.split('diff --git ')[1:]:
|
| 992 |
+
header = chunk.splitlines()[0] if chunk.splitlines() else ''
|
| 993 |
+
match = re.fullmatch(r'a/(.+) b/(.+)', header)
|
| 994 |
+
if match and match.group(1) == match.group(2):
|
| 995 |
+
chunks[match.group(1)] = 'diff --git ' + chunk
|
| 996 |
+
return chunks
|
| 997 |
+
|
| 998 |
+
|
| 999 |
+
def _repair_hunk_headers(patch):
|
| 1000 |
+
"""Make every hunk header state the line counts the hunk actually carries.
|
| 1001 |
+
|
| 1002 |
+
Some Scale-SWE patches lost their final context line, so the last hunk
|
| 1003 |
+
header claims one line more than follows it. git apply rejects such a
|
| 1004 |
+
patch and patch(1) only tolerates the shortfall at end of file; once more
|
| 1005 |
+
diff chunks follow, patch(1) stops at the junction with "malformed patch".
|
| 1006 |
+
Headers whose counts already match are kept byte-identical; correcting the
|
| 1007 |
+
others changes no patch content.
|
| 1008 |
+
"""
|
| 1009 |
+
lines = patch.split('\n')
|
| 1010 |
+
out, i = [], 0
|
| 1011 |
+
while i < len(lines):
|
| 1012 |
+
match = re.match(r'@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(.*)$', lines[i])
|
| 1013 |
+
if not match:
|
| 1014 |
+
out.append(lines[i]); i += 1
|
| 1015 |
+
continue
|
| 1016 |
+
j = i + 1
|
| 1017 |
+
while j < len(lines) and not lines[j].startswith('@@') and not lines[j].startswith('diff --git '):
|
| 1018 |
+
j += 1
|
| 1019 |
+
body = lines[i + 1:j]
|
| 1020 |
+
old = sum(1 for l in body if l[:1] in (' ', '-'))
|
| 1021 |
+
new = sum(1 for l in body if l[:1] in (' ', '+'))
|
| 1022 |
+
declared = (int(match.group(2) or 1), int(match.group(4) or 1))
|
| 1023 |
+
header = lines[i] if declared == (old, new) else f'@@ -{match.group(1)},{old} +{match.group(3)},{new} @@{match.group(5)}'
|
| 1024 |
+
out.append(header); out.extend(body); i = j
|
| 1025 |
+
return '\n'.join(out)
|
| 1026 |
+
|
| 1027 |
+
|
| 1028 |
+
def _in_verifier_reset_scope(path):
|
| 1029 |
+
"""Paths ScaleSWE's test.sh checks out from the base commit or removes before applying f2p.patch."""
|
| 1030 |
+
return PurePosixPath(path).parts[0] in RESET_TEST_DIRS or bool(TEST_MODULE_RE.search(path))
|
| 1031 |
+
|
| 1032 |
+
|
| 1033 |
+
def repair_added_test_fixtures(contents, task_id):
|
| 1034 |
+
"""Give the verifier the complete post-PR test tree.
|
| 1035 |
+
|
| 1036 |
+
Scoring rebuilds the test tree in two steps: reset the test directories to
|
| 1037 |
+
the base commit (so agent edits to tests are discarded), then apply
|
| 1038 |
+
tests/f2p.patch, the tests that verify the fix. The pull request also added
|
| 1039 |
+
or changed test-support files under those directories (fixtures, recorded
|
| 1040 |
+
cassettes, sample inputs), but f2p.patch leaves them out. The reset removes
|
| 1041 |
+
them, so the selected tests fail even with the reference solution, and no
|
| 1042 |
+
agent can make them pass because anything it creates there is reset too.
|
| 1043 |
+
|
| 1044 |
+
This repair appends the pull request's own diff for exactly those files to
|
| 1045 |
+
f2p.patch: files under the top-level test directories that f2p.patch does
|
| 1046 |
+
not already contain, excluding source files and new test modules that the
|
| 1047 |
+
selected test IDs do not use. Hunk headers whose counts no longer match
|
| 1048 |
+
their lines (a truncated final context line in the dataset) are corrected so
|
| 1049 |
+
the combined patch applies as one. The reset and every other gold change are
|
| 1050 |
+
untouched. It applies only to tasks whose reference failed for this reason.
|
| 1051 |
+
"""
|
| 1052 |
+
if task_id not in FIXTURE_RESTORATION_TASKS and task_id not in TEST_FIXTURE_REPAIRS:
|
| 1053 |
+
return []
|
| 1054 |
+
gold = contents.get('solution/gold.patch', b'').decode(errors='replace')
|
| 1055 |
+
if not gold or 'tests/f2p.patch' not in contents:
|
| 1056 |
+
return []
|
| 1057 |
+
f2p = contents['tests/f2p.patch'].decode(errors='replace')
|
| 1058 |
+
gold_chunks, f2p_chunks = _diff_chunks(gold), _diff_chunks(f2p)
|
| 1059 |
+
try:
|
| 1060 |
+
selected_files = {entry.split('::')[0] for entry in json.loads(contents.get('tests/test_ids.json', b'[]').decode())}
|
| 1061 |
+
except ValueError:
|
| 1062 |
+
selected_files = set()
|
| 1063 |
+
restored, additions = [], []
|
| 1064 |
+
for path, chunk in gold_chunks.items():
|
| 1065 |
+
if path in f2p_chunks or 'deleted file mode ' in chunk or not _in_verifier_reset_scope(path):
|
| 1066 |
+
continue
|
| 1067 |
+
if PurePosixPath(path).parts[0] not in RESET_TEST_DIRS:
|
| 1068 |
+
continue # test-named files outside the test trees stay with the gold/f2p split
|
| 1069 |
+
if TEST_MODULE_RE.search(path) and not ('new file mode ' in chunk and path in selected_files):
|
| 1070 |
+
continue
|
| 1071 |
+
additions.append(chunk)
|
| 1072 |
+
restored.append(path)
|
| 1073 |
+
required = set(TEST_FIXTURE_REPAIRS.get(task_id, ()))
|
| 1074 |
+
if required - set(restored) - set(f2p_chunks):
|
| 1075 |
+
raise ValueError(f'Reviewed test fixtures not restored for {task_id}: {sorted(required - set(restored) - set(f2p_chunks))}')
|
| 1076 |
+
if not additions:
|
| 1077 |
+
return []
|
| 1078 |
+
f2p = _repair_hunk_headers(f2p)
|
| 1079 |
+
additions = [_repair_hunk_headers(chunk) for chunk in additions]
|
| 1080 |
+
separator = '' if f2p.endswith('\n') or not f2p else '\n'
|
| 1081 |
+
contents['tests/f2p.patch'] = (f2p + separator + '\n'.join(additions)).encode()
|
| 1082 |
+
return [{'file': 'tests/f2p.patch', 'phase': 'verifier-test-fixture-restoration',
|
| 1083 |
+
'paths': restored,
|
| 1084 |
+
'reason': FIXTURE_RESTORATION_REASON}]
|
| 1085 |
+
|
| 1086 |
+
|
| 1087 |
+
# Explicitly reviewed instruction corrections; keep the task's other hints intact.
|
| 1088 |
+
INSTRUCTION_CORRECTIONS = {
|
| 1089 |
+
'appium_python-client_pr517': (
|
| 1090 |
+
'b1f4a2dc528408bb6651e198b76963c04069b6558453c3da42233ed54848bea2',
|
| 1091 |
+
[('Attempt to run iOS functional tests in parallel using the `-n` flag.',
|
| 1092 |
+
'Attempt to run iOS functional tests in parallel using the existing test file:'),
|
| 1093 |
+
('pytest -n 2 test/functional/ios/find_by_ios_class_chain_tests.py',
|
| 1094 |
+
'pytest -n 2 /workspace/python-client/test/functional/ios/search_context/find_by_ios_class_chain_tests.py')]),
|
| 1095 |
+
'beetbox_mediafile_pr86': (
|
| 1096 |
+
'25ddb4ef83ecc81c538044f8bf4ebfeb367be92adb7a8e2eb5ea283927184e24',
|
| 1097 |
+
[('**`mediafile/utils.py`**: For general utility functions and helpers.',
|
| 1098 |
+
'**`/workspace/mediafile/mediafile/utils/`**: For general utility functions and helpers.')]),
|
| 1099 |
+
}
|
| 1100 |
+
|
| 1101 |
+
|
| 1102 |
+
def patch_blob(blob, diagnostic=None, decisions=(), oracle_passed=False, task_id=None, automatic_paths=False):
|
| 1103 |
+
with tarfile.open(fileobj=io.BytesIO(blob)) as archive:
|
| 1104 |
+
members = archive.getmembers()
|
| 1105 |
+
contents = {}
|
| 1106 |
+
for member in members:
|
| 1107 |
+
name = PurePosixPath(member.name)
|
| 1108 |
+
if name.is_absolute() or '..' in name.parts or not (member.isfile() or member.isdir()):
|
| 1109 |
+
raise ValueError('Unsafe task archive member')
|
| 1110 |
+
if member.isfile():
|
| 1111 |
+
if str(name) in contents:
|
| 1112 |
+
raise ValueError('Duplicate archive member')
|
| 1113 |
+
contents[str(name)] = archive.extractfile(member).read()
|
| 1114 |
+
if (decisions or automatic_paths) and files_digest(contents.items()) != (diagnostic or {}).get('agent_baseline', {}).get('task_sha256'):
|
| 1115 |
+
raise ValueError('Task changed since path resolution')
|
| 1116 |
+
original = contents['instruction.md'].decode()
|
| 1117 |
+
changed, edits = (apply_reviewed_replacements(original, diagnostic, decisions, oracle_passed=oracle_passed)
|
| 1118 |
+
if decisions else (original, []))
|
| 1119 |
+
if automatic_paths:
|
| 1120 |
+
from validation.checks.instruction_paths import automatic
|
| 1121 |
+
changed, edits = automatic(original, diagnostic, oracle_passed)
|
| 1122 |
+
# Task-specific corrections take precedence over generic spans.
|
| 1123 |
+
protected = []
|
| 1124 |
+
for old, _ in INSTRUCTION_CORRECTIONS.get(task_id, ('', []))[1]:
|
| 1125 |
+
start = original.find(old)
|
| 1126 |
+
if start >= 0:
|
| 1127 |
+
protected.append((start, start + len(old)))
|
| 1128 |
+
edits = [e for e in edits if not any(e['start'] < end and start < e['end'] for start, end in protected)]
|
| 1129 |
+
changed = original
|
| 1130 |
+
for edit in reversed(edits):
|
| 1131 |
+
changed = changed[:edit['start']] + edit['new'] + changed[edit['end']:]
|
| 1132 |
+
if task_id in INSTRUCTION_CORRECTIONS:
|
| 1133 |
+
digest, replacements = INSTRUCTION_CORRECTIONS[task_id]
|
| 1134 |
+
if hashlib.sha256(original.encode()).hexdigest() != digest:
|
| 1135 |
+
raise ValueError('Instruction changed since task-specific correction review')
|
| 1136 |
+
for old, new in replacements:
|
| 1137 |
+
if changed.count(old) != 1:
|
| 1138 |
+
raise ValueError('Reviewed instruction correction is missing or conflicts with another edit')
|
| 1139 |
+
changed = changed.replace(old, new, 1)
|
| 1140 |
+
edits.append({'old': old, 'new': new, 'phase': 'explicit-instruction-review',
|
| 1141 |
+
'reason': 'User-approved minimal path correction; preserve remaining task wording'})
|
| 1142 |
+
edits.extend(repair_verifier_imports(contents, task_id))
|
| 1143 |
+
edits.extend(repair_collection_imports(contents, task_id))
|
| 1144 |
+
edits.extend(repair_timeout_verifiers(contents, task_id))
|
| 1145 |
+
edits.extend(repair_exact_test_scoring(contents, task_id))
|
| 1146 |
+
edits.extend(repair_argcomplete_debug_stream(contents, task_id))
|
| 1147 |
+
edits.extend(repair_werkzeug_request_cleanup(contents, task_id))
|
| 1148 |
+
edits.extend(repair_added_test_fixtures(contents, task_id))
|
| 1149 |
+
edits.extend(repair_skipped_required_tests(contents, task_id))
|
| 1150 |
+
if not edits:
|
| 1151 |
+
return blob, []
|
| 1152 |
+
contents['instruction.md'] = changed.encode()
|
| 1153 |
+
output = io.BytesIO()
|
| 1154 |
+
with tarfile.open(fileobj=output, mode='w') as target:
|
| 1155 |
+
for member in members:
|
| 1156 |
+
member = copy.copy(member)
|
| 1157 |
+
if member.isfile():
|
| 1158 |
+
data = contents[str(PurePosixPath(member.name))]
|
| 1159 |
+
member.size = len(data)
|
| 1160 |
+
target.addfile(member, io.BytesIO(data))
|
| 1161 |
+
else:
|
| 1162 |
+
target.addfile(member)
|
| 1163 |
+
return output.getvalue(), edits
|
| 1164 |
+
|
| 1165 |
+
|
| 1166 |
+
QUALITY_LABELS = {'instruction-path-clarified', 'anti-cheat-instruction'}
|
| 1167 |
+
|
| 1168 |
+
|
| 1169 |
+
def environment_repair_stage(task):
|
| 1170 |
+
labels = set(task['labels']) - QUALITY_LABELS
|
| 1171 |
+
if not labels:
|
| 1172 |
+
return None
|
| 1173 |
+
if labels == {'verifier-call-time-imports'} or task['task_id'] == 'rom1504_embedding-reader_pr9':
|
| 1174 |
+
return 5
|
| 1175 |
+
if labels == {'verifier-import-path'} and 'no-op' in task.get('reason', ''):
|
| 1176 |
+
return 5
|
| 1177 |
+
reference = {'verifier-import-path', 'verifier-test-fixture-restoration',
|
| 1178 |
+
'verifier-exact-test-ids', 'verifier-debug-stream-isolation',
|
| 1179 |
+
'verifier-request-cleanup', 'verifier-cpu-affinity',
|
| 1180 |
+
'verifier-worker-cleanup', 'verifier-required-test-skipped'}
|
| 1181 |
+
if labels <= reference:
|
| 1182 |
+
return 4
|
| 1183 |
+
raise ValueError('Unclassified repair: ' + task['task_id'])
|
| 1184 |
+
|
| 1185 |
+
|
| 1186 |
+
def archive_files(blob):
|
| 1187 |
+
"""Read regular task files without extracting to disk."""
|
| 1188 |
+
files = {}
|
| 1189 |
+
with tarfile.open(fileobj=io.BytesIO(blob)) as archive:
|
| 1190 |
+
for member in archive:
|
| 1191 |
+
name = str(PurePosixPath(member.name))
|
| 1192 |
+
if PurePosixPath(name).is_absolute() or '..' in PurePosixPath(name).parts:
|
| 1193 |
+
raise ValueError('Unsafe task archive member')
|
| 1194 |
+
if member.isdir():
|
| 1195 |
+
continue
|
| 1196 |
+
if not member.isfile() or name in files:
|
| 1197 |
+
raise ValueError('Unsupported or duplicate task archive member')
|
| 1198 |
+
files[name] = (archive.extractfile(member).read(), member.mode)
|
| 1199 |
+
return files
|
| 1200 |
+
|
| 1201 |
+
|
| 1202 |
+
def restore_source_instruction(blob, instruction):
|
| 1203 |
+
"""Restore only the upstream instruction, preserving all runtime files and modes."""
|
| 1204 |
+
from data.utils.full_source.harbor_parquet import pack_task
|
| 1205 |
+
files = archive_files(blob)
|
| 1206 |
+
files['instruction.md'] = (instruction, files['instruction.md'][1])
|
| 1207 |
+
return pack_task(files)
|
| 1208 |
+
|
| 1209 |
+
|
| 1210 |
+
def environment_archive_stage(row):
|
| 1211 |
+
"""Cause-based attribution; the historical archive itself retains stage 0."""
|
| 1212 |
+
labels = {label.removeprefix('patch-drop:') for label in row['archive_labels']}
|
| 1213 |
+
noop = {'verifier-no-op-passes', 'task-changes-only-test-files',
|
| 1214 |
+
'verifier-timeout-without-fix', 'verifier-timing-dependent'}
|
| 1215 |
+
reference = {'reference-solution-reward-zero', 'verifier-collection-error',
|
| 1216 |
+
'verifier-network-dependency', 'verifier-external-dependency',
|
| 1217 |
+
'verifier-stale-cassette', 'verifier-execution-checker-pythonpath',
|
| 1218 |
+
'verifier-privileged-port', 'image-dependency-mismatch',
|
| 1219 |
+
'image-missing-test-dependency', 'verifier-execution-error'}
|
| 1220 |
+
if labels and labels <= noop:
|
| 1221 |
+
return 5
|
| 1222 |
+
if labels and labels <= reference:
|
| 1223 |
+
return 4
|
| 1224 |
+
raise ValueError('Unclassified archive reason: ' + row['path'])
|
| 1225 |
+
|
| 1226 |
+
|
| 1227 |
+
def prepare_environment(upstream, tasks, archive, run_record, output, publication_revision):
|
| 1228 |
+
"""Prepare the instruction-original variant from pinned source and historical tasks."""
|
| 1229 |
+
from collections import Counter
|
| 1230 |
+
from data.utils.full_source.convert_prime import scale_files
|
| 1231 |
+
from data.utils.full_source.harbor_parquet import pack_task
|
| 1232 |
+
|
| 1233 |
+
if not re.fullmatch('[0-9a-f]{40}', publication_revision):
|
| 1234 |
+
raise ValueError('Use an immutable publication revision')
|
| 1235 |
+
if output.exists():
|
| 1236 |
+
raise ValueError('Use a new output directory')
|
| 1237 |
+
record = json.loads(run_record.read_text())
|
| 1238 |
+
provenance = record['patch_provenance']['scaleswe']
|
| 1239 |
+
if provenance['source']['revision'] != REVISION:
|
| 1240 |
+
raise ValueError('Unexpected upstream revision')
|
| 1241 |
+
manifest = {x['task_id']: x for x in provenance['tasks']}
|
| 1242 |
+
automation = record['automation_changes']['scaleswe']['tasks']
|
| 1243 |
+
if any(set(x['labels']) != {'anti-cheat-instruction'} for x in automation):
|
| 1244 |
+
raise ValueError('Unreviewed automatic runtime changes')
|
| 1245 |
+
automated_ids = {x['task_id'] for x in automation}
|
| 1246 |
+
published = pq.ParquetFile(tasks)
|
| 1247 |
+
# Recover the frozen common converter support from a task with no patcher edits.
|
| 1248 |
+
support = None
|
| 1249 |
+
for batch in published.iter_batches(batch_size=32):
|
| 1250 |
+
for row in batch.to_pylist():
|
| 1251 |
+
if manifest[row['path']]['action'] == 'unchanged':
|
| 1252 |
+
files = archive_files(row['task_binary'])
|
| 1253 |
+
test = files['tests/test.sh'][0].decode()
|
| 1254 |
+
start = test.index('\n', test.index('\nbase=') + 1) + 1
|
| 1255 |
+
end = test.index('if [ -s /tests/f2p.patch ]; then', start)
|
| 1256 |
+
support = {'score': files['tests/score.py'][0], 'restore': test[start:end]}
|
| 1257 |
+
break
|
| 1258 |
+
if support:
|
| 1259 |
+
break
|
| 1260 |
+
if support is None:
|
| 1261 |
+
raise ValueError('No unchanged converter baseline')
|
| 1262 |
+
source = {}
|
| 1263 |
+
for shard in sorted(upstream.glob('*.parquet')):
|
| 1264 |
+
for batch in pq.ParquetFile(shard).iter_batches(batch_size=32):
|
| 1265 |
+
for raw in batch.to_pylist():
|
| 1266 |
+
task = raw['instance_id']
|
| 1267 |
+
if task in source or task not in manifest:
|
| 1268 |
+
raise ValueError('Duplicate or unexpected source task: ' + task)
|
| 1269 |
+
original = pack_task(scale_files(raw, support))
|
| 1270 |
+
if hashlib.sha256(original).hexdigest() != manifest[task]['source_binary_sha256']:
|
| 1271 |
+
raise ValueError('Pinned source does not reproduce conversion: ' + task)
|
| 1272 |
+
files = archive_files(original)
|
| 1273 |
+
source[task] = {'instruction': files['instruction.md'][0],
|
| 1274 |
+
'image': raw['image_url'],
|
| 1275 |
+
'files': {k: (hashlib.sha256(v).hexdigest(), mode)
|
| 1276 |
+
for k, (v, mode) in files.items()}}
|
| 1277 |
+
if set(source) != set(manifest):
|
| 1278 |
+
raise ValueError('Incomplete source task accounting')
|
| 1279 |
+
print(f'Verified all {len(source)} original converted payload hashes', flush=True)
|
| 1280 |
+
archived = pq.read_table(archive)
|
| 1281 |
+
archive_rows = archived.to_pylist()
|
| 1282 |
+
excluded_ids = set()
|
| 1283 |
+
exclusions = []
|
| 1284 |
+
for row in archive_rows:
|
| 1285 |
+
task = row['path']
|
| 1286 |
+
if task in excluded_ids or manifest[task]['action'] != 'dropped':
|
| 1287 |
+
raise ValueError('Invalid archive task: ' + task)
|
| 1288 |
+
excluded_ids.add(task)
|
| 1289 |
+
if hashlib.sha256(row['task_binary']).hexdigest() != manifest[task]['source_binary_sha256']:
|
| 1290 |
+
raise ValueError('Archive no longer preserves original payload: ' + task)
|
| 1291 |
+
exclusions.append({'task_id': task, 'attributed_stage': environment_archive_stage(row),
|
| 1292 |
+
'historical_archive_stage': row['archive_stage'],
|
| 1293 |
+
'labels': row['archive_labels'], 'reason': row['archive_reason']})
|
| 1294 |
+
kept_ids = set(source) - excluded_ids
|
| 1295 |
+
changed_ids = {task for task in kept_ids if set(manifest[task]['labels']) - QUALITY_LABELS}
|
| 1296 |
+
run_url = ('https://huggingface.co/datasets/FWeindel/validated-tasks/blob/'
|
| 1297 |
+
+ publication_revision + '/runs/' + record['run'] + '.json')
|
| 1298 |
+
summary = {
|
| 1299 |
+
'source': provenance['source'], 'source_tasks': len(source), 'kept': len(kept_ids),
|
| 1300 |
+
'changed_kept': len(changed_ids), 'unchanged_kept': len(kept_ids - changed_ids),
|
| 1301 |
+
'archived': len(excluded_ids),
|
| 1302 |
+
'changed_by_attributed_stage': dict(Counter(environment_repair_stage(manifest[x]) for x in changed_ids)),
|
| 1303 |
+
'archived_by_attributed_stage': dict(Counter(x['attributed_stage'] for x in exclusions)),
|
| 1304 |
+
'original_images': len({x['image'] for x in source.values()}),
|
| 1305 |
+
'retained_images': len({source[x]['image'] for x in kept_ids}),
|
| 1306 |
+
'image_consolidation': False, 'image_registry': 'https://hub.docker.com/r/aweaiteam/scaleswe/tags',
|
| 1307 |
+
'quality_path_edits_excluded': provenance['instructions_changed'],
|
| 1308 |
+
'quality_suffix_edits_excluded': len(automated_ids),
|
| 1309 |
+
'historical_run': run_url, 'publication_revision': publication_revision,
|
| 1310 |
+
'fresh_validation': False,
|
| 1311 |
+
'evidence_transfer': 'Historical stages 3/4/5 only. Original instructions restored; every other file and its mode preserved from the audited publication. No new runtime or teacher run.',
|
| 1312 |
+
}
|
| 1313 |
+
schema = published.schema_arrow.with_metadata({b'ot.environment_reliable.v1': json.dumps(summary).encode()})
|
| 1314 |
+
output.mkdir(parents=True)
|
| 1315 |
+
retained_audit, seen = [], set()
|
| 1316 |
+
with pq.ParquetWriter(output/'tasks.parquet', schema, compression='zstd') as writer:
|
| 1317 |
+
for batch in published.iter_batches(batch_size=32):
|
| 1318 |
+
rows = batch.to_pylist()
|
| 1319 |
+
for row in rows:
|
| 1320 |
+
task = row['path']
|
| 1321 |
+
if task in seen or task not in kept_ids or task not in automated_ids:
|
| 1322 |
+
raise ValueError('Invalid retained task: ' + task)
|
| 1323 |
+
seen.add(task)
|
| 1324 |
+
if row['stages_passed'] != '1,3,4,5':
|
| 1325 |
+
raise ValueError('Incomplete historical evidence: ' + task)
|
| 1326 |
+
before = archive_files(row['task_binary'])
|
| 1327 |
+
if files_digest((k, v) for k, (v, _) in before.items()) != row['content_sha256']:
|
| 1328 |
+
raise ValueError('Published content hash mismatch: ' + task)
|
| 1329 |
+
pre_static, count = re.subn(
|
| 1330 |
+
rb'\n\nYou have [0-9]+ seconds to complete this task\. Do not cheat by using online solutions or hints specific to this task\.\n$',
|
| 1331 |
+
b'\n', before['instruction.md'][0])
|
| 1332 |
+
if count != 1 or hashlib.sha256(restore_source_instruction(row['task_binary'], pre_static)).hexdigest() != manifest[task]['output_binary_sha256']:
|
| 1333 |
+
raise ValueError('Historical payload differs from recorded patcher output: ' + task)
|
| 1334 |
+
payload = restore_source_instruction(row['task_binary'], source[task]['instruction'])
|
| 1335 |
+
after = archive_files(payload)
|
| 1336 |
+
if {k: v for k, v in before.items() if k != 'instruction.md'} != {
|
| 1337 |
+
k: v for k, v in after.items() if k != 'instruction.md'}:
|
| 1338 |
+
raise ValueError('Runtime content changed: ' + task)
|
| 1339 |
+
actual = {k: (hashlib.sha256(v).hexdigest(), mode) for k, (v, mode) in after.items()}
|
| 1340 |
+
changed_files = sorted(k for k in actual.keys() | source[task]['files'].keys()
|
| 1341 |
+
if actual.get(k) != source[task]['files'].get(k))
|
| 1342 |
+
expected = sorted(k for k in manifest[task]['changed_files'] if k != 'instruction.md')
|
| 1343 |
+
if changed_files != expected or bool(changed_files) != (task in changed_ids):
|
| 1344 |
+
raise ValueError('Unaccounted runtime repair: ' + task)
|
| 1345 |
+
if not changed_files and hashlib.sha256(payload).hexdigest() != manifest[task]['source_binary_sha256']:
|
| 1346 |
+
raise ValueError('Unchanged task differs from original archive: ' + task)
|
| 1347 |
+
row.update(task_binary=payload, content_sha256=files_digest((k, v) for k, (v, _) in after.items()),
|
| 1348 |
+
stages_passed='3,4,5', run=run_url, patch_changed=bool(changed_files),
|
| 1349 |
+
patch_labels=sorted(set(manifest[task]['labels']) - QUALITY_LABELS))
|
| 1350 |
+
retained_audit.append({'task_id': task, 'changed_files': changed_files,
|
| 1351 |
+
'labels': row['patch_labels'], 'reason': manifest[task].get('reason', ''),
|
| 1352 |
+
'attributed_stage': environment_repair_stage(manifest[task]),
|
| 1353 |
+
'source_binary_sha256': manifest[task]['source_binary_sha256'],
|
| 1354 |
+
'output_binary_sha256': hashlib.sha256(payload).hexdigest(),
|
| 1355 |
+
'content_sha256': row['content_sha256'], 'image': source[task]['image']})
|
| 1356 |
+
writer.write_table(pa.Table.from_pylist(rows, schema=schema))
|
| 1357 |
+
if seen != kept_ids:
|
| 1358 |
+
raise ValueError('Missing retained tasks')
|
| 1359 |
+
for row in archive_rows:
|
| 1360 |
+
row['run'] = run_url
|
| 1361 |
+
pq.write_table(pa.Table.from_pylist(archive_rows, schema=archived.schema).replace_schema_metadata(schema.metadata),
|
| 1362 |
+
output/'archive.parquet', compression='zstd')
|
| 1363 |
+
(output/'summary.json').write_text(json.dumps(summary, indent=2)+'\n')
|
| 1364 |
+
(output/'audit.json').write_text(json.dumps({'summary': summary, 'retained': retained_audit,
|
| 1365 |
+
'exclusions': exclusions}, indent=2)+'\n')
|
| 1366 |
+
(output/'images.json').write_text(json.dumps({task: source[task]['image'] for task in sorted(kept_ids)}, indent=2)+'\n')
|
| 1367 |
+
return summary
|
| 1368 |
+
|
| 1369 |
+
|
| 1370 |
+
def main():
|
| 1371 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 1372 |
+
parser.add_argument('--source', type=Path)
|
| 1373 |
+
parser.add_argument('--validated-tasks', type=Path)
|
| 1374 |
+
parser.add_argument('--validated-archive', type=Path)
|
| 1375 |
+
parser.add_argument('--upstream-shards', type=Path)
|
| 1376 |
+
parser.add_argument('--run-record', type=Path)
|
| 1377 |
+
parser.add_argument('--publication-revision')
|
| 1378 |
+
parser.add_argument('--output', type=Path, required=True, help='new output directory')
|
| 1379 |
+
parser.add_argument('--resolution-report', type=Path, action='append', default=[])
|
| 1380 |
+
parser.add_argument('--automatic-paths', action='store_true', help='use shared automatic normalization, without a review file')
|
| 1381 |
+
parser.add_argument('--review', type=Path, help='review JSON: tasks maps IDs to decisions and unresolved reasons')
|
| 1382 |
+
args = parser.parse_args()
|
| 1383 |
+
if args.validated_tasks:
|
| 1384 |
+
if args.source or args.review or args.automatic_paths or args.resolution_report:
|
| 1385 |
+
parser.error('Environment preparation cannot be combined with instruction patching')
|
| 1386 |
+
if not all((args.validated_archive, args.upstream_shards, args.run_record, args.publication_revision)):
|
| 1387 |
+
parser.error('Environment preparation requires archive, upstream shards, run record and publication revision')
|
| 1388 |
+
print(json.dumps(prepare_environment(args.upstream_shards, args.validated_tasks,
|
| 1389 |
+
args.validated_archive, args.run_record, args.output, args.publication_revision), indent=2))
|
| 1390 |
+
return
|
| 1391 |
+
if not args.source or any((args.validated_archive, args.upstream_shards, args.run_record, args.publication_revision)):
|
| 1392 |
+
parser.error('Supply --source, or the complete environment preparation inputs')
|
| 1393 |
+
if args.output.exists():
|
| 1394 |
+
raise ValueError('Use a new output directory')
|
| 1395 |
+
review = json.loads(args.review.read_text())['tasks'] if args.review else {}
|
| 1396 |
+
evidence = collect_reports(args.resolution_report)
|
| 1397 |
+
source = pq.read_table(args.source)
|
| 1398 |
+
rows = source.to_pylist()
|
| 1399 |
+
names = {row['path'] for row in rows}
|
| 1400 |
+
if set(review) - names:
|
| 1401 |
+
raise ValueError('Review contains tasks outside the source')
|
| 1402 |
+
labels, reasons, unresolved, changes = {}, {}, {}, {}
|
| 1403 |
+
dropped = {name: ARCHIVED_TASKS[name] for name in names & ARCHIVED_TASKS.keys()}
|
| 1404 |
+
rows = [row for row in rows if row['path'] not in dropped]
|
| 1405 |
+
for row in rows:
|
| 1406 |
+
name = row['path']
|
| 1407 |
+
decision = review.get(name, {})
|
| 1408 |
+
automatic_paths = args.automatic_paths and name in evidence and bool(evidence[name]['selected'].get('diagnostic', {}).get('agent_baseline', {}).get('task_sha256'))
|
| 1409 |
+
selected = evidence[name]['selected'] if automatic_paths or decision.get('replacements') else {}
|
| 1410 |
+
row['task_binary'], edits = patch_blob(
|
| 1411 |
+
row['task_binary'], selected.get('diagnostic'), decision.get('replacements', []),
|
| 1412 |
+
oracle_passed=selected.get('status') == 'passed' and bool(selected.get('rewards')) and all(r == 1 for r in selected['rewards']),
|
| 1413 |
+
task_id=name, automatic_paths=automatic_paths)
|
| 1414 |
+
if not edits:
|
| 1415 |
+
continue
|
| 1416 |
+
changes[name] = edits
|
| 1417 |
+
labels[name] = []
|
| 1418 |
+
descriptions = []
|
| 1419 |
+
if any(e.get('phase') not in ('verifier-import-path', 'verifier-call-time-imports', 'verifier-worker-cleanup', 'verifier-exact-test-ids', 'verifier-debug-stream-isolation', 'verifier-request-cleanup', 'verifier-cpu-affinity', 'verifier-test-fixture-restoration', 'verifier-required-test-skipped') for e in edits):
|
| 1420 |
+
labels[name].append('instruction-path-clarified')
|
| 1421 |
+
descriptions.append('User-approved minimal instruction correction' if name in INSTRUCTION_CORRECTIONS
|
| 1422 |
+
else 'Absolute paths supported by task-setup/reference-solution observations')
|
| 1423 |
+
if any(e.get('phase') == 'verifier-import-path' for e in edits):
|
| 1424 |
+
labels[name].append('verifier-import-path')
|
| 1425 |
+
descriptions.extend(e['reason'] for e in edits if e.get('phase') == 'verifier-import-path')
|
| 1426 |
+
fixture_repairs = [e for e in edits if e.get('phase') == 'verifier-test-fixture-restoration']
|
| 1427 |
+
if fixture_repairs:
|
| 1428 |
+
labels[name].append('verifier-test-fixture-restoration')
|
| 1429 |
+
descriptions.extend(e['reason'] for e in fixture_repairs)
|
| 1430 |
+
if any(e.get('phase') == 'verifier-call-time-imports' for e in edits):
|
| 1431 |
+
labels[name].append('verifier-call-time-imports')
|
| 1432 |
+
descriptions.append('Move reviewed feature imports into consuming test functions so missing functionality fails during test execution; preserve selected tests, assertions and reward rules')
|
| 1433 |
+
cleanup = [e['reason'] for e in edits if e.get('phase') == 'verifier-worker-cleanup']
|
| 1434 |
+
if cleanup:
|
| 1435 |
+
labels[name].append('verifier-worker-cleanup')
|
| 1436 |
+
descriptions.extend(cleanup)
|
| 1437 |
+
exact_ids = [e['reason'] for e in edits if e.get('phase') == 'verifier-exact-test-ids']
|
| 1438 |
+
if exact_ids:
|
| 1439 |
+
labels[name].append('verifier-exact-test-ids')
|
| 1440 |
+
descriptions.extend(exact_ids)
|
| 1441 |
+
debug_stream = [e['reason'] for e in edits if e.get('phase') == 'verifier-debug-stream-isolation']
|
| 1442 |
+
if debug_stream:
|
| 1443 |
+
labels[name].append('verifier-debug-stream-isolation')
|
| 1444 |
+
descriptions.extend(debug_stream)
|
| 1445 |
+
request_cleanup = [e['reason'] for e in edits if e.get('phase') == 'verifier-request-cleanup']
|
| 1446 |
+
if request_cleanup:
|
| 1447 |
+
labels[name].append('verifier-request-cleanup')
|
| 1448 |
+
descriptions.extend(request_cleanup)
|
| 1449 |
+
cpu_affinity = [e['reason'] for e in edits if e.get('phase') == 'verifier-cpu-affinity']
|
| 1450 |
+
if cpu_affinity:
|
| 1451 |
+
labels[name].append('verifier-cpu-affinity')
|
| 1452 |
+
descriptions.extend(cpu_affinity)
|
| 1453 |
+
skipped = [e['reason'] for e in edits if e.get('phase') == 'verifier-required-test-skipped']
|
| 1454 |
+
if skipped:
|
| 1455 |
+
labels[name].append('verifier-required-test-skipped')
|
| 1456 |
+
descriptions.extend(skipped)
|
| 1457 |
+
reasons[name] = '; '.join(descriptions)
|
| 1458 |
+
if decision.get('unresolved'):
|
| 1459 |
+
unresolved[name] = decision['unresolved']
|
| 1460 |
+
args.output.mkdir(parents=True)
|
| 1461 |
+
output = args.output / 'tasks.parquet'
|
| 1462 |
+
from validation.checks.path_cache import KEY, blob_fingerprint, completed
|
| 1463 |
+
cache = {row['path']: blob_fingerprint(row['task_binary']) for row in rows
|
| 1464 |
+
if row['path'] in evidence and completed(evidence[row['path']]['selected']['diagnostic'])}
|
| 1465 |
+
metadata = dict(source.schema.metadata or {})
|
| 1466 |
+
metadata[KEY] = json.dumps(cache).encode()
|
| 1467 |
+
pq.write_table(pa.Table.from_pylist(rows, schema=source.schema).replace_schema_metadata(metadata), output)
|
| 1468 |
+
(args.output / 'path-edits.json').write_text(json.dumps(changes, indent=2)+'\n')
|
| 1469 |
+
(args.output / 'unresolved-paths.json').write_text(json.dumps(unresolved, indent=2)+'\n')
|
| 1470 |
+
write_patch_report(args.source, output, patcher=__file__, source={
|
| 1471 |
+
'dataset': 'PrimeIntellect/Scale-SWE-Verified', 'revision': REVISION,
|
| 1472 |
+
'url': f'https://huggingface.co/datasets/PrimeIntellect/Scale-SWE-Verified/tree/{REVISION}'},
|
| 1473 |
+
dropped=dropped, change_labels=labels, change_reasons=reasons,
|
| 1474 |
+
patches=[{'version': 'absolute-paths-v1', 'resolver_reports': [str(p.resolve()) for p in args.resolution_report],
|
| 1475 |
+
'automatic_paths': args.automatic_paths, 'review': str(args.review.resolve()) if args.review else None},
|
| 1476 |
+
{'version': 'verifier-import-path-v2',
|
| 1477 |
+
'tasks': sorted(name for name in changes if name in VERIFIER_IMPORT_TASKS)},
|
| 1478 |
+
{'version': 'reviewed-collection-repairs-v1', 'tasks': sorted(set(changes) & DEFERRED_IMPORTS.keys()),
|
| 1479 |
+
'archived_tasks': sorted(dropped)},
|
| 1480 |
+
{'version': 'gold-added-test-fixtures-v1',
|
| 1481 |
+
'tasks': sorted(name for name, task_edits in changes.items()
|
| 1482 |
+
if any(e.get('phase') == 'verifier-test-fixture-restoration'
|
| 1483 |
+
for e in task_edits))},
|
| 1484 |
+
{'version': 'skipped-required-tests-v1', 'tasks': sorted(name for name in changes if name in SKIPPED_REQUIRED_TESTS)}])
|
| 1485 |
+
print(json.dumps({'tasks': len(rows), 'changed': len(changes), 'output': str(output)}))
|
| 1486 |
+
|
| 1487 |
+
|
| 1488 |
+
if __name__ == '__main__':
|
| 1489 |
+
main()
|
swelego-real-data-verified_environment-reliable/assets/Leap_Second.dat
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Value of TAI-UTC in second valid beetween the initial value until
|
| 2 |
+
# the epoch given on the next line. The last line reads that NO
|
| 3 |
+
# leap second was introduced since the corresponding date
|
| 4 |
+
# Updated through IERS Bulletin 72 issued in July 2026
|
| 5 |
+
#
|
| 6 |
+
#
|
| 7 |
+
# File expires on 28 June 2027
|
| 8 |
+
#
|
| 9 |
+
#
|
| 10 |
+
# MJD Date TAI-UTC (s)
|
| 11 |
+
# day month year
|
| 12 |
+
# --- -------------- ------
|
| 13 |
+
#
|
| 14 |
+
41317.0 1 1 1972 10
|
| 15 |
+
41499.0 1 7 1972 11
|
| 16 |
+
41683.0 1 1 1973 12
|
| 17 |
+
42048.0 1 1 1974 13
|
| 18 |
+
42413.0 1 1 1975 14
|
| 19 |
+
42778.0 1 1 1976 15
|
| 20 |
+
43144.0 1 1 1977 16
|
| 21 |
+
43509.0 1 1 1978 17
|
| 22 |
+
43874.0 1 1 1979 18
|
| 23 |
+
44239.0 1 1 1980 19
|
| 24 |
+
44786.0 1 7 1981 20
|
| 25 |
+
45151.0 1 7 1982 21
|
| 26 |
+
45516.0 1 7 1983 22
|
| 27 |
+
46247.0 1 7 1985 23
|
| 28 |
+
47161.0 1 1 1988 24
|
| 29 |
+
47892.0 1 1 1990 25
|
| 30 |
+
48257.0 1 1 1991 26
|
| 31 |
+
48804.0 1 7 1992 27
|
| 32 |
+
49169.0 1 7 1993 28
|
| 33 |
+
49534.0 1 7 1994 29
|
| 34 |
+
50083.0 1 1 1996 30
|
| 35 |
+
50630.0 1 7 1997 31
|
| 36 |
+
51179.0 1 1 1999 32
|
| 37 |
+
53736.0 1 1 2006 33
|
| 38 |
+
54832.0 1 1 2009 34
|
| 39 |
+
56109.0 1 7 2012 35
|
| 40 |
+
57204.0 1 7 2015 36
|
| 41 |
+
57754.0 1 1 2017 37
|
swelego-real-data-verified_environment-reliable/assets/base-environments.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
swelego-real-data-verified_environment-reliable/assets/build-backends.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
swelego-real-data-verified_environment-reliable/assets/conda-explicit-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
swelego-real-data-verified_environment-reliable/assets/environment-repairs.json
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_revision": "8b0d2bed6f04ef571ca04abebf737ea23cbceaf3",
|
| 3 |
+
"tasks": {
|
| 4 |
+
"borgbackup__borg-5263": {
|
| 5 |
+
"base_commit": "5ebde5cebc3ef572552b368228eaad4d29f0ee39",
|
| 6 |
+
"label": "restored-git-version-history",
|
| 7 |
+
"reason": "Restore the pinned base commit ancestry and its verified historical release tag, without checking out later code. Our depth-one checkout lost the history needed for the source version and, for Sunpy, triggered a shallow-repository warning treated as an error."
|
| 8 |
+
},
|
| 9 |
+
"dask__fastparquet-940": {
|
| 10 |
+
"base_commit": "0f7a98eac60771685f853f8a955787b7c82a5d18",
|
| 11 |
+
"label": "restored-git-version-history",
|
| 12 |
+
"reason": "Restore the pinned base commit ancestry and its verified historical release tag, without checking out later code. Our depth-one checkout lost the history needed for the source version and, for Sunpy, triggered a shallow-repository warning treated as an error."
|
| 13 |
+
},
|
| 14 |
+
"gitpython-developers__GitPython-1812": {
|
| 15 |
+
"base_commit": "307f1987596a99fb7b7192d8a5308a0df736ca7b",
|
| 16 |
+
"label": "restored-git-test-history",
|
| 17 |
+
"reason": "Restore the pinned base commit ancestry and attach HEAD to a local task branch at that same commit. GitPython tests inspect parents, historical commits and symbolic HEAD; our shallow detached checkout omitted those inputs. Preserve source, test assertions and reference patch.",
|
| 18 |
+
"full_history": true,
|
| 19 |
+
"branch": "swelego-task"
|
| 20 |
+
},
|
| 21 |
+
"gitpython-developers__GitPython-1547": {
|
| 22 |
+
"base_commit": "cc92d5126b2fc80f7cc6866fc8f99b3ffb0189ae",
|
| 23 |
+
"label": "restored-git-test-history",
|
| 24 |
+
"reason": "Restore the pinned base commit ancestry and attach HEAD to a local task branch at that same commit. GitPython tests inspect parents, historical commits and symbolic HEAD; our shallow detached checkout omitted those inputs. Preserve source, test assertions and reference patch.",
|
| 25 |
+
"full_history": true,
|
| 26 |
+
"branch": "swelego-task"
|
| 27 |
+
},
|
| 28 |
+
"gitpython-developers__GitPython-1832": {
|
| 29 |
+
"base_commit": "afa575454f85b34800460881cc9c3cd7fe78c8e3",
|
| 30 |
+
"label": "restored-git-test-history",
|
| 31 |
+
"reason": "Restore the pinned base commit ancestry and attach HEAD to a local task branch at that same commit. GitPython tests inspect parents, historical commits and symbolic HEAD; our shallow detached checkout omitted those inputs. Preserve source, test assertions and reference patch. Restore the verified historical 0.1.6 tag explicitly queried by test_diff_interface.",
|
| 32 |
+
"full_history": true,
|
| 33 |
+
"branch": "swelego-task"
|
| 34 |
+
},
|
| 35 |
+
"sunpy__sunpy-7522": {
|
| 36 |
+
"base_commit": "27f7e032c1a7f9a911dca618f8b2011ad82d7a78",
|
| 37 |
+
"label": "restored-git-version-history",
|
| 38 |
+
"reason": "Restore the pinned base commit ancestry and its verified historical release tag, without checking out later code. Our depth-one checkout lost the history needed for the source version and, for Sunpy, triggered a shallow-repository warning treated as an error. After restoring history, collection exposed an expired leap-second table. Restore the IERS Bulletin72 table, valid through 2027-06-28, from a checksum-pinned local artifact; preserve astropy and other dependency versions and avoid a verification-time download.",
|
| 39 |
+
"additional_labels": [
|
| 40 |
+
"refreshed-leap-second-data"
|
| 41 |
+
],
|
| 42 |
+
"leap_second_table": {
|
| 43 |
+
"source": "https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat",
|
| 44 |
+
"bulletin": 72,
|
| 45 |
+
"expires": "2027-06-28",
|
| 46 |
+
"sha256": "6cb6f5d4b819f2e568e25db4b0b26d89dedf031fdffb18bc94d40f4e94e268d7"
|
| 47 |
+
}
|
| 48 |
+
},
|
| 49 |
+
"vyperlang__vyper-3384": {
|
| 50 |
+
"base_commit": "5ae0a0784426697529c71e4724ccf43ad9c36f07",
|
| 51 |
+
"label": "restored-generated-version-metadata",
|
| 52 |
+
"reason": "Restore the setuptools-scm build plugin declared by the pinned source so installation generates its version module. The runtime freeze omitted this build tool; our installation without build isolation did not regenerate the file. This repairs environment reconstruction, not the task code or reference patch."
|
| 53 |
+
},
|
| 54 |
+
"vyperlang__vyper-4253": {
|
| 55 |
+
"base_commit": "6bcdb00e1c9faaf940395b44756d4970919fd58c",
|
| 56 |
+
"label": "restored-generated-version-metadata",
|
| 57 |
+
"reason": "Restore the setuptools-scm build plugin declared by the pinned source so installation generates its version module. The runtime freeze omitted this build tool; our installation without build isolation did not regenerate the file. This repairs environment reconstruction, not the task code or reference patch."
|
| 58 |
+
},
|
| 59 |
+
"pimutils__khal-1305": {
|
| 60 |
+
"base_commit": "25c5c2671908a72f82f4d2add02068374ffb3242",
|
| 61 |
+
"label": "restored-generated-version-metadata",
|
| 62 |
+
"reason": "Restore the setuptools-scm build plugin declared by the pinned source so installation generates its version module. The runtime freeze omitted this build tool; our installation without build isolation did not regenerate the file. This repairs environment reconstruction, not the task code or reference patch."
|
| 63 |
+
},
|
| 64 |
+
"statsmodels__statsmodels-8339": {
|
| 65 |
+
"base_commit": "35b803767bd7803ca5f9fc35d4546aa8cb7be844",
|
| 66 |
+
"label": "restored-generated-version-metadata",
|
| 67 |
+
"reason": "Restore the setuptools-scm build plugin declared by the pinned source so installation generates its version module. The runtime freeze omitted this build tool; our installation without build isolation did not regenerate the file. This repairs environment reconstruction, not the task code or reference patch."
|
| 68 |
+
},
|
| 69 |
+
"statsmodels__statsmodels-8831": {
|
| 70 |
+
"base_commit": "3e739c26729e2c844394f5918846e2897ad0f871",
|
| 71 |
+
"label": "restored-generated-version-metadata",
|
| 72 |
+
"reason": "Restore the setuptools-scm build plugin declared by the pinned source so installation generates its version module. The runtime freeze omitted this build tool; our installation without build isolation did not regenerate the file. This repairs environment reconstruction, not the task code or reference patch."
|
| 73 |
+
},
|
| 74 |
+
"pytest-dev__pytest-xdist-667": {
|
| 75 |
+
"base_commit": "7f2426b11d2c7890e5637fdaa3aa1c75b4f31758",
|
| 76 |
+
"label": "restored-generated-version-metadata",
|
| 77 |
+
"reason": "Restore the setuptools-scm build plugin declared by the pinned source so installation generates its version module. The runtime freeze omitted this build tool; our installation without build isolation did not regenerate the file. This repairs environment reconstruction, not the task code or reference patch."
|
| 78 |
+
},
|
| 79 |
+
"zarr-developers__zarr-python-659": {
|
| 80 |
+
"base_commit": "da4f790ace08ae9ee2ff25289a7d3f40c6ecb61a",
|
| 81 |
+
"label": "restored-generated-version-metadata",
|
| 82 |
+
"reason": "Restore the setuptools-scm build plugin declared by the pinned source so installation generates its version module. The runtime freeze omitted this build tool; our installation without build isolation did not regenerate the file. This repairs environment reconstruction, not the task code or reference patch."
|
| 83 |
+
},
|
| 84 |
+
"sympy__sympy-10635": {
|
| 85 |
+
"base_commit": "72058725d8bd819aa68450ddfb619b681d9e1dd2",
|
| 86 |
+
"label": "verifier-legacy-pytest-helper",
|
| 87 |
+
"reason": "Restore the missing raises export in the legacy SymPy pytest helper using pytest.raises during verification. The source defines raises only outside pytest mode, so selected tests fail collection under the recorded pytest runner. Preserve assertions, test selection, dependency versions and reference patch.",
|
| 88 |
+
"pytest_plugin": "swelego_sympy_pytest"
|
| 89 |
+
},
|
| 90 |
+
"sympy__sympy-10753": {
|
| 91 |
+
"base_commit": "b23618db3be6f3af9f288002064a14b5aa4ea932",
|
| 92 |
+
"label": "verifier-legacy-pytest-helper",
|
| 93 |
+
"reason": "Restore the missing raises export in the legacy SymPy pytest helper using pytest.raises during verification. The source defines raises only outside pytest mode, so selected tests fail collection under the recorded pytest runner. Preserve assertions, test selection, dependency versions and reference patch.",
|
| 94 |
+
"pytest_plugin": "swelego_sympy_pytest"
|
| 95 |
+
},
|
| 96 |
+
"sympy__sympy-10762": {
|
| 97 |
+
"base_commit": "325341a268a9e7aa07511245b964a3d727167150",
|
| 98 |
+
"label": "verifier-legacy-pytest-helper",
|
| 99 |
+
"reason": "Restore the missing raises export in the legacy SymPy pytest helper using pytest.raises during verification. The source defines raises only outside pytest mode, so selected tests fail collection under the recorded pytest runner. Preserve assertions, test selection, dependency versions and reference patch.",
|
| 100 |
+
"pytest_plugin": "swelego_sympy_pytest"
|
| 101 |
+
},
|
| 102 |
+
"sympy__sympy-10808": {
|
| 103 |
+
"base_commit": "0da63c857cc29ff62c4a4b25158d43c3cf3776e6",
|
| 104 |
+
"label": "verifier-legacy-pytest-helper",
|
| 105 |
+
"reason": "Restore the missing raises export in the legacy SymPy pytest helper using pytest.raises during verification. The source defines raises only outside pytest mode, so selected tests fail collection under the recorded pytest runner. Preserve assertions, test selection, dependency versions and reference patch.",
|
| 106 |
+
"pytest_plugin": "swelego_sympy_pytest"
|
| 107 |
+
},
|
| 108 |
+
"sympy__sympy-10827": {
|
| 109 |
+
"base_commit": "c6c5dfb9ba567c340a420af67ca0b46eace7a45a",
|
| 110 |
+
"label": "verifier-legacy-pytest-helper",
|
| 111 |
+
"reason": "Restore the missing raises export in the legacy SymPy pytest helper using pytest.raises during verification. The source defines raises only outside pytest mode, so selected tests fail collection under the recorded pytest runner. Preserve assertions, test selection, dependency versions and reference patch.",
|
| 112 |
+
"pytest_plugin": "swelego_sympy_pytest"
|
| 113 |
+
},
|
| 114 |
+
"sympy__sympy-11149": {
|
| 115 |
+
"base_commit": "db73ed37b955474ad9f1b3d2c5c762e32ce2cbfe",
|
| 116 |
+
"label": "verifier-legacy-pytest-helper",
|
| 117 |
+
"reason": "Restore the missing raises export in the legacy SymPy pytest helper using pytest.raises during verification. The source defines raises only outside pytest mode, so selected tests fail collection under the recorded pytest runner. Preserve assertions, test selection, dependency versions and reference patch.",
|
| 118 |
+
"pytest_plugin": "swelego_sympy_pytest"
|
| 119 |
+
},
|
| 120 |
+
"pymor__pymor-1296": {
|
| 121 |
+
"base_commit": "6114612e5574117570df66cb2404ce1f822dc145",
|
| 122 |
+
"label": "aligned-build-runtime-numpy",
|
| 123 |
+
"reason": "Replace runtime numpy==2.0.2 with numpy==1.23.5 for this legacy PyMOr checkout, matching the NumPy headers used by its isolated numpy.distutils build. The original frozen NumPy 2 runtime cannot load the resulting NumPy 1 ABI extension. Preserve other runtime pins and the reference patch.",
|
| 124 |
+
"runtime_replacements": {
|
| 125 |
+
"numpy==2.0.2": "numpy==1.23.5"
|
| 126 |
+
}
|
| 127 |
+
},
|
| 128 |
+
"deepset-ai__haystack-9242": {
|
| 129 |
+
"base_commit": "cdc53cae78d080d67ecaa184ff16a83dba13a010",
|
| 130 |
+
"label": "restored-verifier-dependencies",
|
| 131 |
+
"reason": "Install pytest-asyncio==0.26.0, declared by the pinned Haystack development dependencies but absent from the recorded runtime freeze. This enables the existing strict asyncio marker and async fixtures without changing tests or reference code.",
|
| 132 |
+
"test_dependencies": [
|
| 133 |
+
"pytest-asyncio==0.26.0"
|
| 134 |
+
]
|
| 135 |
+
},
|
| 136 |
+
"pymor__pymor-1068": {
|
| 137 |
+
"base_commit": "d7b624f892daa4194b4504e753d198461626aaa0",
|
| 138 |
+
"label": "aligned-build-runtime-numpy",
|
| 139 |
+
"reason": "Replace runtime numpy==2.0.2 with numpy==1.23.5 for this legacy PyMOr checkout, matching the NumPy headers used by its isolated numpy.distutils build. The original frozen NumPy 2 runtime cannot load the resulting NumPy 1 ABI extension. Preserve other runtime pins and the reference patch.",
|
| 140 |
+
"runtime_replacements": {
|
| 141 |
+
"numpy==2.0.2": "numpy==1.23.5"
|
| 142 |
+
}
|
| 143 |
+
},
|
| 144 |
+
"blue-yonder__tsfresh-578": {
|
| 145 |
+
"base_commit": "c3d35c42c799d1f36a1aca1d90ec0ab6450ce264",
|
| 146 |
+
"label": "bounded-verifier-parallelism",
|
| 147 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch.",
|
| 148 |
+
"pytest_workers": 2
|
| 149 |
+
},
|
| 150 |
+
"pybamm-team__PyBaMM-3968": {
|
| 151 |
+
"base_commit": "09ee982ba84055ec2c56f73b4cc63742c2ca0721",
|
| 152 |
+
"label": "bounded-verifier-parallelism",
|
| 153 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch. Install the declared citation extra pybtex and its missing latexcodec dependency so the unfixed package imports during collection. The original regression test then deliberately removes optional dependencies and still exercises the missing-dependency bug during test execution.",
|
| 154 |
+
"pytest_workers": 2,
|
| 155 |
+
"test_dependencies": [
|
| 156 |
+
"pybtex==0.24.0",
|
| 157 |
+
"latexcodec==3.0.0"
|
| 158 |
+
],
|
| 159 |
+
"additional_labels": [
|
| 160 |
+
"restored-verifier-dependencies"
|
| 161 |
+
]
|
| 162 |
+
},
|
| 163 |
+
"pybamm-team__PyBaMM-4179": {
|
| 164 |
+
"base_commit": "088ca3827c831e1b93c4667b6f4353f64fb32cbf",
|
| 165 |
+
"label": "bounded-verifier-parallelism",
|
| 166 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch.",
|
| 167 |
+
"pytest_workers": 2
|
| 168 |
+
},
|
| 169 |
+
"pybamm-team__PyBaMM-4221": {
|
| 170 |
+
"base_commit": "b50dfa595dd93a2943aa2a5a8aa14ac9468aea8e",
|
| 171 |
+
"label": "bounded-verifier-parallelism",
|
| 172 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch.",
|
| 173 |
+
"pytest_workers": 2
|
| 174 |
+
},
|
| 175 |
+
"pybamm-team__PyBaMM-4267": {
|
| 176 |
+
"base_commit": "668e563b01749bcbb55a017e39b0cf94d8256619",
|
| 177 |
+
"label": "bounded-verifier-parallelism",
|
| 178 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch.",
|
| 179 |
+
"pytest_workers": 2
|
| 180 |
+
},
|
| 181 |
+
"common-workflow-language__cwltool-1964": {
|
| 182 |
+
"base_commit": "8ff1fd05a12a124d104a67b7fd8ac3382c3e5212",
|
| 183 |
+
"label": "bounded-verifier-parallelism",
|
| 184 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch.",
|
| 185 |
+
"pytest_workers": 2
|
| 186 |
+
},
|
| 187 |
+
"pybamm-team__PyBaMM-4192": {
|
| 188 |
+
"base_commit": "deca7e2bc404d94a8c944507fb2adee71546b5b0",
|
| 189 |
+
"label": "bounded-verifier-parallelism",
|
| 190 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch.",
|
| 191 |
+
"pytest_workers": 2
|
| 192 |
+
},
|
| 193 |
+
"pybamm-team__PyBaMM-4072": {
|
| 194 |
+
"base_commit": "5f35628f21d44a4152419b7d8215a40f201709bc",
|
| 195 |
+
"label": "bounded-verifier-parallelism",
|
| 196 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. Upstream automatic worker selection sees the 384-CPU host instead of the task allocation, causing excessive process startup and resource contention. Preserve selected tests, assertions, dependencies and reference patch.",
|
| 197 |
+
"pytest_workers": 2
|
| 198 |
+
},
|
| 199 |
+
"tobymao__sqlglot-3166": {
|
| 200 |
+
"base_commit": "cdbe39e7ec36b30e211942b1f62ae86946c7b520",
|
| 201 |
+
"label": "bounded-verifier-process-pool",
|
| 202 |
+
"reason": "Bound the optimizer test module ProcessPoolExecutor to two spawned workers. Its default creates a host-sized pool for each fixture group, despite the smaller task allocation; spawning also avoids forking after DuckDB initializes threads. Preserve submitted fixture jobs, result assertions, selected tests, dependencies and reference patch.",
|
| 203 |
+
"pytest_plugin": "swelego_sqlglot_workers"
|
| 204 |
+
},
|
| 205 |
+
"tobymao__sqlglot-4004": {
|
| 206 |
+
"base_commit": "fcaae87d50653600048917945652cdf463bcc3cf",
|
| 207 |
+
"label": "bounded-verifier-process-pool",
|
| 208 |
+
"reason": "Bound the optimizer test module ProcessPoolExecutor to two spawned workers. Its default creates a host-sized pool for each fixture group, despite the smaller task allocation; spawning also avoids forking after DuckDB initializes threads. Preserve submitted fixture jobs, result assertions, selected tests, dependencies and reference patch.",
|
| 209 |
+
"pytest_plugin": "swelego_sqlglot_workers"
|
| 210 |
+
},
|
| 211 |
+
"python-lsp__python-lsp-server-309": {
|
| 212 |
+
"base_commit": "cd9941c485516a1993c9c3beb7d407696b06c9cd",
|
| 213 |
+
"label": "bounded-verifier-process-pool",
|
| 214 |
+
"reason": "Bound the pinned Rope 1.13.0 autoimport cache ProcessPoolExecutor to two spawned workers. Its default sizes to the host rather than the task allocation; the diagnostic run exhausted task memory while initializing the cache. Preserve indexed packages, cache generation work, test assertions and reference patch.",
|
| 215 |
+
"pytest_plugin": "swelego_rope_workers"
|
| 216 |
+
},
|
| 217 |
+
"holoviz__holoviews-6346": {
|
| 218 |
+
"base_commit": "c1e22a3e2d38046da285ae3c67f076e60c19226a",
|
| 219 |
+
"label": "repair-directory-package-metadata",
|
| 220 |
+
"reason": "Remove only the malformed directory at tomli's dist-info METADATA path before installing the frozen requirements. Pip failed because that path was a directory rather than its required metadata file; the pinned tomli package is then installed normally. After that repair the verifier still failed: the package computes its version with setuptools_scm, which treats our depth-one checkout as a shallow repository and fails conftest import before any test runs (jobs 959924 and 960175). Fetch the pinned commit's full ancestry without checking out later code, as for setuptools_scm-854. Preserve runtime dependency pins, tests and reference patch.",
|
| 221 |
+
"remove_directory_metadata": "tomli-2.0.1.dist-info/METADATA",
|
| 222 |
+
"full_history": true,
|
| 223 |
+
"additional_labels": [
|
| 224 |
+
"restore-git-version-history"
|
| 225 |
+
]
|
| 226 |
+
},
|
| 227 |
+
"astropy__astropy-16241": {
|
| 228 |
+
"base_commit": "33265f16ebb00d3c6c5812911df0d9b4e1bbb8e0",
|
| 229 |
+
"label": "refreshed-leap-second-data",
|
| 230 |
+
"reason": "The regression verifier runs after the bundled leap-second table has expired and Astropy raises an IERSStaleWarning while building coordinate frames. Install the checksum-pinned IERS Bulletin 72 table, valid through 2027-06-28, into astropy_iers_data during setup. Preserve runtime dependency pins, tests and reference patch.",
|
| 231 |
+
"leap_second_table": {
|
| 232 |
+
"source": "https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat",
|
| 233 |
+
"bulletin": 72,
|
| 234 |
+
"expires": "2027-06-28",
|
| 235 |
+
"sha256": "6cb6f5d4b819f2e568e25db4b0b26d89dedf031fdffb18bc94d40f4e94e268d7"
|
| 236 |
+
}
|
| 237 |
+
},
|
| 238 |
+
"astropy__pyvo-357": {
|
| 239 |
+
"base_commit": "861298fbff5395d61af8192b9b739cff911cb025",
|
| 240 |
+
"label": "refreshed-leap-second-data",
|
| 241 |
+
"reason": "The async TAP regression verifier triggers Astropy's expired bundled leap-second table and raises an IERSStaleWarning. Install the checksum-pinned IERS Bulletin 72 table, valid through 2027-06-28, into astropy_iers_data during setup. Preserve runtime dependency pins, tests and reference patch.",
|
| 242 |
+
"leap_second_table": {
|
| 243 |
+
"source": "https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat",
|
| 244 |
+
"bulletin": 72,
|
| 245 |
+
"expires": "2027-06-28",
|
| 246 |
+
"sha256": "6cb6f5d4b819f2e568e25db4b0b26d89dedf031fdffb18bc94d40f4e94e268d7"
|
| 247 |
+
}
|
| 248 |
+
},
|
| 249 |
+
"pypa__setuptools_scm-854": {
|
| 250 |
+
"base_commit": "8856af656b576f8b8c3612303007bbaa92ec8d50",
|
| 251 |
+
"label": "restore-git-version-history",
|
| 252 |
+
"reason": "The reference verifier's version test fails because the shallow task checkout emits a warning where complete history is required. Fetch the pinned commit's full ancestry without checking out later code. Preserve dependency versions, tests and reference patch.",
|
| 253 |
+
"full_history": true
|
| 254 |
+
},
|
| 255 |
+
"moogar0880__PyTrakt-54": {
|
| 256 |
+
"base_commit": "f574c1c1dfc6f65f21296184659aadc2879f2be6",
|
| 257 |
+
"label": "verifier-fixed-date",
|
| 258 |
+
"reason": "The verifier includes an unrelated `now()` format check that fails only in October: the pinned code pads month 10 as `010` because it compares the month with `> 10`. Fix the verifier-local clock to November 2026 so this test checks formatting without depending on the run date; preserve the task source, assertions and reference patch.",
|
| 259 |
+
"pytest_plugin": "swelego_pytrakt_clock"
|
| 260 |
+
},
|
| 261 |
+
"tomerfiliba-org__rpyc-479": {
|
| 262 |
+
"base_commit": "94dbe362d1e12fb0c48bb795aecc1180d6a1a690",
|
| 263 |
+
"label": "verifier-allowed-cpu-affinity",
|
| 264 |
+
"reason": "The affinity regression test pinned to CPU 0, outside the CPU set allocated to its task. In the verifier copy, pin to the lowest CPU already allowed by the task instead. This still tests single-CPU affinity and threaded RPyC behavior without depending on a node-specific CPU number; preserve test selection, assertions and reference patch.",
|
| 265 |
+
"verifier_script": "swelego_rpyc_affinity.py"
|
| 266 |
+
},
|
| 267 |
+
"zarr-developers__zarr-python-2784": {
|
| 268 |
+
"base_commit": "c66f32b93f1dfe4b4e6deebb22a5ea45d40c5aa5",
|
| 269 |
+
"label": "restored-git-version-history",
|
| 270 |
+
"reason": "Restore the pinned base commit ancestry and the preceding release tag v3.0.2 (commit cab29d21, 2025-01-31, thirteen commits before the base), without checking out later code. The package version comes from hatch-vcs; in our depth-one checkout it fell below 3.0.0, so the pinned numcodecs 0.15.1 refused its zarr integration and the required test test_roundtrip_numcodecs failed with ImportError while the other 713 selected tests passed (job 964135). Preserve dependency versions, tests and reference patch."
|
| 271 |
+
},
|
| 272 |
+
"tox-dev__tox-2643": {
|
| 273 |
+
"base_commit": "267d3275ad929b12e951dc8a6d2b73aa3e61b168",
|
| 274 |
+
"label": "restored-git-version-history",
|
| 275 |
+
"reason": "Restore the pinned base commit ancestry and the preceding release tag 4.0.2 (commit 5c0863ce, two commits before the base), without checking out later code. tox computes its version with setuptools_scm; in our depth-one checkout it became 0.1.dev1, so every child tox run in the four failing integration tests decided the host tox did not satisfy tox>=4.0, tried to provision it from the tests' deliberately unreachable index and exited 1 (job 964137). Preserve dependency versions, tests and reference patch."
|
| 276 |
+
},
|
| 277 |
+
"sigmavirus24__github3.py-1167": {
|
| 278 |
+
"base_commit": "99398b4de421dde31992f3e9127f1e1f594124e0",
|
| 279 |
+
"label": "bounded-verifier-parallelism",
|
| 280 |
+
"pytest_workers": 2,
|
| 281 |
+
"reason": "Use two pytest workers for this verifier. The repository configuration enables pytest-xdist with automatic worker selection, which sees the 384-CPU host instead of the task allocation: the verifier was killed at 4 GiB and at 12 GiB (jobs 960179, 964134) while every test alone peaks at 45 MiB, and under a thread limit the same run died in xdist node startup with \"can't start new thread\" (job 964365). Preserve selected tests, assertions, dependencies and reference patch."
|
| 282 |
+
},
|
| 283 |
+
"pybamm-team__PyBaMM-4644": {
|
| 284 |
+
"base_commit": "3bf74038405bd9f489395eb3c3ae2cbd4911a1c5",
|
| 285 |
+
"label": "bounded-verifier-parallelism",
|
| 286 |
+
"pytest_workers": 2,
|
| 287 |
+
"reason": "Use two pytest workers and one numerical-library thread per worker for this verifier. The repository configuration enables pytest-xdist with automatic worker selection, which sees the 384-CPU host: the verifier was killed at 4 GiB and at 12 GiB (jobs 960179, 964134, 964365) while every selected test alone peaks at 207 MiB (job 964137). Preserve selected tests, assertions, dependencies and reference patch."
|
| 288 |
+
},
|
| 289 |
+
"RightBrain-Networks__auto-semver-51": {
|
| 290 |
+
"base_commit": "eaebfcc3297fd1adb355069691cbf5e95eb31731",
|
| 291 |
+
"label": "checkout-default-branch",
|
| 292 |
+
"branch": "master",
|
| 293 |
+
"reason": "Attach HEAD to a local master branch at the pinned base commit, as the upstream image does. The required test_run_no_merge resolves the current branch name and expects the repository default branch master; on our detached checkout it fails (jobs 959554 and v66-0), while all 17 required tests pass with the gold and test patches on a master branch and only the same test fails detached (local reproduction 2026-10-10). The duplicate-tag messages in the verifier output are emitted by the test suite itself and are not the failure. Preserve source, test assertions and reference patch."
|
| 294 |
+
}
|
| 295 |
+
}
|
| 296 |
+
}
|
swelego-real-data-verified_environment-reliable/assets/f5_test_imports.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Defer the reviewed new-feature import until the consuming test runs."""
|
| 2 |
+
import ast
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def repair(root):
|
| 7 |
+
statement = 'from f5.bigip.tm.asm.tasks import Import_Policy'
|
| 8 |
+
for kind in ('functional', 'unit'):
|
| 9 |
+
path = Path(root) / f'f5/bigip/tm/asm/test/{kind}/test_tasks.py'
|
| 10 |
+
source = path.read_text()
|
| 11 |
+
lines = source.splitlines(keepends=True)
|
| 12 |
+
tree = ast.parse(source)
|
| 13 |
+
imports = [n for n in tree.body if isinstance(n, ast.ImportFrom)
|
| 14 |
+
and ast.get_source_segment(source, n) == statement]
|
| 15 |
+
if len(imports) != 1:
|
| 16 |
+
raise ValueError(f'Expected one reviewed Import_Policy import in {path}')
|
| 17 |
+
edits = [(imports[0].lineno - 1, imports[0].end_lineno, '')]
|
| 18 |
+
covered = set()
|
| 19 |
+
for node in ast.walk(tree):
|
| 20 |
+
if not isinstance(node, ast.FunctionDef):
|
| 21 |
+
continue
|
| 22 |
+
uses = [n for stmt in node.body for n in ast.walk(stmt)
|
| 23 |
+
if isinstance(n, ast.Name) and n.id == 'Import_Policy']
|
| 24 |
+
if not uses:
|
| 25 |
+
continue
|
| 26 |
+
first = node.body[0]
|
| 27 |
+
if isinstance(first, ast.Expr) and isinstance(first.value, ast.Constant) and isinstance(first.value.value, str):
|
| 28 |
+
first = node.body[1]
|
| 29 |
+
edits.append((first.lineno - 1, first.lineno - 1,
|
| 30 |
+
' ' * first.col_offset + statement + '\n'))
|
| 31 |
+
covered.update(id(n) for n in uses)
|
| 32 |
+
all_uses = {id(n) for n in ast.walk(tree)
|
| 33 |
+
if isinstance(n, ast.Name) and n.id == 'Import_Policy'}
|
| 34 |
+
if not covered or covered != all_uses:
|
| 35 |
+
raise ValueError(f'Unreviewed Import_Policy use in {path}')
|
| 36 |
+
for start, end, replacement in sorted(edits, reverse=True):
|
| 37 |
+
lines[start:end] = [replacement]
|
| 38 |
+
result = ''.join(lines)
|
| 39 |
+
ast.parse(result)
|
| 40 |
+
path.write_text(result)
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
if __name__ == '__main__':
|
| 44 |
+
repair('/testbed')
|
swelego-real-data-verified_environment-reliable/assets/sdss_verifier_clock.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Keep SDSS #69's release-date regression test before DR19 becomes public."""
|
| 2 |
+
import datetime
|
| 3 |
+
import sys
|
| 4 |
+
from types import SimpleNamespace
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
class VerifierDatetime(datetime.datetime):
|
| 8 |
+
@classmethod
|
| 9 |
+
def now(cls, tz=None):
|
| 10 |
+
return cls(2025, 4, 1, tzinfo=tz)
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def pytest_collection_modifyitems(session, config, items):
|
| 14 |
+
# Tests import this module during collection. Replace only its datetime
|
| 15 |
+
# reference, leaving the process clock and other dependencies untouched.
|
| 16 |
+
module = sys.modules.get('sdss_access.path.path')
|
| 17 |
+
if module is None:
|
| 18 |
+
raise RuntimeError('SDSS verifier did not import sdss_access.path.path')
|
| 19 |
+
clock = SimpleNamespace(**{name: getattr(datetime, name)
|
| 20 |
+
for name in dir(datetime) if not name.startswith('__')})
|
| 21 |
+
clock.datetime = VerifierDatetime
|
| 22 |
+
module.datetime = clock
|
swelego-real-data-verified_environment-reliable/assets/setup.sh
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
marker=/setup_files/.swelego-@IDENTITY@
|
| 4 |
+
if [ -f "$marker" ]; then exit 0; fi
|
| 5 |
+
@PREPARED@
|
| 6 |
+
export PATH=/opt/conda/envs/testbed/bin:/opt/conda/bin:$PATH
|
| 7 |
+
set +u
|
| 8 |
+
source /opt/conda/bin/activate testbed
|
| 9 |
+
set -u
|
| 10 |
+
export PIP_DISABLE_PIP_VERSION_CHECK=1
|
| 11 |
+
export PIP_DEFAULT_TIMEOUT=60
|
| 12 |
+
export PIP_PROGRESS_BAR=off
|
| 13 |
+
export PIP_ROOT_USER_ACTION=ignore
|
| 14 |
+
export GIT_TERMINAL_PROMPT=0
|
| 15 |
+
@EXPORTS@
|
| 16 |
+
started=$SECONDS
|
| 17 |
+
phase=checkout
|
| 18 |
+
timings=/setup_files/setup-phases.tsv
|
| 19 |
+
: > "$timings"
|
| 20 |
+
last=$SECONDS
|
| 21 |
+
finish_phase() {
|
| 22 |
+
printf '%s\t%s\n' "$phase" "$((SECONDS-last))" >> "$timings"
|
| 23 |
+
last=$SECONDS
|
| 24 |
+
phase=$1
|
| 25 |
+
}
|
| 26 |
+
finish() {
|
| 27 |
+
status=$?
|
| 28 |
+
trap - EXIT
|
| 29 |
+
finish_phase done
|
| 30 |
+
/opt/conda/bin/python - "$started" "$SECONDS" "$status" <<'PY'
|
| 31 |
+
import json, pathlib, sys
|
| 32 |
+
phases = {}
|
| 33 |
+
for line in pathlib.Path('/setup_files/setup-phases.tsv').read_text().splitlines():
|
| 34 |
+
name, seconds = line.split('\t')
|
| 35 |
+
phases[name] = int(seconds)
|
| 36 |
+
result = {'seconds': int(sys.argv[2])-int(sys.argv[1]), 'exit_code': int(sys.argv[3]), 'phases': phases}
|
| 37 |
+
pathlib.Path('/setup_files/setup-timing.json').write_text(json.dumps(result, indent=2)+'\n')
|
| 38 |
+
print('SWELEGO_SETUP_TIMING=' + json.dumps(result), flush=True)
|
| 39 |
+
PY
|
| 40 |
+
exit "$status"
|
| 41 |
+
}
|
| 42 |
+
trap finish EXIT
|
| 43 |
+
mkdir -p /testbed
|
| 44 |
+
cd /testbed
|
| 45 |
+
git init
|
| 46 |
+
git remote remove origin 2>/dev/null || true
|
| 47 |
+
git remote add origin @REPO@
|
| 48 |
+
git fetch --depth @DEPTH@ origin @COMMIT@
|
| 49 |
+
git checkout --detach --force @COMMIT@
|
| 50 |
+
test "$(git rev-parse HEAD)" = @COMMIT@
|
| 51 |
+
@VERSION_TAG@
|
| 52 |
+
git remote remove origin
|
| 53 |
+
finish_phase conda
|
| 54 |
+
@CONDA@
|
| 55 |
+
finish_phase preinstall
|
| 56 |
+
@PREINSTALL@
|
| 57 |
+
finish_phase dependencies
|
| 58 |
+
python -m pip install --no-deps@PIP_CACHE@ -r /setup_files/requirements.txt
|
| 59 |
+
finish_phase install
|
| 60 |
+
# Frozen dependencies are already restored. The local checkout must not resolve
|
| 61 |
+
# newer versions through extras or an isolated build environment.
|
| 62 |
+
export PIP_NO_DEPS=1
|
| 63 |
+
# pip maps this negative-option environment variable to build_isolation itself.
|
| 64 |
+
export PIP_NO_BUILD_ISOLATION=0
|
| 65 |
+
@INSTALL@
|
| 66 |
+
test "$(git rev-parse HEAD)" = @COMMIT@
|
| 67 |
+
touch "$marker"
|
swelego-real-data-verified_environment-reliable/assets/swelego_pytrakt_clock.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Keep PyTrakt's unrelated current-date formatting test deterministic."""
|
| 2 |
+
import datetime
|
| 3 |
+
import sys
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class VerifierDatetime(datetime.datetime):
|
| 7 |
+
@classmethod
|
| 8 |
+
def now(cls, tz=None):
|
| 9 |
+
# PyTrakt 0.16.0 pads months using `month > 10`; October therefore
|
| 10 |
+
# becomes "010". November avoids that unrelated boundary while keeping
|
| 11 |
+
# the task's existing two-digit date-format assertion meaningful.
|
| 12 |
+
return cls(2026, 11, 5, tzinfo=tz)
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def pytest_collection_modifyitems(session, config, items):
|
| 16 |
+
module = sys.modules.get('trakt.utils')
|
| 17 |
+
if module is None:
|
| 18 |
+
raise RuntimeError('PyTrakt did not import trakt.utils')
|
| 19 |
+
module.datetime = VerifierDatetime
|
swelego-real-data-verified_environment-reliable/assets/swelego_rope_workers.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Bound Rope's autoimport cache workers without changing indexed inputs."""
|
| 2 |
+
from concurrent.futures import ProcessPoolExecutor
|
| 3 |
+
from functools import partial
|
| 4 |
+
import multiprocessing
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def pytest_configure(config):
|
| 8 |
+
from rope.contrib.autoimport import sqlite
|
| 9 |
+
|
| 10 |
+
if sqlite.ProcessPoolExecutor is not ProcessPoolExecutor:
|
| 11 |
+
raise RuntimeError('Unexpected Rope autoimport process pool')
|
| 12 |
+
sqlite.ProcessPoolExecutor = partial(
|
| 13 |
+
ProcessPoolExecutor, max_workers=2,
|
| 14 |
+
mp_context=multiprocessing.get_context('spawn'))
|
swelego-real-data-verified_environment-reliable/assets/swelego_rpyc_affinity.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Make RPyC's verifier affinity test honor the task's allocated CPU set."""
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import argparse
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
OLD = 'self._os.sched_setaffinity(0, {0, })'
|
| 9 |
+
NEW = 'self._os.sched_setaffinity(0, {min(self._os.sched_getaffinity(0)), })'
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def rewrite(source: str) -> str:
|
| 13 |
+
if source.count(OLD) == 1 and source.count(NEW) == 0:
|
| 14 |
+
return source.replace(OLD, NEW)
|
| 15 |
+
if source.count(OLD) == 0 and source.count(NEW) == 1:
|
| 16 |
+
return source
|
| 17 |
+
raise ValueError('Expected exactly one hard-coded CPU 0 affinity call')
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def main() -> None:
|
| 21 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 22 |
+
parser.add_argument('test_file', type=Path)
|
| 23 |
+
args = parser.parse_args()
|
| 24 |
+
source = args.test_file.read_text()
|
| 25 |
+
args.test_file.write_text(rewrite(source))
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
if __name__ == '__main__':
|
| 29 |
+
main()
|
swelego-real-data-verified_environment-reliable/assets/swelego_sqlglot_workers.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Bound only the optimizer test module's fixture worker pool."""
|
| 2 |
+
from concurrent.futures import ProcessPoolExecutor
|
| 3 |
+
from functools import partial
|
| 4 |
+
import multiprocessing
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def pytest_collection_modifyitems(session, config, items):
|
| 8 |
+
modules = {item.module for item in items}
|
| 9 |
+
matched = False
|
| 10 |
+
for module in modules:
|
| 11 |
+
if module.__name__ == 'tests.test_optimizer':
|
| 12 |
+
if module.ProcessPoolExecutor is not ProcessPoolExecutor:
|
| 13 |
+
raise RuntimeError('Unexpected optimizer fixture process pool')
|
| 14 |
+
module.ProcessPoolExecutor = partial(
|
| 15 |
+
ProcessPoolExecutor, max_workers=2,
|
| 16 |
+
mp_context=multiprocessing.get_context('spawn'))
|
| 17 |
+
matched = True
|
| 18 |
+
if not matched:
|
| 19 |
+
raise RuntimeError('Optimizer verifier tests were not collected')
|
swelego-real-data-verified_environment-reliable/assets/swelego_sympy_pytest.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Restore the exception assertion export omitted by legacy SymPy pytest mode."""
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
def pytest_configure(config):
|
| 5 |
+
import pytest
|
| 6 |
+
from sympy.utilities import pytest as helper
|
| 7 |
+
|
| 8 |
+
if not hasattr(helper, 'raises'):
|
| 9 |
+
helper.raises = pytest.raises
|
swelego-real-data-verified_environment-reliable/assets/wheel-cache.json
ADDED
|
@@ -0,0 +1,1473 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_revision": "8b0d2bed6f04ef571ca04abebf737ea23cbceaf3",
|
| 3 |
+
"measured_tasks": [
|
| 4 |
+
"pgmpy__pgmpy-1470",
|
| 5 |
+
"tinosulzer__PyBaMM-66",
|
| 6 |
+
"tobymao__sqlglot-1944",
|
| 7 |
+
"roaldnefs__salt-lint-35",
|
| 8 |
+
"vertexproject__synapse-294",
|
| 9 |
+
"stfc__PSyclone-834",
|
| 10 |
+
"astropy__astropy-16127",
|
| 11 |
+
"rsagroup__rsatoolbox-375",
|
| 12 |
+
"UXARRAY__uxarray-877",
|
| 13 |
+
"python-graphblas__python-graphblas-303",
|
| 14 |
+
"kylebgorman__wikipron-392",
|
| 15 |
+
"albumentations-team__albumentations-1193",
|
| 16 |
+
"DHI__mikeio-227",
|
| 17 |
+
"GjjvdBurg__paper2remarkable-43",
|
| 18 |
+
"LibertyAces__BitSwanPump-53",
|
| 19 |
+
"PMEAL__OpenPNM-2550",
|
| 20 |
+
"Unidata__MetPy-3056",
|
| 21 |
+
"TeamGraphix__graphix-225",
|
| 22 |
+
"andersbogsnes__ml_tooling-683",
|
| 23 |
+
"audeering__auglib-36",
|
| 24 |
+
"dask__dask-ml-743",
|
| 25 |
+
"dask__distributed-3021",
|
| 26 |
+
"eigenfoo__littlemcmc-62",
|
| 27 |
+
"einsteinpy__einsteinpy-301",
|
| 28 |
+
"jupyter__nbgrader-947",
|
| 29 |
+
"lincc-frameworks__nested-pandas-139",
|
| 30 |
+
"iterative__dvc-6284",
|
| 31 |
+
"m3dev__gokart-147",
|
| 32 |
+
"matplotlib__matplotlib-18184",
|
| 33 |
+
"modin-project__modin-1842",
|
| 34 |
+
"mne-tools__mne-python-2495",
|
| 35 |
+
"plotly__dash-796",
|
| 36 |
+
"pybamm-team__PyBaMM-2141",
|
| 37 |
+
"pyro-ppl__numpyro-1792",
|
| 38 |
+
"qutech__qupulse-616",
|
| 39 |
+
"pytorch__ignite-506"
|
| 40 |
+
],
|
| 41 |
+
"profiles": {
|
| 42 |
+
"3.10.16": [
|
| 43 |
+
"Bottleneck==1.4.2",
|
| 44 |
+
"Cython==3.0.12",
|
| 45 |
+
"PyYAML==6.0.2",
|
| 46 |
+
"Pygments==2.19.1",
|
| 47 |
+
"aiobotocore==2.21.1",
|
| 48 |
+
"aiohappyeyeballs==2.6.1",
|
| 49 |
+
"aiohttp==3.11.14",
|
| 50 |
+
"aioitertools==0.12.0",
|
| 51 |
+
"aiosignal==1.3.2",
|
| 52 |
+
"asdf-astropy==0.7.1",
|
| 53 |
+
"asdf==4.1.0",
|
| 54 |
+
"asdf_coordinates_schemas==0.3.0",
|
| 55 |
+
"asdf_standard==1.1.1",
|
| 56 |
+
"asdf_transform_schemas==0.5.0",
|
| 57 |
+
"astropy-iers-data==0.2025.3.31.0.36.18",
|
| 58 |
+
"asttokens==3.0.0",
|
| 59 |
+
"async-timeout==5.0.1",
|
| 60 |
+
"attrs==25.3.0",
|
| 61 |
+
"beautifulsoup4==4.13.3",
|
| 62 |
+
"bleach==6.2.0",
|
| 63 |
+
"botocore==1.37.1",
|
| 64 |
+
"certifi==2025.1.31",
|
| 65 |
+
"cfgv==3.4.0",
|
| 66 |
+
"click==8.1.8",
|
| 67 |
+
"cloudpickle==3.1.1",
|
| 68 |
+
"contourpy==1.3.1",
|
| 69 |
+
"coverage==7.8.0",
|
| 70 |
+
"cycler==0.12.1",
|
| 71 |
+
"dask==2025.3.0",
|
| 72 |
+
"decorator==5.2.1",
|
| 73 |
+
"distlib==0.3.9",
|
| 74 |
+
"exceptiongroup==1.2.2",
|
| 75 |
+
"executing==2.2.0",
|
| 76 |
+
"extension-helpers==1.2.0",
|
| 77 |
+
"filelock==3.18.0",
|
| 78 |
+
"fonttools==4.56.0",
|
| 79 |
+
"frozenlist==1.5.0",
|
| 80 |
+
"fsspec==2025.3.1",
|
| 81 |
+
"h5py==3.13.0",
|
| 82 |
+
"html5lib==1.1",
|
| 83 |
+
"hypothesis==6.130.5",
|
| 84 |
+
"identify==2.6.9",
|
| 85 |
+
"idna==3.10",
|
| 86 |
+
"importlib_metadata==8.6.1",
|
| 87 |
+
"iniconfig==2.1.0",
|
| 88 |
+
"ipython==8.34.0",
|
| 89 |
+
"jedi==0.19.2",
|
| 90 |
+
"jmespath==1.0.1",
|
| 91 |
+
"jplephem==2.22",
|
| 92 |
+
"kiwisolver==1.4.8",
|
| 93 |
+
"locket==1.0.0",
|
| 94 |
+
"matplotlib-inline==0.1.7",
|
| 95 |
+
"matplotlib==3.10.1",
|
| 96 |
+
"mpmath==1.3.0",
|
| 97 |
+
"multidict==6.2.0",
|
| 98 |
+
"nodeenv==1.9.1",
|
| 99 |
+
"numpy==2.2.4",
|
| 100 |
+
"packaging==24.2",
|
| 101 |
+
"pandas==2.2.3",
|
| 102 |
+
"parso==0.8.4",
|
| 103 |
+
"partd==1.4.2",
|
| 104 |
+
"pexpect==4.9.0",
|
| 105 |
+
"pillow==11.1.0",
|
| 106 |
+
"platformdirs==4.3.7",
|
| 107 |
+
"pluggy==1.5.0",
|
| 108 |
+
"pre_commit==4.2.0",
|
| 109 |
+
"prompt_toolkit==3.0.50",
|
| 110 |
+
"propcache==0.3.1",
|
| 111 |
+
"ptyprocess==0.7.0",
|
| 112 |
+
"pure_eval==0.2.3",
|
| 113 |
+
"pyarrow==19.0.1",
|
| 114 |
+
"pyerfa==2.0.1.5",
|
| 115 |
+
"pyparsing==3.2.3",
|
| 116 |
+
"pytest-arraydiff==0.6.1",
|
| 117 |
+
"pytest-astropy-header==0.2.2",
|
| 118 |
+
"pytest-astropy==0.11.0",
|
| 119 |
+
"pytest-cov==6.0.0",
|
| 120 |
+
"pytest-doctestplus==1.4.0",
|
| 121 |
+
"pytest-filter-subpackage==0.2.0",
|
| 122 |
+
"pytest-mock==3.14.0",
|
| 123 |
+
"pytest-remotedata==0.4.1",
|
| 124 |
+
"pytest==8.3.5",
|
| 125 |
+
"python-dateutil==2.9.0.post0",
|
| 126 |
+
"pytz==2025.2",
|
| 127 |
+
"s3fs==2025.3.1",
|
| 128 |
+
"scipy==1.15.2",
|
| 129 |
+
"semantic-version==2.10.0",
|
| 130 |
+
"setuptools-scm==8.2.0",
|
| 131 |
+
"six==1.17.0",
|
| 132 |
+
"sortedcontainers==2.4.0",
|
| 133 |
+
"soupsieve==2.6",
|
| 134 |
+
"stack-data==0.6.3",
|
| 135 |
+
"tomli==2.2.1",
|
| 136 |
+
"toolz==1.0.0",
|
| 137 |
+
"traitlets==5.14.3",
|
| 138 |
+
"typing_extensions==4.13.0",
|
| 139 |
+
"tzdata==2025.2",
|
| 140 |
+
"urllib3==2.3.0",
|
| 141 |
+
"virtualenv==20.29.3",
|
| 142 |
+
"wcwidth==0.2.13",
|
| 143 |
+
"webencodings==0.5.1",
|
| 144 |
+
"wrapt==1.17.2",
|
| 145 |
+
"yarl==1.18.3",
|
| 146 |
+
"zipp==3.21.0"
|
| 147 |
+
],
|
| 148 |
+
"3.6.13": [
|
| 149 |
+
"APScheduler==3.10.4",
|
| 150 |
+
"Babel==2.11.0",
|
| 151 |
+
"Flask==1.1.4",
|
| 152 |
+
"GitPython==3.1.18",
|
| 153 |
+
"HeapDict==1.0.1",
|
| 154 |
+
"Jinja2==2.10.3",
|
| 155 |
+
"Jinja2==3.0.3",
|
| 156 |
+
"Mako==1.1.6",
|
| 157 |
+
"MarkupSafe==2.0.1",
|
| 158 |
+
"Pillow==8.4.0",
|
| 159 |
+
"PyJWT==2.4.0",
|
| 160 |
+
"PyVISA==1.11.3",
|
| 161 |
+
"PyYAML==6.0.1",
|
| 162 |
+
"Pygments==2.14.0",
|
| 163 |
+
"SQLAlchemy==1.4.54",
|
| 164 |
+
"Send2Trash==1.8.3",
|
| 165 |
+
"Sphinx==4.3.2",
|
| 166 |
+
"Sphinx==5.3.0",
|
| 167 |
+
"Werkzeug==1.0.1",
|
| 168 |
+
"aiohttp==3.8.6",
|
| 169 |
+
"aiosignal==1.2.0",
|
| 170 |
+
"alabaster==0.7.13",
|
| 171 |
+
"alembic==1.7.7",
|
| 172 |
+
"anyio==3.6.2",
|
| 173 |
+
"anytree==2.8.0",
|
| 174 |
+
"argon2-cffi-bindings==21.2.0",
|
| 175 |
+
"argon2-cffi==21.3.0",
|
| 176 |
+
"astroid==1.4.9",
|
| 177 |
+
"astropy==4.1",
|
| 178 |
+
"async-generator==1.10",
|
| 179 |
+
"async-timeout==4.0.2",
|
| 180 |
+
"asynctest==0.13.0",
|
| 181 |
+
"attrs==22.2.0",
|
| 182 |
+
"backcall==0.2.0",
|
| 183 |
+
"backports.zoneinfo==0.2.1",
|
| 184 |
+
"black==22.8.0",
|
| 185 |
+
"bleach==4.1.0",
|
| 186 |
+
"bokeh==2.3.3",
|
| 187 |
+
"boto3==1.23.10",
|
| 188 |
+
"botocore==1.26.10",
|
| 189 |
+
"cached-property==1.5.2",
|
| 190 |
+
"cachetools==4.2.4",
|
| 191 |
+
"cffi==1.15.1",
|
| 192 |
+
"charset-normalizer==2.0.12",
|
| 193 |
+
"click==7.1.2",
|
| 194 |
+
"click==8.0.4",
|
| 195 |
+
"cloudpickle==2.2.1",
|
| 196 |
+
"codecov==2.1.13",
|
| 197 |
+
"comm==0.1.4",
|
| 198 |
+
"configparser==5.2.0",
|
| 199 |
+
"contextvars==2.4",
|
| 200 |
+
"cov-core==1.15.0",
|
| 201 |
+
"coverage==6.2",
|
| 202 |
+
"cryptography==40.0.2",
|
| 203 |
+
"cycler==0.11.0",
|
| 204 |
+
"daft==0.1.2",
|
| 205 |
+
"dask==2021.3.0",
|
| 206 |
+
"databricks-cli==0.17.8",
|
| 207 |
+
"dataclasses==0.8",
|
| 208 |
+
"decorator==4.4.2",
|
| 209 |
+
"decorator==5.1.1",
|
| 210 |
+
"defusedxml==0.7.1",
|
| 211 |
+
"distlib==0.3.9",
|
| 212 |
+
"distro==1.9.0",
|
| 213 |
+
"docker==5.0.3",
|
| 214 |
+
"docutils==0.17.1",
|
| 215 |
+
"docutils==0.18.1",
|
| 216 |
+
"entrypoints==0.4",
|
| 217 |
+
"execnet==1.9.0",
|
| 218 |
+
"filelock==3.4.1",
|
| 219 |
+
"flake8==5.0.4",
|
| 220 |
+
"fparser==0.0.11",
|
| 221 |
+
"frozenlist==1.2.0",
|
| 222 |
+
"gitdb==4.0.9",
|
| 223 |
+
"google-api-core==2.8.2",
|
| 224 |
+
"google-api-python-client==2.52.0",
|
| 225 |
+
"google-auth-httplib2==0.2.0",
|
| 226 |
+
"google-auth==2.22.0",
|
| 227 |
+
"googleapis-common-protos==1.56.3",
|
| 228 |
+
"graphviz==0.19.1",
|
| 229 |
+
"greenlet==2.0.2",
|
| 230 |
+
"gunicorn==21.2.0",
|
| 231 |
+
"gym-notices==0.0.8",
|
| 232 |
+
"gym==0.26.2",
|
| 233 |
+
"hestia==0.6.0",
|
| 234 |
+
"httplib2==0.22.0",
|
| 235 |
+
"idna-ssl==1.1.0",
|
| 236 |
+
"idna==3.10",
|
| 237 |
+
"imagesize==1.4.1",
|
| 238 |
+
"immutables==0.19",
|
| 239 |
+
"importlib-metadata==4.2.0",
|
| 240 |
+
"importlib-metadata==4.8.3",
|
| 241 |
+
"importlib-resources==5.4.0",
|
| 242 |
+
"iniconfig==1.1.1",
|
| 243 |
+
"ipykernel==5.5.6",
|
| 244 |
+
"ipython-genutils==0.2.0",
|
| 245 |
+
"ipython==7.16.3",
|
| 246 |
+
"ipywidgets==7.8.5",
|
| 247 |
+
"isort==5.10.1",
|
| 248 |
+
"itsdangerous==1.1.0",
|
| 249 |
+
"jedi==0.17.2",
|
| 250 |
+
"jmespath==0.10.0",
|
| 251 |
+
"joblib==1.1.1",
|
| 252 |
+
"json5==0.9.16",
|
| 253 |
+
"jsonpatch==1.32",
|
| 254 |
+
"jsonpointer==2.3",
|
| 255 |
+
"jsonschema==3.2.0",
|
| 256 |
+
"jupyter-client==7.1.2",
|
| 257 |
+
"jupyter-console==6.4.3",
|
| 258 |
+
"jupyter-core==4.9.2",
|
| 259 |
+
"jupyter-server-proxy==3.2.4",
|
| 260 |
+
"jupyter-server==1.13.1",
|
| 261 |
+
"jupyter-sphinx==0.4.0",
|
| 262 |
+
"jupyter==1.1.1",
|
| 263 |
+
"jupyterlab-pygments==0.1.2",
|
| 264 |
+
"jupyterlab-server==2.10.3",
|
| 265 |
+
"jupyterlab==3.2.9",
|
| 266 |
+
"jupyterlab_widgets==1.1.11",
|
| 267 |
+
"kiwisolver==1.3.1",
|
| 268 |
+
"latexcodec==2.0.1",
|
| 269 |
+
"lazy-object-proxy==1.7.1",
|
| 270 |
+
"llvmlite==0.36.0",
|
| 271 |
+
"lmdb==1.6.2",
|
| 272 |
+
"lockfile==0.12.2",
|
| 273 |
+
"looseversion==1.3.0",
|
| 274 |
+
"luigi==3.6.0",
|
| 275 |
+
"marshmallow==3.0.0rc5",
|
| 276 |
+
"matplotlib==3.3.4",
|
| 277 |
+
"mccabe==0.7.0",
|
| 278 |
+
"mistune==0.8.4",
|
| 279 |
+
"mlflow==1.23.1",
|
| 280 |
+
"mock==5.2.0",
|
| 281 |
+
"mpmath==1.3.0",
|
| 282 |
+
"msgpack-python==0.5.6",
|
| 283 |
+
"msgpack==1.0.5",
|
| 284 |
+
"multidict==5.2.0",
|
| 285 |
+
"mypy-extensions==1.0.0",
|
| 286 |
+
"nbclassic==0.3.5",
|
| 287 |
+
"nbclient==0.5.9",
|
| 288 |
+
"nbconvert==6.0.7",
|
| 289 |
+
"nbformat==5.1.3",
|
| 290 |
+
"nbsphinx==0.8.8",
|
| 291 |
+
"nbval==0.10.0",
|
| 292 |
+
"nest-asyncio==1.6.0",
|
| 293 |
+
"networkx==2.5.1",
|
| 294 |
+
"nose-cov==1.6",
|
| 295 |
+
"nose==1.3.7",
|
| 296 |
+
"notebook==6.4.10",
|
| 297 |
+
"numba==0.53.1",
|
| 298 |
+
"numpy==1.19.5",
|
| 299 |
+
"oauthlib==3.2.2",
|
| 300 |
+
"packaging==21.3",
|
| 301 |
+
"pandas==1.1.5",
|
| 302 |
+
"pandocfilters==1.5.1",
|
| 303 |
+
"parso==0.7.1",
|
| 304 |
+
"pathspec==0.9.0",
|
| 305 |
+
"patsy==1.0.1",
|
| 306 |
+
"pep257==0.7.0",
|
| 307 |
+
"pep8==1.7.1",
|
| 308 |
+
"pexpect==4.9.0",
|
| 309 |
+
"pickleshare==0.7.5",
|
| 310 |
+
"platformdirs==2.4.0",
|
| 311 |
+
"plotly==3.10.0",
|
| 312 |
+
"pluggy==1.0.0",
|
| 313 |
+
"polyaxon-client==0.6.1",
|
| 314 |
+
"polyaxon-schemas==0.6.1",
|
| 315 |
+
"polystores==0.2.5",
|
| 316 |
+
"prometheus-client==0.17.1",
|
| 317 |
+
"prometheus_flask_exporter==0.23.2",
|
| 318 |
+
"prompt-toolkit==3.0.36",
|
| 319 |
+
"protobuf==3.19.6",
|
| 320 |
+
"protobuf==4.21.0",
|
| 321 |
+
"psutil==7.0.0",
|
| 322 |
+
"ptyprocess==0.7.0",
|
| 323 |
+
"py==1.11.0",
|
| 324 |
+
"pyOpenSSL==23.2.0",
|
| 325 |
+
"pyarrow==6.0.1",
|
| 326 |
+
"pyasn1-modules==0.3.0",
|
| 327 |
+
"pyasn1==0.5.1",
|
| 328 |
+
"pybtex-docutils==1.0.2",
|
| 329 |
+
"pybtex==0.24.0",
|
| 330 |
+
"pycodestyle==2.10.0",
|
| 331 |
+
"pycodestyle==2.9.1",
|
| 332 |
+
"pycparser==2.21",
|
| 333 |
+
"pycryptodomex==3.21.0",
|
| 334 |
+
"pyenchant==3.2.2",
|
| 335 |
+
"pyflakes==2.5.0",
|
| 336 |
+
"pyflakes==3.0.1",
|
| 337 |
+
"pylint==1.6.5",
|
| 338 |
+
"pyparsing==3.1.4",
|
| 339 |
+
"pyrsistent==0.18.0",
|
| 340 |
+
"pytest-asyncio==0.16.0",
|
| 341 |
+
"pytest-cache==1.0",
|
| 342 |
+
"pytest-cov==2.5.1",
|
| 343 |
+
"pytest-cov==4.0.0",
|
| 344 |
+
"pytest-flakes==4.0.5",
|
| 345 |
+
"pytest-mock==3.6.1",
|
| 346 |
+
"pytest-pep257==0.0.5",
|
| 347 |
+
"pytest-pep8==1.0.6",
|
| 348 |
+
"pytest-pylint==0.14.1",
|
| 349 |
+
"pytest-xdist==3.0.2",
|
| 350 |
+
"pytest==7.0.1",
|
| 351 |
+
"python-daemon==2.3.2",
|
| 352 |
+
"python-dateutil==2.9.0.post0",
|
| 353 |
+
"pytz-deprecation-shim==0.1.0.post0",
|
| 354 |
+
"pytz==2025.2",
|
| 355 |
+
"pyzmq==25.0.2",
|
| 356 |
+
"pyzmq==25.1.2",
|
| 357 |
+
"querystring-parser==1.2.4",
|
| 358 |
+
"redis==4.3.6",
|
| 359 |
+
"requests-toolbelt==1.0.0",
|
| 360 |
+
"requests==2.27.1",
|
| 361 |
+
"retrying==1.3.4",
|
| 362 |
+
"rhea==0.5.5",
|
| 363 |
+
"rsa==4.9",
|
| 364 |
+
"s3transfer==0.5.2",
|
| 365 |
+
"salt==3006.6",
|
| 366 |
+
"scikit-learn==0.24.2",
|
| 367 |
+
"scipy==1.5.4",
|
| 368 |
+
"simpervisor==0.4",
|
| 369 |
+
"six==1.17.0",
|
| 370 |
+
"slackclient==2.9.4",
|
| 371 |
+
"smmap==5.0.0",
|
| 372 |
+
"sniffio==1.2.0",
|
| 373 |
+
"snowballstemmer==2.2.0",
|
| 374 |
+
"sortedcontainers==2.4.0",
|
| 375 |
+
"sphinx-rtd-theme==2.0.0",
|
| 376 |
+
"sphinxcontrib-applehelp==1.0.2",
|
| 377 |
+
"sphinxcontrib-bibtex==2.5.0",
|
| 378 |
+
"sphinxcontrib-devhelp==1.0.2",
|
| 379 |
+
"sphinxcontrib-htmlhelp==2.0.0",
|
| 380 |
+
"sphinxcontrib-jquery==4.1",
|
| 381 |
+
"sphinxcontrib-jsmath==1.0.1",
|
| 382 |
+
"sphinxcontrib-qthelp==1.0.3",
|
| 383 |
+
"sphinxcontrib-serializinghtml==1.1.5",
|
| 384 |
+
"sphinxcontrib-spelling==7.7.0",
|
| 385 |
+
"sqlparse==0.4.4",
|
| 386 |
+
"statsmodels==0.12.2",
|
| 387 |
+
"sympy==1.9",
|
| 388 |
+
"tabor-control==0.1.1",
|
| 389 |
+
"tabulate==0.8.10",
|
| 390 |
+
"tblib==1.7.0",
|
| 391 |
+
"tek-awg==0.2.1",
|
| 392 |
+
"tenacity==8.2.2",
|
| 393 |
+
"tensorboardX==2.6.2.2",
|
| 394 |
+
"termcolor==1.1.0",
|
| 395 |
+
"terminado==0.12.1",
|
| 396 |
+
"testpath==0.6.0",
|
| 397 |
+
"threadpoolctl==3.1.0",
|
| 398 |
+
"toml==0.10.2",
|
| 399 |
+
"tomli==1.2.3",
|
| 400 |
+
"toolz==0.12.0",
|
| 401 |
+
"torch==1.10.2",
|
| 402 |
+
"tornado==6.1",
|
| 403 |
+
"tox==3.28.0",
|
| 404 |
+
"tqdm==4.64.1",
|
| 405 |
+
"traitlets==4.3.3",
|
| 406 |
+
"typed-ast==1.5.5",
|
| 407 |
+
"typing_extensions==4.1.1",
|
| 408 |
+
"tzdata==2025.2",
|
| 409 |
+
"tzlocal==4.2",
|
| 410 |
+
"uritemplate==4.1.1",
|
| 411 |
+
"urllib3==1.26.20",
|
| 412 |
+
"virtualenv==20.17.1",
|
| 413 |
+
"visdom==0.2.4",
|
| 414 |
+
"wcwidth==0.2.13",
|
| 415 |
+
"webencodings==0.5.1",
|
| 416 |
+
"websocket-client==1.3.1",
|
| 417 |
+
"widgetsnbextension==3.6.10",
|
| 418 |
+
"wrapt==1.16.0",
|
| 419 |
+
"xdoctest==1.1.6",
|
| 420 |
+
"xxhash==3.2.0",
|
| 421 |
+
"yarl==1.7.2",
|
| 422 |
+
"zhinst==22.2.29711",
|
| 423 |
+
"zict==2.1.0",
|
| 424 |
+
"zipp==3.6.0"
|
| 425 |
+
],
|
| 426 |
+
"3.8.12": [
|
| 427 |
+
"PyQt5==5.15.4",
|
| 428 |
+
"PyYAML==6.0.2",
|
| 429 |
+
"awkward==2.6.10",
|
| 430 |
+
"awkward_cpp==40",
|
| 431 |
+
"cffi==1.17.1",
|
| 432 |
+
"donfig==0.8.1.post1",
|
| 433 |
+
"exceptiongroup==1.2.2",
|
| 434 |
+
"fsspec==2025.3.1",
|
| 435 |
+
"importlib_metadata==8.5.0",
|
| 436 |
+
"iniconfig==2.1.0",
|
| 437 |
+
"llvmlite==0.41.1",
|
| 438 |
+
"numba==0.58.1",
|
| 439 |
+
"pluggy==1.5.0",
|
| 440 |
+
"pycparser==2.22",
|
| 441 |
+
"pytest==8.3.5",
|
| 442 |
+
"suitesparse-graphblas==7.3.3.0",
|
| 443 |
+
"tomli==2.2.1",
|
| 444 |
+
"typing_extensions==4.13.0"
|
| 445 |
+
],
|
| 446 |
+
"3.8.20": [
|
| 447 |
+
"GitPython==3.1.44",
|
| 448 |
+
"Jinja2==3.1.6",
|
| 449 |
+
"MarkupSafe==2.1.5",
|
| 450 |
+
"PyDrive2==1.21.3",
|
| 451 |
+
"PyJWT==2.9.0",
|
| 452 |
+
"PyNaCl==1.5.0",
|
| 453 |
+
"PyWavelets==1.4.1",
|
| 454 |
+
"PyYAML==5.4.1",
|
| 455 |
+
"PyYAML==6.0.2",
|
| 456 |
+
"Pygments==2.9.0",
|
| 457 |
+
"WsgiDAV==3.1.0",
|
| 458 |
+
"adal==1.2.7",
|
| 459 |
+
"adlfs==0.7.1",
|
| 460 |
+
"aiobotocore==1.3.0",
|
| 461 |
+
"aiohappyeyeballs==2.4.4",
|
| 462 |
+
"aiohttp==3.10.11",
|
| 463 |
+
"aioitertools==0.12.0",
|
| 464 |
+
"aiosignal==1.3.1",
|
| 465 |
+
"aliyun-python-sdk-core-v3==2.13.33",
|
| 466 |
+
"aliyun-python-sdk-core==2.16.0",
|
| 467 |
+
"aliyun-python-sdk-kms==2.16.5",
|
| 468 |
+
"anyio==4.5.2",
|
| 469 |
+
"appdirs==1.4.4",
|
| 470 |
+
"argcomplete==3.6.1",
|
| 471 |
+
"astroid==2.5.6",
|
| 472 |
+
"async-timeout==5.0.1",
|
| 473 |
+
"atpublic==5.0",
|
| 474 |
+
"attrs==21.4.0",
|
| 475 |
+
"attrs==25.3.0",
|
| 476 |
+
"autocommand==2.2.2",
|
| 477 |
+
"azure-core==1.32.0",
|
| 478 |
+
"azure-datalake-store==0.0.53",
|
| 479 |
+
"azure-identity==1.21.0",
|
| 480 |
+
"azure-storage-blob==12.6.0",
|
| 481 |
+
"backports.tarfile==1.2.0",
|
| 482 |
+
"bcrypt==4.3.0",
|
| 483 |
+
"beautifulsoup4==4.9.3",
|
| 484 |
+
"boto3==1.17.49",
|
| 485 |
+
"boto==2.49.0",
|
| 486 |
+
"botocore==1.20.49",
|
| 487 |
+
"cachetools==4.2.4",
|
| 488 |
+
"certifi==2025.1.31",
|
| 489 |
+
"cffi==1.17.1",
|
| 490 |
+
"charset-normalizer==3.4.1",
|
| 491 |
+
"chemicals==1.3.3",
|
| 492 |
+
"click==8.1.8",
|
| 493 |
+
"collective.checkdocs==0.2",
|
| 494 |
+
"colorama==0.4.6",
|
| 495 |
+
"configobj==5.0.9",
|
| 496 |
+
"contourpy==1.1.1",
|
| 497 |
+
"coverage==7.6.1",
|
| 498 |
+
"crc32c==2.2.post0",
|
| 499 |
+
"crcmod==1.7",
|
| 500 |
+
"cryptography==43.0.3",
|
| 501 |
+
"cycler==0.12.1",
|
| 502 |
+
"decorator==5.2.1",
|
| 503 |
+
"defusedxml==0.7.1",
|
| 504 |
+
"dictdiffer==0.9.0",
|
| 505 |
+
"diskcache==5.6.3",
|
| 506 |
+
"distro==1.9.0",
|
| 507 |
+
"docker-compose==1.29.2",
|
| 508 |
+
"docker==7.1.0",
|
| 509 |
+
"dockerpty==0.4.1",
|
| 510 |
+
"docopt==0.6.2",
|
| 511 |
+
"docrep==0.3.2",
|
| 512 |
+
"docutils==0.20.1",
|
| 513 |
+
"dpath==2.2.0",
|
| 514 |
+
"dulwich==0.22.4",
|
| 515 |
+
"exceptiongroup==1.2.2",
|
| 516 |
+
"execnet==2.1.1",
|
| 517 |
+
"filelock==3.0.12",
|
| 518 |
+
"flaky==3.7.0",
|
| 519 |
+
"flatdict==4.0.1",
|
| 520 |
+
"flatten-dict==0.4.2",
|
| 521 |
+
"flufl.lock==3.2",
|
| 522 |
+
"fluids==1.1.0",
|
| 523 |
+
"fonttools==4.56.0",
|
| 524 |
+
"freetype-py==2.5.1",
|
| 525 |
+
"frozenlist==1.5.0",
|
| 526 |
+
"fsspec==2021.6.1",
|
| 527 |
+
"funcy==2.0",
|
| 528 |
+
"future==1.0.0",
|
| 529 |
+
"gcsfs==2021.6.1",
|
| 530 |
+
"gitdb==4.0.12",
|
| 531 |
+
"google-api-core==2.10.2",
|
| 532 |
+
"google-api-python-client==2.166.0",
|
| 533 |
+
"google-auth-httplib2==0.2.0",
|
| 534 |
+
"google-auth-oauthlib==0.5.3",
|
| 535 |
+
"google-auth==1.35.0",
|
| 536 |
+
"google-cloud-core==1.7.3",
|
| 537 |
+
"google-cloud-storage==1.40.0",
|
| 538 |
+
"google-compute-engine==2.8.13",
|
| 539 |
+
"google-crc32c==1.5.0",
|
| 540 |
+
"google-resumable-media==1.3.3",
|
| 541 |
+
"googleapis-common-protos==1.69.2",
|
| 542 |
+
"grandalf==0.6",
|
| 543 |
+
"h11==0.14.0",
|
| 544 |
+
"h5py==3.11.0",
|
| 545 |
+
"hdfs==2.5.8",
|
| 546 |
+
"hsluv==5.0.4",
|
| 547 |
+
"httpcore==1.0.7",
|
| 548 |
+
"httplib2==0.22.0",
|
| 549 |
+
"httpx==0.28.1",
|
| 550 |
+
"idna==3.10",
|
| 551 |
+
"imageio==2.35.1",
|
| 552 |
+
"importlib_metadata==8.5.0",
|
| 553 |
+
"importlib_resources==6.4.5",
|
| 554 |
+
"iniconfig==2.1.0",
|
| 555 |
+
"intel-cmplr-lib-ur==2025.1.0",
|
| 556 |
+
"intel-openmp==2025.1.0",
|
| 557 |
+
"invoke==2.2.0",
|
| 558 |
+
"isodate==0.7.2",
|
| 559 |
+
"isort==5.13.2",
|
| 560 |
+
"jaraco.classes==3.4.0",
|
| 561 |
+
"jaraco.collections==5.1.0",
|
| 562 |
+
"jaraco.context==6.0.1",
|
| 563 |
+
"jaraco.functools==4.1.0",
|
| 564 |
+
"jaraco.structures==2.2.0",
|
| 565 |
+
"jaraco.text==4.0.0",
|
| 566 |
+
"jaraco.ui==2.4.0",
|
| 567 |
+
"jaraco.windows==5.5.0",
|
| 568 |
+
"jmespath==0.10.0",
|
| 569 |
+
"joblib==1.4.2",
|
| 570 |
+
"json-tricks==3.17.3",
|
| 571 |
+
"json5==0.10.0",
|
| 572 |
+
"jsonpath-ng==1.7.0",
|
| 573 |
+
"jsonschema-specifications==2023.12.1",
|
| 574 |
+
"jsonschema==3.2.0",
|
| 575 |
+
"jsonschema==4.23.0",
|
| 576 |
+
"kiwisolver==1.4.7",
|
| 577 |
+
"knack==0.12.0",
|
| 578 |
+
"lazy-object-proxy==1.10.0",
|
| 579 |
+
"lazy_loader==0.4",
|
| 580 |
+
"llvmlite==0.41.1",
|
| 581 |
+
"markdown-it-py==2.2.0",
|
| 582 |
+
"matplotlib==3.7.5",
|
| 583 |
+
"mccabe==0.6.1",
|
| 584 |
+
"mdurl==0.1.2",
|
| 585 |
+
"mkl==2025.1.0",
|
| 586 |
+
"mock-ssh-server==0.9.0",
|
| 587 |
+
"mock==4.0.3",
|
| 588 |
+
"more-itertools==10.5.0",
|
| 589 |
+
"mpmath==1.3.0",
|
| 590 |
+
"msal-extensions==1.3.0",
|
| 591 |
+
"msal==1.32.0",
|
| 592 |
+
"msrest==0.7.1",
|
| 593 |
+
"msrestazure==0.6.4.post1",
|
| 594 |
+
"multidict==6.1.0",
|
| 595 |
+
"mypy==0.910",
|
| 596 |
+
"mypy_extensions==0.4.4",
|
| 597 |
+
"named==1.4.2",
|
| 598 |
+
"nanotime==0.5.2",
|
| 599 |
+
"networkx==2.8.8",
|
| 600 |
+
"networkx==3.1",
|
| 601 |
+
"numba==0.58.1",
|
| 602 |
+
"numpy==1.24.4",
|
| 603 |
+
"oauth2client==4.1.3",
|
| 604 |
+
"oauthlib==3.2.2",
|
| 605 |
+
"opencv-python-headless==4.11.0.86",
|
| 606 |
+
"oss2==2.6.1",
|
| 607 |
+
"packaging==24.2",
|
| 608 |
+
"pandas==2.0.3",
|
| 609 |
+
"paramiko==3.5.1",
|
| 610 |
+
"path==17.0.0",
|
| 611 |
+
"pathspec==0.12.1",
|
| 612 |
+
"pillow==10.4.0",
|
| 613 |
+
"pkgutil_resolve_name==1.3.10",
|
| 614 |
+
"pluggy==0.13.1",
|
| 615 |
+
"pluggy==1.5.0",
|
| 616 |
+
"ply==3.11",
|
| 617 |
+
"propcache==0.2.0",
|
| 618 |
+
"protobuf==4.25.6",
|
| 619 |
+
"psutil==7.0.0",
|
| 620 |
+
"py==1.11.0",
|
| 621 |
+
"pyOpenSSL==24.2.1",
|
| 622 |
+
"pyarrow==17.0.0",
|
| 623 |
+
"pyasn1==0.6.1",
|
| 624 |
+
"pyasn1_modules==0.4.2",
|
| 625 |
+
"pycparser==2.22",
|
| 626 |
+
"pycryptodome==3.22.0",
|
| 627 |
+
"pydocstyle==6.1.1",
|
| 628 |
+
"pydot==1.4.2",
|
| 629 |
+
"pygit2==1.13.3",
|
| 630 |
+
"pygtrie==2.5.0",
|
| 631 |
+
"pylint-plugin-utils==0.6",
|
| 632 |
+
"pylint-pytest==1.0.3",
|
| 633 |
+
"pylint==2.8.3",
|
| 634 |
+
"pypardiso==0.4.6",
|
| 635 |
+
"pyparsing==2.4.7",
|
| 636 |
+
"pyparsing==3.1.4",
|
| 637 |
+
"pyrsistent==0.20.0",
|
| 638 |
+
"pytest-cov==2.12.1",
|
| 639 |
+
"pytest-docker==0.10.3",
|
| 640 |
+
"pytest-forked==1.6.0",
|
| 641 |
+
"pytest-lazy-fixture==0.6.3",
|
| 642 |
+
"pytest-mock==3.6.1",
|
| 643 |
+
"pytest-timeout==1.4.2",
|
| 644 |
+
"pytest-xdist==2.3.0",
|
| 645 |
+
"pytest==6.2.4",
|
| 646 |
+
"pytest==8.3.5",
|
| 647 |
+
"python-benedict==0.34.1",
|
| 648 |
+
"python-dateutil==2.9.0.post0",
|
| 649 |
+
"python-dotenv==0.21.1",
|
| 650 |
+
"python-fsutil==0.15.0",
|
| 651 |
+
"python-slugify==8.0.4",
|
| 652 |
+
"pytz==2025.2",
|
| 653 |
+
"qudida==0.0.4",
|
| 654 |
+
"rangehttpserver==1.2.0",
|
| 655 |
+
"referencing==0.35.1",
|
| 656 |
+
"requests-oauthlib==2.0.0",
|
| 657 |
+
"requests==2.32.3",
|
| 658 |
+
"rich==13.2.0",
|
| 659 |
+
"rpds-py==0.20.1",
|
| 660 |
+
"rsa==4.9",
|
| 661 |
+
"ruamel.yaml.clib==0.2.8",
|
| 662 |
+
"ruamel.yaml==0.18.10",
|
| 663 |
+
"s3fs==2021.6.1",
|
| 664 |
+
"s3transfer==0.3.7",
|
| 665 |
+
"scikit-image==0.18.3",
|
| 666 |
+
"scikit-image==0.21.0",
|
| 667 |
+
"scikit-learn==1.3.2",
|
| 668 |
+
"scipy==1.10.1",
|
| 669 |
+
"shellingham==1.5.4",
|
| 670 |
+
"shortuuid==1.0.13",
|
| 671 |
+
"shtab==1.7.1",
|
| 672 |
+
"six==1.17.0",
|
| 673 |
+
"smmap==5.0.2",
|
| 674 |
+
"sniffio==1.3.1",
|
| 675 |
+
"snowballstemmer==2.2.0",
|
| 676 |
+
"soupsieve==2.6",
|
| 677 |
+
"sympy==1.13.3",
|
| 678 |
+
"tabulate==0.9.0",
|
| 679 |
+
"tbb==2022.1.0",
|
| 680 |
+
"tcmlib==1.3.0",
|
| 681 |
+
"terminaltables==3.1.10",
|
| 682 |
+
"text-unidecode==1.3",
|
| 683 |
+
"texttable==1.7.0",
|
| 684 |
+
"thermo==0.4.2",
|
| 685 |
+
"threadpoolctl==3.5.0",
|
| 686 |
+
"tifffile==2023.7.10",
|
| 687 |
+
"toml==0.10.2",
|
| 688 |
+
"tomli==2.2.1",
|
| 689 |
+
"tqdm==4.67.1",
|
| 690 |
+
"traits==7.0.2",
|
| 691 |
+
"transforms3d==0.4.2",
|
| 692 |
+
"typer==0.15.2",
|
| 693 |
+
"types-paramiko==3.5.0.20240928",
|
| 694 |
+
"types-requests==2.31.0.6",
|
| 695 |
+
"types-tabulate==0.9.0.20241207",
|
| 696 |
+
"types-toml==0.10.8.20240310",
|
| 697 |
+
"types-urllib3==1.26.25.14",
|
| 698 |
+
"typing_extensions==4.13.0",
|
| 699 |
+
"tzdata==2025.2",
|
| 700 |
+
"umf==0.10.0",
|
| 701 |
+
"uritemplate==4.1.1",
|
| 702 |
+
"urllib3==1.26.6",
|
| 703 |
+
"vispy==0.14.2",
|
| 704 |
+
"voluptuous==0.14.2",
|
| 705 |
+
"webdav4==0.10.0",
|
| 706 |
+
"websocket-client==0.59.0",
|
| 707 |
+
"wget==3.2",
|
| 708 |
+
"wrapt==1.12.1",
|
| 709 |
+
"xmltodict==0.12.0",
|
| 710 |
+
"yarl==1.15.2",
|
| 711 |
+
"zc.lockfile==3.0.post1",
|
| 712 |
+
"zipp==3.20.2"
|
| 713 |
+
],
|
| 714 |
+
"3.9.21": [
|
| 715 |
+
"Brotli==1.1.0",
|
| 716 |
+
"Cartopy==0.23.0",
|
| 717 |
+
"Cython==3.0.12",
|
| 718 |
+
"Deprecated==1.2.18",
|
| 719 |
+
"Flask-Compress==1.17",
|
| 720 |
+
"Flask==3.1.0",
|
| 721 |
+
"Jinja2==3.1.6",
|
| 722 |
+
"Markdown==3.7",
|
| 723 |
+
"MarkupSafe==3.0.2",
|
| 724 |
+
"Pint==0.24.4",
|
| 725 |
+
"PyJWT==2.10.1",
|
| 726 |
+
"PyPDF2==3.0.1",
|
| 727 |
+
"PySocks==1.7.1",
|
| 728 |
+
"PyYAML==6.0.2",
|
| 729 |
+
"Pygments==2.19.1",
|
| 730 |
+
"Pympler==1.1",
|
| 731 |
+
"Send2Trash==1.8.3",
|
| 732 |
+
"Sphinx==7.3.7",
|
| 733 |
+
"Sphinx==7.4.7",
|
| 734 |
+
"Unidecode==1.3.8",
|
| 735 |
+
"Werkzeug==3.1.3",
|
| 736 |
+
"absl-py==2.2.1",
|
| 737 |
+
"alabaster==0.7.16",
|
| 738 |
+
"annotated-types==0.7.0",
|
| 739 |
+
"antimeridian==0.3.8",
|
| 740 |
+
"anyio==4.9.0",
|
| 741 |
+
"anytree==2.12.1",
|
| 742 |
+
"appdirs==1.4.4",
|
| 743 |
+
"argcomplete==3.6.1",
|
| 744 |
+
"argon2-cffi-bindings==21.2.0",
|
| 745 |
+
"argon2-cffi==23.1.0",
|
| 746 |
+
"arrow==1.3.0",
|
| 747 |
+
"arviz==0.17.1",
|
| 748 |
+
"asttokens==3.0.0",
|
| 749 |
+
"asv==0.6.3",
|
| 750 |
+
"asv_runner==0.2.1",
|
| 751 |
+
"async-lru==2.0.5",
|
| 752 |
+
"attrs==25.3.0",
|
| 753 |
+
"audb==1.11.3",
|
| 754 |
+
"audbackend==2.2.2",
|
| 755 |
+
"audeer==2.2.1",
|
| 756 |
+
"audformat==1.3.1",
|
| 757 |
+
"audinterface==1.2.3",
|
| 758 |
+
"audiofile==1.5.1",
|
| 759 |
+
"audmath==1.4.1",
|
| 760 |
+
"audobject==0.7.11",
|
| 761 |
+
"audresample==1.3.3",
|
| 762 |
+
"autoflake==2.3.1",
|
| 763 |
+
"autograd==1.7.0",
|
| 764 |
+
"autoray==0.7.1",
|
| 765 |
+
"babel==2.17.0",
|
| 766 |
+
"beautifulsoup4==4.13.3",
|
| 767 |
+
"bibtexparser==2.0.0b8",
|
| 768 |
+
"black==20.8b1",
|
| 769 |
+
"black==25.1.0",
|
| 770 |
+
"bleach==6.2.0",
|
| 771 |
+
"blinker==1.9.0",
|
| 772 |
+
"bokeh==3.4.3",
|
| 773 |
+
"bs4==0.0.2",
|
| 774 |
+
"build==1.2.2.post1",
|
| 775 |
+
"casadi==3.7.0",
|
| 776 |
+
"certifi==2025.1.31",
|
| 777 |
+
"cffi==1.17.1",
|
| 778 |
+
"cfgv==3.4.0",
|
| 779 |
+
"cftime==1.6.4.post1",
|
| 780 |
+
"chardet==3.0.4",
|
| 781 |
+
"chardet==5.2.0",
|
| 782 |
+
"charset-normalizer==3.4.1",
|
| 783 |
+
"chex==0.1.89",
|
| 784 |
+
"click==8.1.8",
|
| 785 |
+
"clldutils==3.24.2",
|
| 786 |
+
"cloudpickle==3.1.1",
|
| 787 |
+
"colorama==0.4.6",
|
| 788 |
+
"colorcet==3.1.0",
|
| 789 |
+
"colorlog==6.9.0",
|
| 790 |
+
"colorspacious==1.1.2",
|
| 791 |
+
"comm==0.2.2",
|
| 792 |
+
"contourpy==1.2.1",
|
| 793 |
+
"contourpy==1.3.0",
|
| 794 |
+
"cotengra==0.7.1",
|
| 795 |
+
"coverage==7.8.0",
|
| 796 |
+
"cryptography==44.0.2",
|
| 797 |
+
"cssselect2==0.8.0",
|
| 798 |
+
"cssselect==1.3.0",
|
| 799 |
+
"csvw==3.5.1",
|
| 800 |
+
"cycler==0.12.1",
|
| 801 |
+
"cytoolz==1.0.1",
|
| 802 |
+
"dash_core_components==1.0.0",
|
| 803 |
+
"dash_html_components==1.0.0",
|
| 804 |
+
"dash_renderer==1.0.0",
|
| 805 |
+
"dash_table==4.0.0",
|
| 806 |
+
"dask-expr==1.1.10",
|
| 807 |
+
"dask==2024.8.0",
|
| 808 |
+
"datashader==0.17.0",
|
| 809 |
+
"debugpy==1.8.13",
|
| 810 |
+
"decorator==5.2.1",
|
| 811 |
+
"defusedxml==0.7.1",
|
| 812 |
+
"dill==0.3.9",
|
| 813 |
+
"distlib==0.3.9",
|
| 814 |
+
"dm-haiku==0.0.13",
|
| 815 |
+
"dm-tree==0.1.8",
|
| 816 |
+
"docutils==0.21.2",
|
| 817 |
+
"dohq-artifactory==1.0.0",
|
| 818 |
+
"duckdb==1.2.1",
|
| 819 |
+
"etils==1.5.2",
|
| 820 |
+
"eval_type_backport==0.2.2",
|
| 821 |
+
"exceptiongroup==1.2.2",
|
| 822 |
+
"execnet==2.1.1",
|
| 823 |
+
"executing==2.2.0",
|
| 824 |
+
"fake-useragent==2.1.0",
|
| 825 |
+
"fastjsonschema==2.21.1",
|
| 826 |
+
"filelock==3.18.0",
|
| 827 |
+
"flake8-docstrings==1.7.0",
|
| 828 |
+
"flake8==3.8.4",
|
| 829 |
+
"flake8==7.2.0",
|
| 830 |
+
"flax==0.8.5",
|
| 831 |
+
"flexcache==0.3",
|
| 832 |
+
"flexparser==0.4",
|
| 833 |
+
"fonttools==4.56.0",
|
| 834 |
+
"fqdn==1.5.1",
|
| 835 |
+
"fsspec==2025.3.1",
|
| 836 |
+
"funsor==0.4.5",
|
| 837 |
+
"galois==0.4.4",
|
| 838 |
+
"gast==0.6.0",
|
| 839 |
+
"geoviews==1.12.0",
|
| 840 |
+
"graphviz==0.20.3",
|
| 841 |
+
"green==4.0.2",
|
| 842 |
+
"guzzle_sphinx_theme==0.7.11",
|
| 843 |
+
"h11==0.14.0",
|
| 844 |
+
"h5netcdf==1.6.1",
|
| 845 |
+
"h5py==3.13.0",
|
| 846 |
+
"holoviews==1.20.2",
|
| 847 |
+
"html2text==2024.2.26",
|
| 848 |
+
"httpcore==1.0.7",
|
| 849 |
+
"httpx==0.28.1",
|
| 850 |
+
"humanize==4.12.2",
|
| 851 |
+
"identify==2.6.9",
|
| 852 |
+
"idna==2.10",
|
| 853 |
+
"idna==3.10",
|
| 854 |
+
"imageio==2.37.0",
|
| 855 |
+
"imagesize==1.4.1",
|
| 856 |
+
"importlib-metadata==4.13.0",
|
| 857 |
+
"importlib_metadata==8.6.1",
|
| 858 |
+
"importlib_resources==6.5.2",
|
| 859 |
+
"iniconfig==2.1.0",
|
| 860 |
+
"ipykernel==6.29.5",
|
| 861 |
+
"ipython-genutils==0.2.0",
|
| 862 |
+
"ipython==8.18.1",
|
| 863 |
+
"ipywidgets==7.8.5",
|
| 864 |
+
"ipywidgets==8.1.5",
|
| 865 |
+
"iso3166==2.1.1",
|
| 866 |
+
"iso639-lang==2.6.0",
|
| 867 |
+
"iso639==0.1.4",
|
| 868 |
+
"isodate==0.7.2",
|
| 869 |
+
"isoduration==20.11.0",
|
| 870 |
+
"isort==6.0.1",
|
| 871 |
+
"itsdangerous==2.2.0",
|
| 872 |
+
"jax==0.4.30",
|
| 873 |
+
"jaxlib==0.4.30",
|
| 874 |
+
"jaxns==2.4.8",
|
| 875 |
+
"jaxopt==0.8.3",
|
| 876 |
+
"jedi==0.19.2",
|
| 877 |
+
"jmp==0.0.4",
|
| 878 |
+
"joblib==1.4.2",
|
| 879 |
+
"json5==0.10.0",
|
| 880 |
+
"jsonpointer==3.0.0",
|
| 881 |
+
"jsonschema-specifications==2024.10.1",
|
| 882 |
+
"jsonschema==4.23.0",
|
| 883 |
+
"julia==0.6.2",
|
| 884 |
+
"jupyter-console==6.6.3",
|
| 885 |
+
"jupyter-events==0.12.0",
|
| 886 |
+
"jupyter-lsp==2.2.5",
|
| 887 |
+
"jupyter==1.1.1",
|
| 888 |
+
"jupyter_client==8.6.3",
|
| 889 |
+
"jupyter_core==5.7.2",
|
| 890 |
+
"jupyter_server==2.15.0",
|
| 891 |
+
"jupyter_server_terminals==0.5.3",
|
| 892 |
+
"jupyterlab==4.3.6",
|
| 893 |
+
"jupyterlab_pygments==0.3.0",
|
| 894 |
+
"jupyterlab_server==2.27.3",
|
| 895 |
+
"jupyterlab_widgets==1.1.11",
|
| 896 |
+
"jupyterlab_widgets==3.0.13",
|
| 897 |
+
"kiwisolver==1.4.7",
|
| 898 |
+
"language-tags==1.2.0",
|
| 899 |
+
"lark==1.1.9",
|
| 900 |
+
"latexcodec==3.0.0",
|
| 901 |
+
"lazy_loader==0.4",
|
| 902 |
+
"linkify-it-py==2.0.3",
|
| 903 |
+
"llvmlite==0.43.0",
|
| 904 |
+
"locket==1.0.0",
|
| 905 |
+
"lxml==5.3.1",
|
| 906 |
+
"makefun==1.15.6",
|
| 907 |
+
"markdown-it-py==3.0.0",
|
| 908 |
+
"matplotlib-inline==0.1.7",
|
| 909 |
+
"matplotlib==3.8.4",
|
| 910 |
+
"matplotlib==3.9.4",
|
| 911 |
+
"mccabe==0.6.1",
|
| 912 |
+
"mccabe==0.7.0",
|
| 913 |
+
"mdit-py-plugins==0.4.2",
|
| 914 |
+
"mdurl==0.1.2",
|
| 915 |
+
"mikecore==0.2.2",
|
| 916 |
+
"minio==7.2.15",
|
| 917 |
+
"mistune==3.1.3",
|
| 918 |
+
"ml_dtypes==0.5.1",
|
| 919 |
+
"mne==1.8.0",
|
| 920 |
+
"mpmath==1.3.0",
|
| 921 |
+
"msgpack==1.1.0",
|
| 922 |
+
"multipledispatch==1.0.0",
|
| 923 |
+
"mypy-extensions==1.0.0",
|
| 924 |
+
"mypy==0.790",
|
| 925 |
+
"mypy==1.15.0",
|
| 926 |
+
"mypy_extensions==0.4.4",
|
| 927 |
+
"narwhals==1.32.0",
|
| 928 |
+
"nbclient==0.10.2",
|
| 929 |
+
"nbconvert==7.16.6",
|
| 930 |
+
"nbformat==5.10.4",
|
| 931 |
+
"nbsphinx==0.9.7",
|
| 932 |
+
"nest-asyncio==1.6.0",
|
| 933 |
+
"netCDF4==1.7.2",
|
| 934 |
+
"networkx==3.2.1",
|
| 935 |
+
"nodeenv==1.9.1",
|
| 936 |
+
"notebook==7.3.3",
|
| 937 |
+
"notebook_shim==0.2.4",
|
| 938 |
+
"nox==2024.10.9",
|
| 939 |
+
"numba==0.60.0",
|
| 940 |
+
"numpy==1.22.0",
|
| 941 |
+
"numpy==1.26.4",
|
| 942 |
+
"numpy==2.0.2",
|
| 943 |
+
"numpydoc==1.8.0",
|
| 944 |
+
"opt_einsum==3.4.0",
|
| 945 |
+
"optax==0.2.4",
|
| 946 |
+
"orbax-checkpoint==0.6.4",
|
| 947 |
+
"outcome==1.3.0.post0",
|
| 948 |
+
"overrides==7.7.0",
|
| 949 |
+
"oyaml==1.0",
|
| 950 |
+
"packaging==24.2",
|
| 951 |
+
"pandas==2.0.3",
|
| 952 |
+
"pandas==2.2.3",
|
| 953 |
+
"pandocfilters==1.5.1",
|
| 954 |
+
"panel==1.4.5",
|
| 955 |
+
"param==2.2.0",
|
| 956 |
+
"parameterized==0.9.0",
|
| 957 |
+
"parse==1.20.2",
|
| 958 |
+
"parso==0.8.4",
|
| 959 |
+
"partd==1.4.2",
|
| 960 |
+
"pathlib==1.0.1",
|
| 961 |
+
"pathspec==0.12.1",
|
| 962 |
+
"pbr==6.1.1",
|
| 963 |
+
"pdfminer.six==20250327",
|
| 964 |
+
"pdfplumber==0.11.6",
|
| 965 |
+
"pdoc==15.0.1",
|
| 966 |
+
"percy==2.0.2",
|
| 967 |
+
"pexpect==4.9.0",
|
| 968 |
+
"pikepdf==9.5.2",
|
| 969 |
+
"pillow==11.1.0",
|
| 970 |
+
"platformdirs==4.3.7",
|
| 971 |
+
"plotly==6.0.1",
|
| 972 |
+
"pluggy==0.13.1",
|
| 973 |
+
"pluggy==1.5.0",
|
| 974 |
+
"pooch==1.8.2",
|
| 975 |
+
"pre_commit==4.2.0",
|
| 976 |
+
"prometheus_client==0.21.1",
|
| 977 |
+
"prompt_toolkit==3.0.50",
|
| 978 |
+
"protobuf==6.30.2",
|
| 979 |
+
"psutil==7.0.0",
|
| 980 |
+
"ptyprocess==0.7.0",
|
| 981 |
+
"pure_eval==0.2.3",
|
| 982 |
+
"py4j==0.10.9.7",
|
| 983 |
+
"py==1.11.0",
|
| 984 |
+
"pyarrow==19.0.1",
|
| 985 |
+
"pybtex==0.24.0",
|
| 986 |
+
"pycodestyle==2.13.0",
|
| 987 |
+
"pycodestyle==2.6.0",
|
| 988 |
+
"pycparser==2.22",
|
| 989 |
+
"pycryptodome==3.22.0",
|
| 990 |
+
"pyct==0.5.0",
|
| 991 |
+
"pydantic==2.11.1",
|
| 992 |
+
"pydantic_core==2.33.0",
|
| 993 |
+
"pydocstyle==3.0.0",
|
| 994 |
+
"pydyf==0.11.0",
|
| 995 |
+
"pyee==11.1.1",
|
| 996 |
+
"pyflakes==2.2.0",
|
| 997 |
+
"pyflakes==3.3.1",
|
| 998 |
+
"pylab-sdk==1.7.2",
|
| 999 |
+
"pylatexenc==2.10",
|
| 1000 |
+
"pyparsing==3.2.3",
|
| 1001 |
+
"pypdfium2==4.30.1",
|
| 1002 |
+
"pyperclip==1.9.0",
|
| 1003 |
+
"pyphen==0.17.2",
|
| 1004 |
+
"pyppeteer==2.0.0",
|
| 1005 |
+
"pyproj==3.6.1",
|
| 1006 |
+
"pyproject_hooks==1.2.0",
|
| 1007 |
+
"pyquery==2.0.1",
|
| 1008 |
+
"pyright==1.1.398",
|
| 1009 |
+
"pyro-api==0.1.2",
|
| 1010 |
+
"pyshp==2.3.1",
|
| 1011 |
+
"pyspark==3.5.5",
|
| 1012 |
+
"pytest-asyncio==0.26.0",
|
| 1013 |
+
"pytest-cov==6.0.0",
|
| 1014 |
+
"pytest-doctestplus==1.4.0",
|
| 1015 |
+
"pytest-mock==3.14.0",
|
| 1016 |
+
"pytest-mpl==0.17.0",
|
| 1017 |
+
"pytest-rerunfailures==15.0",
|
| 1018 |
+
"pytest-sugar==1.0.0",
|
| 1019 |
+
"pytest-timeout==2.3.1",
|
| 1020 |
+
"pytest-xdist==3.6.1",
|
| 1021 |
+
"pytest==6.1.1",
|
| 1022 |
+
"pytest==8.3.5",
|
| 1023 |
+
"python-dateutil==2.9.0.post0",
|
| 1024 |
+
"python-json-logger==3.3.0",
|
| 1025 |
+
"pytz==2025.2",
|
| 1026 |
+
"pyviz_comms==3.0.4",
|
| 1027 |
+
"pyzmq==26.3.0",
|
| 1028 |
+
"pyzx==0.8.0",
|
| 1029 |
+
"qiskit-aer==0.17.0",
|
| 1030 |
+
"qiskit==1.4.2",
|
| 1031 |
+
"quimb==1.10.0",
|
| 1032 |
+
"rdflib==7.1.4",
|
| 1033 |
+
"readability-lxml==0.8.1",
|
| 1034 |
+
"readthedocs-sphinx-search==0.3.2",
|
| 1035 |
+
"referencing==0.36.2",
|
| 1036 |
+
"regex==2024.11.6",
|
| 1037 |
+
"requests-html==0.10.0",
|
| 1038 |
+
"requests==2.24.0",
|
| 1039 |
+
"requests==2.32.3",
|
| 1040 |
+
"retrying==1.3.4",
|
| 1041 |
+
"rfc3339-validator==0.1.4",
|
| 1042 |
+
"rfc3986-validator==0.1.1",
|
| 1043 |
+
"rfc3986==1.5.0",
|
| 1044 |
+
"rich==14.0.0",
|
| 1045 |
+
"rpds-py==0.24.0",
|
| 1046 |
+
"rstcheck-core==1.2.1",
|
| 1047 |
+
"rstcheck==6.2.4",
|
| 1048 |
+
"ruff==0.11.2",
|
| 1049 |
+
"rustworkx==0.16.0",
|
| 1050 |
+
"scikit-fem==10.0.2",
|
| 1051 |
+
"scikit-image==0.24.0",
|
| 1052 |
+
"scikit-learn==1.6.1",
|
| 1053 |
+
"scipy==1.11.4",
|
| 1054 |
+
"scipy==1.13.1",
|
| 1055 |
+
"seaborn==0.13.2",
|
| 1056 |
+
"segments==2.2.0",
|
| 1057 |
+
"selenium==4.30.0",
|
| 1058 |
+
"setuptools-scm==8.2.0",
|
| 1059 |
+
"shapely==2.0.7",
|
| 1060 |
+
"shellingham==1.5.4",
|
| 1061 |
+
"six==1.17.0",
|
| 1062 |
+
"sniffio==1.3.1",
|
| 1063 |
+
"snowballstemmer==2.2.0",
|
| 1064 |
+
"sortedcontainers==2.4.0",
|
| 1065 |
+
"soundfile==0.13.1",
|
| 1066 |
+
"soupsieve==2.6",
|
| 1067 |
+
"spatialpandas==0.4.10",
|
| 1068 |
+
"sphinx-copybutton==0.5.2",
|
| 1069 |
+
"sphinx-gallery==0.19.0",
|
| 1070 |
+
"sphinx-rtd-theme==3.0.2",
|
| 1071 |
+
"sphinxcontrib-applehelp==2.0.0",
|
| 1072 |
+
"sphinxcontrib-devhelp==2.0.0",
|
| 1073 |
+
"sphinxcontrib-htmlhelp==2.1.0",
|
| 1074 |
+
"sphinxcontrib-jquery==4.1",
|
| 1075 |
+
"sphinxcontrib-jsmath==1.0.1",
|
| 1076 |
+
"sphinxcontrib-qthelp==2.0.0",
|
| 1077 |
+
"sphinxcontrib-serializinghtml==2.0.0",
|
| 1078 |
+
"sphinxcontrib-svg2pdfconverter==1.3.0",
|
| 1079 |
+
"stack-data==0.6.3",
|
| 1080 |
+
"stevedore==5.4.1",
|
| 1081 |
+
"symengine==0.13.0",
|
| 1082 |
+
"sympy==1.13.3",
|
| 1083 |
+
"tabulate==0.9.0",
|
| 1084 |
+
"tensorflow-probability==0.25.0",
|
| 1085 |
+
"tensorstore==0.1.69",
|
| 1086 |
+
"termcolor==2.5.0",
|
| 1087 |
+
"terminado==0.18.1",
|
| 1088 |
+
"threadpoolctl==3.6.0",
|
| 1089 |
+
"tifffile==2024.8.30",
|
| 1090 |
+
"tinycss2==1.4.0",
|
| 1091 |
+
"tinyhtml5==2.0.0",
|
| 1092 |
+
"titlecase==2.4.1",
|
| 1093 |
+
"toml==0.10.2",
|
| 1094 |
+
"tomli==2.2.1",
|
| 1095 |
+
"toolz==1.0.0",
|
| 1096 |
+
"tornado==6.4.2",
|
| 1097 |
+
"tqdm==4.67.1",
|
| 1098 |
+
"traitlets==5.14.3",
|
| 1099 |
+
"trio-websocket==0.12.2",
|
| 1100 |
+
"trio==0.29.0",
|
| 1101 |
+
"typed-ast==1.4.3",
|
| 1102 |
+
"typer==0.15.2",
|
| 1103 |
+
"types-networkx==3.4.2.20250319",
|
| 1104 |
+
"types-psutil==7.0.0.20250218",
|
| 1105 |
+
"types-python-dateutil==2.9.0.20241206",
|
| 1106 |
+
"typing-inspection==0.4.0",
|
| 1107 |
+
"typing_extensions==4.13.0",
|
| 1108 |
+
"tzdata==2025.2",
|
| 1109 |
+
"uc-micro-py==1.0.3",
|
| 1110 |
+
"unicodedataplus==13.0.0.post2",
|
| 1111 |
+
"uri-template==1.3.0",
|
| 1112 |
+
"uritemplate==4.1.1",
|
| 1113 |
+
"urllib3==1.25.11",
|
| 1114 |
+
"urllib3==2.3.0",
|
| 1115 |
+
"virtualenv==20.29.3",
|
| 1116 |
+
"virtualenv==20.30.0",
|
| 1117 |
+
"w3lib==2.3.1",
|
| 1118 |
+
"waitress==3.0.2",
|
| 1119 |
+
"wcwidth==0.2.13",
|
| 1120 |
+
"weasyprint==65.0",
|
| 1121 |
+
"webcolors==24.11.1",
|
| 1122 |
+
"webencodings==0.5.1",
|
| 1123 |
+
"websocket-client==1.8.0",
|
| 1124 |
+
"websockets==10.4",
|
| 1125 |
+
"widgetsnbextension==3.6.10",
|
| 1126 |
+
"widgetsnbextension==4.0.13",
|
| 1127 |
+
"wordcloud==1.9.4",
|
| 1128 |
+
"wrapt==1.17.2",
|
| 1129 |
+
"wsproto==1.2.0",
|
| 1130 |
+
"xarray-einstats==0.7.0",
|
| 1131 |
+
"xarray==2024.7.0",
|
| 1132 |
+
"xyzservices==2025.1.0",
|
| 1133 |
+
"zipp==3.21.0",
|
| 1134 |
+
"zopfli==0.2.3.post1",
|
| 1135 |
+
"zstandard==0.23.0"
|
| 1136 |
+
],
|
| 1137 |
+
"3.7.16": [
|
| 1138 |
+
"Babel==2.14.0",
|
| 1139 |
+
"HeapDict==1.0.1",
|
| 1140 |
+
"Jinja2==3.1.6",
|
| 1141 |
+
"MarkupSafe==2.1.5",
|
| 1142 |
+
"Pillow==7.2.0",
|
| 1143 |
+
"Pillow==9.5.0",
|
| 1144 |
+
"PyJWT==1.7.1",
|
| 1145 |
+
"PyMySQL==0.9.2",
|
| 1146 |
+
"PyYAML==5.3.1",
|
| 1147 |
+
"PyYAML==6.0.1",
|
| 1148 |
+
"Pygments==2.17.2",
|
| 1149 |
+
"SQLAlchemy==1.3.19",
|
| 1150 |
+
"SQLAlchemy==2.0.40",
|
| 1151 |
+
"SecretStorage==3.3.3",
|
| 1152 |
+
"Send2Trash==1.8.3",
|
| 1153 |
+
"Sphinx==5.3.0",
|
| 1154 |
+
"aiobotocore==2.4.2",
|
| 1155 |
+
"aiofiles==22.1.0",
|
| 1156 |
+
"aiohttp==3.8.6",
|
| 1157 |
+
"aioitertools==0.11.0",
|
| 1158 |
+
"aiokafka==0.8.0",
|
| 1159 |
+
"aiomysql==0.0.22",
|
| 1160 |
+
"aioodbc==0.3.3",
|
| 1161 |
+
"aiopg==0.16.0",
|
| 1162 |
+
"aioresponses==0.6.0",
|
| 1163 |
+
"aiosignal==1.3.1",
|
| 1164 |
+
"aiosmtplib==1.1.7",
|
| 1165 |
+
"aiosqlite==0.19.0",
|
| 1166 |
+
"alabaster==0.7.13",
|
| 1167 |
+
"anyio==3.7.1",
|
| 1168 |
+
"appdirs==1.4.4",
|
| 1169 |
+
"apptools==5.2.1",
|
| 1170 |
+
"argon2-cffi-bindings==21.2.0",
|
| 1171 |
+
"argon2-cffi==23.1.0",
|
| 1172 |
+
"arrow==1.2.3",
|
| 1173 |
+
"asab==19.11",
|
| 1174 |
+
"astroid==2.15.8",
|
| 1175 |
+
"async-timeout==4.0.3",
|
| 1176 |
+
"asyncssh==2.0.1",
|
| 1177 |
+
"asynctest==0.13.0",
|
| 1178 |
+
"attrs==20.2.0",
|
| 1179 |
+
"attrs==24.2.0",
|
| 1180 |
+
"backcall==0.2.0",
|
| 1181 |
+
"beautifulsoup4==4.13.3",
|
| 1182 |
+
"black==23.3.0",
|
| 1183 |
+
"bleach==6.0.0",
|
| 1184 |
+
"bokeh==2.4.3",
|
| 1185 |
+
"botocore==1.27.59",
|
| 1186 |
+
"cached-property==1.5.2",
|
| 1187 |
+
"cachetools==5.5.2",
|
| 1188 |
+
"certifi==2020.6.20",
|
| 1189 |
+
"cffi==1.15.1",
|
| 1190 |
+
"cfgv==3.1.0",
|
| 1191 |
+
"chardet==3.0.4",
|
| 1192 |
+
"charset-normalizer==3.4.1",
|
| 1193 |
+
"click==8.1.8",
|
| 1194 |
+
"cloudpickle==2.2.1",
|
| 1195 |
+
"colorama==0.4.6",
|
| 1196 |
+
"comm==0.1.4",
|
| 1197 |
+
"configobj==5.0.9",
|
| 1198 |
+
"coverage==4.5.4",
|
| 1199 |
+
"coverage==5.2.1",
|
| 1200 |
+
"coverage==7.2.7",
|
| 1201 |
+
"cryptography==44.0.2",
|
| 1202 |
+
"cycler==0.10.0",
|
| 1203 |
+
"cycler==0.11.0",
|
| 1204 |
+
"dask-glm==0.3.2",
|
| 1205 |
+
"dask-xgboost==0.2.0",
|
| 1206 |
+
"dask==2.19.0",
|
| 1207 |
+
"dask==2022.2.0",
|
| 1208 |
+
"debugpy==1.7.0",
|
| 1209 |
+
"decorator==5.1.1",
|
| 1210 |
+
"defusedxml==0.7.1",
|
| 1211 |
+
"dill==0.3.7",
|
| 1212 |
+
"distlib==0.3.9",
|
| 1213 |
+
"distributed==2.19.0",
|
| 1214 |
+
"distributed==2022.2.0",
|
| 1215 |
+
"docutils==0.19",
|
| 1216 |
+
"dohq-artifactory==0.7.382",
|
| 1217 |
+
"entrypoints==0.4",
|
| 1218 |
+
"envisage==7.0.3",
|
| 1219 |
+
"et-xmlfile==1.1.0",
|
| 1220 |
+
"exceptiongroup==1.2.2",
|
| 1221 |
+
"execnet==2.0.2",
|
| 1222 |
+
"fastavro==0.24.2",
|
| 1223 |
+
"fastjsonschema==2.21.1",
|
| 1224 |
+
"feather-format==0.4.1",
|
| 1225 |
+
"filelock==3.12.2",
|
| 1226 |
+
"flake8==5.0.4",
|
| 1227 |
+
"fonttools==4.38.0",
|
| 1228 |
+
"fqdn==1.5.1",
|
| 1229 |
+
"frozenlist==1.3.3",
|
| 1230 |
+
"fsspec==2023.1.0",
|
| 1231 |
+
"google-api-core==1.34.1",
|
| 1232 |
+
"google-api-core==2.24.2",
|
| 1233 |
+
"google-api-python-client==1.12.11",
|
| 1234 |
+
"google-auth-httplib2==0.2.0",
|
| 1235 |
+
"google-auth-oauthlib==1.2.1",
|
| 1236 |
+
"google-auth==2.38.0",
|
| 1237 |
+
"google-cloud-bigquery-storage==1.1.2",
|
| 1238 |
+
"google-cloud-bigquery==1.27.2",
|
| 1239 |
+
"google-cloud-core==1.5.0",
|
| 1240 |
+
"google-crc32c==1.5.0",
|
| 1241 |
+
"google-resumable-media==1.3.3",
|
| 1242 |
+
"google==3.0.0",
|
| 1243 |
+
"googleapis-common-protos==1.69.2",
|
| 1244 |
+
"greenlet==3.1.1",
|
| 1245 |
+
"grpcio-status==1.48.2",
|
| 1246 |
+
"grpcio==1.62.3",
|
| 1247 |
+
"h5py==3.8.0",
|
| 1248 |
+
"httplib2==0.22.0",
|
| 1249 |
+
"identify==1.4.25",
|
| 1250 |
+
"idna==2.10",
|
| 1251 |
+
"idna==3.10",
|
| 1252 |
+
"imagesize==1.4.1",
|
| 1253 |
+
"importlib-metadata==4.13.0",
|
| 1254 |
+
"importlib-metadata==4.2.0",
|
| 1255 |
+
"importlib-metadata==6.7.0",
|
| 1256 |
+
"importlib-resources==5.12.0",
|
| 1257 |
+
"iniconfig==1.0.0",
|
| 1258 |
+
"iniconfig==2.0.0",
|
| 1259 |
+
"ipykernel==6.16.2",
|
| 1260 |
+
"ipython-genutils==0.2.0",
|
| 1261 |
+
"ipython==7.34.0",
|
| 1262 |
+
"ipywidgets==8.1.5",
|
| 1263 |
+
"isoduration==20.11.0",
|
| 1264 |
+
"isort==5.11.5",
|
| 1265 |
+
"jaraco.classes==3.2.3",
|
| 1266 |
+
"jedi==0.19.2",
|
| 1267 |
+
"jeepney==0.9.0",
|
| 1268 |
+
"jmespath==1.0.1",
|
| 1269 |
+
"joblib==0.17.0",
|
| 1270 |
+
"joblib==1.3.2",
|
| 1271 |
+
"json5==0.9.16",
|
| 1272 |
+
"jsonpointer==3.0.0",
|
| 1273 |
+
"jsonschema==4.17.3",
|
| 1274 |
+
"jupyter-console==6.6.3",
|
| 1275 |
+
"jupyter-events==0.6.3",
|
| 1276 |
+
"jupyter-server==1.24.0",
|
| 1277 |
+
"jupyter-ydoc==0.2.5",
|
| 1278 |
+
"jupyter==1.1.1",
|
| 1279 |
+
"jupyter_client==7.4.9",
|
| 1280 |
+
"jupyter_core==4.12.0",
|
| 1281 |
+
"jupyter_server_fileid==0.9.3",
|
| 1282 |
+
"jupyter_server_ydoc==0.8.0",
|
| 1283 |
+
"jupyterlab-pygments==0.2.2",
|
| 1284 |
+
"jupyterlab==3.6.8",
|
| 1285 |
+
"jupyterlab_server==2.24.0",
|
| 1286 |
+
"jupyterlab_widgets==3.0.13",
|
| 1287 |
+
"kafka-python==2.1.4",
|
| 1288 |
+
"keyring==24.1.1",
|
| 1289 |
+
"kiwisolver==1.2.0",
|
| 1290 |
+
"kiwisolver==1.4.5",
|
| 1291 |
+
"lazy-object-proxy==1.9.0",
|
| 1292 |
+
"llvmlite==0.39.1",
|
| 1293 |
+
"locket==1.0.0",
|
| 1294 |
+
"lxml==5.3.1",
|
| 1295 |
+
"markdown-it-py==2.2.0",
|
| 1296 |
+
"matplotlib-inline==0.1.6",
|
| 1297 |
+
"matplotlib==3.2.2",
|
| 1298 |
+
"matplotlib==3.3.2",
|
| 1299 |
+
"matplotlib==3.5.3",
|
| 1300 |
+
"mayavi==4.8.1",
|
| 1301 |
+
"mccabe==0.7.0",
|
| 1302 |
+
"mdurl==0.1.2",
|
| 1303 |
+
"mistune==3.0.2",
|
| 1304 |
+
"mongoquery==1.4.2",
|
| 1305 |
+
"more-itertools==9.1.0",
|
| 1306 |
+
"motor==2.5.1",
|
| 1307 |
+
"msgpack==0.6.2",
|
| 1308 |
+
"msgpack==1.0.5",
|
| 1309 |
+
"multidict==6.0.5",
|
| 1310 |
+
"multipledispatch==1.0.0",
|
| 1311 |
+
"mypy-extensions==1.0.0",
|
| 1312 |
+
"mypy==1.4.1",
|
| 1313 |
+
"mysql-replication==0.25",
|
| 1314 |
+
"nbclassic==1.2.0",
|
| 1315 |
+
"nbclient==0.7.4",
|
| 1316 |
+
"nbconvert==7.6.0",
|
| 1317 |
+
"nbformat==5.8.0",
|
| 1318 |
+
"nest-asyncio==1.6.0",
|
| 1319 |
+
"nibabel==4.0.2",
|
| 1320 |
+
"nodeenv==1.4.0",
|
| 1321 |
+
"nose-timer==1.0.1",
|
| 1322 |
+
"nose==1.3.7",
|
| 1323 |
+
"notebook==6.5.7",
|
| 1324 |
+
"notebook_shim==0.2.4",
|
| 1325 |
+
"numba==0.56.4",
|
| 1326 |
+
"numexpr==2.8.6",
|
| 1327 |
+
"numpy==1.19.2",
|
| 1328 |
+
"numpy==1.21.6",
|
| 1329 |
+
"numpydoc==1.5.0",
|
| 1330 |
+
"oauthlib==3.2.2",
|
| 1331 |
+
"openpyxl==3.1.3",
|
| 1332 |
+
"packaging==24.0",
|
| 1333 |
+
"pandas-gbq==0.15.0",
|
| 1334 |
+
"pandas==0.25.3",
|
| 1335 |
+
"pandas==1.0.5",
|
| 1336 |
+
"pandas==1.1.3",
|
| 1337 |
+
"pandas==1.3.5",
|
| 1338 |
+
"pandocfilters==1.5.1",
|
| 1339 |
+
"parso==0.8.4",
|
| 1340 |
+
"partd==1.4.1",
|
| 1341 |
+
"pathlib==1.0.1",
|
| 1342 |
+
"pathspec==0.11.2",
|
| 1343 |
+
"pexpect==4.9.0",
|
| 1344 |
+
"pickleshare==0.7.5",
|
| 1345 |
+
"pika==1.3.2",
|
| 1346 |
+
"pkginfo==1.10.0",
|
| 1347 |
+
"pkgutil_resolve_name==1.3.10",
|
| 1348 |
+
"platformdirs==4.0.0",
|
| 1349 |
+
"pluggy==0.13.1",
|
| 1350 |
+
"pluggy==1.2.0",
|
| 1351 |
+
"pre-commit==2.7.1",
|
| 1352 |
+
"prometheus-client==0.17.1",
|
| 1353 |
+
"prompt_toolkit==3.0.48",
|
| 1354 |
+
"proto-plus==1.26.1",
|
| 1355 |
+
"protobuf==3.20.3",
|
| 1356 |
+
"protobuf==4.24.4",
|
| 1357 |
+
"psutil==5.6.6",
|
| 1358 |
+
"psutil==7.0.0",
|
| 1359 |
+
"psycopg2-binary==2.9.9",
|
| 1360 |
+
"ptyprocess==0.7.0",
|
| 1361 |
+
"py-spy==0.4.0",
|
| 1362 |
+
"py==1.11.0",
|
| 1363 |
+
"py==1.9.0",
|
| 1364 |
+
"pyaml==20.4.0",
|
| 1365 |
+
"pyarrow==0.16.0",
|
| 1366 |
+
"pyasn1-modules==0.3.0",
|
| 1367 |
+
"pyasn1==0.5.1",
|
| 1368 |
+
"pycodestyle==2.9.1",
|
| 1369 |
+
"pycparser==2.21",
|
| 1370 |
+
"pydata-google-auth==1.8.2",
|
| 1371 |
+
"pydocstyle==6.3.0",
|
| 1372 |
+
"pyface==8.0.0",
|
| 1373 |
+
"pyflakes==2.5.0",
|
| 1374 |
+
"pylint==2.17.7",
|
| 1375 |
+
"pymongo==3.13.0",
|
| 1376 |
+
"pyodbc==4.0.39",
|
| 1377 |
+
"pyparsing==2.4.7",
|
| 1378 |
+
"pyparsing==3.1.4",
|
| 1379 |
+
"pyrsistent==0.19.3",
|
| 1380 |
+
"pysurfer==0.11.2",
|
| 1381 |
+
"pytest-cov==2.10.1",
|
| 1382 |
+
"pytest-cov==4.1.0",
|
| 1383 |
+
"pytest-custom-exit-code==0.3.0",
|
| 1384 |
+
"pytest-html==3.2.0",
|
| 1385 |
+
"pytest-metadata==3.0.0",
|
| 1386 |
+
"pytest-mock==3.11.1",
|
| 1387 |
+
"pytest-testmon==1.2.3",
|
| 1388 |
+
"pytest-xdist==3.5.0",
|
| 1389 |
+
"pytest==6.1.1",
|
| 1390 |
+
"pytest==7.4.4",
|
| 1391 |
+
"python-dateutil==2.8.1",
|
| 1392 |
+
"python-dateutil==2.9.0.post0",
|
| 1393 |
+
"python-json-logger==3.0.1",
|
| 1394 |
+
"pytz==2019.3",
|
| 1395 |
+
"pytz==2020.1",
|
| 1396 |
+
"pytz==2025.2",
|
| 1397 |
+
"pyzmq==26.2.1",
|
| 1398 |
+
"ray==0.8.6",
|
| 1399 |
+
"readme-renderer==37.3",
|
| 1400 |
+
"redis==3.4.1",
|
| 1401 |
+
"requests-oauthlib==2.0.0",
|
| 1402 |
+
"requests-toolbelt==1.0.0",
|
| 1403 |
+
"requests==2.24.0",
|
| 1404 |
+
"requests==2.31.0",
|
| 1405 |
+
"rfc3339-validator==0.1.4",
|
| 1406 |
+
"rfc3986-validator==0.1.1",
|
| 1407 |
+
"rfc3986==2.0.0",
|
| 1408 |
+
"rich==13.8.1",
|
| 1409 |
+
"rsa==4.9",
|
| 1410 |
+
"s3fs==2023.1.0",
|
| 1411 |
+
"scikit-learn==0.23.1",
|
| 1412 |
+
"scikit-learn==1.0.2",
|
| 1413 |
+
"scikit-optimize==0.8.1",
|
| 1414 |
+
"scipy==1.5.2",
|
| 1415 |
+
"scipy==1.7.3",
|
| 1416 |
+
"six==1.15.0",
|
| 1417 |
+
"six==1.17.0",
|
| 1418 |
+
"sniffio==1.3.1",
|
| 1419 |
+
"snowballstemmer==2.2.0",
|
| 1420 |
+
"sortedcontainers==2.4.0",
|
| 1421 |
+
"soupsieve==2.4.1",
|
| 1422 |
+
"sparse==0.13.0",
|
| 1423 |
+
"sphinx-rtd-theme==2.0.0",
|
| 1424 |
+
"sphinxcontrib-applehelp==1.0.2",
|
| 1425 |
+
"sphinxcontrib-devhelp==1.0.2",
|
| 1426 |
+
"sphinxcontrib-htmlhelp==2.0.0",
|
| 1427 |
+
"sphinxcontrib-jquery==4.1",
|
| 1428 |
+
"sphinxcontrib-jsmath==1.0.1",
|
| 1429 |
+
"sphinxcontrib-qthelp==1.0.3",
|
| 1430 |
+
"sphinxcontrib-serializinghtml==1.1.5",
|
| 1431 |
+
"tables==3.7.0",
|
| 1432 |
+
"tblib==2.0.0",
|
| 1433 |
+
"terminado==0.17.1",
|
| 1434 |
+
"threadpoolctl==2.1.0",
|
| 1435 |
+
"threadpoolctl==3.1.0",
|
| 1436 |
+
"tinycss2==1.2.1",
|
| 1437 |
+
"toml==0.10.1",
|
| 1438 |
+
"tomli==2.0.1",
|
| 1439 |
+
"tomlkit==0.12.5",
|
| 1440 |
+
"toolz==0.12.1",
|
| 1441 |
+
"tornado==6.2",
|
| 1442 |
+
"tox==3.28.0",
|
| 1443 |
+
"tqdm==4.67.1",
|
| 1444 |
+
"traitlets==5.9.0",
|
| 1445 |
+
"traits==6.4.3",
|
| 1446 |
+
"traitsui==8.0.0",
|
| 1447 |
+
"twine==4.0.2",
|
| 1448 |
+
"typed-ast==1.5.5",
|
| 1449 |
+
"typing_extensions==4.7.1",
|
| 1450 |
+
"uri-template==1.3.0",
|
| 1451 |
+
"uritemplate==3.0.1",
|
| 1452 |
+
"urllib3==1.25.10",
|
| 1453 |
+
"urllib3==1.26.20",
|
| 1454 |
+
"urllib3==2.0.7",
|
| 1455 |
+
"virtualenv==20.26.6",
|
| 1456 |
+
"vtk==9.3.1",
|
| 1457 |
+
"wcwidth==0.2.13",
|
| 1458 |
+
"webcolors==1.13",
|
| 1459 |
+
"webencodings==0.5.1",
|
| 1460 |
+
"websocket-client==1.6.1",
|
| 1461 |
+
"widgetsnbextension==4.0.13",
|
| 1462 |
+
"wrapt==1.16.0",
|
| 1463 |
+
"xarray==0.19.0",
|
| 1464 |
+
"xgboost==0.90",
|
| 1465 |
+
"xlrd==2.0.1",
|
| 1466 |
+
"y-py==0.6.2",
|
| 1467 |
+
"yarl==1.9.4",
|
| 1468 |
+
"ypy-websocket==0.8.4",
|
| 1469 |
+
"zict==2.2.0",
|
| 1470 |
+
"zipp==3.15.0"
|
| 1471 |
+
]
|
| 1472 |
+
}
|
| 1473 |
+
}
|
swelego-real-data-verified_environment-reliable/patch.py
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|