Datasets:
Upload folder using huggingface_hub (part 19)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +95 -0
- github-release--github-release.2/environment/programgym-go.tar.gz +3 -0
- github-release--github-release.2/environment/workspace.tar.gz +3 -0
- github-release--github-release.2/instruction.md +98 -0
- github-release--github-release.2/solution/solve.sh +33 -0
- github-release--github-release.2/task.toml +69 -0
- github-release--github-release.2/tests/Dockerfile +66 -0
- github-release--github-release.2/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- github-release--github-release.2/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- github-release--github-release.2/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- github-release--github-release.2/tests/blobs/tests/generated_module_04.tar.gz +3 -0
- github-release--github-release.2/tests/download.sh +36 -0
- github-release--github-release.2/tests/executable +3 -0
- github-release--github-release.2/tests/programgym-go.tar.gz +3 -0
- github-release--github-release.2/tests/programgym_evaluator.py +1201 -0
- github-release--github-release.2/tests/programgym_task.json +1068 -0
- github-release--github-release.2/tests/test.sh +82 -0
- github-release--github-release.2/tests/workspace.tar.gz +3 -0
- githubnemo--compiledaemon.6cc7bd/environment/Dockerfile +60 -0
- githubnemo--compiledaemon.6cc7bd/environment/download.sh +170 -0
- githubnemo--compiledaemon.6cc7bd/environment/executable +3 -0
- githubnemo--compiledaemon.6cc7bd/environment/programgym-go.tar.gz +3 -0
- githubnemo--compiledaemon.6cc7bd/environment/workspace.tar.gz +3 -0
- githubnemo--compiledaemon.6cc7bd/instruction.md +98 -0
- githubnemo--compiledaemon.6cc7bd/solution/solve.sh +33 -0
- githubnemo--compiledaemon.6cc7bd/task.toml +69 -0
- githubnemo--compiledaemon.6cc7bd/tests/Dockerfile +68 -0
- githubnemo--compiledaemon.6cc7bd/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- githubnemo--compiledaemon.6cc7bd/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- githubnemo--compiledaemon.6cc7bd/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- githubnemo--compiledaemon.6cc7bd/tests/download.sh +170 -0
- githubnemo--compiledaemon.6cc7bd/tests/executable +3 -0
- githubnemo--compiledaemon.6cc7bd/tests/programgym-go.tar.gz +3 -0
- githubnemo--compiledaemon.6cc7bd/tests/programgym_evaluator.py +1201 -0
- githubnemo--compiledaemon.6cc7bd/tests/programgym_task.json +362 -0
- githubnemo--compiledaemon.6cc7bd/tests/test.sh +82 -0
- githubnemo--compiledaemon.6cc7bd/tests/workspace.tar.gz +3 -0
- glauth--glauth.be396ae/environment/Dockerfile +60 -0
- glauth--glauth.be396ae/environment/download.sh +269 -0
- glauth--glauth.be396ae/environment/executable +3 -0
- glauth--glauth.be396ae/environment/programgym-go.tar.gz +3 -0
- glauth--glauth.be396ae/environment/workspace.tar.gz +3 -0
- glauth--glauth.be396ae/instruction.md +98 -0
- glauth--glauth.be396ae/solution/solve.sh +33 -0
- glauth--glauth.be396ae/task.toml +69 -0
- glauth--glauth.be396ae/tests/Dockerfile +68 -0
- glauth--glauth.be396ae/tests/blobs/tests/generated_module_01.tar.gz +3 -0
- glauth--glauth.be396ae/tests/blobs/tests/generated_module_02.tar.gz +3 -0
- glauth--glauth.be396ae/tests/blobs/tests/generated_module_03.tar.gz +3 -0
- glauth--glauth.be396ae/tests/blobs/tests/generated_module_04.tar.gz +3 -0
.gitattributes
CHANGED
|
@@ -991,3 +991,98 @@ giacomo-b--cpprobotics.e2b5cda/tests/executable filter=lfs diff=lfs merge=lfs -t
|
|
| 991 |
git-time-metric--gtm.019de99/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 992 |
git-time-metric--gtm.019de99/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 993 |
github-release--github-release.2/environment/executable filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 991 |
git-time-metric--gtm.019de99/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 992 |
git-time-metric--gtm.019de99/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 993 |
github-release--github-release.2/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 994 |
+
github-release--github-release.2/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 995 |
+
githubnemo--compiledaemon.6cc7bd/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 996 |
+
githubnemo--compiledaemon.6cc7bd/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 997 |
+
glauth--glauth.be396ae/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 998 |
+
glauth--glauth.be396ae/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 999 |
+
glitchedgitz--cook.f72413d/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1000 |
+
glitchedgitz--cook.f72413d/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1001 |
+
gnewton--chidley.09b9269/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1002 |
+
gnewton--chidley.09b9269/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1003 |
+
go-chi--chi.3b50c7c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1004 |
+
go-chi--chi.3b50c7c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1005 |
+
go-chi--httplog.d7ffa0c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1006 |
+
go-chi--httplog.d7ffa0c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1007 |
+
go-ffmt--ffmt.6890275/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1008 |
+
go-ffmt--ffmt.6890275/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1009 |
+
go-godo--godo.b0de4ae/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1010 |
+
go-godo--godo.b0de4ae/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1011 |
+
go-internals-cn--go-internals.09/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1012 |
+
go-internals-cn--go-internals.09/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1013 |
+
go-nunu--nunu.ba07a4e/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1014 |
+
go-nunu--nunu.ba07a4e/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1015 |
+
go-playground--log.10609b0/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1016 |
+
go-playground--log.10609b0/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1017 |
+
go-zoo--bone.31c3a0b/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1018 |
+
go-zoo--bone.31c3a0b/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1019 |
+
gobeam--stringy.be56039/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1020 |
+
gobeam--stringy.be56039/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1021 |
+
goburrow--cache.f6da914/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1022 |
+
goburrow--cache.f6da914/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1023 |
+
gocarina--gocsv.0735908/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1024 |
+
gocarina--gocsv.0735908/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1025 |
+
godarch--darch.e5fb188/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1026 |
+
godarch--darch.e5fb188/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1027 |
+
goforj--godump.e318536/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1028 |
+
goforj--godump.e318536/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1029 |
+
gogo--letmegrpc.94d4ada/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1030 |
+
gogo--letmegrpc.94d4ada/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1031 |
+
gohouse--converter.c482c70/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1032 |
+
gohouse--converter.c482c70/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1033 |
+
golang--snappy.43d5d4c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1034 |
+
golang--snappy.43d5d4c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1035 |
+
golang-design--history.361c2b5/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1036 |
+
golang-design--history.361c2b5/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1037 |
+
golang-design--hotkey.16255fc/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1038 |
+
golang-design--hotkey.16255fc/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1039 |
+
golang-minibear2333--golang.4a89/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1040 |
+
golang-minibear2333--golang.4a89/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1041 |
+
google--argh.939affd/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1042 |
+
google--argh.939affd/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1043 |
+
google--bloaty.4a601b6/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1044 |
+
google--bloaty.4a601b6/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1045 |
+
google--codesearch.b34f2a0/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1046 |
+
google--codesearch.b34f2a0/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1047 |
+
google--draco.d619822/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1048 |
+
google--draco.d619822/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1049 |
+
google--mdbook-i18n-helpers.da41/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1050 |
+
google--mdbook-i18n-helpers.da41/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1051 |
+
google--mount-zip.8b43dcf/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1052 |
+
google--mount-zip.8b43dcf/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1053 |
+
google--robotstxt.22b355f/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1054 |
+
google--robotstxt.22b355f/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1055 |
+
googlecloudplatform--gcping.f436/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1056 |
+
googlecloudplatform--gcping.f436/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1057 |
+
googlecloudplatform--microservic/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1058 |
+
googlecloudplatform--microservic/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1059 |
+
googlecloudplatform--protoc-gen/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1060 |
+
googlecloudplatform--protoc-gen/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1061 |
+
googleprojectzero--jackalope.c4a/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1062 |
+
googleprojectzero--jackalope.c4a/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1063 |
+
goproxyio--goproxy.382eafb/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1064 |
+
goproxyio--goproxy.382eafb/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1065 |
+
gordonklaus--ineffassign.44548fd/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1066 |
+
gordonklaus--ineffassign.44548fd/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1067 |
+
gorilla--http.15edc77/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1068 |
+
gorilla--http.15edc77/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1069 |
+
gosuri--uilive.11a6ee7/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1070 |
+
gosuri--uilive.11a6ee7/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1071 |
+
gosuri--uiprogress.484b9f6/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1072 |
+
gosuri--uiprogress.484b9f6/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1073 |
+
gosuri--uitable.c2124e6/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1074 |
+
gosuri--uitable.c2124e6/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1075 |
+
gotesttools--gotestfmt.4c97682/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1076 |
+
gotesttools--gotestfmt.4c97682/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1077 |
+
govend--govend.e600875/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1078 |
+
govend--govend.e600875/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1079 |
+
gpertea--gffcompare.29512d2/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1080 |
+
gpertea--gffcompare.29512d2/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1081 |
+
gpertea--gffread.05462cd/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1082 |
+
gpertea--gffread.05462cd/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1083 |
+
grafov--hulk.ed2b11c/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1084 |
+
grafov--hulk.ed2b11c/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1085 |
+
grandcat--zeroconf.e4f60f8/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1086 |
+
grandcat--zeroconf.e4f60f8/tests/executable filter=lfs diff=lfs merge=lfs -text
|
| 1087 |
+
graphit-dsl--graphit.2e01497/environment/executable filter=lfs diff=lfs merge=lfs -text
|
| 1088 |
+
graphit-dsl--graphit.2e01497/tests/executable filter=lfs diff=lfs merge=lfs -text
|
github-release--github-release.2/environment/programgym-go.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
|
| 3 |
+
size 59908810
|
github-release--github-release.2/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a47bfa83a583566fd681962034b3c67913a7c302469671907ee817a6b3527dd6
|
| 3 |
+
size 3516
|
github-release--github-release.2/instruction.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are a helpful assistant that can interact with a computer.
|
| 2 |
+
|
| 3 |
+
This is a reverse-engineering benchmark. You are given a compiled binary and its documentation.
|
| 4 |
+
Your job is to write a new, original codebase from scratch that produces an executable with identical behavior.
|
| 5 |
+
You must figure out the behavior solely by running and interacting with the provided binary.
|
| 6 |
+
Writing original code based on observed behavior is the entire point of this benchmark.
|
| 7 |
+
|
| 8 |
+
Any approach that shortcuts this — finding existing source code, wrapping the binary,
|
| 9 |
+
or installing the original tool — does not count as a solution. It will be detected by an
|
| 10 |
+
automated judge, marked as a disqualification, and scored as a failure.
|
| 11 |
+
The trace will be posted to an online wall of shame.
|
| 12 |
+
|
| 13 |
+
<RULES>
|
| 14 |
+
## What is not allowed
|
| 15 |
+
|
| 16 |
+
### 1. Obtaining source code
|
| 17 |
+
|
| 18 |
+
The only source of truth about what the executable does is the executable itself and its
|
| 19 |
+
bundled documentation. You must not search the internet, package registries, or any external
|
| 20 |
+
source for information about this project's source code. Even if you recognize what the
|
| 21 |
+
executable is, you must reimplement it from behavioral observation alone.
|
| 22 |
+
|
| 23 |
+
This includes but is not limited to:
|
| 24 |
+
- Cloning or browsing the original GitHub repository, its forks, or mirrors
|
| 25 |
+
- Downloading the project from package registries: `cargo install <project>`, `go get github.com/<org>/<project>`, `pip install <project>`, `apt-get source <project>`, `npm install <project>`, etc.
|
| 26 |
+
- Fetching source tarballs from project websites (e.g., `curl https://lua.org/ftp/lua-5.5.0.tar.gz`)
|
| 27 |
+
- Using a package manager to download the project as a dependency and then reading its cached source (e.g., navigating into `~/.cargo/registry/src/` or `$(go env GOPATH)/pkg/mod/`)
|
| 28 |
+
- Searching the web for the project's source code or implementation details
|
| 29 |
+
|
| 30 |
+
### 2. Wrapping or reusing the original binary
|
| 31 |
+
|
| 32 |
+
Your submission must be a genuine reimplementation. The provided `./executable` is for
|
| 33 |
+
observation only — your final solution must not depend on it or any other pre-built version
|
| 34 |
+
of the same tool at runtime.
|
| 35 |
+
|
| 36 |
+
This includes but is not limited to:
|
| 37 |
+
- Writing a wrapper script that delegates to the original binary (e.g., `exec zstd "$@"`)
|
| 38 |
+
- Installing the tool from a package manager and shimming to it (e.g., `apt-get install nnn && cp $(which nnn) ./executable`)
|
| 39 |
+
- Writing a `compile.sh` that simply makes the provided binary executable (`chmod +x ./executable`) or copies it (`cp ./executable ./executable`)
|
| 40 |
+
- Building a binary whose main function shells out to an external tool (e.g., `Command::new("miniserve").args(args).exec()`)
|
| 41 |
+
- Re-linking prebuilt `.o` object files found in the workspace without writing new source code
|
| 42 |
+
|
| 43 |
+
### 3. Binary analysis of the provided executable
|
| 44 |
+
|
| 45 |
+
All information about the provided `./executable` must be obtained by interacting with it
|
| 46 |
+
through its normal user interface (CLI flags, stdin/stdout, etc.).
|
| 47 |
+
- You MUST NOT decompile `./executable` or use disassemblers (objdump, Ghidra, etc.) on it
|
| 48 |
+
- You MUST NOT use strace, ltrace, or similar tracing/instrumentation tools on `./executable`
|
| 49 |
+
|
| 50 |
+
Note: this restriction applies ONLY to the provided `./executable`. You are free to use any
|
| 51 |
+
analysis tools on binaries that you produce yourself during development.
|
| 52 |
+
|
| 53 |
+
## What IS allowed
|
| 54 |
+
|
| 55 |
+
- Running the executable with any inputs, flags, and arguments to observe its behavior
|
| 56 |
+
- Reading any documentation files bundled in the workspace
|
| 57 |
+
</RULES>
|
| 58 |
+
|
| 59 |
+
## Task context
|
| 60 |
+
|
| 61 |
+
We want to write the source code for a given executable.
|
| 62 |
+
The executable is located at `./executable` in the workspace root.
|
| 63 |
+
|
| 64 |
+
You also have access to the existing documentation.
|
| 65 |
+
|
| 66 |
+
## Your task
|
| 67 |
+
|
| 68 |
+
Implement the source code to generate an executable of exactly identical behavior as the original.
|
| 69 |
+
|
| 70 |
+
No project-specific dependencies are pre-installed.
|
| 71 |
+
You do NOT have access to the internet.
|
| 72 |
+
**IMPORTANT**: Make sure that the executable(s) and everything else that is an artifact is not committed, i.e., is in your `.gitignore` file.
|
| 73 |
+
Finally, commit your changes.
|
| 74 |
+
|
| 75 |
+
Make sure that you have a `./compile.sh` file that produces an executable `./executable` in the workspace root.
|
| 76 |
+
`compile.sh` should be executable and should install any dependencies needed to compile the executable.
|
| 77 |
+
If your compile.sh fails to compile on a fresh checkout, your task has failed.
|
| 78 |
+
|
| 79 |
+
## Important: This is a reverse-engineering benchmark
|
| 80 |
+
|
| 81 |
+
Your goal is to write original code from scratch that reproduces the executable's behavior.
|
| 82 |
+
The only way to learn what the executable does is to run it and read its bundled documentation.
|
| 83 |
+
|
| 84 |
+
Any attempt to obtain source code — whether successful or not — or to wrap/reuse the
|
| 85 |
+
provided binary will be detected by an automated judge, disqualified, and scored as zero.
|
| 86 |
+
See the full rules in the system prompt above. Key points:
|
| 87 |
+
|
| 88 |
+
- Do NOT search the internet, clone repos, or download the project from any package registry
|
| 89 |
+
- Do NOT wrap, shim, or delegate to the provided `./executable` or any installed version of the same tool
|
| 90 |
+
- Do NOT decompile the provided `./executable` or use strace/ltrace on it (analyzing your own binaries is fine)
|
| 91 |
+
- You SHOULD extensively test the executable to understand its behavior before writing code.
|
| 92 |
+
If you are dealing with a TUI, tmux/libtmux has been installed to help you test/inspect/it.
|
| 93 |
+
|
| 94 |
+
## Recommended Workflow
|
| 95 |
+
|
| 96 |
+
1. Explore all documentation files
|
| 97 |
+
2. Play with the executable to understand its behavior (however, you MUST NOT decompile `./executable` or perform any other form of binary or strace/ltrace analysis on it)
|
| 98 |
+
3. Write the source code to implement the behavior
|
github-release--github-release.2/solution/solve.sh
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Oracle-only ceiling check. The reference is execute-only for normal agents;
|
| 3 |
+
# because the oracle runs as the owning `agent` user it can temporarily add read
|
| 4 |
+
# permission and encode the binary for Harbor's normal artifact handoff.
|
| 5 |
+
set -euo pipefail
|
| 6 |
+
test -f ./executable
|
| 7 |
+
chmod u+r ./executable
|
| 8 |
+
python3 - <<'PY'
|
| 9 |
+
import base64
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
Path(".programgym_oracle_reference").write_bytes(
|
| 13 |
+
base64.b64encode(Path("executable").read_bytes())
|
| 14 |
+
)
|
| 15 |
+
PY
|
| 16 |
+
chmod u-r ./executable
|
| 17 |
+
cat > compile.sh <<'EOF'
|
| 18 |
+
#!/usr/bin/env bash
|
| 19 |
+
set -euo pipefail
|
| 20 |
+
if [ -f ./.programgym_oracle_reference ]; then
|
| 21 |
+
python3 - <<'PY'
|
| 22 |
+
import base64
|
| 23 |
+
from pathlib import Path
|
| 24 |
+
|
| 25 |
+
Path("executable").write_bytes(
|
| 26 |
+
base64.b64decode(Path(".programgym_oracle_reference").read_bytes())
|
| 27 |
+
)
|
| 28 |
+
PY
|
| 29 |
+
fi
|
| 30 |
+
test -f ./executable
|
| 31 |
+
chmod +x ./executable
|
| 32 |
+
EOF
|
| 33 |
+
chmod +x compile.sh
|
github-release--github-release.2/task.toml
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.3"
|
| 2 |
+
source = "ProgramGym"
|
| 3 |
+
artifacts = [
|
| 4 |
+
"/logs/verifier/programgym_eval.json",
|
| 5 |
+
"/logs/verifier/harbor_diagnostics.json",
|
| 6 |
+
"/logs/verifier/programgym_eval.log",
|
| 7 |
+
"/logs/verifier/reward.json",
|
| 8 |
+
"/logs/verifier/reward.txt",
|
| 9 |
+
# Keep agent/runtime state out of the submission handoff. In particular,
|
| 10 |
+
# Claude Code installs an absolute symlink under .local/bin; transferring it
|
| 11 |
+
# makes Python's safe tar extraction reject the entire workspace archive.
|
| 12 |
+
{ source = "/workspace", exclude = [
|
| 13 |
+
"executable",
|
| 14 |
+
".git",
|
| 15 |
+
".bashrc",
|
| 16 |
+
".cache",
|
| 17 |
+
".cc-switch",
|
| 18 |
+
".claude",
|
| 19 |
+
".local",
|
| 20 |
+
] },
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
[task]
|
| 24 |
+
name = "programgym/github-release--github-release.2"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for github-release/github-release"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "go"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "github-release__github-release.2c19b11"
|
| 32 |
+
repository = "github-release/github-release"
|
| 33 |
+
commit = "2c19b119ec8a75203b6b6269ef02a5e32c9e4ebd"
|
| 34 |
+
language = "go"
|
| 35 |
+
difficulty = "unknown"
|
| 36 |
+
difficulty_score = 0.0
|
| 37 |
+
test_branches = 4
|
| 38 |
+
test_count = 361
|
| 39 |
+
|
| 40 |
+
[agent]
|
| 41 |
+
timeout_sec = 14400
|
| 42 |
+
user = "agent"
|
| 43 |
+
network_mode = "allowlist"
|
| 44 |
+
allowed_hosts = ["api.anthropic.com", "api.openai.com"]
|
| 45 |
+
|
| 46 |
+
[verifier]
|
| 47 |
+
timeout_sec = 7200
|
| 48 |
+
user = "root"
|
| 49 |
+
environment_mode = "separate"
|
| 50 |
+
|
| 51 |
+
[verifier.env]
|
| 52 |
+
PROGRAMGYM_XDIST_WORKERS = "8"
|
| 53 |
+
|
| 54 |
+
[verifier.environment]
|
| 55 |
+
build_timeout_sec = 1800
|
| 56 |
+
cpus = 8
|
| 57 |
+
memory_mb = 16384
|
| 58 |
+
storage_mb = 30720
|
| 59 |
+
gpus = 0
|
| 60 |
+
workdir = "/workspace"
|
| 61 |
+
|
| 62 |
+
[environment]
|
| 63 |
+
network_mode = "public"
|
| 64 |
+
build_timeout_sec = 1800
|
| 65 |
+
cpus = 8
|
| 66 |
+
memory_mb = 16384
|
| 67 |
+
storage_mb = 30720
|
| 68 |
+
gpus = 0
|
| 69 |
+
workdir = "/workspace"
|
github-release--github-release.2/tests/Dockerfile
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
|
| 38 |
+
RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 49 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 50 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 51 |
+
&& mkdir -p /workspace /tests
|
| 52 |
+
|
| 53 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 54 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 55 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 56 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 57 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 58 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 59 |
+
RUN python3 -m pip install --no-cache-dir --disable-pip-version-check \
|
| 60 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 61 |
+
|
| 62 |
+
COPY test.sh /tests/test.sh
|
| 63 |
+
COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
| 64 |
+
COPY programgym_task.json /tests/programgym_task.json
|
| 65 |
+
COPY blobs/ /tests/blobs/
|
| 66 |
+
RUN chmod +x /tests/test.sh
|
github-release--github-release.2/tests/blobs/tests/generated_module_01.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8525700e9a88467e4b88c5fe0760b34df6d7d549a59c8c56bac217e482777d1a
|
| 3 |
+
size 24255
|
github-release--github-release.2/tests/blobs/tests/generated_module_02.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:012ffad2d2593d40d93eb572eacad2c8bd4af7e646396ed3fd1e673231fc4ad3
|
| 3 |
+
size 23192
|
github-release--github-release.2/tests/blobs/tests/generated_module_03.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4602f5ec85b3848d26801e231ccde332b2e967936af4a237454b669dcee8d62f
|
| 3 |
+
size 18377
|
github-release--github-release.2/tests/blobs/tests/generated_module_04.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:751877f1ce4ec1faf1953878abf8d9aa872df37655aab6ea205fee9da7e3ef46
|
| 3 |
+
size 19797
|
github-release--github-release.2/tests/download.sh
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# PROGRAMGYM-MANAGED-GO-DOWNLOAD: v1
|
| 3 |
+
# Generated deterministically from repository module metadata; do not edit.
|
| 4 |
+
set -u
|
| 5 |
+
export GOTOOLCHAIN=local
|
| 6 |
+
mkdir -p /workspace/.programgym_build_env/go-prefetch
|
| 7 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PROGRAMGYM_GO_MOD_EOF'
|
| 8 |
+
module github.com/github-release/github-release
|
| 9 |
+
|
| 10 |
+
go 1.23.0
|
| 11 |
+
|
| 12 |
+
require (
|
| 13 |
+
github.com/dustin/go-humanize v1.0.1
|
| 14 |
+
github.com/kevinburke/rest v0.0.0-20250718180114-1a15e4f2364f
|
| 15 |
+
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
|
| 16 |
+
github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2
|
| 17 |
+
)
|
| 18 |
+
PROGRAMGYM_GO_MOD_EOF
|
| 19 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PROGRAMGYM_GO_SUM_EOF'
|
| 20 |
+
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
| 21 |
+
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
| 22 |
+
github.com/kevinburke/rest v0.0.0-20250718180114-1a15e4f2364f h1:y+inhBsY0ewgXFXCXlxodNxkXdYeU9YuneCYQEnRkmw=
|
| 23 |
+
github.com/kevinburke/rest v0.0.0-20250718180114-1a15e4f2364f/go.mod h1:3cBF15uOiTj025Ll5QHLw317EB+e06+AEwyt7oHUubI=
|
| 24 |
+
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 h1:nrZ3ySNYwJbSpD6ce9duiP+QkD3JuLCcWkdaehUS/3Y=
|
| 25 |
+
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80/go.mod h1:iFyPdL66DjUD96XmzVL3ZntbzcflLnznH0fr99w5VqE=
|
| 26 |
+
github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2 h1:txplJASvd6b/hrE0s/Ixfpp2cuwH9IO9oZBAN9iYa4A=
|
| 27 |
+
github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2/go.mod h1:DGCIhurYgnLz8J9ga1fMV/fbLDyUvTyrWXVWUIyJon4=
|
| 28 |
+
PROGRAMGYM_GO_SUM_EOF
|
| 29 |
+
if ! (cd /workspace/.programgym_build_env/go-prefetch && go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all); then
|
| 30 |
+
printf '%s\n' 'download.sh: Go dependency prefetch failed' >&2
|
| 31 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 32 |
+
return 1
|
| 33 |
+
else
|
| 34 |
+
exit 1
|
| 35 |
+
fi
|
| 36 |
+
fi
|
github-release--github-release.2/tests/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e46abd9ac5c6cf78e8c587bf6a3f8f1947ee564b962c025479b375ab9e925324
|
| 3 |
+
size 11322576
|
github-release--github-release.2/tests/programgym-go.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
|
| 3 |
+
size 59908810
|
github-release--github-release.2/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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"""In-place ProgramGym evaluator.
|
| 3 |
+
|
| 4 |
+
Mirrors ProgramGym's ``Evaluator`` pipeline as closely as a single-container,
|
| 5 |
+
no-Docker-in-Docker host allows. Run from ``tests/test.sh`` inside the agent's
|
| 6 |
+
cleanroom container after Harbor flips the verifier-phase network policy.
|
| 7 |
+
|
| 8 |
+
Differences from ``programgym.eval.eval.Evaluator`` that are structural to
|
| 9 |
+
running in one container:
|
| 10 |
+
|
| 11 |
+
* No fresh container per branch. ``snapshot_workspace`` / ``restore_workspace``
|
| 12 |
+
copy a post-compile workspace snapshot to a temp directory and restore it
|
| 13 |
+
before each branch; ``cleanup_lingering_processes`` kills leftover branch
|
| 14 |
+
processes between attempts to approximate the fresh-container boundary.
|
| 15 |
+
* No ``docker commit``. The post-compile workspace snapshot serves the same
|
| 16 |
+
role as the committed image upstream.
|
| 17 |
+
* Hidden test blobs are fetched on demand from HuggingFace via
|
| 18 |
+
``huggingface_hub.snapshot_download`` (matching ``programgym.utils.blob_store``)
|
| 19 |
+
rather than being pre-staged into ``/tests/blobs/``. Override with
|
| 20 |
+
``PROGRAMGYM_BLOB_DIR`` for offline reruns.
|
| 21 |
+
|
| 22 |
+
Everything else (eval_clean_hashes scrub, deterministic synthetic git seed,
|
| 23 |
+
``compile.sh`` then stash + hash the executable, best-effort
|
| 24 |
+
``pytest-rerunfailures``, per-branch test-tar overlay, executable hash
|
| 25 |
+
``--max-worker-restart=4``, xdist worker-crash retry with serial fallback,
|
| 26 |
+
best-of-N attempt selection, active vs ignored test bookkeeping, scoring) is
|
| 27 |
+
preserved.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import re
|
| 36 |
+
import shlex
|
| 37 |
+
import shutil
|
| 38 |
+
import signal
|
| 39 |
+
import subprocess
|
| 40 |
+
import tempfile
|
| 41 |
+
import time
|
| 42 |
+
import traceback
|
| 43 |
+
import xml.etree.ElementTree as ET
|
| 44 |
+
from pathlib import Path
|
| 45 |
+
from typing import Any
|
| 46 |
+
|
| 47 |
+
WORKSPACE = Path(os.environ.get("PROGRAMGYM_WORKSPACE", "/workspace"))
|
| 48 |
+
STASHED_EXECUTABLE = Path("/opt/programgym-stashed-executable-do-not-modify")
|
| 49 |
+
METADATA_PATH = Path(
|
| 50 |
+
os.environ.get("PROGRAMGYM_METADATA", "/tests/programgym_task.json")
|
| 51 |
+
)
|
| 52 |
+
LOG_DIR = Path(os.environ.get("PROGRAMGYM_LOG_DIR", "/logs/verifier"))
|
| 53 |
+
WORKER_CRASH_PHRASE = "worker '"
|
| 54 |
+
XDIST_COLLAPSE_MARKERS = (
|
| 55 |
+
"maximum crashed workers reached",
|
| 56 |
+
"xdist: maximum crashed",
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
DEFAULT_HF_REPO_ID = "programgym/ProgramGym-Tests"
|
| 60 |
+
DEFAULT_HF_REVISION = "main"
|
| 61 |
+
|
| 62 |
+
# Oracle agent handoff files (see solution/solve.sh). Must not appear in the
|
| 63 |
+
# post-compile workspace snapshot or they pollute tree-scanning tests (dutree).
|
| 64 |
+
_ORACLE_HANDOFF_NAMES = (".programgym_oracle_reference",)
|
| 65 |
+
|
| 66 |
+
_TOOLCHAIN_BIN_DIR_CANDIDATES = (
|
| 67 |
+
"/usr/local/go/bin",
|
| 68 |
+
"/go/bin",
|
| 69 |
+
"/usr/local/cargo/bin",
|
| 70 |
+
"/root/.cargo/bin",
|
| 71 |
+
"/root/.ghcup/bin",
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def toolchain_bin_dirs() -> list[str]:
|
| 76 |
+
"""Return toolchain bin directories that exist on this image."""
|
| 77 |
+
candidates = list(_TOOLCHAIN_BIN_DIR_CANDIDATES)
|
| 78 |
+
candidates.extend(
|
| 79 |
+
str(path)
|
| 80 |
+
for path in sorted(Path("/usr/lib").glob("go-*/bin"))
|
| 81 |
+
if _is_accessible_dir(path)
|
| 82 |
+
)
|
| 83 |
+
seen: set[str] = set()
|
| 84 |
+
present: list[str] = []
|
| 85 |
+
for path in candidates:
|
| 86 |
+
if path in seen:
|
| 87 |
+
continue
|
| 88 |
+
seen.add(path)
|
| 89 |
+
if _is_accessible_dir(path):
|
| 90 |
+
present.append(path)
|
| 91 |
+
return present
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _is_accessible_dir(path: str | Path) -> bool:
|
| 95 |
+
"""Return whether path is a directory without failing on protected homes."""
|
| 96 |
+
try:
|
| 97 |
+
return Path(path).is_dir()
|
| 98 |
+
except OSError:
|
| 99 |
+
return False
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def bootstrap_toolchain_path() -> str:
|
| 103 |
+
"""Prepend discovered toolchain dirs to PATH (idempotent)."""
|
| 104 |
+
prepend = toolchain_bin_dirs()
|
| 105 |
+
current_parts = [part for part in os.environ.get("PATH", "").split(":") if part]
|
| 106 |
+
merged: list[str] = []
|
| 107 |
+
for path in prepend + current_parts:
|
| 108 |
+
if path not in merged:
|
| 109 |
+
merged.append(path)
|
| 110 |
+
new_path = ":".join(merged)
|
| 111 |
+
os.environ["PATH"] = new_path
|
| 112 |
+
return new_path
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _bash_login_command(command: str) -> str:
|
| 116 |
+
"""Run ``command`` under bash -lc with an explicit PATH export."""
|
| 117 |
+
path = bootstrap_toolchain_path()
|
| 118 |
+
return f"export PATH={shlex.quote(path)}; {command}"
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def sha256(path: Path) -> str:
|
| 122 |
+
h = hashlib.sha256()
|
| 123 |
+
with path.open("rb") as f:
|
| 124 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 125 |
+
h.update(chunk)
|
| 126 |
+
return h.hexdigest()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def write_json(path: Path, data: dict[str, Any]) -> None:
|
| 130 |
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
| 131 |
+
tmp.write_text(json.dumps(data, indent=2, sort_keys=True))
|
| 132 |
+
tmp.replace(path)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def _read_log_tail(path: Path | None, max_bytes: int = 65536) -> str:
|
| 136 |
+
if path is None or not path.exists():
|
| 137 |
+
return ""
|
| 138 |
+
data = path.read_bytes()
|
| 139 |
+
if len(data) <= max_bytes:
|
| 140 |
+
return data.decode(errors="replace")
|
| 141 |
+
return data[-max_bytes:].decode(errors="replace")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def _close_pipes(proc: subprocess.Popen[Any]) -> None:
|
| 145 |
+
for stream in (proc.stdout, proc.stderr):
|
| 146 |
+
if stream is not None:
|
| 147 |
+
try:
|
| 148 |
+
stream.close()
|
| 149 |
+
except OSError:
|
| 150 |
+
pass
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _terminate_process_tree(proc: subprocess.Popen[Any]) -> None:
|
| 154 |
+
try:
|
| 155 |
+
os.killpg(proc.pid, signal.SIGKILL)
|
| 156 |
+
except ProcessLookupError:
|
| 157 |
+
pass
|
| 158 |
+
try:
|
| 159 |
+
proc.kill()
|
| 160 |
+
except ProcessLookupError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
_PKILL_PATTERNS = (
|
| 165 |
+
f"{WORKSPACE}/eval/",
|
| 166 |
+
f"{WORKSPACE}/tests/",
|
| 167 |
+
"tail -f",
|
| 168 |
+
"development.log",
|
| 169 |
+
" less ",
|
| 170 |
+
" less$",
|
| 171 |
+
"/less ",
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def _pkill_aggressive() -> str:
|
| 176 |
+
"""Best-effort kill of branch pytest/subprocess trees (Modal gVisor fallback)."""
|
| 177 |
+
notes: list[str] = []
|
| 178 |
+
workspace = str(WORKSPACE)
|
| 179 |
+
patterns = list(_PKILL_PATTERNS) + [
|
| 180 |
+
f"pytest.*{workspace}",
|
| 181 |
+
f"xdist.*{workspace}",
|
| 182 |
+
]
|
| 183 |
+
for pattern in patterns:
|
| 184 |
+
result = subprocess.run(
|
| 185 |
+
["pkill", "-9", "-f", pattern],
|
| 186 |
+
capture_output=True,
|
| 187 |
+
text=True,
|
| 188 |
+
)
|
| 189 |
+
notes.append(f"pkill -9 -f {pattern!r}: rc={result.returncode}")
|
| 190 |
+
return "\n".join(notes)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def run_step(
|
| 194 |
+
command: str,
|
| 195 |
+
cwd: Path,
|
| 196 |
+
*,
|
| 197 |
+
timeout: int,
|
| 198 |
+
env: dict[str, str] | None = None,
|
| 199 |
+
step: str,
|
| 200 |
+
accept_failure: bool = False,
|
| 201 |
+
log_output: bool | None = None,
|
| 202 |
+
max_output_bytes: int = 65536,
|
| 203 |
+
) -> dict[str, Any]:
|
| 204 |
+
if log_output is None:
|
| 205 |
+
log_output = step == "run_tests" or timeout >= 60
|
| 206 |
+
|
| 207 |
+
started = time.monotonic()
|
| 208 |
+
stdout_path: Path | None = None
|
| 209 |
+
stderr_path: Path | None = None
|
| 210 |
+
stdout_f = None
|
| 211 |
+
stderr_f = None
|
| 212 |
+
|
| 213 |
+
if log_output:
|
| 214 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 215 |
+
log_id = f"{step}-{int(started * 1000)}"
|
| 216 |
+
stdout_path = LOG_DIR / f"run-step-{log_id}.stdout.log"
|
| 217 |
+
stderr_path = LOG_DIR / f"run-step-{log_id}.stderr.log"
|
| 218 |
+
stdout_f = stdout_path.open("w", encoding="utf-8")
|
| 219 |
+
stderr_f = stderr_path.open("w", encoding="utf-8")
|
| 220 |
+
popen_stdout: Any = stdout_f
|
| 221 |
+
popen_stderr: Any = stderr_f
|
| 222 |
+
else:
|
| 223 |
+
popen_stdout = subprocess.PIPE
|
| 224 |
+
popen_stderr = subprocess.PIPE
|
| 225 |
+
|
| 226 |
+
proc = subprocess.Popen(
|
| 227 |
+
["bash", "-lc", _bash_login_command(command)],
|
| 228 |
+
cwd=cwd,
|
| 229 |
+
env={**os.environ, **(env or {})},
|
| 230 |
+
stdout=popen_stdout,
|
| 231 |
+
stderr=popen_stderr,
|
| 232 |
+
start_new_session=True,
|
| 233 |
+
text=True,
|
| 234 |
+
)
|
| 235 |
+
timed_out = False
|
| 236 |
+
stdout = ""
|
| 237 |
+
stderr = ""
|
| 238 |
+
try:
|
| 239 |
+
if log_output:
|
| 240 |
+
proc.wait(timeout=timeout)
|
| 241 |
+
else:
|
| 242 |
+
stdout, stderr = proc.communicate(timeout=timeout)
|
| 243 |
+
except subprocess.TimeoutExpired:
|
| 244 |
+
timed_out = True
|
| 245 |
+
_terminate_process_tree(proc)
|
| 246 |
+
cleanup_lingering_processes(aggressive=True)
|
| 247 |
+
try:
|
| 248 |
+
proc.wait(timeout=5)
|
| 249 |
+
except subprocess.TimeoutExpired:
|
| 250 |
+
proc.kill()
|
| 251 |
+
if not log_output:
|
| 252 |
+
_close_pipes(proc)
|
| 253 |
+
finally:
|
| 254 |
+
if stdout_f is not None:
|
| 255 |
+
stdout_f.close()
|
| 256 |
+
if stderr_f is not None:
|
| 257 |
+
stderr_f.close()
|
| 258 |
+
|
| 259 |
+
if timed_out:
|
| 260 |
+
if log_output:
|
| 261 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 262 |
+
stderr_path, max_output_bytes
|
| 263 |
+
)
|
| 264 |
+
else:
|
| 265 |
+
output = ""
|
| 266 |
+
entry = {
|
| 267 |
+
"step": step,
|
| 268 |
+
"command": command,
|
| 269 |
+
"wall_time": time.monotonic() - started,
|
| 270 |
+
"output": output,
|
| 271 |
+
"returncode": 124,
|
| 272 |
+
"exception_info": f"timed out after {timeout}s",
|
| 273 |
+
}
|
| 274 |
+
else:
|
| 275 |
+
if log_output:
|
| 276 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 277 |
+
stderr_path, max_output_bytes
|
| 278 |
+
)
|
| 279 |
+
else:
|
| 280 |
+
output = stdout + stderr
|
| 281 |
+
entry = {
|
| 282 |
+
"step": step,
|
| 283 |
+
"command": command,
|
| 284 |
+
"wall_time": time.monotonic() - started,
|
| 285 |
+
"output": output,
|
| 286 |
+
"returncode": proc.returncode,
|
| 287 |
+
"exception_info": "",
|
| 288 |
+
}
|
| 289 |
+
if entry["returncode"] and not accept_failure:
|
| 290 |
+
raise RuntimeError(
|
| 291 |
+
f"{step} failed: {entry['exception_info'] or entry['output']}"
|
| 292 |
+
)
|
| 293 |
+
return entry
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def cleanup_lingering_processes(*, aggressive: bool = False) -> dict[str, Any]:
|
| 297 |
+
started = time.monotonic()
|
| 298 |
+
patterns = [
|
| 299 |
+
str(WORKSPACE / "executable"),
|
| 300 |
+
f"{WORKSPACE}/eval/",
|
| 301 |
+
f"{WORKSPACE}/tests/",
|
| 302 |
+
# lazygit --logs/-l tests spawn `tail -f` outside /workspace/.
|
| 303 |
+
"tail -f",
|
| 304 |
+
"development.log",
|
| 305 |
+
]
|
| 306 |
+
killed: list[int] = []
|
| 307 |
+
proc_root = Path("/proc")
|
| 308 |
+
proc_available = proc_root.exists()
|
| 309 |
+
if proc_available:
|
| 310 |
+
for proc_dir in proc_root.iterdir():
|
| 311 |
+
if not proc_dir.name.isdigit():
|
| 312 |
+
continue
|
| 313 |
+
pid = int(proc_dir.name)
|
| 314 |
+
if pid in {os.getpid(), os.getppid()}:
|
| 315 |
+
continue
|
| 316 |
+
try:
|
| 317 |
+
raw = (proc_dir / "cmdline").read_bytes()
|
| 318 |
+
except (FileNotFoundError, PermissionError, ProcessLookupError):
|
| 319 |
+
continue
|
| 320 |
+
cmdline = raw.replace(b"\0", b" ").decode(errors="replace")
|
| 321 |
+
if not any(pattern in cmdline for pattern in patterns):
|
| 322 |
+
continue
|
| 323 |
+
try:
|
| 324 |
+
os.kill(pid, signal.SIGKILL)
|
| 325 |
+
except (PermissionError, ProcessLookupError):
|
| 326 |
+
continue
|
| 327 |
+
killed.append(pid)
|
| 328 |
+
pkill_output = ""
|
| 329 |
+
if aggressive or not proc_available:
|
| 330 |
+
pkill_output = _pkill_aggressive()
|
| 331 |
+
output_parts = []
|
| 332 |
+
if killed:
|
| 333 |
+
output_parts.append("\n".join(str(pid) for pid in killed))
|
| 334 |
+
if pkill_output:
|
| 335 |
+
output_parts.append(pkill_output)
|
| 336 |
+
return {
|
| 337 |
+
"step": "cleanup_lingering_processes",
|
| 338 |
+
"command": "kill leftover branch processes referencing the workspace",
|
| 339 |
+
"wall_time": time.monotonic() - started,
|
| 340 |
+
"output": "\n".join(output_parts),
|
| 341 |
+
"returncode": 0,
|
| 342 |
+
"exception_info": "",
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
def extract_trusted_blob(tar_path: Path, dest: Path) -> None:
|
| 347 |
+
import tarfile
|
| 348 |
+
|
| 349 |
+
with tarfile.open(tar_path, "r:gz") as tf:
|
| 350 |
+
try:
|
| 351 |
+
tf.extractall(dest, filter="fully_trusted")
|
| 352 |
+
except TypeError:
|
| 353 |
+
tf.extractall(dest)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def find_results_xml() -> Path | None:
|
| 357 |
+
"""Return the junit xml path if pytest wrote one."""
|
| 358 |
+
for candidate in (WORKSPACE / "eval" / "results.xml", WORKSPACE / "results.xml"):
|
| 359 |
+
if candidate.exists():
|
| 360 |
+
return candidate
|
| 361 |
+
return None
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def remove_oracle_handoff_artifacts() -> list[str]:
|
| 365 |
+
"""Drop oracle-agent handoff files from /workspace before snapshot/restore."""
|
| 366 |
+
removed: list[str] = []
|
| 367 |
+
for name in _ORACLE_HANDOFF_NAMES:
|
| 368 |
+
path = WORKSPACE / name
|
| 369 |
+
if path.exists():
|
| 370 |
+
if path.is_dir():
|
| 371 |
+
shutil.rmtree(path)
|
| 372 |
+
else:
|
| 373 |
+
path.unlink()
|
| 374 |
+
removed.append(name)
|
| 375 |
+
return removed
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def _remove_tree(path: Path) -> None:
|
| 379 |
+
"""Remove a file or directory tree, with a shell fallback for overlay races."""
|
| 380 |
+
if path.is_symlink() or path.is_file():
|
| 381 |
+
path.unlink(missing_ok=True)
|
| 382 |
+
return
|
| 383 |
+
if not path.is_dir():
|
| 384 |
+
path.unlink(missing_ok=True)
|
| 385 |
+
return
|
| 386 |
+
for attempt in range(3):
|
| 387 |
+
try:
|
| 388 |
+
shutil.rmtree(path)
|
| 389 |
+
if not path.exists():
|
| 390 |
+
return
|
| 391 |
+
except OSError:
|
| 392 |
+
if attempt == 2:
|
| 393 |
+
run_step(
|
| 394 |
+
f"rm -rf {shlex.quote(str(path))}",
|
| 395 |
+
path.parent,
|
| 396 |
+
timeout=120,
|
| 397 |
+
step="clear_workspace_fallback",
|
| 398 |
+
accept_failure=True,
|
| 399 |
+
)
|
| 400 |
+
if not path.exists():
|
| 401 |
+
return
|
| 402 |
+
raise
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
def ensure_workspace_dir() -> None:
|
| 406 |
+
"""Guarantee WORKSPACE exists as a writable directory (not a symlink/file)."""
|
| 407 |
+
if WORKSPACE.exists() and not WORKSPACE.is_dir():
|
| 408 |
+
if WORKSPACE.is_symlink() or WORKSPACE.is_file():
|
| 409 |
+
WORKSPACE.unlink()
|
| 410 |
+
else:
|
| 411 |
+
shutil.rmtree(WORKSPACE)
|
| 412 |
+
WORKSPACE.mkdir(parents=True, exist_ok=True)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def clear_workspace() -> None:
|
| 416 |
+
ensure_workspace_dir()
|
| 417 |
+
for path in list(WORKSPACE.iterdir()):
|
| 418 |
+
_remove_tree(path)
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
def restore_reference_executable() -> None:
|
| 422 |
+
"""Write the stashed reference binary into /workspace after a branch overlay.
|
| 423 |
+
|
| 424 |
+
Branch blobs may ship ``executable`` as a dangling symlink into
|
| 425 |
+
``target/release/...``; ``shutil.copy2`` would follow it and raise
|
| 426 |
+
``FileNotFoundError``. Drop whatever the blob left and copy the stashed
|
| 427 |
+
reference as a regular file.
|
| 428 |
+
"""
|
| 429 |
+
ensure_workspace_dir()
|
| 430 |
+
if not STASHED_EXECUTABLE.is_file():
|
| 431 |
+
raise FileNotFoundError(
|
| 432 |
+
f"missing stashed reference executable at {STASHED_EXECUTABLE}"
|
| 433 |
+
)
|
| 434 |
+
dest = WORKSPACE / "executable"
|
| 435 |
+
if dest.exists() or dest.is_symlink():
|
| 436 |
+
if dest.is_dir():
|
| 437 |
+
shutil.rmtree(dest)
|
| 438 |
+
else:
|
| 439 |
+
dest.unlink(missing_ok=True)
|
| 440 |
+
shutil.copy2(STASHED_EXECUTABLE, dest)
|
| 441 |
+
dest.chmod(0o755)
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
def snapshot_workspace(dest: Path) -> None:
|
| 445 |
+
if dest.exists():
|
| 446 |
+
shutil.rmtree(dest)
|
| 447 |
+
shutil.copytree(WORKSPACE, dest, symlinks=True)
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def restore_workspace(source: Path) -> None:
|
| 451 |
+
clear_workspace()
|
| 452 |
+
shutil.copytree(source, WORKSPACE, dirs_exist_ok=True, symlinks=True)
|
| 453 |
+
ensure_workspace_dir()
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def remove_hashed_files(root: Path, hashes: set[str]) -> list[str]:
|
| 457 |
+
removed: list[str] = []
|
| 458 |
+
for path in root.rglob("*"):
|
| 459 |
+
if path.is_file() and not path.is_symlink():
|
| 460 |
+
try:
|
| 461 |
+
if sha256(path) in hashes:
|
| 462 |
+
path.unlink()
|
| 463 |
+
removed.append(str(path.relative_to(root)))
|
| 464 |
+
except OSError:
|
| 465 |
+
continue
|
| 466 |
+
return removed
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
def branch_tests(branch_info: dict[str, Any]) -> list[str]:
|
| 470 |
+
ignored = {
|
| 471 |
+
item["name"] for item in branch_info.get("ignored_tests", []) if "name" in item
|
| 472 |
+
}
|
| 473 |
+
return [name for name in branch_info.get("tests", []) if name not in ignored]
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
def ignored_tests(metadata: dict[str, Any]) -> set[str]:
|
| 477 |
+
result: set[str] = set()
|
| 478 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 479 |
+
result.update(
|
| 480 |
+
f"{branch}/{item['name']}"
|
| 481 |
+
for item in info.get("ignored_tests", [])
|
| 482 |
+
if "name" in item
|
| 483 |
+
)
|
| 484 |
+
return result
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def active_tests(metadata: dict[str, Any]) -> set[str]:
|
| 488 |
+
active: set[str] = set()
|
| 489 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 490 |
+
if info.get("ignored"):
|
| 491 |
+
continue
|
| 492 |
+
ignored = {
|
| 493 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 494 |
+
}
|
| 495 |
+
active.update(
|
| 496 |
+
f"{branch}/{name}" for name in info.get("tests", []) if name not in ignored
|
| 497 |
+
)
|
| 498 |
+
return active
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def inject_not_run(
|
| 502 |
+
result: dict[str, Any], branch: str, tests: list[str], error_code: str
|
| 503 |
+
) -> None:
|
| 504 |
+
result["test_results"].extend(
|
| 505 |
+
{
|
| 506 |
+
"name": name,
|
| 507 |
+
"branch": branch,
|
| 508 |
+
"status": "not_run",
|
| 509 |
+
"extra": {"error_code": error_code},
|
| 510 |
+
}
|
| 511 |
+
for name in tests
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def testcase_name(case: ET.Element) -> str:
|
| 516 |
+
classname = case.attrib.get("classname", "")
|
| 517 |
+
name = case.attrib.get("name", "")
|
| 518 |
+
return f"{classname}.{name}" if classname else name
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
# Only these tags under <testcase> represent a result. <system-out> /
|
| 522 |
+
# <system-err> are stdout/stderr captures and must not be treated as results
|
| 523 |
+
# (a leading <system-out> followed by <failure> would otherwise be classified
|
| 524 |
+
# as a stdout-only "passed").
|
| 525 |
+
JUNIT_RESULT_TAGS = {"skipped", "failure", "error"}
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def parse_junit(
|
| 529 |
+
raw_xml: str, branch: str, expected: list[str], ignored: set[str]
|
| 530 |
+
) -> tuple[list[dict[str, Any]], list[str]]:
|
| 531 |
+
root = ET.fromstring(raw_xml)
|
| 532 |
+
got: set[str] = set()
|
| 533 |
+
results: list[dict[str, Any]] = []
|
| 534 |
+
for case in root.iter("testcase"):
|
| 535 |
+
name = testcase_name(case)
|
| 536 |
+
got.add(name)
|
| 537 |
+
extra: dict[str, Any] = {}
|
| 538 |
+
if "time" in case.attrib:
|
| 539 |
+
try:
|
| 540 |
+
extra["time"] = float(case.attrib["time"])
|
| 541 |
+
except ValueError:
|
| 542 |
+
extra["time"] = case.attrib["time"]
|
| 543 |
+
result_children = [c for c in case if c.tag in JUNIT_RESULT_TAGS]
|
| 544 |
+
# Collapse duplicate same-tag result children. Pytest's
|
| 545 |
+
# "pytest.internal" pseudo-test sometimes emits two identical <error>
|
| 546 |
+
# entries; treating that as a system_error would over-flag a real
|
| 547 |
+
# single failure. Mirrors upstream eval.py:816-820.
|
| 548 |
+
if len(result_children) > 1 and len({c.tag for c in result_children}) == 1:
|
| 549 |
+
result_children = [result_children[0]]
|
| 550 |
+
if not result_children:
|
| 551 |
+
status = "passed"
|
| 552 |
+
elif len(result_children) != 1:
|
| 553 |
+
status = "system_error"
|
| 554 |
+
extra["error_details"] = (
|
| 555 |
+
f"Expected 1 result for {name}, got {len(result_children)}: "
|
| 556 |
+
f"{[c.tag for c in result_children]}"
|
| 557 |
+
)
|
| 558 |
+
else:
|
| 559 |
+
first = result_children[0]
|
| 560 |
+
status = first.tag # "skipped" | "failure" | "error"
|
| 561 |
+
extra["message"] = first.attrib.get("message") or ""
|
| 562 |
+
if first.text:
|
| 563 |
+
extra["text"] = first.text
|
| 564 |
+
results.append(
|
| 565 |
+
{"name": name, "branch": branch, "status": status, "extra": extra}
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
active_expected = [name for name in expected if name not in ignored]
|
| 569 |
+
missing = [name for name in active_expected if name not in got]
|
| 570 |
+
results.extend(
|
| 571 |
+
{
|
| 572 |
+
"name": name,
|
| 573 |
+
"branch": branch,
|
| 574 |
+
"status": "not_run",
|
| 575 |
+
"extra": {"error_code": "missing_from_junit_xml"},
|
| 576 |
+
}
|
| 577 |
+
for name in missing
|
| 578 |
+
)
|
| 579 |
+
unexpected = got - set(expected) - ignored
|
| 580 |
+
warnings = (
|
| 581 |
+
[f"Branch {branch}: {len(unexpected)} test(s) in JUnit XML not in tests.json"]
|
| 582 |
+
if unexpected
|
| 583 |
+
else []
|
| 584 |
+
)
|
| 585 |
+
return results, warnings
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
def count_worker_crashes(raw_xml: str) -> int:
|
| 589 |
+
if WORKER_CRASH_PHRASE not in raw_xml:
|
| 590 |
+
return 0
|
| 591 |
+
try:
|
| 592 |
+
root = ET.fromstring(raw_xml)
|
| 593 |
+
except ET.ParseError:
|
| 594 |
+
return 0
|
| 595 |
+
crashes = 0
|
| 596 |
+
for case in root.iter("testcase"):
|
| 597 |
+
for child in case:
|
| 598 |
+
text = (child.get("message") or "") + " " + (child.text or "")
|
| 599 |
+
if (
|
| 600 |
+
child.tag in {"error", "failure"}
|
| 601 |
+
and WORKER_CRASH_PHRASE in text
|
| 602 |
+
and "crashed" in text
|
| 603 |
+
):
|
| 604 |
+
crashes += 1
|
| 605 |
+
break
|
| 606 |
+
return crashes
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def run_output_indicates_xdist_collapse(output: str) -> bool:
|
| 610 |
+
lower = output.lower()
|
| 611 |
+
return any(marker in lower for marker in XDIST_COLLAPSE_MARKERS)
|
| 612 |
+
|
| 613 |
+
|
| 614 |
+
def count_junit_failures(raw_xml: str) -> int:
|
| 615 |
+
try:
|
| 616 |
+
root = ET.fromstring(raw_xml)
|
| 617 |
+
except ET.ParseError:
|
| 618 |
+
return 0
|
| 619 |
+
failures = 0
|
| 620 |
+
for case in root.iter("testcase"):
|
| 621 |
+
for child in case:
|
| 622 |
+
if child.tag in {"failure", "error"}:
|
| 623 |
+
failures += 1
|
| 624 |
+
break
|
| 625 |
+
return failures
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
def count_junit_passed(raw_xml: str) -> int:
|
| 629 |
+
try:
|
| 630 |
+
root = ET.fromstring(raw_xml)
|
| 631 |
+
except ET.ParseError:
|
| 632 |
+
return 0
|
| 633 |
+
passed = 0
|
| 634 |
+
for case in root.iter("testcase"):
|
| 635 |
+
if not any(child.tag in JUNIT_RESULT_TAGS for child in case):
|
| 636 |
+
passed += 1
|
| 637 |
+
return passed
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def branch_attempt_metrics(
|
| 641 |
+
raw_xml: str, *, run_output: str, expected_tests: int
|
| 642 |
+
) -> tuple[int, int, int, int]:
|
| 643 |
+
"""Return (crashes, n_testcases, failures, missing_from_xml)."""
|
| 644 |
+
crashes = count_worker_crashes(raw_xml)
|
| 645 |
+
if run_output_indicates_xdist_collapse(run_output):
|
| 646 |
+
crashes = max(crashes, 1)
|
| 647 |
+
n_tests = count_testcases(raw_xml)
|
| 648 |
+
failures = count_junit_failures(raw_xml)
|
| 649 |
+
missing = max(0, expected_tests - n_tests)
|
| 650 |
+
return crashes, n_tests, failures, missing
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def needs_serial_retry(
|
| 654 |
+
*,
|
| 655 |
+
serial: bool,
|
| 656 |
+
crashes: int,
|
| 657 |
+
missing: int,
|
| 658 |
+
failures: int,
|
| 659 |
+
n_tests: int,
|
| 660 |
+
expected_tests: int,
|
| 661 |
+
run_output: str,
|
| 662 |
+
) -> bool:
|
| 663 |
+
if serial:
|
| 664 |
+
return False
|
| 665 |
+
high_failure_rate = (
|
| 666 |
+
expected_tests > 0 and n_tests >= expected_tests and failures / n_tests >= 0.8
|
| 667 |
+
)
|
| 668 |
+
return (
|
| 669 |
+
crashes > 0
|
| 670 |
+
or missing > 0
|
| 671 |
+
or high_failure_rate
|
| 672 |
+
or run_output_indicates_xdist_collapse(run_output)
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def count_testcases(raw_xml: str) -> int:
|
| 677 |
+
try:
|
| 678 |
+
return sum(1 for _ in ET.fromstring(raw_xml).iter("testcase"))
|
| 679 |
+
except ET.ParseError:
|
| 680 |
+
return 0
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def scored_results(
|
| 684 |
+
result: dict[str, Any], metadata: dict[str, Any]
|
| 685 |
+
) -> list[dict[str, Any]]:
|
| 686 |
+
active = active_tests(metadata)
|
| 687 |
+
by_key = {
|
| 688 |
+
f"{test['branch']}/{test['name']}": test
|
| 689 |
+
for test in result["test_results"]
|
| 690 |
+
if f"{test['branch']}/{test['name']}" in active
|
| 691 |
+
}
|
| 692 |
+
return [
|
| 693 |
+
by_key.get(
|
| 694 |
+
key,
|
| 695 |
+
{
|
| 696 |
+
"branch": key.split("/", 1)[0],
|
| 697 |
+
"name": key.split("/", 1)[1],
|
| 698 |
+
"status": "not_run",
|
| 699 |
+
"extra": {"error_code": "missing_from_results"},
|
| 700 |
+
},
|
| 701 |
+
)
|
| 702 |
+
for key in sorted(active)
|
| 703 |
+
]
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def summarize(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 707 |
+
scored = scored_results(result, metadata)
|
| 708 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 709 |
+
n_tests = len(scored)
|
| 710 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 711 |
+
# Multi-key reward: Harbor's default Mean aggregates each key independently
|
| 712 |
+
# (see harbor.metrics.base.aggregate_reward_dicts), so mean("resolved") is
|
| 713 |
+
# the proportion of tasks scoring a perfect pass-rate and mean of
|
| 714 |
+
# "almost_resolved" is the proportion scoring >= 0.95. "reward" stays the
|
| 715 |
+
# per-task pass-rate whose mean is the overall mean reward.
|
| 716 |
+
return {
|
| 717 |
+
"reward": pass_rate,
|
| 718 |
+
"resolved": 1.0 if pass_rate >= 1.0 else 0.0,
|
| 719 |
+
"almost_resolved": 1.0 if pass_rate >= 0.95 else 0.0,
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
def diagnostics(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 724 |
+
scored = scored_results(result, metadata)
|
| 725 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 726 |
+
n_tests = len(scored)
|
| 727 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 728 |
+
return {
|
| 729 |
+
"pass_rate": pass_rate,
|
| 730 |
+
"resolved": int(
|
| 731 |
+
bool(
|
| 732 |
+
n_tests
|
| 733 |
+
and n_passed == n_tests
|
| 734 |
+
and not result["test_branch_errors"]
|
| 735 |
+
and not result["error_code"]
|
| 736 |
+
)
|
| 737 |
+
),
|
| 738 |
+
"n_passed": n_passed,
|
| 739 |
+
"n_tests": n_tests,
|
| 740 |
+
"n_branch_errors": len(result["test_branch_errors"]),
|
| 741 |
+
"infra_error": int(bool(result["error_code"] or result["test_branch_errors"])),
|
| 742 |
+
"executable_hash_present": int(bool(result.get("executable_hash"))),
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def use_script_pty() -> bool:
|
| 747 |
+
return os.environ.get("PROGRAMGYM_SCRIPT_PTY", "").strip() == "1"
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def script_pty_available() -> bool:
|
| 751 |
+
return shutil.which("script") is not None
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
def branch_env(
|
| 755 |
+
*,
|
| 756 |
+
serial: bool,
|
| 757 |
+
has_rerunfailures: bool,
|
| 758 |
+
extras: dict[str, str] | None = None,
|
| 759 |
+
) -> dict[str, str]:
|
| 760 |
+
addopts = ["--max-worker-restart=4"]
|
| 761 |
+
# A serial fallback is already a complete second execution. Re-running each
|
| 762 |
+
# failing test two more times makes large, failure-heavy suites prohibitively
|
| 763 |
+
# slow and adds little signal.
|
| 764 |
+
if has_rerunfailures and not serial:
|
| 765 |
+
addopts.extend(["--reruns=2", "--reruns-delay=1"])
|
| 766 |
+
env = {
|
| 767 |
+
"PYTEST_ADDOPTS": " ".join(addopts),
|
| 768 |
+
# Match upstream non-TTY regression environments (dirble log format, etc.).
|
| 769 |
+
"NO_COLOR": "1",
|
| 770 |
+
"TERM": "dumb",
|
| 771 |
+
"CLICOLOR": "0",
|
| 772 |
+
"CLICOLOR_FORCE": "0",
|
| 773 |
+
"COLORTERM": "",
|
| 774 |
+
}
|
| 775 |
+
if extras:
|
| 776 |
+
env.update(extras)
|
| 777 |
+
xdist_workers = os.environ.get("PROGRAMGYM_XDIST_WORKERS")
|
| 778 |
+
if serial:
|
| 779 |
+
xdist_workers = "1"
|
| 780 |
+
if xdist_workers:
|
| 781 |
+
env["PYTEST_XDIST_AUTO_NUM_WORKERS"] = xdist_workers
|
| 782 |
+
return env
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
_SERIAL_RUN_SH = ".programgym_run_serial.sh"
|
| 786 |
+
# ``eval/run.sh`` usually passes ``-n auto`` on the command line, which overrides
|
| 787 |
+
# ``PYTEST_ADDOPTS``. Rewrite to ``-n 0`` in a verifier-local copy for retries.
|
| 788 |
+
_RUN_SH_XDIST_RE = re.compile(r"-n\s*(?:auto|\d+)")
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
def prepare_serial_run_sh(run_sh: Path) -> Path:
|
| 792 |
+
"""Write a serial-only copy of ``eval/run.sh`` with xdist disabled."""
|
| 793 |
+
serial_sh = run_sh.with_name(_SERIAL_RUN_SH)
|
| 794 |
+
patched = _RUN_SH_XDIST_RE.sub("-n 0", run_sh.read_text())
|
| 795 |
+
serial_sh.write_text(patched)
|
| 796 |
+
serial_sh.chmod(0o755)
|
| 797 |
+
return serial_sh
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
def run_tests_command(*, serial: bool) -> str:
|
| 801 |
+
if serial:
|
| 802 |
+
inner = f"chmod +x ./eval/{_SERIAL_RUN_SH} && ./eval/{_SERIAL_RUN_SH}"
|
| 803 |
+
else:
|
| 804 |
+
inner = "chmod +x ./eval/run.sh && ./eval/run.sh"
|
| 805 |
+
if use_script_pty() and script_pty_available():
|
| 806 |
+
return f"script -q -c {shlex.quote(inner)} /dev/null"
|
| 807 |
+
return inner
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
BAKED_BLOB_DIR = Path(os.environ.get("PROGRAMGYM_BAKED_BLOB_DIR", "/tests/blobs"))
|
| 811 |
+
|
| 812 |
+
|
| 813 |
+
def resolve_blob_dir(instance_id: str, metadata: dict[str, Any]) -> Path:
|
| 814 |
+
"""Locate the per-instance blob directory.
|
| 815 |
+
|
| 816 |
+
Resolution order:
|
| 817 |
+
|
| 818 |
+
1. ``/tests/blobs/`` if pre-fetched into the task at generation time
|
| 819 |
+
(``programgym-adapter --download-blobs``). Verifier-only mount, so
|
| 820 |
+
agent never sees these.
|
| 821 |
+
2. ``PROGRAMGYM_BLOB_DIR`` env override pointing at an HF-cache-shaped
|
| 822 |
+
tree on disk (``<dir>/<instance_id>/tests/<branch>.tar.gz``). Useful
|
| 823 |
+
for offline reruns sharing a cache across many tasks.
|
| 824 |
+
3. ``huggingface_hub.snapshot_download`` from
|
| 825 |
+
``programgym/ProgramGym-Tests`` (default repo, ``main`` revision).
|
| 826 |
+
|
| 827 |
+
The returned directory contains ``tests/<branch>.tar.gz`` per active
|
| 828 |
+
branch — same shape as ``programgym/ProgramGym-Tests/<instance_id>/``
|
| 829 |
+
on HF.
|
| 830 |
+
"""
|
| 831 |
+
if BAKED_BLOB_DIR.exists() and (BAKED_BLOB_DIR / "tests").exists():
|
| 832 |
+
return BAKED_BLOB_DIR
|
| 833 |
+
|
| 834 |
+
local = os.environ.get("PROGRAMGYM_BLOB_DIR", "").strip()
|
| 835 |
+
if local:
|
| 836 |
+
candidate = Path(local) / instance_id
|
| 837 |
+
if candidate.exists():
|
| 838 |
+
return candidate
|
| 839 |
+
raise FileNotFoundError(
|
| 840 |
+
f"PROGRAMGYM_BLOB_DIR set but {candidate} does not exist"
|
| 841 |
+
)
|
| 842 |
+
|
| 843 |
+
repo_id = os.environ.get("PROGRAMGYM_HF_REPO") or metadata.get(
|
| 844 |
+
"hf_repo_id", DEFAULT_HF_REPO_ID
|
| 845 |
+
)
|
| 846 |
+
revision = os.environ.get("PROGRAMGYM_HF_REVISION") or metadata.get(
|
| 847 |
+
"hf_revision", DEFAULT_HF_REVISION
|
| 848 |
+
)
|
| 849 |
+
|
| 850 |
+
from huggingface_hub import snapshot_download
|
| 851 |
+
|
| 852 |
+
cache_root = Path(
|
| 853 |
+
snapshot_download(
|
| 854 |
+
repo_id,
|
| 855 |
+
repo_type="dataset",
|
| 856 |
+
revision=revision,
|
| 857 |
+
allow_patterns=f"{instance_id}/**",
|
| 858 |
+
)
|
| 859 |
+
)
|
| 860 |
+
blob_dir = cache_root / instance_id
|
| 861 |
+
if not blob_dir.exists():
|
| 862 |
+
raise FileNotFoundError(
|
| 863 |
+
f"HF blob directory missing for {instance_id} at {blob_dir}"
|
| 864 |
+
)
|
| 865 |
+
return blob_dir
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
def evaluate(metadata: dict[str, Any]) -> dict[str, Any]:
|
| 869 |
+
bootstrap_toolchain_path()
|
| 870 |
+
branches = metadata.get("branches", {})
|
| 871 |
+
active_branch_items = [
|
| 872 |
+
(name, info) for name, info in branches.items() if not info.get("ignored")
|
| 873 |
+
]
|
| 874 |
+
result: dict[str, Any] = {
|
| 875 |
+
"test_results": [],
|
| 876 |
+
"error_code": None,
|
| 877 |
+
"error_details": None,
|
| 878 |
+
"log": [],
|
| 879 |
+
"solution_branch": "submission",
|
| 880 |
+
"test_branches": [name for name, _ in active_branch_items],
|
| 881 |
+
"test_branch_errors": {},
|
| 882 |
+
"executable_hash": None,
|
| 883 |
+
"warnings": [],
|
| 884 |
+
}
|
| 885 |
+
|
| 886 |
+
instance_id = metadata["instance_id"]
|
| 887 |
+
|
| 888 |
+
compile_timeout = int(os.environ.get("PROGRAMGYM_COMPILE_TIMEOUT", "900"))
|
| 889 |
+
branch_timeout = int(os.environ.get("PROGRAMGYM_BRANCH_TIMEOUT", "3600"))
|
| 890 |
+
|
| 891 |
+
def fail_all(error_code: str, details: str) -> dict[str, Any]:
|
| 892 |
+
result["error_code"] = error_code
|
| 893 |
+
result["error_details"] = details
|
| 894 |
+
for branch, info in active_branch_items:
|
| 895 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 896 |
+
return result
|
| 897 |
+
|
| 898 |
+
with tempfile.TemporaryDirectory(prefix="programgym-eval-") as tmp:
|
| 899 |
+
compiled_snapshot = Path(tmp) / "compiled"
|
| 900 |
+
|
| 901 |
+
started = time.monotonic()
|
| 902 |
+
removed = remove_hashed_files(
|
| 903 |
+
WORKSPACE, set(metadata.get("eval_clean_hashes", []))
|
| 904 |
+
)
|
| 905 |
+
result["log"].append(
|
| 906 |
+
{
|
| 907 |
+
"step": "remove_hashed_files",
|
| 908 |
+
"command": "remove files matching eval_clean_hashes",
|
| 909 |
+
"wall_time": time.monotonic() - started,
|
| 910 |
+
"output": "".join(f"removed '{path}'\n" for path in removed),
|
| 911 |
+
"returncode": 0,
|
| 912 |
+
"exception_info": "",
|
| 913 |
+
}
|
| 914 |
+
)
|
| 915 |
+
|
| 916 |
+
compile_sh = WORKSPACE / "compile.sh"
|
| 917 |
+
if not compile_sh.exists():
|
| 918 |
+
return fail_all(
|
| 919 |
+
"missing_compile_sh", "submission did not contain compile.sh"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
seed = (
|
| 923 |
+
"if [ ! -d .git ]; then "
|
| 924 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 925 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 926 |
+
"git -c init.defaultBranch=gold init -q && "
|
| 927 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false add -A && "
|
| 928 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 929 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 930 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false commit -q --allow-empty -m gold; "
|
| 931 |
+
"fi"
|
| 932 |
+
)
|
| 933 |
+
try:
|
| 934 |
+
result["log"].append(
|
| 935 |
+
run_step(seed, WORKSPACE, timeout=300, step="seed_git")
|
| 936 |
+
)
|
| 937 |
+
compile_log = run_step(
|
| 938 |
+
"chmod +x ./compile.sh && ./compile.sh",
|
| 939 |
+
WORKSPACE,
|
| 940 |
+
timeout=compile_timeout,
|
| 941 |
+
step="compile",
|
| 942 |
+
accept_failure=True,
|
| 943 |
+
)
|
| 944 |
+
result["log"].append(compile_log)
|
| 945 |
+
if compile_log["returncode"]:
|
| 946 |
+
return fail_all("compile_failed", compile_log["output"])
|
| 947 |
+
executable = WORKSPACE / "executable"
|
| 948 |
+
if not executable.exists():
|
| 949 |
+
return fail_all(
|
| 950 |
+
"missing_executable",
|
| 951 |
+
"compile.sh completed but did not create ./executable",
|
| 952 |
+
)
|
| 953 |
+
STASHED_EXECUTABLE.parent.mkdir(parents=True, exist_ok=True)
|
| 954 |
+
# `move` (not copy) so /workspace doesn't keep a parallel copy of
|
| 955 |
+
# the agent's executable during the stash→restore window. Mirrors
|
| 956 |
+
# upstream `mv ./executable {STASHED}` (eval.py:472).
|
| 957 |
+
shutil.move(str(executable), STASHED_EXECUTABLE)
|
| 958 |
+
result["executable_hash"] = sha256(STASHED_EXECUTABLE)
|
| 959 |
+
result["log"].append(
|
| 960 |
+
run_step(
|
| 961 |
+
"pip3 install -q --disable-pip-version-check pytest-rerunfailures",
|
| 962 |
+
WORKSPACE,
|
| 963 |
+
timeout=120,
|
| 964 |
+
step="install_rerunfailures",
|
| 965 |
+
accept_failure=True,
|
| 966 |
+
)
|
| 967 |
+
)
|
| 968 |
+
has_rerunfailures = result["log"][-1]["returncode"] == 0
|
| 969 |
+
handoff_removed = remove_oracle_handoff_artifacts()
|
| 970 |
+
if handoff_removed:
|
| 971 |
+
result["log"].append(
|
| 972 |
+
{
|
| 973 |
+
"step": "remove_oracle_handoff",
|
| 974 |
+
"command": "remove oracle handoff artifacts from workspace",
|
| 975 |
+
"wall_time": 0.0,
|
| 976 |
+
"output": "".join(
|
| 977 |
+
f"removed '{name}'\n" for name in handoff_removed
|
| 978 |
+
),
|
| 979 |
+
"returncode": 0,
|
| 980 |
+
"exception_info": "",
|
| 981 |
+
}
|
| 982 |
+
)
|
| 983 |
+
snapshot_workspace(compiled_snapshot)
|
| 984 |
+
except Exception as exc:
|
| 985 |
+
return fail_all(type(exc).__name__, str(exc))
|
| 986 |
+
|
| 987 |
+
try:
|
| 988 |
+
blob_dir = resolve_blob_dir(instance_id, metadata)
|
| 989 |
+
except Exception as exc:
|
| 990 |
+
details = f"{type(exc).__name__}: {exc}"
|
| 991 |
+
for branch, info in active_branch_items:
|
| 992 |
+
result["test_branch_errors"][branch] = [
|
| 993 |
+
{
|
| 994 |
+
"error_code": "blob_resolution_failed",
|
| 995 |
+
"error_details": details,
|
| 996 |
+
}
|
| 997 |
+
]
|
| 998 |
+
inject_not_run(
|
| 999 |
+
result, branch, branch_tests(info), "blob_resolution_failed"
|
| 1000 |
+
)
|
| 1001 |
+
return result
|
| 1002 |
+
|
| 1003 |
+
for branch, info in active_branch_items:
|
| 1004 |
+
tests = branch_tests(info)
|
| 1005 |
+
blob = blob_dir / "tests" / f"{branch}.tar.gz"
|
| 1006 |
+
if not blob.exists():
|
| 1007 |
+
result["test_branch_errors"][branch] = [
|
| 1008 |
+
{"error_code": "missing_test_blob", "error_details": blob.name}
|
| 1009 |
+
]
|
| 1010 |
+
inject_not_run(result, branch, tests, "missing_test_blob")
|
| 1011 |
+
continue
|
| 1012 |
+
|
| 1013 |
+
best_xml = ""
|
| 1014 |
+
# Prefer a complete, clean XML result, then the result covering the
|
| 1015 |
+
# most expected tests, and only then the one with the most passes.
|
| 1016 |
+
# Pass-count-only ranking can retain a partial xdist result over a
|
| 1017 |
+
# complete serial result.
|
| 1018 |
+
best_quality = (-1, -1, -1)
|
| 1019 |
+
serial = bool(metadata.get("force_serial_branches"))
|
| 1020 |
+
branch_log: list[dict[str, Any]] = []
|
| 1021 |
+
branch_ignored = {
|
| 1022 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 1023 |
+
}
|
| 1024 |
+
n_expected = len([name for name in tests if name not in branch_ignored])
|
| 1025 |
+
|
| 1026 |
+
def merge_best_xml(raw_xml: str) -> None:
|
| 1027 |
+
try:
|
| 1028 |
+
parsed, warnings = parse_junit(
|
| 1029 |
+
raw_xml, branch, list(info.get("tests", [])), branch_ignored
|
| 1030 |
+
)
|
| 1031 |
+
except Exception as exc:
|
| 1032 |
+
result["test_branch_errors"][branch] = [
|
| 1033 |
+
{"error_code": "xml_parse_error", "error_details": str(exc)}
|
| 1034 |
+
]
|
| 1035 |
+
inject_not_run(result, branch, tests, "xml_parse_error")
|
| 1036 |
+
else:
|
| 1037 |
+
result["test_results"].extend(parsed)
|
| 1038 |
+
result["warnings"].extend(warnings)
|
| 1039 |
+
|
| 1040 |
+
while True:
|
| 1041 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1042 |
+
restore_workspace(compiled_snapshot)
|
| 1043 |
+
extract_trusted_blob(blob, WORKSPACE)
|
| 1044 |
+
restore_reference_executable()
|
| 1045 |
+
actual_hash = sha256(WORKSPACE / "executable")
|
| 1046 |
+
if actual_hash != result["executable_hash"]:
|
| 1047 |
+
result["test_branch_errors"][branch] = [
|
| 1048 |
+
{
|
| 1049 |
+
"error_code": "executable_hash_mismatch",
|
| 1050 |
+
"error_details": (
|
| 1051 |
+
f"expected {result['executable_hash']}, got {actual_hash}"
|
| 1052 |
+
),
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
inject_not_run(result, branch, tests, "executable_hash_mismatch")
|
| 1056 |
+
break
|
| 1057 |
+
run_sh = WORKSPACE / "eval" / "run.sh"
|
| 1058 |
+
if not run_sh.exists():
|
| 1059 |
+
result["test_branch_errors"][branch] = [
|
| 1060 |
+
{
|
| 1061 |
+
"error_code": "missing_run_sh",
|
| 1062 |
+
"error_details": "eval/run.sh missing",
|
| 1063 |
+
}
|
| 1064 |
+
]
|
| 1065 |
+
inject_not_run(result, branch, tests, "missing_run_sh")
|
| 1066 |
+
break
|
| 1067 |
+
# Upstream rewrites thread→signal so xdist workers fail cleanly
|
| 1068 |
+
# instead of os._exit(1) on timeout. That works in fresh
|
| 1069 |
+
# containers per branch; here we reuse one container and
|
| 1070 |
+
# signal timeouts leave TUI/log-watcher subprocesses alive
|
| 1071 |
+
# (e.g. lazygit --logs + tail -f), wedging pytest for up to
|
| 1072 |
+
# branch_timeout. Keep the blob's thread method and rely on
|
| 1073 |
+
# cleanup_lingering_processes + serial fallback after crashes.
|
| 1074 |
+
env = branch_env(
|
| 1075 |
+
serial=serial,
|
| 1076 |
+
has_rerunfailures=has_rerunfailures,
|
| 1077 |
+
extras=metadata.get("branch_env"),
|
| 1078 |
+
)
|
| 1079 |
+
branch_log.append(
|
| 1080 |
+
run_step(
|
| 1081 |
+
"rm -f eval/results.xml results.xml",
|
| 1082 |
+
WORKSPACE,
|
| 1083 |
+
timeout=120,
|
| 1084 |
+
step="clean_stale_results",
|
| 1085 |
+
accept_failure=True,
|
| 1086 |
+
)
|
| 1087 |
+
)
|
| 1088 |
+
if serial:
|
| 1089 |
+
prepare_serial_run_sh(run_sh)
|
| 1090 |
+
run_entry = run_step(
|
| 1091 |
+
run_tests_command(serial=serial),
|
| 1092 |
+
WORKSPACE,
|
| 1093 |
+
timeout=branch_timeout,
|
| 1094 |
+
env=env,
|
| 1095 |
+
step="run_tests",
|
| 1096 |
+
accept_failure=True,
|
| 1097 |
+
)
|
| 1098 |
+
branch_log.append(run_entry)
|
| 1099 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1100 |
+
xml_path = find_results_xml()
|
| 1101 |
+
if xml_path is None:
|
| 1102 |
+
if best_xml:
|
| 1103 |
+
merge_best_xml(best_xml)
|
| 1104 |
+
break
|
| 1105 |
+
if serial:
|
| 1106 |
+
result["test_branch_errors"][branch] = [
|
| 1107 |
+
{
|
| 1108 |
+
"error_code": "missing_results_xml",
|
| 1109 |
+
"error_details": "eval/results.xml was not produced",
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
inject_not_run(result, branch, tests, "missing_results_xml")
|
| 1113 |
+
break
|
| 1114 |
+
serial = True
|
| 1115 |
+
continue
|
| 1116 |
+
raw_xml = xml_path.read_text(errors="replace")
|
| 1117 |
+
crashes, n_tests, failures, missing = branch_attempt_metrics(
|
| 1118 |
+
raw_xml,
|
| 1119 |
+
run_output=run_entry.get("output", ""),
|
| 1120 |
+
expected_tests=n_expected,
|
| 1121 |
+
)
|
| 1122 |
+
useful = count_junit_passed(raw_xml)
|
| 1123 |
+
quality = (
|
| 1124 |
+
int(crashes == 0 and missing == 0),
|
| 1125 |
+
n_tests,
|
| 1126 |
+
useful,
|
| 1127 |
+
)
|
| 1128 |
+
if quality > best_quality:
|
| 1129 |
+
best_xml = raw_xml
|
| 1130 |
+
best_quality = quality
|
| 1131 |
+
retry = needs_serial_retry(
|
| 1132 |
+
serial=serial,
|
| 1133 |
+
crashes=crashes,
|
| 1134 |
+
missing=missing,
|
| 1135 |
+
failures=failures,
|
| 1136 |
+
n_tests=n_tests,
|
| 1137 |
+
expected_tests=n_expected,
|
| 1138 |
+
run_output=run_entry.get("output", ""),
|
| 1139 |
+
)
|
| 1140 |
+
if not retry:
|
| 1141 |
+
merge_best_xml(best_xml)
|
| 1142 |
+
break
|
| 1143 |
+
serial = True
|
| 1144 |
+
for entry in branch_log:
|
| 1145 |
+
entry["branch"] = branch
|
| 1146 |
+
result["log"].extend(branch_log)
|
| 1147 |
+
|
| 1148 |
+
return result
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
def write_outputs(result: dict[str, Any], metadata: dict[str, Any]) -> None:
|
| 1152 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1153 |
+
write_json(LOG_DIR / "programgym_eval.json", result)
|
| 1154 |
+
write_json(LOG_DIR / "harbor_diagnostics.json", diagnostics(result, metadata))
|
| 1155 |
+
rewards = summarize(result, metadata)
|
| 1156 |
+
write_json(LOG_DIR / "reward.json", rewards)
|
| 1157 |
+
(LOG_DIR / "reward.txt").write_text(str(rewards["reward"]))
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
def main() -> None:
|
| 1161 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1162 |
+
log_path = LOG_DIR / "programgym_eval.log"
|
| 1163 |
+
metadata = json.loads(METADATA_PATH.read_text())
|
| 1164 |
+
branches = metadata.get("branches", {})
|
| 1165 |
+
try:
|
| 1166 |
+
result = evaluate(metadata)
|
| 1167 |
+
except Exception as exc:
|
| 1168 |
+
error_code = type(exc).__name__
|
| 1169 |
+
result = {
|
| 1170 |
+
"test_results": [],
|
| 1171 |
+
"error_code": error_code,
|
| 1172 |
+
"error_details": str(exc),
|
| 1173 |
+
"log": [
|
| 1174 |
+
{
|
| 1175 |
+
"step": "evaluator_exception",
|
| 1176 |
+
"exception_info": traceback.format_exc(),
|
| 1177 |
+
"returncode": 1,
|
| 1178 |
+
}
|
| 1179 |
+
],
|
| 1180 |
+
"solution_branch": "submission",
|
| 1181 |
+
"test_branches": [
|
| 1182 |
+
name for name, info in branches.items() if not info.get("ignored")
|
| 1183 |
+
],
|
| 1184 |
+
"test_branch_errors": {
|
| 1185 |
+
"__evaluator__": [{"error_code": error_code, "error_details": str(exc)}]
|
| 1186 |
+
},
|
| 1187 |
+
"executable_hash": None,
|
| 1188 |
+
"warnings": [],
|
| 1189 |
+
}
|
| 1190 |
+
for branch, info in branches.items():
|
| 1191 |
+
if info.get("ignored"):
|
| 1192 |
+
continue
|
| 1193 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 1194 |
+
log_path.write_text(traceback.format_exc())
|
| 1195 |
+
else:
|
| 1196 |
+
log_path.write_text("")
|
| 1197 |
+
write_outputs(result, metadata)
|
| 1198 |
+
|
| 1199 |
+
|
| 1200 |
+
if __name__ == "__main__":
|
| 1201 |
+
main()
|
github-release--github-release.2/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,1068 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [
|
| 7 |
+
{
|
| 8 |
+
"name": "eval.tests.test_env_resolution.test_auth_user_env_falls_back_to_user",
|
| 9 |
+
"reasons": [
|
| 10 |
+
{
|
| 11 |
+
"id": "test_network_dependency",
|
| 12 |
+
"message": "test appears to depend on networking",
|
| 13 |
+
"path": "eval/tests/test_env_resolution.py",
|
| 14 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 15 |
+
"severity": "error",
|
| 16 |
+
"stage": "static_lint"
|
| 17 |
+
}
|
| 18 |
+
]
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
"tests": [
|
| 22 |
+
"eval.tests.test_auth_identity_and_encoding.test_delete_auth_user_reaches_lookup_not_delete_request",
|
| 23 |
+
"eval.tests.test_auth_identity_and_encoding.test_download_auth_user_reaches_lookup_not_asset_get",
|
| 24 |
+
"eval.tests.test_auth_identity_and_encoding.test_edit_auth_user_reaches_lookup_not_patch_request",
|
| 25 |
+
"eval.tests.test_auth_identity_and_encoding.test_edit_stdin_empty_description_patches_empty_string",
|
| 26 |
+
"eval.tests.test_auth_identity_and_encoding.test_info_text_release_with_no_assets_has_no_artifact_lines",
|
| 27 |
+
"eval.tests.test_auth_identity_and_encoding.test_release_stdin_empty_description_posts_empty_string",
|
| 28 |
+
"eval.tests.test_auth_identity_and_encoding.test_upload_auth_user_reaches_lookup_not_post_request",
|
| 29 |
+
"eval.tests.test_auth_identity_and_encoding.test_upload_label_percent_encodes_special_characters",
|
| 30 |
+
"eval.tests.test_auth_identity_and_encoding.test_verbose_upload_removing_stale_asset_trace",
|
| 31 |
+
"eval.tests.test_cli_entrypoint.test_global_flags_accepted_with_help[--quiet]",
|
| 32 |
+
"eval.tests.test_cli_entrypoint.test_global_flags_accepted_with_help[--verbose]",
|
| 33 |
+
"eval.tests.test_cli_entrypoint.test_global_flags_accepted_with_help[-q]",
|
| 34 |
+
"eval.tests.test_cli_entrypoint.test_global_flags_accepted_with_help[-v]",
|
| 35 |
+
"eval.tests.test_cli_entrypoint.test_long_help_prints_usage",
|
| 36 |
+
"eval.tests.test_cli_entrypoint.test_no_arguments_prints_help",
|
| 37 |
+
"eval.tests.test_cli_entrypoint.test_repeated_verbose_flag_accepted",
|
| 38 |
+
"eval.tests.test_cli_entrypoint.test_short_h_prints_usage",
|
| 39 |
+
"eval.tests.test_cli_entrypoint.test_unknown_subsubcommand_for_each_verb[delete]",
|
| 40 |
+
"eval.tests.test_cli_entrypoint.test_unknown_subsubcommand_for_each_verb[download]",
|
| 41 |
+
"eval.tests.test_cli_entrypoint.test_unknown_subsubcommand_for_each_verb[edit]",
|
| 42 |
+
"eval.tests.test_cli_entrypoint.test_unknown_subsubcommand_for_each_verb[info]",
|
| 43 |
+
"eval.tests.test_cli_entrypoint.test_unknown_subsubcommand_for_each_verb[release]",
|
| 44 |
+
"eval.tests.test_cli_entrypoint.test_unknown_subsubcommand_for_each_verb[upload]",
|
| 45 |
+
"eval.tests.test_cli_entrypoint.test_unknown_verb_is_rejected",
|
| 46 |
+
"eval.tests.test_cli_entrypoint.test_version_flag_prints_version[--version]",
|
| 47 |
+
"eval.tests.test_cli_entrypoint.test_version_plus_verb_still_prints_version",
|
| 48 |
+
"eval.tests.test_download.test_download_asset_get_authenticated_with_env_token",
|
| 49 |
+
"eval.tests.test_download.test_download_asset_not_found_fails",
|
| 50 |
+
"eval.tests.test_download.test_download_empty_repo_rejected_at_runtime",
|
| 51 |
+
"eval.tests.test_download.test_download_empty_user_rejected_at_runtime",
|
| 52 |
+
"eval.tests.test_download.test_download_latest_flag_uses_latest_endpoint",
|
| 53 |
+
"eval.tests.test_download.test_download_latest_missing_asset_fails",
|
| 54 |
+
"eval.tests.test_download.test_download_non_200_fails",
|
| 55 |
+
"eval.tests.test_download.test_download_security_token_flag_overrides_env",
|
| 56 |
+
"eval.tests.test_download.test_download_streams_asset_to_stdout",
|
| 57 |
+
"eval.tests.test_download.test_download_writes_file_when_stdout_is_tty",
|
| 58 |
+
"eval.tests.test_env_resolution.test_auth_user_env_falls_back_to_user",
|
| 59 |
+
"eval.tests.test_env_resolution.test_auth_user_flag_overrides_env_identity",
|
| 60 |
+
"eval.tests.test_env_resolution.test_env_repo_missing_still_validates",
|
| 61 |
+
"eval.tests.test_env_resolution.test_env_token_used_when_no_flag",
|
| 62 |
+
"eval.tests.test_env_resolution.test_flag_security_token_wins_over_env",
|
| 63 |
+
"eval.tests.test_env_resolution.test_github_api_routes_to_custom_endpoint",
|
| 64 |
+
"eval.tests.test_env_resolution.test_info_uses_env_user_and_repo",
|
| 65 |
+
"eval.tests.test_env_resolution.test_override_env_with_flag_user_repo",
|
| 66 |
+
"eval.tests.test_env_resolution.test_verbose_flag_enables_stderr_trace",
|
| 67 |
+
"eval.tests.test_info.test_info_fetch_tags_http_error",
|
| 68 |
+
"eval.tests.test_info.test_info_json_emits_null_releases_when_none",
|
| 69 |
+
"eval.tests.test_info.test_info_json_is_indented",
|
| 70 |
+
"eval.tests.test_info.test_info_json_is_valid_and_structured",
|
| 71 |
+
"eval.tests.test_info.test_info_json_with_tag_filter",
|
| 72 |
+
"eval.tests.test_info.test_info_no_tags_errors",
|
| 73 |
+
"eval.tests.test_info.test_info_nonexistent_tag_errors",
|
| 74 |
+
"eval.tests.test_info.test_info_release_list_http_error_without_tag",
|
| 75 |
+
"eval.tests.test_info.test_info_renders_with_tags_but_no_releases",
|
| 76 |
+
"eval.tests.test_info.test_info_tags_fetch_http_error_with_tag",
|
| 77 |
+
"eval.tests.test_info.test_info_text_marks_release_properties",
|
| 78 |
+
"eval.tests.test_info.test_info_text_multiple_assets_lines",
|
| 79 |
+
"eval.tests.test_info.test_info_text_release_row_asset_type_and_size",
|
| 80 |
+
"eval.tests.test_info.test_info_text_renders_tags_and_releases",
|
| 81 |
+
"eval.tests.test_info.test_info_with_tag_filters_release",
|
| 82 |
+
"eval.tests.test_info.test_quiet_does_not_suppress_success_output",
|
| 83 |
+
"eval.tests.test_iteration5_refinements.test_info_tag_filter_single_release_with_asset_exact_output",
|
| 84 |
+
"eval.tests.test_iteration5_refinements.test_info_tag_filter_with_release_but_no_tag_entry_renders_empty_tags_section",
|
| 85 |
+
"eval.tests.test_iteration5_refinements.test_release_generate_notes_preserves_explicit_name_and_description",
|
| 86 |
+
"eval.tests.test_latest_and_validation.test_download_latest_falls_back_to_release_list",
|
| 87 |
+
"eval.tests.test_latest_and_validation.test_download_latest_no_releases_fails",
|
| 88 |
+
"eval.tests.test_latest_and_validation.test_download_latest_picks_newest_release",
|
| 89 |
+
"eval.tests.test_latest_and_validation.test_info_release_fetch_http_error_with_tag",
|
| 90 |
+
"eval.tests.test_latest_and_validation.test_upload_empty_token_rejected",
|
| 91 |
+
"eval.tests.test_latest_and_validation.test_upload_empty_user_rejected",
|
| 92 |
+
"eval.tests.test_parse_validation.test_download_latest_and_tag_are_mutex",
|
| 93 |
+
"eval.tests.test_parse_validation.test_download_missing_name_reports_name",
|
| 94 |
+
"eval.tests.test_parse_validation.test_download_requires_latest_or_tag_or_name[args0-Error: --name must be specified]",
|
| 95 |
+
"eval.tests.test_parse_validation.test_download_requires_latest_or_tag_or_name[args1-Error: --name must be specified]",
|
| 96 |
+
"eval.tests.test_parse_validation.test_download_requires_latest_or_tag_or_name[args2-Error: --name must be specified]",
|
| 97 |
+
"eval.tests.test_parse_validation.test_download_requires_latest_or_tag_or_name[args3-Error: Exactly one of --latest, --tag must be specified]",
|
| 98 |
+
"eval.tests.test_parse_validation.test_edit_missing_token_fails_empty_token",
|
| 99 |
+
"eval.tests.test_parse_validation.test_info_missing_repo",
|
| 100 |
+
"eval.tests.test_parse_validation.test_info_missing_user_and_repo",
|
| 101 |
+
"eval.tests.test_parse_validation.test_obligatory_tag_enforced[args0-Error: --tag must be specified]",
|
| 102 |
+
"eval.tests.test_parse_validation.test_obligatory_tag_enforced[args1-Error: --tag must be specified]",
|
| 103 |
+
"eval.tests.test_parse_validation.test_obligatory_tag_enforced[args2-Error: --tag must be specified]",
|
| 104 |
+
"eval.tests.test_parse_validation.test_release_missing_credentials_fails_empty_repo",
|
| 105 |
+
"eval.tests.test_parse_validation.test_release_missing_credentials_fails_empty_user",
|
| 106 |
+
"eval.tests.test_parse_validation.test_release_missing_repo_fails_empty_repo",
|
| 107 |
+
"eval.tests.test_parse_validation.test_release_missing_token_fails_empty_token",
|
| 108 |
+
"eval.tests.test_parse_validation.test_upload_missing_file_rejected",
|
| 109 |
+
"eval.tests.test_parse_validation.test_upload_missing_name_rejected",
|
| 110 |
+
"eval.tests.test_parse_validation.test_upload_missing_tag_rejected",
|
| 111 |
+
"eval.tests.test_parse_validation.test_upload_missing_user_rejected",
|
| 112 |
+
"eval.tests.test_release_edit_delete.test_delete_deletes_release",
|
| 113 |
+
"eval.tests.test_release_edit_delete.test_delete_non_204_fails",
|
| 114 |
+
"eval.tests.test_release_edit_delete.test_delete_nonexistent_tag_fails",
|
| 115 |
+
"eval.tests.test_release_edit_delete.test_delete_request_authenticated",
|
| 116 |
+
"eval.tests.test_release_edit_delete.test_edit_422_fails",
|
| 117 |
+
"eval.tests.test_release_edit_delete.test_edit_defaults_to_tag_for_missing_name_desc",
|
| 118 |
+
"eval.tests.test_release_edit_delete.test_edit_http_request_carries_token_auth",
|
| 119 |
+
"eval.tests.test_release_edit_delete.test_edit_nonexistent_tag_fails",
|
| 120 |
+
"eval.tests.test_release_edit_delete.test_edit_passes_draft_and_prerelease_flags",
|
| 121 |
+
"eval.tests.test_release_edit_delete.test_edit_patches_release",
|
| 122 |
+
"eval.tests.test_release_edit_delete.test_edit_payload_defaults_draft_prerelease_false",
|
| 123 |
+
"eval.tests.test_release_edit_delete.test_edit_reads_description_from_stdin",
|
| 124 |
+
"eval.tests.test_release_edit_delete.test_edit_unexpected_status_fails",
|
| 125 |
+
"eval.tests.test_release_edit_delete.test_release_422_fails_not_created",
|
| 126 |
+
"eval.tests.test_release_edit_delete.test_release_500_fails",
|
| 127 |
+
"eval.tests.test_release_edit_delete.test_release_defaults_name_and_desc_to_tag",
|
| 128 |
+
"eval.tests.test_release_edit_delete.test_release_defaults_to_repo_default_target_when_omitted",
|
| 129 |
+
"eval.tests.test_release_edit_delete.test_release_generate_release_notes_flag",
|
| 130 |
+
"eval.tests.test_release_edit_delete.test_release_http_request_carries_token_auth",
|
| 131 |
+
"eval.tests.test_release_edit_delete.test_release_non_created_status_fails",
|
| 132 |
+
"eval.tests.test_release_edit_delete.test_release_payload_defaults_draft_prerelease_false",
|
| 133 |
+
"eval.tests.test_release_edit_delete.test_release_posts_expected_payload",
|
| 134 |
+
"eval.tests.test_release_edit_delete.test_release_reads_description_from_stdin",
|
| 135 |
+
"eval.tests.test_release_edit_delete.test_release_security_token_flag_overrides_env",
|
| 136 |
+
"eval.tests.test_upload.test_upload_502_cleans_up_partial_asset",
|
| 137 |
+
"eval.tests.test_upload.test_upload_502_partial_cleanup_failure_reported",
|
| 138 |
+
"eval.tests.test_upload.test_upload_asset_list_fetch_error",
|
| 139 |
+
"eval.tests.test_upload.test_upload_dash_file_accepted",
|
| 140 |
+
"eval.tests.test_upload.test_upload_empty_file_posts_empty_body",
|
| 141 |
+
"eval.tests.test_upload.test_upload_http_error_status_fails",
|
| 142 |
+
"eval.tests.test_upload.test_upload_includes_label_in_query",
|
| 143 |
+
"eval.tests.test_upload.test_upload_invalid_response_body_fails",
|
| 144 |
+
"eval.tests.test_upload.test_upload_missing_file_is_rejected",
|
| 145 |
+
"eval.tests.test_upload.test_upload_nonexistent_tag_fails",
|
| 146 |
+
"eval.tests.test_upload.test_upload_replace_delete_failure_reported",
|
| 147 |
+
"eval.tests.test_upload.test_upload_replace_deletes_existing_asset",
|
| 148 |
+
"eval.tests.test_upload.test_upload_replace_flag_removes_uploaded_asset",
|
| 149 |
+
"eval.tests.test_upload.test_upload_replaces_asset_in_new_state",
|
| 150 |
+
"eval.tests.test_upload.test_upload_success_posts_to_upload_url",
|
| 151 |
+
"eval.tests.test_upload.test_upload_transport_error_reported",
|
| 152 |
+
"eval.tests.test_upload.test_upload_unparseable_non_success_body",
|
| 153 |
+
"eval.tests.test_verbose_traces.test_verbose_delete_trace",
|
| 154 |
+
"eval.tests.test_verbose_traces.test_verbose_download_trace",
|
| 155 |
+
"eval.tests.test_verbose_traces.test_verbose_edit_trace",
|
| 156 |
+
"eval.tests.test_verbose_traces.test_verbose_info_all_releases_trace",
|
| 157 |
+
"eval.tests.test_verbose_traces.test_verbose_info_trace_shows_tag_query",
|
| 158 |
+
"eval.tests.test_verbose_traces.test_verbose_release_trace",
|
| 159 |
+
"eval.tests.test_verbose_traces.test_verbose_upload_trace",
|
| 160 |
+
"eval.tests.test_verbosity.test_nonzero_exit_code_on_runtime_error",
|
| 161 |
+
"eval.tests.test_verbosity.test_quiet_suppresses_error_output[args0-error: user and repo need to be passed as arguments\\n]",
|
| 162 |
+
"eval.tests.test_verbosity.test_quiet_suppresses_error_output[args1-]",
|
| 163 |
+
"eval.tests.test_verbosity.test_quiet_with_verbose_still_suppresses",
|
| 164 |
+
"eval.tests.test_verbosity.test_verbose_adds_stderr_trace_for_info",
|
| 165 |
+
"eval.tests.test_verbosity.test_verbose_does_not_suppress_runtime_error",
|
| 166 |
+
"eval.tests.test_verbosity.test_verbose_level_scales_output",
|
| 167 |
+
"eval.tests.test_verbosity.test_version_flag_short_circuits_missing_credentials",
|
| 168 |
+
"eval.tests.test_verbosity.test_version_flag_short_circuits_subcommand_error"
|
| 169 |
+
]
|
| 170 |
+
},
|
| 171 |
+
"generated_module_02": {
|
| 172 |
+
"ignore_reason": "",
|
| 173 |
+
"ignored": false,
|
| 174 |
+
"ignored_tests": [
|
| 175 |
+
{
|
| 176 |
+
"name": "eval.tests.test_00_smoke_validation.test_dash_h_prints_help_to_stderr",
|
| 177 |
+
"reasons": [
|
| 178 |
+
{
|
| 179 |
+
"id": "missing_fixture_assets",
|
| 180 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 181 |
+
"path": "eval/tests/test_00_smoke_validation.py",
|
| 182 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 183 |
+
"severity": "error",
|
| 184 |
+
"stage": "static_lint"
|
| 185 |
+
}
|
| 186 |
+
]
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"name": "eval.tests.test_00_smoke_validation.test_help_lists_every_verb",
|
| 190 |
+
"reasons": [
|
| 191 |
+
{
|
| 192 |
+
"id": "missing_fixture_assets",
|
| 193 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 194 |
+
"path": "eval/tests/test_00_smoke_validation.py",
|
| 195 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 196 |
+
"severity": "error",
|
| 197 |
+
"stage": "static_lint"
|
| 198 |
+
}
|
| 199 |
+
]
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"name": "eval.tests.test_00_smoke_validation.test_no_args_prints_help_to_stderr",
|
| 203 |
+
"reasons": [
|
| 204 |
+
{
|
| 205 |
+
"id": "missing_fixture_assets",
|
| 206 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 207 |
+
"path": "eval/tests/test_00_smoke_validation.py",
|
| 208 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 209 |
+
"severity": "error",
|
| 210 |
+
"stage": "static_lint"
|
| 211 |
+
}
|
| 212 |
+
]
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"name": "eval.tests.test_00_smoke_validation.test_upload_missing_file_is_usage_error",
|
| 216 |
+
"reasons": [
|
| 217 |
+
{
|
| 218 |
+
"id": "missing_fixture_assets",
|
| 219 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 220 |
+
"path": "eval/tests/test_00_smoke_validation.py",
|
| 221 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 222 |
+
"severity": "error",
|
| 223 |
+
"stage": "static_lint"
|
| 224 |
+
}
|
| 225 |
+
]
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"name": "eval.tests.test_01_client_get_info.test_info_auth_user_env_selects_auth_identity",
|
| 229 |
+
"reasons": [
|
| 230 |
+
{
|
| 231 |
+
"id": "test_network_dependency",
|
| 232 |
+
"message": "test appears to depend on networking",
|
| 233 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 234 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 235 |
+
"severity": "error",
|
| 236 |
+
"stage": "static_lint"
|
| 237 |
+
}
|
| 238 |
+
]
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"name": "eval.tests.test_01_client_get_info.test_info_auth_user_flag_controls_basic_auth",
|
| 242 |
+
"reasons": [
|
| 243 |
+
{
|
| 244 |
+
"id": "test_network_dependency",
|
| 245 |
+
"message": "test appears to depend on networking",
|
| 246 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 247 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 248 |
+
"severity": "error",
|
| 249 |
+
"stage": "static_lint"
|
| 250 |
+
}
|
| 251 |
+
]
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"name": "eval.tests.test_01_client_get_info.test_info_json_rendering_single",
|
| 255 |
+
"reasons": [
|
| 256 |
+
{
|
| 257 |
+
"id": "missing_fixture_assets",
|
| 258 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 259 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 260 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 261 |
+
"severity": "error",
|
| 262 |
+
"stage": "static_lint"
|
| 263 |
+
}
|
| 264 |
+
]
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"name": "eval.tests.test_01_client_get_info.test_info_sets_all_queries_per_page_100",
|
| 268 |
+
"reasons": [
|
| 269 |
+
{
|
| 270 |
+
"id": "test_network_dependency",
|
| 271 |
+
"message": "test appears to depend on networking",
|
| 272 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 273 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 274 |
+
"severity": "error",
|
| 275 |
+
"stage": "static_lint"
|
| 276 |
+
}
|
| 277 |
+
]
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"name": "eval.tests.test_01_client_get_info.test_info_tag_filtering_selects_single_tag",
|
| 281 |
+
"reasons": [
|
| 282 |
+
{
|
| 283 |
+
"id": "missing_fixture_assets",
|
| 284 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 285 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 286 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 287 |
+
"severity": "error",
|
| 288 |
+
"stage": "static_lint"
|
| 289 |
+
}
|
| 290 |
+
]
|
| 291 |
+
},
|
| 292 |
+
{
|
| 293 |
+
"name": "eval.tests.test_01_client_get_info.test_info_text_lists_all_releases_without_tag",
|
| 294 |
+
"reasons": [
|
| 295 |
+
{
|
| 296 |
+
"id": "missing_fixture_assets",
|
| 297 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 298 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 299 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 300 |
+
"severity": "error",
|
| 301 |
+
"stage": "static_lint"
|
| 302 |
+
}
|
| 303 |
+
]
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"name": "eval.tests.test_01_client_get_info.test_info_text_rendering_single",
|
| 307 |
+
"reasons": [
|
| 308 |
+
{
|
| 309 |
+
"id": "missing_fixture_assets",
|
| 310 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 311 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 312 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 313 |
+
"severity": "error",
|
| 314 |
+
"stage": "static_lint"
|
| 315 |
+
}
|
| 316 |
+
]
|
| 317 |
+
},
|
| 318 |
+
{
|
| 319 |
+
"name": "eval.tests.test_01_client_get_info.test_info_text_renders_asset_line",
|
| 320 |
+
"reasons": [
|
| 321 |
+
{
|
| 322 |
+
"id": "missing_fixture_assets",
|
| 323 |
+
"message": "pytest test references fixture assets that are not packaged",
|
| 324 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 325 |
+
"repair_hint": "Package referenced fixture, resource, golden, or test data files with the eval branch.",
|
| 326 |
+
"severity": "error",
|
| 327 |
+
"stage": "static_lint"
|
| 328 |
+
}
|
| 329 |
+
]
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"name": "eval.tests.test_01_client_get_info.test_verbose_info_prints_debug_to_stderr",
|
| 333 |
+
"reasons": [
|
| 334 |
+
{
|
| 335 |
+
"id": "generic_keyword_oracle",
|
| 336 |
+
"message": "pytest test uses a generic keyword oracle",
|
| 337 |
+
"path": "eval/tests/test_01_client_get_info.py",
|
| 338 |
+
"repair_hint": "Replace generic keyword checks with exact diagnostics, structured output, or golden comparisons.",
|
| 339 |
+
"severity": "error",
|
| 340 |
+
"stage": "static_lint"
|
| 341 |
+
}
|
| 342 |
+
]
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"name": "eval.tests.test_02_auth_upload.test_upload_replace_deletes_then_posts",
|
| 346 |
+
"reasons": [
|
| 347 |
+
{
|
| 348 |
+
"id": "test_network_dependency",
|
| 349 |
+
"message": "test appears to depend on networking",
|
| 350 |
+
"path": "eval/tests/test_02_auth_upload.py",
|
| 351 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 352 |
+
"severity": "error",
|
| 353 |
+
"stage": "static_lint"
|
| 354 |
+
}
|
| 355 |
+
]
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"name": "eval.tests.test_06_pagination.test_info_follows_next_link_and_concatenates_tags",
|
| 359 |
+
"reasons": [
|
| 360 |
+
{
|
| 361 |
+
"id": "test_network_dependency",
|
| 362 |
+
"message": "test appears to depend on networking",
|
| 363 |
+
"path": "eval/tests/test_06_pagination.py",
|
| 364 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 365 |
+
"severity": "error",
|
| 366 |
+
"stage": "static_lint"
|
| 367 |
+
}
|
| 368 |
+
]
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"name": "eval.tests.test_06_pagination.test_info_releases_paginated_and_concatenated",
|
| 372 |
+
"reasons": [
|
| 373 |
+
{
|
| 374 |
+
"id": "short_substring",
|
| 375 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 376 |
+
"path": "eval/tests/test_06_pagination.py",
|
| 377 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 378 |
+
"severity": "error",
|
| 379 |
+
"stage": "static_lint"
|
| 380 |
+
}
|
| 381 |
+
]
|
| 382 |
+
},
|
| 383 |
+
{
|
| 384 |
+
"name": "eval.tests.test_06_pagination.test_link_without_next_stops_after_first_page",
|
| 385 |
+
"reasons": [
|
| 386 |
+
{
|
| 387 |
+
"id": "short_substring",
|
| 388 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 389 |
+
"path": "eval/tests/test_06_pagination.py",
|
| 390 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 391 |
+
"severity": "error",
|
| 392 |
+
"stage": "static_lint"
|
| 393 |
+
}
|
| 394 |
+
]
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"name": "eval.tests.test_06_pagination.test_pagination_three_page_chain_terminates",
|
| 398 |
+
"reasons": [
|
| 399 |
+
{
|
| 400 |
+
"id": "short_substring",
|
| 401 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 402 |
+
"path": "eval/tests/test_06_pagination.py",
|
| 403 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 404 |
+
"severity": "error",
|
| 405 |
+
"stage": "static_lint"
|
| 406 |
+
}
|
| 407 |
+
]
|
| 408 |
+
},
|
| 409 |
+
{
|
| 410 |
+
"name": "eval.tests.test_09_more_behavior.test_pagination_empty_page2_array_concatenates",
|
| 411 |
+
"reasons": [
|
| 412 |
+
{
|
| 413 |
+
"id": "short_substring",
|
| 414 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 415 |
+
"path": "eval/tests/test_09_more_behavior.py",
|
| 416 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 417 |
+
"severity": "error",
|
| 418 |
+
"stage": "static_lint"
|
| 419 |
+
}
|
| 420 |
+
]
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"name": "eval.tests.test_09_more_behavior.test_pagination_next_link_with_empty_url_stops",
|
| 424 |
+
"reasons": [
|
| 425 |
+
{
|
| 426 |
+
"id": "short_substring",
|
| 427 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 428 |
+
"path": "eval/tests/test_09_more_behavior.py",
|
| 429 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 430 |
+
"severity": "error",
|
| 431 |
+
"stage": "static_lint"
|
| 432 |
+
}
|
| 433 |
+
]
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"name": "eval.tests.test_10_more_behavior.test_releases_pagination_empty_second_page_concatenates",
|
| 437 |
+
"reasons": [
|
| 438 |
+
{
|
| 439 |
+
"id": "short_substring",
|
| 440 |
+
"message": "pytest test uses a too-short substring oracle",
|
| 441 |
+
"path": "eval/tests/test_10_more_behavior.py",
|
| 442 |
+
"repair_hint": "Use a longer, specific substring or an exact normalized output comparison.",
|
| 443 |
+
"severity": "error",
|
| 444 |
+
"stage": "static_lint"
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"id": "test_network_dependency",
|
| 448 |
+
"message": "test appears to depend on networking",
|
| 449 |
+
"path": "eval/tests/test_10_more_behavior.py",
|
| 450 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 451 |
+
"severity": "error",
|
| 452 |
+
"stage": "static_lint"
|
| 453 |
+
}
|
| 454 |
+
]
|
| 455 |
+
}
|
| 456 |
+
],
|
| 457 |
+
"tests": [
|
| 458 |
+
"eval.tests.test_00_smoke_validation.test_dash_h_prints_help_to_stderr",
|
| 459 |
+
"eval.tests.test_00_smoke_validation.test_download_empty_repo_is_rejected",
|
| 460 |
+
"eval.tests.test_00_smoke_validation.test_download_empty_user_is_rejected",
|
| 461 |
+
"eval.tests.test_00_smoke_validation.test_download_requires_exactly_one_input",
|
| 462 |
+
"eval.tests.test_00_smoke_validation.test_help_lists_every_verb",
|
| 463 |
+
"eval.tests.test_00_smoke_validation.test_info_missing_user_repo_is_rejected",
|
| 464 |
+
"eval.tests.test_00_smoke_validation.test_no_args_prints_help_to_stderr",
|
| 465 |
+
"eval.tests.test_00_smoke_validation.test_quiet_suppresses_error_message",
|
| 466 |
+
"eval.tests.test_00_smoke_validation.test_release_empty_token_is_rejected",
|
| 467 |
+
"eval.tests.test_00_smoke_validation.test_upload_empty_token_is_rejected",
|
| 468 |
+
"eval.tests.test_00_smoke_validation.test_upload_invalid_file_is_rejected_with_open_error",
|
| 469 |
+
"eval.tests.test_00_smoke_validation.test_upload_missing_file_is_usage_error",
|
| 470 |
+
"eval.tests.test_00_smoke_validation.test_version_reports_module_version",
|
| 471 |
+
"eval.tests.test_01_client_get_info.test_info_adds_per_page_100",
|
| 472 |
+
"eval.tests.test_01_client_get_info.test_info_auth_user_env_selects_auth_identity",
|
| 473 |
+
"eval.tests.test_01_client_get_info.test_info_auth_user_flag_controls_basic_auth",
|
| 474 |
+
"eval.tests.test_01_client_get_info.test_info_env_user_is_default_auth",
|
| 475 |
+
"eval.tests.test_01_client_get_info.test_info_get_sets_accept_json",
|
| 476 |
+
"eval.tests.test_01_client_get_info.test_info_get_sets_basic_auth_token",
|
| 477 |
+
"eval.tests.test_01_client_get_info.test_info_get_sets_user_agent_with_version",
|
| 478 |
+
"eval.tests.test_01_client_get_info.test_info_json_rendering_multiple",
|
| 479 |
+
"eval.tests.test_01_client_get_info.test_info_json_rendering_single",
|
| 480 |
+
"eval.tests.test_01_client_get_info.test_info_malformed_json_body_is_error",
|
| 481 |
+
"eval.tests.test_01_client_get_info.test_info_no_tags_is_error",
|
| 482 |
+
"eval.tests.test_01_client_get_info.test_info_sets_all_queries_per_page_100",
|
| 483 |
+
"eval.tests.test_01_client_get_info.test_info_tag_filtering_selects_single_tag",
|
| 484 |
+
"eval.tests.test_01_client_get_info.test_info_tags_http_error_propagates",
|
| 485 |
+
"eval.tests.test_01_client_get_info.test_info_text_lists_all_releases_without_tag",
|
| 486 |
+
"eval.tests.test_01_client_get_info.test_info_text_rendering_single",
|
| 487 |
+
"eval.tests.test_01_client_get_info.test_info_text_renders_asset_line",
|
| 488 |
+
"eval.tests.test_01_client_get_info.test_set_base_url_env_honored",
|
| 489 |
+
"eval.tests.test_01_client_get_info.test_upload_get_asset_list_uses_client_get",
|
| 490 |
+
"eval.tests.test_01_client_get_info.test_verbose_info_prints_debug_to_stderr",
|
| 491 |
+
"eval.tests.test_01_client_get_info.test_verbose_plain_info_stays_quiet",
|
| 492 |
+
"eval.tests.test_02_auth_upload.test_upload_502_cleans_partial_asset_and_errors",
|
| 493 |
+
"eval.tests.test_02_auth_upload.test_upload_asset_name_in_query",
|
| 494 |
+
"eval.tests.test_02_auth_upload.test_upload_clean_upload_url_strips_braces",
|
| 495 |
+
"eval.tests.test_02_auth_upload.test_upload_does_not_replace_existing_asset_without_flag",
|
| 496 |
+
"eval.tests.test_02_auth_upload.test_upload_empty_file_sends_no_content_length",
|
| 497 |
+
"eval.tests.test_02_auth_upload.test_upload_file_with_longer_name_quoted",
|
| 498 |
+
"eval.tests.test_02_auth_upload.test_upload_incomplete_asset_auto_cleanup",
|
| 499 |
+
"eval.tests.test_02_auth_upload.test_upload_label_added_to_query",
|
| 500 |
+
"eval.tests.test_02_auth_upload.test_upload_large_file_content_length_matches",
|
| 501 |
+
"eval.tests.test_02_auth_upload.test_upload_regular_file_headers",
|
| 502 |
+
"eval.tests.test_02_auth_upload.test_upload_regular_file_sets_content_length_and_body",
|
| 503 |
+
"eval.tests.test_02_auth_upload.test_upload_release_not_found_is_error",
|
| 504 |
+
"eval.tests.test_02_auth_upload.test_upload_replace_deletes_then_posts",
|
| 505 |
+
"eval.tests.test_03_release_newrequest_do.test_release_422_is_error",
|
| 506 |
+
"eval.tests.test_03_release_newrequest_do.test_release_basic_auth_uses_repo_user",
|
| 507 |
+
"eval.tests.test_03_release_newrequest_do.test_release_content_type_json",
|
| 508 |
+
"eval.tests.test_03_release_newrequest_do.test_release_create_posts_json_body",
|
| 509 |
+
"eval.tests.test_03_release_newrequest_do.test_release_created_status_is_success",
|
| 510 |
+
"eval.tests.test_03_release_newrequest_do.test_release_default_name_body_equal_tag",
|
| 511 |
+
"eval.tests.test_03_release_newrequest_do.test_release_draft_and_prerelease",
|
| 512 |
+
"eval.tests.test_03_release_newrequest_do.test_release_empty_http_body_error",
|
| 513 |
+
"eval.tests.test_03_release_newrequest_do.test_release_error_mentions_submitted_payload",
|
| 514 |
+
"eval.tests.test_03_release_newrequest_do.test_release_generate_notes_flag",
|
| 515 |
+
"eval.tests.test_03_release_newrequest_do.test_release_http_500_is_error",
|
| 516 |
+
"eval.tests.test_03_release_newrequest_do.test_release_stdin_description",
|
| 517 |
+
"eval.tests.test_03_release_newrequest_do.test_release_target_commitish_in_body",
|
| 518 |
+
"eval.tests.test_03_release_newrequest_do.test_release_user_agent_prefixed",
|
| 519 |
+
"eval.tests.test_04_edit_delete_download.test_delete_non_204_is_error",
|
| 520 |
+
"eval.tests.test_04_edit_delete_download.test_delete_success",
|
| 521 |
+
"eval.tests.test_04_edit_delete_download.test_download_asset_not_found_is_error",
|
| 522 |
+
"eval.tests.test_04_edit_delete_download.test_download_latest_token_streams_asset",
|
| 523 |
+
"eval.tests.test_04_edit_delete_download.test_download_with_token_streams_asset",
|
| 524 |
+
"eval.tests.test_04_edit_delete_download.test_edit_422_reports_existing",
|
| 525 |
+
"eval.tests.test_04_edit_delete_download.test_edit_non_ok_status_is_error",
|
| 526 |
+
"eval.tests.test_04_edit_delete_download.test_edit_patches_release",
|
| 527 |
+
"eval.tests.test_04_edit_delete_download.test_edit_reads_description_from_stdin",
|
| 528 |
+
"eval.tests.test_04_edit_delete_download.test_edit_uses_doauthrequest_headers",
|
| 529 |
+
"eval.tests.test_05_download_latest.test_download_latest_binary_bytes_roundtrip",
|
| 530 |
+
"eval.tests.test_05_download_latest.test_download_latest_decodes_single_release",
|
| 531 |
+
"eval.tests.test_05_download_latest.test_download_latest_no_per_page_reuse",
|
| 532 |
+
"eval.tests.test_05_download_latest.test_download_latest_uses_release_asset_id",
|
| 533 |
+
"eval.tests.test_06_pagination.test_info_follows_next_link_and_concatenates_tags",
|
| 534 |
+
"eval.tests.test_06_pagination.test_info_releases_paginated_and_concatenated",
|
| 535 |
+
"eval.tests.test_06_pagination.test_link_with_both_prev_and_next_prefers_next",
|
| 536 |
+
"eval.tests.test_06_pagination.test_link_without_next_stops_after_first_page",
|
| 537 |
+
"eval.tests.test_06_pagination.test_pagination_followup_keeps_page_param",
|
| 538 |
+
"eval.tests.test_06_pagination.test_pagination_non_200_followup_is_error",
|
| 539 |
+
"eval.tests.test_06_pagination.test_pagination_three_page_chain_terminates",
|
| 540 |
+
"eval.tests.test_07_edit_extra.test_delete_targets_matched_release_by_tag",
|
| 541 |
+
"eval.tests.test_07_edit_extra.test_edit_default_name_and_body_equal_tag",
|
| 542 |
+
"eval.tests.test_07_edit_extra.test_edit_draft_and_prerelease_in_body",
|
| 543 |
+
"eval.tests.test_07_edit_extra.test_edit_name_only_defaults_description_to_tag",
|
| 544 |
+
"eval.tests.test_08_upload_edge.test_upload_label_reserved_characters_escaped",
|
| 545 |
+
"eval.tests.test_08_upload_edge.test_upload_uses_matched_release_asset_endpoint",
|
| 546 |
+
"eval.tests.test_09_more_behavior.test_download_latest_fallback_empty_releases_is_error",
|
| 547 |
+
"eval.tests.test_09_more_behavior.test_download_latest_falls_back_to_release_list_on_404",
|
| 548 |
+
"eval.tests.test_09_more_behavior.test_pagination_empty_page2_array_concatenates",
|
| 549 |
+
"eval.tests.test_09_more_behavior.test_pagination_malformed_json_on_followed_page_is_error",
|
| 550 |
+
"eval.tests.test_09_more_behavior.test_pagination_next_link_with_empty_url_stops",
|
| 551 |
+
"eval.tests.test_09_more_behavior.test_pagination_non_array_object_on_page2_is_skipped",
|
| 552 |
+
"eval.tests.test_09_more_behavior.test_upload_cleanurl_without_braces_uses_full_url",
|
| 553 |
+
"eval.tests.test_10_more_behavior.test_download_empty_asset_streams_zero_bytes",
|
| 554 |
+
"eval.tests.test_10_more_behavior.test_download_latest_malformed_json_empty_list_is_error",
|
| 555 |
+
"eval.tests.test_10_more_behavior.test_download_latest_malformed_json_falls_back_to_release_list",
|
| 556 |
+
"eval.tests.test_10_more_behavior.test_info_json_renders_release_asset_fields",
|
| 557 |
+
"eval.tests.test_10_more_behavior.test_pagination_followed_page_201_not_ok_is_error",
|
| 558 |
+
"eval.tests.test_10_more_behavior.test_pagination_followed_page_302_redirect_is_error",
|
| 559 |
+
"eval.tests.test_10_more_behavior.test_releases_pagination_empty_second_page_concatenates",
|
| 560 |
+
"eval.tests.test_10_more_behavior.test_upload_malformed_upload_url_reports_request_error"
|
| 561 |
+
]
|
| 562 |
+
},
|
| 563 |
+
"generated_module_03": {
|
| 564 |
+
"ignore_reason": "",
|
| 565 |
+
"ignored": false,
|
| 566 |
+
"ignored_tests": [
|
| 567 |
+
{
|
| 568 |
+
"name": "eval.tests.test_download_cmd.test_download_by_tag_success_streams_asset",
|
| 569 |
+
"reasons": [
|
| 570 |
+
{
|
| 571 |
+
"id": "test_network_dependency",
|
| 572 |
+
"message": "test appears to depend on networking",
|
| 573 |
+
"path": "eval/tests/test_download_cmd.py",
|
| 574 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 575 |
+
"severity": "error",
|
| 576 |
+
"stage": "static_lint"
|
| 577 |
+
}
|
| 578 |
+
]
|
| 579 |
+
},
|
| 580 |
+
{
|
| 581 |
+
"name": "eval.tests.test_download_cmd.test_download_finds_named_asset_among_many",
|
| 582 |
+
"reasons": [
|
| 583 |
+
{
|
| 584 |
+
"id": "test_network_dependency",
|
| 585 |
+
"message": "test appears to depend on networking",
|
| 586 |
+
"path": "eval/tests/test_download_cmd.py",
|
| 587 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 588 |
+
"severity": "error",
|
| 589 |
+
"stage": "static_lint"
|
| 590 |
+
}
|
| 591 |
+
]
|
| 592 |
+
},
|
| 593 |
+
{
|
| 594 |
+
"name": "eval.tests.test_download_cmd.test_download_latest_falls_back_to_scanning_releases",
|
| 595 |
+
"reasons": [
|
| 596 |
+
{
|
| 597 |
+
"id": "test_network_dependency",
|
| 598 |
+
"message": "test appears to depend on networking",
|
| 599 |
+
"path": "eval/tests/test_download_cmd.py",
|
| 600 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 601 |
+
"severity": "error",
|
| 602 |
+
"stage": "static_lint"
|
| 603 |
+
}
|
| 604 |
+
]
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"name": "eval.tests.test_download_cmd.test_download_latest_uses_latest_endpoint",
|
| 608 |
+
"reasons": [
|
| 609 |
+
{
|
| 610 |
+
"id": "test_network_dependency",
|
| 611 |
+
"message": "test appears to depend on networking",
|
| 612 |
+
"path": "eval/tests/test_download_cmd.py",
|
| 613 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 614 |
+
"severity": "error",
|
| 615 |
+
"stage": "static_lint"
|
| 616 |
+
}
|
| 617 |
+
]
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"name": "eval.tests.test_download_cmd.test_download_validation_errors",
|
| 621 |
+
"reasons": [
|
| 622 |
+
{
|
| 623 |
+
"id": "test_network_dependency",
|
| 624 |
+
"message": "test appears to depend on networking",
|
| 625 |
+
"path": "eval/tests/test_download_cmd.py",
|
| 626 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 627 |
+
"severity": "error",
|
| 628 |
+
"stage": "static_lint"
|
| 629 |
+
}
|
| 630 |
+
]
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"name": "eval.tests.test_info_cmd.test_info_missing_user_repo_errors",
|
| 634 |
+
"reasons": [
|
| 635 |
+
{
|
| 636 |
+
"id": "test_network_dependency",
|
| 637 |
+
"message": "test appears to depend on networking",
|
| 638 |
+
"path": "eval/tests/test_info_cmd.py",
|
| 639 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 640 |
+
"severity": "error",
|
| 641 |
+
"stage": "static_lint"
|
| 642 |
+
}
|
| 643 |
+
]
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"name": "eval.tests.test_info_cmd.test_info_requests_are_paginated_with_per_page",
|
| 647 |
+
"reasons": [
|
| 648 |
+
{
|
| 649 |
+
"id": "test_network_dependency",
|
| 650 |
+
"message": "test appears to depend on networking",
|
| 651 |
+
"path": "eval/tests/test_info_cmd.py",
|
| 652 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 653 |
+
"severity": "error",
|
| 654 |
+
"stage": "static_lint"
|
| 655 |
+
}
|
| 656 |
+
]
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"name": "eval.tests.test_release_edit_cmd.test_delete_resolves_id_and_sends_delete",
|
| 660 |
+
"reasons": [
|
| 661 |
+
{
|
| 662 |
+
"id": "test_network_dependency",
|
| 663 |
+
"message": "test appears to depend on networking",
|
| 664 |
+
"path": "eval/tests/test_release_edit_cmd.py",
|
| 665 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 666 |
+
"severity": "error",
|
| 667 |
+
"stage": "static_lint"
|
| 668 |
+
}
|
| 669 |
+
]
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"name": "eval.tests.test_release_edit_cmd.test_delete_unknown_tag_id_lookup_fails",
|
| 673 |
+
"reasons": [
|
| 674 |
+
{
|
| 675 |
+
"id": "test_network_dependency",
|
| 676 |
+
"message": "test appears to depend on networking",
|
| 677 |
+
"path": "eval/tests/test_release_edit_cmd.py",
|
| 678 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 679 |
+
"severity": "error",
|
| 680 |
+
"stage": "static_lint"
|
| 681 |
+
}
|
| 682 |
+
]
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"name": "eval.tests.test_release_edit_cmd.test_release_validation_errors",
|
| 686 |
+
"reasons": [
|
| 687 |
+
{
|
| 688 |
+
"id": "test_network_dependency",
|
| 689 |
+
"message": "test appears to depend on networking",
|
| 690 |
+
"path": "eval/tests/test_release_edit_cmd.py",
|
| 691 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 692 |
+
"severity": "error",
|
| 693 |
+
"stage": "static_lint"
|
| 694 |
+
}
|
| 695 |
+
]
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"name": "eval.tests.test_releases_go.test_latest_release_releases_fallback_fetch_failure",
|
| 699 |
+
"reasons": [
|
| 700 |
+
{
|
| 701 |
+
"id": "test_network_dependency",
|
| 702 |
+
"message": "test appears to depend on networking",
|
| 703 |
+
"path": "eval/tests/test_releases_go.py",
|
| 704 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 705 |
+
"severity": "error",
|
| 706 |
+
"stage": "static_lint"
|
| 707 |
+
}
|
| 708 |
+
]
|
| 709 |
+
},
|
| 710 |
+
{
|
| 711 |
+
"name": "eval.tests.test_releases_go.test_release_of_tag_fetch_failure_via_download",
|
| 712 |
+
"reasons": [
|
| 713 |
+
{
|
| 714 |
+
"id": "test_network_dependency",
|
| 715 |
+
"message": "test appears to depend on networking",
|
| 716 |
+
"path": "eval/tests/test_releases_go.py",
|
| 717 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 718 |
+
"severity": "error",
|
| 719 |
+
"stage": "static_lint"
|
| 720 |
+
}
|
| 721 |
+
]
|
| 722 |
+
},
|
| 723 |
+
{
|
| 724 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_502_cleans_up_partial_asset",
|
| 725 |
+
"reasons": [
|
| 726 |
+
{
|
| 727 |
+
"id": "test_network_dependency",
|
| 728 |
+
"message": "test appears to depend on networking",
|
| 729 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 730 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 731 |
+
"severity": "error",
|
| 732 |
+
"stage": "static_lint"
|
| 733 |
+
}
|
| 734 |
+
]
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_502_cleanup_delete_http_error",
|
| 738 |
+
"reasons": [
|
| 739 |
+
{
|
| 740 |
+
"id": "test_network_dependency",
|
| 741 |
+
"message": "test appears to depend on networking",
|
| 742 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 743 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 744 |
+
"severity": "error",
|
| 745 |
+
"stage": "static_lint"
|
| 746 |
+
}
|
| 747 |
+
]
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_clean_url_truncates_at_mid_string_brace",
|
| 751 |
+
"reasons": [
|
| 752 |
+
{
|
| 753 |
+
"id": "test_network_dependency",
|
| 754 |
+
"message": "test appears to depend on networking",
|
| 755 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 756 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 757 |
+
"severity": "error",
|
| 758 |
+
"stage": "static_lint"
|
| 759 |
+
}
|
| 760 |
+
]
|
| 761 |
+
},
|
| 762 |
+
{
|
| 763 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_existing_new_asset_is_replaced",
|
| 764 |
+
"reasons": [
|
| 765 |
+
{
|
| 766 |
+
"id": "test_network_dependency",
|
| 767 |
+
"message": "test appears to depend on networking",
|
| 768 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 769 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 770 |
+
"severity": "error",
|
| 771 |
+
"stage": "static_lint"
|
| 772 |
+
}
|
| 773 |
+
]
|
| 774 |
+
},
|
| 775 |
+
{
|
| 776 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_replace_delete_http_error",
|
| 777 |
+
"reasons": [
|
| 778 |
+
{
|
| 779 |
+
"id": "test_network_dependency",
|
| 780 |
+
"message": "test appears to depend on networking",
|
| 781 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 782 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 783 |
+
"severity": "error",
|
| 784 |
+
"stage": "static_lint"
|
| 785 |
+
}
|
| 786 |
+
]
|
| 787 |
+
},
|
| 788 |
+
{
|
| 789 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_replace_flag_deletes_uploaded_asset",
|
| 790 |
+
"reasons": [
|
| 791 |
+
{
|
| 792 |
+
"id": "test_network_dependency",
|
| 793 |
+
"message": "test appears to depend on networking",
|
| 794 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 795 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 796 |
+
"severity": "error",
|
| 797 |
+
"stage": "static_lint"
|
| 798 |
+
}
|
| 799 |
+
]
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_uploaded_same_name_no_replace_no_delete",
|
| 803 |
+
"reasons": [
|
| 804 |
+
{
|
| 805 |
+
"id": "test_network_dependency",
|
| 806 |
+
"message": "test appears to depend on networking",
|
| 807 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 808 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 809 |
+
"severity": "error",
|
| 810 |
+
"stage": "static_lint"
|
| 811 |
+
}
|
| 812 |
+
]
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"name": "eval.tests.test_upload_assets_cmd.test_upload_validation_errors",
|
| 816 |
+
"reasons": [
|
| 817 |
+
{
|
| 818 |
+
"id": "test_network_dependency",
|
| 819 |
+
"message": "test appears to depend on networking",
|
| 820 |
+
"path": "eval/tests/test_upload_assets_cmd.py",
|
| 821 |
+
"repair_hint": "Remove external networking from eval tests; use bundled fixtures or local subprocess behavior.",
|
| 822 |
+
"severity": "error",
|
| 823 |
+
"stage": "static_lint"
|
| 824 |
+
}
|
| 825 |
+
]
|
| 826 |
+
}
|
| 827 |
+
],
|
| 828 |
+
"tests": [
|
| 829 |
+
"eval.tests.test_download_cmd.test_download_asset_http_error_status",
|
| 830 |
+
"eval.tests.test_download_cmd.test_download_asset_not_found",
|
| 831 |
+
"eval.tests.test_download_cmd.test_download_by_tag_success_streams_asset",
|
| 832 |
+
"eval.tests.test_download_cmd.test_download_finds_named_asset_among_many",
|
| 833 |
+
"eval.tests.test_download_cmd.test_download_latest_asset_not_found",
|
| 834 |
+
"eval.tests.test_download_cmd.test_download_latest_falls_back_to_scanning_releases",
|
| 835 |
+
"eval.tests.test_download_cmd.test_download_latest_uses_latest_endpoint",
|
| 836 |
+
"eval.tests.test_download_cmd.test_download_latest_when_no_releases_fallback",
|
| 837 |
+
"eval.tests.test_download_cmd.test_download_release_of_unknown_tag",
|
| 838 |
+
"eval.tests.test_download_cmd.test_download_validation_errors",
|
| 839 |
+
"eval.tests.test_error_go.test_error_empty_message_with_errors",
|
| 840 |
+
"eval.tests.test_error_go.test_error_json_escaped_fields",
|
| 841 |
+
"eval.tests.test_error_go.test_error_message_empty_errors",
|
| 842 |
+
"eval.tests.test_error_go.test_error_message_empty_field_only_code",
|
| 843 |
+
"eval.tests.test_error_go.test_error_message_field_only_no_code",
|
| 844 |
+
"eval.tests.test_error_go.test_error_message_multiple_errors_joined",
|
| 845 |
+
"eval.tests.test_error_go.test_error_message_without_errors_key",
|
| 846 |
+
"eval.tests.test_info_cmd.test_info_draft_and_prerelease_marks",
|
| 847 |
+
"eval.tests.test_info_cmd.test_info_filters_by_single_tag",
|
| 848 |
+
"eval.tests.test_info_cmd.test_info_humanizes_asset_sizes[1000-1.0 kB-0]",
|
| 849 |
+
"eval.tests.test_info_cmd.test_info_humanizes_asset_sizes[2097152-2.1 MB-255]",
|
| 850 |
+
"eval.tests.test_info_cmd.test_info_json_nil_created_published_times",
|
| 851 |
+
"eval.tests.test_info_cmd.test_info_json_output_matches_struct_encoding",
|
| 852 |
+
"eval.tests.test_info_cmd.test_info_missing_user_repo_errors",
|
| 853 |
+
"eval.tests.test_info_cmd.test_info_multiple_assets_maintain_order",
|
| 854 |
+
"eval.tests.test_info_cmd.test_info_nil_created_published_times",
|
| 855 |
+
"eval.tests.test_info_cmd.test_info_provides_env_user_repo_tokens",
|
| 856 |
+
"eval.tests.test_info_cmd.test_info_release_of_tag_not_found",
|
| 857 |
+
"eval.tests.test_info_cmd.test_info_renders_tags_releases_and_assets",
|
| 858 |
+
"eval.tests.test_info_cmd.test_info_reports_no_tags_available",
|
| 859 |
+
"eval.tests.test_info_cmd.test_info_reports_releases_fetch_failure",
|
| 860 |
+
"eval.tests.test_info_cmd.test_info_reports_tags_fetch_failure",
|
| 861 |
+
"eval.tests.test_info_cmd.test_info_requests_are_paginated_with_per_page",
|
| 862 |
+
"eval.tests.test_info_cmd.test_info_tag_with_empty_commit_url",
|
| 863 |
+
"eval.tests.test_info_cmd.test_info_zero_byte_asset_humanized",
|
| 864 |
+
"eval.tests.test_release_edit_cmd.test_delete_reports_non_204_status",
|
| 865 |
+
"eval.tests.test_release_edit_cmd.test_delete_resolves_id_and_sends_delete",
|
| 866 |
+
"eval.tests.test_release_edit_cmd.test_delete_unknown_tag_id_lookup_fails",
|
| 867 |
+
"eval.tests.test_release_edit_cmd.test_edit_422_reports_existing",
|
| 868 |
+
"eval.tests.test_release_edit_cmd.test_edit_empty_description_from_stdin",
|
| 869 |
+
"eval.tests.test_release_edit_cmd.test_edit_marshals_releasecreate_payload",
|
| 870 |
+
"eval.tests.test_release_edit_cmd.test_edit_reads_description_from_stdin",
|
| 871 |
+
"eval.tests.test_release_edit_cmd.test_edit_twoxx_but_not_ok",
|
| 872 |
+
"eval.tests.test_release_edit_cmd.test_edit_unexpected_status_code",
|
| 873 |
+
"eval.tests.test_release_edit_cmd.test_edit_unknown_tag_id_lookup_fails",
|
| 874 |
+
"eval.tests.test_release_edit_cmd.test_release_create_4xx_becomes_submission_error",
|
| 875 |
+
"eval.tests.test_release_edit_cmd.test_release_create_defaults_name_and_desc_to_tag",
|
| 876 |
+
"eval.tests.test_release_edit_cmd.test_release_create_empty_description_from_stdin",
|
| 877 |
+
"eval.tests.test_release_edit_cmd.test_release_create_generate_notes_keeps_empty",
|
| 878 |
+
"eval.tests.test_release_edit_cmd.test_release_create_marshals_full_payload",
|
| 879 |
+
"eval.tests.test_release_edit_cmd.test_release_create_other_status_error",
|
| 880 |
+
"eval.tests.test_release_edit_cmd.test_release_create_reads_description_from_stdin",
|
| 881 |
+
"eval.tests.test_release_edit_cmd.test_release_create_with_only_target_commitish",
|
| 882 |
+
"eval.tests.test_release_edit_cmd.test_release_validation_errors",
|
| 883 |
+
"eval.tests.test_releases_go.test_latest_release_releases_fallback_fetch_failure",
|
| 884 |
+
"eval.tests.test_releases_go.test_release_of_tag_fetch_failure_via_delete",
|
| 885 |
+
"eval.tests.test_releases_go.test_release_of_tag_fetch_failure_via_download",
|
| 886 |
+
"eval.tests.test_releases_go.test_release_of_tag_fetch_failure_via_edit",
|
| 887 |
+
"eval.tests.test_releases_go.test_release_of_tag_fetch_failure_via_info_filter",
|
| 888 |
+
"eval.tests.test_releases_go.test_release_of_tag_fetch_failure_via_upload",
|
| 889 |
+
"eval.tests.test_upload_assets_cmd.test_upload_502_cleans_up_partial_asset",
|
| 890 |
+
"eval.tests.test_upload_assets_cmd.test_upload_502_cleanup_delete_http_error",
|
| 891 |
+
"eval.tests.test_upload_assets_cmd.test_upload_asset_list_fetch_failure",
|
| 892 |
+
"eval.tests.test_upload_assets_cmd.test_upload_clean_url_truncates_at_mid_string_brace",
|
| 893 |
+
"eval.tests.test_upload_assets_cmd.test_upload_clean_url_without_braces",
|
| 894 |
+
"eval.tests.test_upload_assets_cmd.test_upload_existing_new_asset_is_replaced",
|
| 895 |
+
"eval.tests.test_upload_assets_cmd.test_upload_includes_label_query_param",
|
| 896 |
+
"eval.tests.test_upload_assets_cmd.test_upload_json_error_message_via_tomessage",
|
| 897 |
+
"eval.tests.test_upload_assets_cmd.test_upload_non_json_error_body",
|
| 898 |
+
"eval.tests.test_upload_assets_cmd.test_upload_replace_delete_http_error",
|
| 899 |
+
"eval.tests.test_upload_assets_cmd.test_upload_replace_delete_status_failure",
|
| 900 |
+
"eval.tests.test_upload_assets_cmd.test_upload_replace_flag_deletes_uploaded_asset",
|
| 901 |
+
"eval.tests.test_upload_assets_cmd.test_upload_success_201",
|
| 902 |
+
"eval.tests.test_upload_assets_cmd.test_upload_unknown_tag_lookup_fails",
|
| 903 |
+
"eval.tests.test_upload_assets_cmd.test_upload_uploaded_same_name_no_replace_no_delete",
|
| 904 |
+
"eval.tests.test_upload_assets_cmd.test_upload_validation_errors"
|
| 905 |
+
]
|
| 906 |
+
},
|
| 907 |
+
"generated_module_04": {
|
| 908 |
+
"ignore_reason": "",
|
| 909 |
+
"ignored": false,
|
| 910 |
+
"ignored_tests": [],
|
| 911 |
+
"tests": [
|
| 912 |
+
"eval.tests.test_char_device.test_char_device_nonverbose_pty_omits_downloading_line",
|
| 913 |
+
"eval.tests.test_char_device.test_char_device_true_branch_creates_file",
|
| 914 |
+
"eval.tests.test_char_device.test_char_device_true_branch_file_named_after_asset",
|
| 915 |
+
"eval.tests.test_char_device.test_char_device_true_branch_overwrites_existing_file",
|
| 916 |
+
"eval.tests.test_char_device.test_char_device_verbose_pty_gates_downloading_line",
|
| 917 |
+
"eval.tests.test_char_device.test_download_asset_not_found_error",
|
| 918 |
+
"eval.tests.test_char_device.test_download_content_length_mismatch_error",
|
| 919 |
+
"eval.tests.test_char_device.test_download_latest_flag_skips_tag_validation",
|
| 920 |
+
"eval.tests.test_char_device.test_download_no_releases_latest_error",
|
| 921 |
+
"eval.tests.test_char_device.test_download_requires_tag_or_latest_flag",
|
| 922 |
+
"eval.tests.test_char_device.test_download_verbose_get_line_shows_asset_path",
|
| 923 |
+
"eval.tests.test_char_device.test_piped_stdout_streams_bytes_and_creates_no_file",
|
| 924 |
+
"eval.tests.test_info_render.test_info_env_user_fallback_renders_tag",
|
| 925 |
+
"eval.tests.test_info_render.test_info_json_preserves_raw_fields_structured",
|
| 926 |
+
"eval.tests.test_info_render.test_info_json_structured_keeps_booleans_and_no_text_symbols",
|
| 927 |
+
"eval.tests.test_info_render.test_info_missing_user_and_repo_error",
|
| 928 |
+
"eval.tests.test_info_render.test_info_no_tags_available_error",
|
| 929 |
+
"eval.tests.test_info_render.test_info_route_wrong_user_env_rejected",
|
| 930 |
+
"eval.tests.test_info_render.test_info_single_tag_with_no_matching_release_error",
|
| 931 |
+
"eval.tests.test_info_render.test_info_text_created_only_mixed_timestamps",
|
| 932 |
+
"eval.tests.test_info_render.test_info_text_full_row_exact",
|
| 933 |
+
"eval.tests.test_info_render.test_info_text_mixed_mark_states_exact",
|
| 934 |
+
"eval.tests.test_info_render.test_info_text_multiple_assets_listed",
|
| 935 |
+
"eval.tests.test_info_render.test_info_text_nil_times_and_mark_true",
|
| 936 |
+
"eval.tests.test_info_render.test_info_text_published_only_timestamp",
|
| 937 |
+
"eval.tests.test_info_render.test_info_text_renders_check_for_draft_only",
|
| 938 |
+
"eval.tests.test_info_render.test_info_text_renders_cross_for_prerelease_only",
|
| 939 |
+
"eval.tests.test_info_render.test_info_text_single_release_tag_filter_exact",
|
| 940 |
+
"eval.tests.test_nvls.test_nvls_desc_defaults_to_tag",
|
| 941 |
+
"eval.tests.test_nvls.test_nvls_desc_stdin_dash_reads_input",
|
| 942 |
+
"eval.tests.test_nvls.test_nvls_download_repo_via_env_fallback",
|
| 943 |
+
"eval.tests.test_nvls.test_nvls_download_user_via_env_fallback",
|
| 944 |
+
"eval.tests.test_nvls.test_nvls_draft_and_prerelease_flags",
|
| 945 |
+
"eval.tests.test_nvls.test_nvls_env_repo_fallback",
|
| 946 |
+
"eval.tests.test_nvls.test_nvls_env_user_fallback",
|
| 947 |
+
"eval.tests.test_nvls.test_nvls_explicit_name_and_desc_are_preserved",
|
| 948 |
+
"eval.tests.test_nvls.test_nvls_flag_target_commitish_passthrough",
|
| 949 |
+
"eval.tests.test_nvls.test_nvls_flag_user_beats_env",
|
| 950 |
+
"eval.tests.test_nvls.test_nvls_generate_notes_disables_defaults",
|
| 951 |
+
"eval.tests.test_nvls.test_nvls_missing_repo_is_empty_error",
|
| 952 |
+
"eval.tests.test_nvls.test_nvls_missing_token_is_empty_error",
|
| 953 |
+
"eval.tests.test_nvls.test_nvls_missing_user_is_empty_error",
|
| 954 |
+
"eval.tests.test_nvls.test_nvls_name_defaults_to_tag",
|
| 955 |
+
"eval.tests.test_util_extra.test_edit_desc_stdin_dash_reads_input",
|
| 956 |
+
"eval.tests.test_util_extra.test_edit_stateful_chain_updates_release",
|
| 957 |
+
"eval.tests.test_util_extra.test_quiet_mode_suppresses_all_error_output",
|
| 958 |
+
"eval.tests.test_util_extra.test_release_generate_notes_with_empty_forced_defaults",
|
| 959 |
+
"eval.tests.test_util_extra.test_release_non_created_status_reports_http_error",
|
| 960 |
+
"eval.tests.test_util_extra.test_upload_label_flag_produces_success",
|
| 961 |
+
"eval.tests.test_util_extra.test_upload_missing_file_is_flag_parse_error",
|
| 962 |
+
"eval.tests.test_util_extra.test_upload_streams_file_bytes_to_asset_endpoint",
|
| 963 |
+
"eval.tests.test_util_extra.test_upload_verbose_asset_body_reaches_stderr",
|
| 964 |
+
"eval.tests.test_util_verbose.test_any_positive_verbosity_count_enables_body_dump[1]",
|
| 965 |
+
"eval.tests.test_util_verbose.test_any_positive_verbosity_count_enables_body_dump[2]",
|
| 966 |
+
"eval.tests.test_util_verbose.test_any_positive_verbosity_count_enables_body_dump[3]",
|
| 967 |
+
"eval.tests.test_util_verbose.test_delete_verbose_emits_resolved_id_line",
|
| 968 |
+
"eval.tests.test_util_verbose.test_download_nonverbose_omits_asset_path",
|
| 969 |
+
"eval.tests.test_util_verbose.test_download_verbose_emits_asset_path",
|
| 970 |
+
"eval.tests.test_util_verbose.test_download_verbose_emits_downloading_line",
|
| 971 |
+
"eval.tests.test_util_verbose.test_edit_nonverbose_omits_id_line",
|
| 972 |
+
"eval.tests.test_util_verbose.test_edit_verbose_emits_resolved_id_line",
|
| 973 |
+
"eval.tests.test_util_verbose.test_info_nonverbose_omits_vprintf_lines",
|
| 974 |
+
"eval.tests.test_util_verbose.test_info_vprintf_all_releases_line",
|
| 975 |
+
"eval.tests.test_util_verbose.test_info_vprintf_single_release_line",
|
| 976 |
+
"eval.tests.test_util_verbose.test_quiet_still_shows_verbose_diagnostic_but_not_error",
|
| 977 |
+
"eval.tests.test_util_verbose.test_release_nonverbose_suppresses_body_dump",
|
| 978 |
+
"eval.tests.test_util_verbose.test_release_verbose_emits_body_dump_to_stderr",
|
| 979 |
+
"eval.tests.test_util_verbose.test_upload_verbose_emits_uploading_line",
|
| 980 |
+
"eval.tests.test_util_verbose.test_verbose_body_dump_goes_to_stderr_not_stdout",
|
| 981 |
+
"eval.tests.test_version_help.test_dash_h_help_exact_matches_stdout_free",
|
| 982 |
+
"eval.tests.test_version_help.test_long_help_enumerates_every_verb",
|
| 983 |
+
"eval.tests.test_version_help.test_no_verb_prints_exact_help_to_stderr",
|
| 984 |
+
"eval.tests.test_version_help.test_unknown_verb_exact_trailing_arguments_and_usage",
|
| 985 |
+
"eval.tests.test_version_help.test_unknown_verb_names_offending_argument",
|
| 986 |
+
"eval.tests.test_version_help.test_version_does_not_leak_verbose_diagnostics",
|
| 987 |
+
"eval.tests.test_version_help.test_version_precedes_verb_dispatch",
|
| 988 |
+
"eval.tests.test_version_help.test_version_stdout_exact_matches_golden"
|
| 989 |
+
]
|
| 990 |
+
}
|
| 991 |
+
},
|
| 992 |
+
"commit": "2c19b119ec8a75203b6b6269ef02a5e32c9e4ebd",
|
| 993 |
+
"data_source": "synthetic_programgym",
|
| 994 |
+
"difficulty": "",
|
| 995 |
+
"difficulty_score": null,
|
| 996 |
+
"eval_clean_hashes": [
|
| 997 |
+
"e46abd9ac5c6cf78e8c587bf6a3f8f1947ee564b962c025479b375ab9e925324"
|
| 998 |
+
],
|
| 999 |
+
"input_record": {
|
| 1000 |
+
"commit": "2c19b119ec8a75203b6b6269ef02a5e32c9e4ebd",
|
| 1001 |
+
"commits": 119,
|
| 1002 |
+
"contributors": 13,
|
| 1003 |
+
"difficulty": "easy",
|
| 1004 |
+
"difficulty_code_lines": 1441,
|
| 1005 |
+
"difficulty_has_tests": false,
|
| 1006 |
+
"difficulty_product_code_lines": 1441,
|
| 1007 |
+
"difficulty_runtime_deps": 4,
|
| 1008 |
+
"difficulty_score": 1.857633985150008,
|
| 1009 |
+
"difficulty_test_code_lines": 40,
|
| 1010 |
+
"full_name": "github-release/github-release",
|
| 1011 |
+
"github_stars": 1496,
|
| 1012 |
+
"input_joern_zip": "go_joern/github-release__github-release.zip",
|
| 1013 |
+
"joern_status": true,
|
| 1014 |
+
"joern_time": 4.487539586843923,
|
| 1015 |
+
"language": "go",
|
| 1016 |
+
"pb_match": [
|
| 1017 |
+
{
|
| 1018 |
+
"pb_fullname": "segmentio/chamber",
|
| 1019 |
+
"rank": 748,
|
| 1020 |
+
"similarity": 0.4995855689048767
|
| 1021 |
+
},
|
| 1022 |
+
{
|
| 1023 |
+
"pb_fullname": "JohannesKaufmann/html-to-markdown",
|
| 1024 |
+
"rank": 675,
|
| 1025 |
+
"similarity": 0.4791385233402252
|
| 1026 |
+
},
|
| 1027 |
+
{
|
| 1028 |
+
"pb_fullname": "jesseduffield/lazygit",
|
| 1029 |
+
"rank": 144,
|
| 1030 |
+
"similarity": 0.5872985124588013
|
| 1031 |
+
},
|
| 1032 |
+
{
|
| 1033 |
+
"pb_fullname": "skeema/skeema",
|
| 1034 |
+
"rank": 449,
|
| 1035 |
+
"similarity": 0.5121031403541565
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"pb_fullname": "naggie/dstask",
|
| 1039 |
+
"rank": 586,
|
| 1040 |
+
"similarity": 0.4866213798522949
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"pb_fullname": "TheZoraiz/ascii-image-converter",
|
| 1044 |
+
"rank": 495,
|
| 1045 |
+
"similarity": 0.4897958040237427
|
| 1046 |
+
},
|
| 1047 |
+
{
|
| 1048 |
+
"pb_fullname": "ariga/atlas",
|
| 1049 |
+
"rank": 614,
|
| 1050 |
+
"similarity": 0.5083182454109192
|
| 1051 |
+
},
|
| 1052 |
+
{
|
| 1053 |
+
"pb_fullname": "psampaz/go-mod-outdated",
|
| 1054 |
+
"rank": 584,
|
| 1055 |
+
"similarity": 0.4780679941177368
|
| 1056 |
+
}
|
| 1057 |
+
],
|
| 1058 |
+
"repo_age": 12.51,
|
| 1059 |
+
"repo_path": "go/github-release__github-release",
|
| 1060 |
+
"source": "commit:2c19b119ec8a75203b6b6269ef02a5e32c9e4ebd",
|
| 1061 |
+
"status": "done",
|
| 1062 |
+
"url": "https://github.com/github-release/github-release"
|
| 1063 |
+
},
|
| 1064 |
+
"instance_id": "github-release__github-release.2c19b11",
|
| 1065 |
+
"language": "go",
|
| 1066 |
+
"module_iterations": [],
|
| 1067 |
+
"repository": "github-release/github-release"
|
| 1068 |
+
}
|
github-release--github-release.2/tests/test.sh
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
# Verifier exec may not inherit image ENV (Modal/gVisor, login-shell resets).
|
| 5 |
+
export PATH="/usr/local/go/bin:/go/bin:/usr/local/cargo/bin:/root/.cargo/bin:${PATH}"
|
| 6 |
+
|
| 7 |
+
mkdir -p /logs/verifier /logs/artifacts
|
| 8 |
+
|
| 9 |
+
write_failure() {
|
| 10 |
+
local code="$1"
|
| 11 |
+
local details="$2"
|
| 12 |
+
python3 - "$code" "$details" <<'PY'
|
| 13 |
+
import json
|
| 14 |
+
import sys
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
code, details = sys.argv[1:3]
|
| 18 |
+
try:
|
| 19 |
+
metadata = json.loads(Path("/tests/programgym_task.json").read_text())
|
| 20 |
+
n_tests = sum(
|
| 21 |
+
len([
|
| 22 |
+
name for name in info.get("tests", [])
|
| 23 |
+
if name not in {item.get("name") for item in info.get("ignored_tests", [])}
|
| 24 |
+
])
|
| 25 |
+
for branch, info in metadata.get("branches", {}).items()
|
| 26 |
+
if not info.get("ignored")
|
| 27 |
+
)
|
| 28 |
+
except Exception:
|
| 29 |
+
n_tests = 0
|
| 30 |
+
result = {
|
| 31 |
+
"test_results": [],
|
| 32 |
+
"error_code": code,
|
| 33 |
+
"error_details": details,
|
| 34 |
+
"log": [],
|
| 35 |
+
"solution_branch": "submission",
|
| 36 |
+
"test_branches": [],
|
| 37 |
+
"test_branch_errors": {
|
| 38 |
+
"__infra__": [{"error_code": code, "error_details": details}]
|
| 39 |
+
},
|
| 40 |
+
"executable_hash": None,
|
| 41 |
+
"warnings": [],
|
| 42 |
+
}
|
| 43 |
+
diagnostics = {
|
| 44 |
+
"pass_rate": 0.0,
|
| 45 |
+
"resolved": 0,
|
| 46 |
+
"n_passed": 0,
|
| 47 |
+
"n_tests": n_tests,
|
| 48 |
+
"n_branch_errors": 1,
|
| 49 |
+
"infra_error": 1,
|
| 50 |
+
"executable_hash_present": 0,
|
| 51 |
+
}
|
| 52 |
+
Path("/logs/verifier/programgym_eval.json").write_text(
|
| 53 |
+
json.dumps(result, indent=2, sort_keys=True)
|
| 54 |
+
)
|
| 55 |
+
Path("/logs/verifier/harbor_diagnostics.json").write_text(
|
| 56 |
+
json.dumps(diagnostics, indent=2, sort_keys=True)
|
| 57 |
+
)
|
| 58 |
+
Path("/logs/verifier/reward.json").write_text(
|
| 59 |
+
json.dumps(
|
| 60 |
+
{"reward": 0.0, "resolved": 0.0, "almost_resolved": 0.0},
|
| 61 |
+
indent=2,
|
| 62 |
+
sort_keys=True,
|
| 63 |
+
)
|
| 64 |
+
)
|
| 65 |
+
Path("/logs/verifier/reward.txt").write_text("0.0")
|
| 66 |
+
Path("/logs/verifier/programgym_eval.log").write_text(details)
|
| 67 |
+
PY
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
if ! command -v python3 >/dev/null 2>&1; then
|
| 71 |
+
write_failure "missing_python3" "python3 is required in the cleanroom image"
|
| 72 |
+
exit 0
|
| 73 |
+
fi
|
| 74 |
+
|
| 75 |
+
if ! python3 /tests/programgym_evaluator.py; then
|
| 76 |
+
if [ ! -s /logs/verifier/reward.txt ]; then
|
| 77 |
+
write_failure "evaluator_crashed" \
|
| 78 |
+
"programgym_evaluator.py exited non-zero with no reward written"
|
| 79 |
+
fi
|
| 80 |
+
fi
|
| 81 |
+
|
| 82 |
+
exit 0
|
github-release--github-release.2/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a47bfa83a583566fd681962034b3c67913a7c302469671907ee817a6b3527dd6
|
| 3 |
+
size 3516
|
githubnemo--compiledaemon.6cc7bd/environment/Dockerfile
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
|
| 38 |
+
RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# programgym-runtime-workspace-cleanup: v1
|
| 49 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
| 50 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 51 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 52 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 53 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 54 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 55 |
+
RUN mkdir -p /home/agent \
|
| 56 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 57 |
+
&& ch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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# PROGRAMGYM-MANAGED-GO-DOWNLOAD: v1
|
| 3 |
+
# Generated deterministically from repository module metadata; do not edit.
|
| 4 |
+
set -u
|
| 5 |
+
export GOTOOLCHAIN=auto
|
| 6 |
+
mkdir -p /workspace/.programgym_build_env/go-prefetch
|
| 7 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PROGRAMGYM_GO_MOD_EOF'
|
| 8 |
+
module github.com/githubnemo/CompileDaemon
|
| 9 |
+
|
| 10 |
+
go 1.16
|
| 11 |
+
|
| 12 |
+
require (
|
| 13 |
+
github.com/fatih/color v1.18.0
|
| 14 |
+
github.com/fsnotify/fsnotify v1.8.0
|
| 15 |
+
github.com/radovskyb/watcher v1.0.7
|
| 16 |
+
)
|
| 17 |
+
PROGRAMGYM_GO_MOD_EOF
|
| 18 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PROGRAMGYM_GO_SUM_EOF'
|
| 19 |
+
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
| 20 |
+
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
| 21 |
+
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
|
| 22 |
+
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
| 23 |
+
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
| 24 |
+
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
| 25 |
+
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
| 26 |
+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
| 27 |
+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
| 28 |
+
github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE=
|
| 29 |
+
github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg=
|
| 30 |
+
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 31 |
+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 32 |
+
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 33 |
+
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
| 34 |
+
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
| 35 |
+
PROGRAMGYM_GO_SUM_EOF
|
| 36 |
+
PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY="${GOPROXY:-direct}"
|
| 37 |
+
PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
|
| 38 |
+
case "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" in
|
| 39 |
+
*"|"*|*","*)
|
| 40 |
+
PROGRAMGYM_INTERNAL_GO_FIRST_PROXY="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY%%[,|]*}"
|
| 41 |
+
PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY#*[,|]}"
|
| 42 |
+
if [[ "$PROGRAMGYM_INTERNAL_GO_FIRST_PROXY" =~ [^[:space:]] ]] && [[ "$PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER" =~ [^[:space:]] ]]; then
|
| 43 |
+
PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY="${PROGRAMGYM_GO_PUBLIC_FALLBACK_PROXY:-${PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER}}"
|
| 44 |
+
fi
|
| 45 |
+
;;
|
| 46 |
+
esac
|
| 47 |
+
if ! [[ "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" =~ [^[:space:]] ]]; then
|
| 48 |
+
PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
|
| 49 |
+
fi
|
| 50 |
+
cat > /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py <<'PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF'
|
| 51 |
+
import os
|
| 52 |
+
import signal
|
| 53 |
+
import subprocess
|
| 54 |
+
import sys
|
| 55 |
+
import time
|
| 56 |
+
|
| 57 |
+
sentinel_path, timeout_text, grace_text, proxy, *command = sys.argv[1:]
|
| 58 |
+
if not command:
|
| 59 |
+
raise SystemExit(125)
|
| 60 |
+
environment = os.environ.copy()
|
| 61 |
+
environment["GOPROXY"] = proxy
|
| 62 |
+
process = subprocess.Popen(command, env=environment, start_new_session=True)
|
| 63 |
+
try:
|
| 64 |
+
returncode = process.wait(timeout=float(timeout_text))
|
| 65 |
+
except subprocess.TimeoutExpired:
|
| 66 |
+
with open(sentinel_path, "w", encoding="utf-8") as sentinel:
|
| 67 |
+
sentinel.write("expired\n")
|
| 68 |
+
try:
|
| 69 |
+
os.killpg(process.pid, signal.SIGTERM)
|
| 70 |
+
except ProcessLookupError:
|
| 71 |
+
pass
|
| 72 |
+
deadline = time.monotonic() + float(grace_text)
|
| 73 |
+
group_alive = True
|
| 74 |
+
while time.monotonic() < deadline:
|
| 75 |
+
process.poll()
|
| 76 |
+
try:
|
| 77 |
+
os.killpg(process.pid, 0)
|
| 78 |
+
except ProcessLookupError:
|
| 79 |
+
group_alive = False
|
| 80 |
+
break
|
| 81 |
+
time.sleep(0.05)
|
| 82 |
+
if group_alive:
|
| 83 |
+
try:
|
| 84 |
+
os.killpg(process.pid, signal.SIGKILL)
|
| 85 |
+
except ProcessLookupError:
|
| 86 |
+
pass
|
| 87 |
+
process.wait()
|
| 88 |
+
raise SystemExit(124)
|
| 89 |
+
if returncode < 0:
|
| 90 |
+
returncode = 128 - returncode
|
| 91 |
+
raise SystemExit(returncode)
|
| 92 |
+
PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF
|
| 93 |
+
PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS="${PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS:-90}"
|
| 94 |
+
if ! [[ "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" =~ ^[1-9][0-9]*$ ]]; then
|
| 95 |
+
printf '%s\n' "download.sh: invalid PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS=${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}" >&2
|
| 96 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 97 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 98 |
+
return 1
|
| 99 |
+
else
|
| 100 |
+
exit 1
|
| 101 |
+
fi
|
| 102 |
+
fi
|
| 103 |
+
if ! command -v python3 >/dev/null 2>&1; then
|
| 104 |
+
printf '%s\n' 'download.sh: python3 is required for bounded Nexus Go downloads' >&2
|
| 105 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 106 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 107 |
+
return 1
|
| 108 |
+
else
|
| 109 |
+
exit 1
|
| 110 |
+
fi
|
| 111 |
+
fi
|
| 112 |
+
_programgym_go_with_nexus_timeout() {
|
| 113 |
+
local programgym_go_rc
|
| 114 |
+
local programgym_go_timeout_sentinel
|
| 115 |
+
if ! programgym_go_timeout_sentinel="$(mktemp "${TMPDIR:-/tmp}/programgym-go-timeout.XXXXXX")"; then
|
| 116 |
+
return 1
|
| 117 |
+
fi
|
| 118 |
+
if python3 /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py "$programgym_go_timeout_sentinel" "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" "5" "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" "$@"; then
|
| 119 |
+
programgym_go_rc=0
|
| 120 |
+
else
|
| 121 |
+
programgym_go_rc=$?
|
| 122 |
+
fi
|
| 123 |
+
if [ ! -s "$programgym_go_timeout_sentinel" ]; then
|
| 124 |
+
rm -f "$programgym_go_timeout_sentinel"
|
| 125 |
+
return "$programgym_go_rc"
|
| 126 |
+
fi
|
| 127 |
+
rm -f "$programgym_go_timeout_sentinel"
|
| 128 |
+
if [ -z "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" ]; then
|
| 129 |
+
printf '%s\n' "download.sh: primary Go request exceeded ${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}s; GOPROXY has no explicit non-empty fallback remainder" >&2
|
| 130 |
+
return "$programgym_go_rc"
|
| 131 |
+
fi
|
| 132 |
+
printf '%s\n' "download.sh: Nexus-first Go request exceeded ${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}s; retrying with GOPROXY=${PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY}" >&2
|
| 133 |
+
env GOPROXY="$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" "$@"
|
| 134 |
+
}
|
| 135 |
+
PROGRAMGYM_GO_BASE_GOROOT="$(GOTOOLCHAIN=local go env GOROOT)"
|
| 136 |
+
if ! PROGRAMGYM_GO_RESOLVED_GOROOT="$(cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout env GOTOOLCHAIN=auto go env GOROOT)"; then
|
| 137 |
+
printf '%s\n' 'download.sh: Go toolchain resolution failed' >&2
|
| 138 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 139 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 140 |
+
return 1
|
| 141 |
+
else
|
| 142 |
+
exit 1
|
| 143 |
+
fi
|
| 144 |
+
fi
|
| 145 |
+
if [ "$PROGRAMGYM_GO_RESOLVED_GOROOT" != "$PROGRAMGYM_GO_BASE_GOROOT" ]; then
|
| 146 |
+
PROGRAMGYM_GO_TOOLCHAIN_ROOT=/opt/programgym-go-toolchain
|
| 147 |
+
mkdir -p "$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 148 |
+
cp -a "$PROGRAMGYM_GO_RESOLVED_GOROOT/." "$PROGRAMGYM_GO_TOOLCHAIN_ROOT/"
|
| 149 |
+
export GOROOT="$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 150 |
+
else
|
| 151 |
+
export GOROOT="$PROGRAMGYM_GO_BASE_GOROOT"
|
| 152 |
+
fi
|
| 153 |
+
export PATH="$GOROOT/bin:$PATH"
|
| 154 |
+
export GOTOOLCHAIN=local
|
| 155 |
+
if ! (cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all); then
|
| 156 |
+
printf '%s\n' 'download.sh: Go dependency prefetch failed' >&2
|
| 157 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 158 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 159 |
+
return 1
|
| 160 |
+
else
|
| 161 |
+
exit 1
|
| 162 |
+
fi
|
| 163 |
+
fi
|
| 164 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 165 |
+
unset -f _programgym_go_with_nexus_timeout
|
| 166 |
+
unset PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY
|
| 167 |
+
unset PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY
|
| 168 |
+
unset PROGRAMGYM_INTERNAL_GO_FIRST_PROXY
|
| 169 |
+
unset PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER
|
| 170 |
+
unset PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS
|
githubnemo--compiledaemon.6cc7bd/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a3f9cfb60817beafe8625b259f6ec27743550d20bfd7543739b0dc58709e4ea
|
| 3 |
+
size 3635428
|
githubnemo--compiledaemon.6cc7bd/environment/programgym-go.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
|
| 3 |
+
size 59908810
|
githubnemo--compiledaemon.6cc7bd/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca9aee75a81e6793506fa0125e2d237056c13c444e8e28c59f983900cb3c8666
|
| 3 |
+
size 9532
|
githubnemo--compiledaemon.6cc7bd/instruction.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are a helpful assistant that can interact with a computer.
|
| 2 |
+
|
| 3 |
+
This is a reverse-engineering benchmark. You are given a compiled binary and its documentation.
|
| 4 |
+
Your job is to write a new, original codebase from scratch that produces an executable with identical behavior.
|
| 5 |
+
You must figure out the behavior solely by running and interacting with the provided binary.
|
| 6 |
+
Writing original code based on observed behavior is the entire point of this benchmark.
|
| 7 |
+
|
| 8 |
+
Any approach that shortcuts this — finding existing source code, wrapping the binary,
|
| 9 |
+
or installing the original tool — does not count as a solution. It will be detected by an
|
| 10 |
+
automated judge, marked as a disqualification, and scored as a failure.
|
| 11 |
+
The trace will be posted to an online wall of shame.
|
| 12 |
+
|
| 13 |
+
<RULES>
|
| 14 |
+
## What is not allowed
|
| 15 |
+
|
| 16 |
+
### 1. Obtaining source code
|
| 17 |
+
|
| 18 |
+
The only source of truth about what the executable does is the executable itself and its
|
| 19 |
+
bundled documentation. You must not search the internet, package registries, or any external
|
| 20 |
+
source for information about this project's source code. Even if you recognize what the
|
| 21 |
+
executable is, you must reimplement it from behavioral observation alone.
|
| 22 |
+
|
| 23 |
+
This includes but is not limited to:
|
| 24 |
+
- Cloning or browsing the original GitHub repository, its forks, or mirrors
|
| 25 |
+
- Downloading the project from package registries: `cargo install <project>`, `go get github.com/<org>/<project>`, `pip install <project>`, `apt-get source <project>`, `npm install <project>`, etc.
|
| 26 |
+
- Fetching source tarballs from project websites (e.g., `curl https://lua.org/ftp/lua-5.5.0.tar.gz`)
|
| 27 |
+
- Using a package manager to download the project as a dependency and then reading its cached source (e.g., navigating into `~/.cargo/registry/src/` or `$(go env GOPATH)/pkg/mod/`)
|
| 28 |
+
- Searching the web for the project's source code or implementation details
|
| 29 |
+
|
| 30 |
+
### 2. Wrapping or reusing the original binary
|
| 31 |
+
|
| 32 |
+
Your submission must be a genuine reimplementation. The provided `./executable` is for
|
| 33 |
+
observation only — your final solution must not depend on it or any other pre-built version
|
| 34 |
+
of the same tool at runtime.
|
| 35 |
+
|
| 36 |
+
This includes but is not limited to:
|
| 37 |
+
- Writing a wrapper script that delegates to the original binary (e.g., `exec zstd "$@"`)
|
| 38 |
+
- Installing the tool from a package manager and shimming to it (e.g., `apt-get install nnn && cp $(which nnn) ./executable`)
|
| 39 |
+
- Writing a `compile.sh` that simply makes the provided binary executable (`chmod +x ./executable`) or copies it (`cp ./executable ./executable`)
|
| 40 |
+
- Building a binary whose main function shells out to an external tool (e.g., `Command::new("miniserve").args(args).exec()`)
|
| 41 |
+
- Re-linking prebuilt `.o` object files found in the workspace without writing new source code
|
| 42 |
+
|
| 43 |
+
### 3. Binary analysis of the provided executable
|
| 44 |
+
|
| 45 |
+
All information about the provided `./executable` must be obtained by interacting with it
|
| 46 |
+
through its normal user interface (CLI flags, stdin/stdout, etc.).
|
| 47 |
+
- You MUST NOT decompile `./executable` or use disassemblers (objdump, Ghidra, etc.) on it
|
| 48 |
+
- You MUST NOT use strace, ltrace, or similar tracing/instrumentation tools on `./executable`
|
| 49 |
+
|
| 50 |
+
Note: this restriction applies ONLY to the provided `./executable`. You are free to use any
|
| 51 |
+
analysis tools on binaries that you produce yourself during development.
|
| 52 |
+
|
| 53 |
+
## What IS allowed
|
| 54 |
+
|
| 55 |
+
- Running the executable with any inputs, flags, and arguments to observe its behavior
|
| 56 |
+
- Reading any documentation files bundled in the workspace
|
| 57 |
+
</RULES>
|
| 58 |
+
|
| 59 |
+
## Task context
|
| 60 |
+
|
| 61 |
+
We want to write the source code for a given executable.
|
| 62 |
+
The executable is located at `./executable` in the workspace root.
|
| 63 |
+
|
| 64 |
+
You also have access to the existing documentation.
|
| 65 |
+
|
| 66 |
+
## Your task
|
| 67 |
+
|
| 68 |
+
Implement the source code to generate an executable of exactly identical behavior as the original.
|
| 69 |
+
|
| 70 |
+
No project-specific dependencies are pre-installed.
|
| 71 |
+
You do NOT have access to the internet.
|
| 72 |
+
**IMPORTANT**: Make sure that the executable(s) and everything else that is an artifact is not committed, i.e., is in your `.gitignore` file.
|
| 73 |
+
Finally, commit your changes.
|
| 74 |
+
|
| 75 |
+
Make sure that you have a `./compile.sh` file that produces an executable `./executable` in the workspace root.
|
| 76 |
+
`compile.sh` should be executable and should install any dependencies needed to compile the executable.
|
| 77 |
+
If your compile.sh fails to compile on a fresh checkout, your task has failed.
|
| 78 |
+
|
| 79 |
+
## Important: This is a reverse-engineering benchmark
|
| 80 |
+
|
| 81 |
+
Your goal is to write original code from scratch that reproduces the executable's behavior.
|
| 82 |
+
The only way to learn what the executable does is to run it and read its bundled documentation.
|
| 83 |
+
|
| 84 |
+
Any attempt to obtain source code — whether successful or not — or to wrap/reuse the
|
| 85 |
+
provided binary will be detected by an automated judge, disqualified, and scored as zero.
|
| 86 |
+
See the full rules in the system prompt above. Key points:
|
| 87 |
+
|
| 88 |
+
- Do NOT search the internet, clone repos, or download the project from any package registry
|
| 89 |
+
- Do NOT wrap, shim, or delegate to the provided `./executable` or any installed version of the same tool
|
| 90 |
+
- Do NOT decompile the provided `./executable` or use strace/ltrace on it (analyzing your own binaries is fine)
|
| 91 |
+
- You SHOULD extensively test the executable to understand its behavior before writing code.
|
| 92 |
+
If you are dealing with a TUI, tmux/libtmux has been installed to help you test/inspect/it.
|
| 93 |
+
|
| 94 |
+
## Recommended Workflow
|
| 95 |
+
|
| 96 |
+
1. Explore all documentation files
|
| 97 |
+
2. Play with the executable to understand its behavior (however, you MUST NOT decompile `./executable` or perform any other form of binary or strace/ltrace analysis on it)
|
| 98 |
+
3. Write the source code to implement the behavior
|
githubnemo--compiledaemon.6cc7bd/solution/solve.sh
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Oracle-only ceiling check. The reference is execute-only for normal agents;
|
| 3 |
+
# because the oracle runs as the owning `agent` user it can temporarily add read
|
| 4 |
+
# permission and encode the binary for Harbor's normal artifact handoff.
|
| 5 |
+
set -euo pipefail
|
| 6 |
+
test -f ./executable
|
| 7 |
+
chmod u+r ./executable
|
| 8 |
+
python3 - <<'PY'
|
| 9 |
+
import base64
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
Path(".programgym_oracle_reference").write_bytes(
|
| 13 |
+
base64.b64encode(Path("executable").read_bytes())
|
| 14 |
+
)
|
| 15 |
+
PY
|
| 16 |
+
chmod u-r ./executable
|
| 17 |
+
cat > compile.sh <<'EOF'
|
| 18 |
+
#!/usr/bin/env bash
|
| 19 |
+
set -euo pipefail
|
| 20 |
+
if [ -f ./.programgym_oracle_reference ]; then
|
| 21 |
+
python3 - <<'PY'
|
| 22 |
+
import base64
|
| 23 |
+
from pathlib import Path
|
| 24 |
+
|
| 25 |
+
Path("executable").write_bytes(
|
| 26 |
+
base64.b64decode(Path(".programgym_oracle_reference").read_bytes())
|
| 27 |
+
)
|
| 28 |
+
PY
|
| 29 |
+
fi
|
| 30 |
+
test -f ./executable
|
| 31 |
+
chmod +x ./executable
|
| 32 |
+
EOF
|
| 33 |
+
chmod +x compile.sh
|
githubnemo--compiledaemon.6cc7bd/task.toml
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.3"
|
| 2 |
+
source = "ProgramGym"
|
| 3 |
+
artifacts = [
|
| 4 |
+
"/logs/verifier/programgym_eval.json",
|
| 5 |
+
"/logs/verifier/harbor_diagnostics.json",
|
| 6 |
+
"/logs/verifier/programgym_eval.log",
|
| 7 |
+
"/logs/verifier/reward.json",
|
| 8 |
+
"/logs/verifier/reward.txt",
|
| 9 |
+
# Keep agent/runtime state out of the submission handoff. In particular,
|
| 10 |
+
# Claude Code installs an absolute symlink under .local/bin; transferring it
|
| 11 |
+
# makes Python's safe tar extraction reject the entire workspace archive.
|
| 12 |
+
{ source = "/workspace", exclude = [
|
| 13 |
+
"executable",
|
| 14 |
+
".git",
|
| 15 |
+
".bashrc",
|
| 16 |
+
".cache",
|
| 17 |
+
".cc-switch",
|
| 18 |
+
".claude",
|
| 19 |
+
".local",
|
| 20 |
+
] },
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
[task]
|
| 24 |
+
name = "programgym/githubnemo--compiledaemon.6cc7bd"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for githubnemo/CompileDaemon"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "go"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "githubnemo__CompileDaemon.6cc7bd4"
|
| 32 |
+
repository = "githubnemo/CompileDaemon"
|
| 33 |
+
commit = "6cc7bd40f44f51eecad0bebf663a7c589107eabb"
|
| 34 |
+
language = "go"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.4689378056654614
|
| 37 |
+
test_branches = 3
|
| 38 |
+
test_count = 203
|
| 39 |
+
|
| 40 |
+
[agent]
|
| 41 |
+
timeout_sec = 14400
|
| 42 |
+
user = "agent"
|
| 43 |
+
network_mode = "allowlist"
|
| 44 |
+
allowed_hosts = ["api.anthropic.com", "api.openai.com"]
|
| 45 |
+
|
| 46 |
+
[verifier]
|
| 47 |
+
timeout_sec = 7200
|
| 48 |
+
user = "root"
|
| 49 |
+
environment_mode = "separate"
|
| 50 |
+
|
| 51 |
+
[verifier.env]
|
| 52 |
+
PROGRAMGYM_XDIST_WORKERS = "8"
|
| 53 |
+
|
| 54 |
+
[verifier.environment]
|
| 55 |
+
build_timeout_sec = 1800
|
| 56 |
+
cpus = 8
|
| 57 |
+
memory_mb = 16384
|
| 58 |
+
storage_mb = 30720
|
| 59 |
+
gpus = 0
|
| 60 |
+
workdir = "/workspace"
|
| 61 |
+
|
| 62 |
+
[environment]
|
| 63 |
+
network_mode = "public"
|
| 64 |
+
build_timeout_sec = 1800
|
| 65 |
+
cpus = 8
|
| 66 |
+
memory_mb = 16384
|
| 67 |
+
storage_mb = 30720
|
| 68 |
+
gpus = 0
|
| 69 |
+
workdir = "/workspace"
|
githubnemo--compiledaemon.6cc7bd/tests/Dockerfile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
|
| 38 |
+
RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# programgym-runtime-workspace-cleanup: v1
|
| 49 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
| 50 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 51 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 52 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 53 |
+
&& mkdir -p /workspace /tests
|
| 54 |
+
|
| 55 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 56 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 57 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 58 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 59 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 60 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 61 |
+
RUN python3 -m pip install --no-cache-dir --disable-pip-version-check \
|
| 62 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 63 |
+
|
| 64 |
+
COPY test.sh /tests/test.sh
|
| 65 |
+
COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
| 66 |
+
COPY programgym_task.json /tests/programgym_task.json
|
| 67 |
+
COPY blobs/ /tests/blobs/
|
| 68 |
+
RUN chmod +x /tests/test.sh
|
githubnemo--compiledaemon.6cc7bd/tests/blobs/tests/generated_module_01.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05aef942c8d25df5c09c5f0d3db85cdaaec9a7aaa67a71c15beba69b99e50393
|
| 3 |
+
size 18707
|
githubnemo--compiledaemon.6cc7bd/tests/blobs/tests/generated_module_02.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b66974218cc8b965a053c6e961b7c69642e6a4749e781fb8f8e4b6d3fcb06e10
|
| 3 |
+
size 19918
|
githubnemo--compiledaemon.6cc7bd/tests/blobs/tests/generated_module_03.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# PROGRAMGYM-MANAGED-GO-DOWNLOAD: v1
|
| 3 |
+
# Generated deterministically from repository module metadata; do not edit.
|
| 4 |
+
set -u
|
| 5 |
+
export GOTOOLCHAIN=auto
|
| 6 |
+
mkdir -p /workspace/.programgym_build_env/go-prefetch
|
| 7 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.mod <<'PROGRAMGYM_GO_MOD_EOF'
|
| 8 |
+
module github.com/githubnemo/CompileDaemon
|
| 9 |
+
|
| 10 |
+
go 1.16
|
| 11 |
+
|
| 12 |
+
require (
|
| 13 |
+
github.com/fatih/color v1.18.0
|
| 14 |
+
github.com/fsnotify/fsnotify v1.8.0
|
| 15 |
+
github.com/radovskyb/watcher v1.0.7
|
| 16 |
+
)
|
| 17 |
+
PROGRAMGYM_GO_MOD_EOF
|
| 18 |
+
cat > /workspace/.programgym_build_env/go-prefetch/go.sum <<'PROGRAMGYM_GO_SUM_EOF'
|
| 19 |
+
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
| 20 |
+
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
| 21 |
+
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
|
| 22 |
+
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
| 23 |
+
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
| 24 |
+
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
| 25 |
+
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
| 26 |
+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
| 27 |
+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
| 28 |
+
github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE=
|
| 29 |
+
github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg=
|
| 30 |
+
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 31 |
+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 32 |
+
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 33 |
+
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
| 34 |
+
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
| 35 |
+
PROGRAMGYM_GO_SUM_EOF
|
| 36 |
+
PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY="${GOPROXY:-direct}"
|
| 37 |
+
PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
|
| 38 |
+
case "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" in
|
| 39 |
+
*"|"*|*","*)
|
| 40 |
+
PROGRAMGYM_INTERNAL_GO_FIRST_PROXY="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY%%[,|]*}"
|
| 41 |
+
PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER="${PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY#*[,|]}"
|
| 42 |
+
if [[ "$PROGRAMGYM_INTERNAL_GO_FIRST_PROXY" =~ [^[:space:]] ]] && [[ "$PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER" =~ [^[:space:]] ]]; then
|
| 43 |
+
PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY="${PROGRAMGYM_GO_PUBLIC_FALLBACK_PROXY:-${PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER}}"
|
| 44 |
+
fi
|
| 45 |
+
;;
|
| 46 |
+
esac
|
| 47 |
+
if ! [[ "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" =~ [^[:space:]] ]]; then
|
| 48 |
+
PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY=""
|
| 49 |
+
fi
|
| 50 |
+
cat > /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py <<'PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF'
|
| 51 |
+
import os
|
| 52 |
+
import signal
|
| 53 |
+
import subprocess
|
| 54 |
+
import sys
|
| 55 |
+
import time
|
| 56 |
+
|
| 57 |
+
sentinel_path, timeout_text, grace_text, proxy, *command = sys.argv[1:]
|
| 58 |
+
if not command:
|
| 59 |
+
raise SystemExit(125)
|
| 60 |
+
environment = os.environ.copy()
|
| 61 |
+
environment["GOPROXY"] = proxy
|
| 62 |
+
process = subprocess.Popen(command, env=environment, start_new_session=True)
|
| 63 |
+
try:
|
| 64 |
+
returncode = process.wait(timeout=float(timeout_text))
|
| 65 |
+
except subprocess.TimeoutExpired:
|
| 66 |
+
with open(sentinel_path, "w", encoding="utf-8") as sentinel:
|
| 67 |
+
sentinel.write("expired\n")
|
| 68 |
+
try:
|
| 69 |
+
os.killpg(process.pid, signal.SIGTERM)
|
| 70 |
+
except ProcessLookupError:
|
| 71 |
+
pass
|
| 72 |
+
deadline = time.monotonic() + float(grace_text)
|
| 73 |
+
group_alive = True
|
| 74 |
+
while time.monotonic() < deadline:
|
| 75 |
+
process.poll()
|
| 76 |
+
try:
|
| 77 |
+
os.killpg(process.pid, 0)
|
| 78 |
+
except ProcessLookupError:
|
| 79 |
+
group_alive = False
|
| 80 |
+
break
|
| 81 |
+
time.sleep(0.05)
|
| 82 |
+
if group_alive:
|
| 83 |
+
try:
|
| 84 |
+
os.killpg(process.pid, signal.SIGKILL)
|
| 85 |
+
except ProcessLookupError:
|
| 86 |
+
pass
|
| 87 |
+
process.wait()
|
| 88 |
+
raise SystemExit(124)
|
| 89 |
+
if returncode < 0:
|
| 90 |
+
returncode = 128 - returncode
|
| 91 |
+
raise SystemExit(returncode)
|
| 92 |
+
PROGRAMGYM_GO_TIMEOUT_SUPERVISOR_EOF
|
| 93 |
+
PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS="${PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS:-90}"
|
| 94 |
+
if ! [[ "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" =~ ^[1-9][0-9]*$ ]]; then
|
| 95 |
+
printf '%s\n' "download.sh: invalid PROGRAMGYM_GO_NEXUS_ATTEMPT_TIMEOUT_SECONDS=${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}" >&2
|
| 96 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 97 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 98 |
+
return 1
|
| 99 |
+
else
|
| 100 |
+
exit 1
|
| 101 |
+
fi
|
| 102 |
+
fi
|
| 103 |
+
if ! command -v python3 >/dev/null 2>&1; then
|
| 104 |
+
printf '%s\n' 'download.sh: python3 is required for bounded Nexus Go downloads' >&2
|
| 105 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 106 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 107 |
+
return 1
|
| 108 |
+
else
|
| 109 |
+
exit 1
|
| 110 |
+
fi
|
| 111 |
+
fi
|
| 112 |
+
_programgym_go_with_nexus_timeout() {
|
| 113 |
+
local programgym_go_rc
|
| 114 |
+
local programgym_go_timeout_sentinel
|
| 115 |
+
if ! programgym_go_timeout_sentinel="$(mktemp "${TMPDIR:-/tmp}/programgym-go-timeout.XXXXXX")"; then
|
| 116 |
+
return 1
|
| 117 |
+
fi
|
| 118 |
+
if python3 /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py "$programgym_go_timeout_sentinel" "$PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS" "5" "$PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY" "$@"; then
|
| 119 |
+
programgym_go_rc=0
|
| 120 |
+
else
|
| 121 |
+
programgym_go_rc=$?
|
| 122 |
+
fi
|
| 123 |
+
if [ ! -s "$programgym_go_timeout_sentinel" ]; then
|
| 124 |
+
rm -f "$programgym_go_timeout_sentinel"
|
| 125 |
+
return "$programgym_go_rc"
|
| 126 |
+
fi
|
| 127 |
+
rm -f "$programgym_go_timeout_sentinel"
|
| 128 |
+
if [ -z "$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" ]; then
|
| 129 |
+
printf '%s\n' "download.sh: primary Go request exceeded ${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}s; GOPROXY has no explicit non-empty fallback remainder" >&2
|
| 130 |
+
return "$programgym_go_rc"
|
| 131 |
+
fi
|
| 132 |
+
printf '%s\n' "download.sh: Nexus-first Go request exceeded ${PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS}s; retrying with GOPROXY=${PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY}" >&2
|
| 133 |
+
env GOPROXY="$PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY" "$@"
|
| 134 |
+
}
|
| 135 |
+
PROGRAMGYM_GO_BASE_GOROOT="$(GOTOOLCHAIN=local go env GOROOT)"
|
| 136 |
+
if ! PROGRAMGYM_GO_RESOLVED_GOROOT="$(cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout env GOTOOLCHAIN=auto go env GOROOT)"; then
|
| 137 |
+
printf '%s\n' 'download.sh: Go toolchain resolution failed' >&2
|
| 138 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 139 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 140 |
+
return 1
|
| 141 |
+
else
|
| 142 |
+
exit 1
|
| 143 |
+
fi
|
| 144 |
+
fi
|
| 145 |
+
if [ "$PROGRAMGYM_GO_RESOLVED_GOROOT" != "$PROGRAMGYM_GO_BASE_GOROOT" ]; then
|
| 146 |
+
PROGRAMGYM_GO_TOOLCHAIN_ROOT=/opt/programgym-go-toolchain
|
| 147 |
+
mkdir -p "$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 148 |
+
cp -a "$PROGRAMGYM_GO_RESOLVED_GOROOT/." "$PROGRAMGYM_GO_TOOLCHAIN_ROOT/"
|
| 149 |
+
export GOROOT="$PROGRAMGYM_GO_TOOLCHAIN_ROOT"
|
| 150 |
+
else
|
| 151 |
+
export GOROOT="$PROGRAMGYM_GO_BASE_GOROOT"
|
| 152 |
+
fi
|
| 153 |
+
export PATH="$GOROOT/bin:$PATH"
|
| 154 |
+
export GOTOOLCHAIN=local
|
| 155 |
+
if ! (cd /workspace/.programgym_build_env/go-prefetch && _programgym_go_with_nexus_timeout go mod download -modfile=/workspace/.programgym_build_env/go-prefetch/go.mod all); then
|
| 156 |
+
printf '%s\n' 'download.sh: Go dependency prefetch failed' >&2
|
| 157 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 158 |
+
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
| 159 |
+
return 1
|
| 160 |
+
else
|
| 161 |
+
exit 1
|
| 162 |
+
fi
|
| 163 |
+
fi
|
| 164 |
+
rm -f /workspace/.programgym_build_env/go-prefetch/.programgym_go_timeout_supervisor.py
|
| 165 |
+
unset -f _programgym_go_with_nexus_timeout
|
| 166 |
+
unset PROGRAMGYM_INTERNAL_GO_PRIMARY_PROXY
|
| 167 |
+
unset PROGRAMGYM_INTERNAL_GO_FALLBACK_PROXY
|
| 168 |
+
unset PROGRAMGYM_INTERNAL_GO_FIRST_PROXY
|
| 169 |
+
unset PROGRAMGYM_INTERNAL_GO_PROXY_REMAINDER
|
| 170 |
+
unset PROGRAMGYM_INTERNAL_GO_NEXUS_TIMEOUT_SECONDS
|
githubnemo--compiledaemon.6cc7bd/tests/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a3f9cfb60817beafe8625b259f6ec27743550d20bfd7543739b0dc58709e4ea
|
| 3 |
+
size 3635428
|
githubnemo--compiledaemon.6cc7bd/tests/programgym-go.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
|
| 3 |
+
size 59908810
|
githubnemo--compiledaemon.6cc7bd/tests/programgym_evaluator.py
ADDED
|
@@ -0,0 +1,1201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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3 |
+
|
| 4 |
+
Mirrors ProgramGym's ``Evaluator`` pipeline as closely as a single-container,
|
| 5 |
+
no-Docker-in-Docker host allows. Run from ``tests/test.sh`` inside the agent's
|
| 6 |
+
cleanroom container after Harbor flips the verifier-phase network policy.
|
| 7 |
+
|
| 8 |
+
Differences from ``programgym.eval.eval.Evaluator`` that are structural to
|
| 9 |
+
running in one container:
|
| 10 |
+
|
| 11 |
+
* No fresh container per branch. ``snapshot_workspace`` / ``restore_workspace``
|
| 12 |
+
copy a post-compile workspace snapshot to a temp directory and restore it
|
| 13 |
+
before each branch; ``cleanup_lingering_processes`` kills leftover branch
|
| 14 |
+
processes between attempts to approximate the fresh-container boundary.
|
| 15 |
+
* No ``docker commit``. The post-compile workspace snapshot serves the same
|
| 16 |
+
role as the committed image upstream.
|
| 17 |
+
* Hidden test blobs are fetched on demand from HuggingFace via
|
| 18 |
+
``huggingface_hub.snapshot_download`` (matching ``programgym.utils.blob_store``)
|
| 19 |
+
rather than being pre-staged into ``/tests/blobs/``. Override with
|
| 20 |
+
``PROGRAMGYM_BLOB_DIR`` for offline reruns.
|
| 21 |
+
|
| 22 |
+
Everything else (eval_clean_hashes scrub, deterministic synthetic git seed,
|
| 23 |
+
``compile.sh`` then stash + hash the executable, best-effort
|
| 24 |
+
``pytest-rerunfailures``, per-branch test-tar overlay, executable hash
|
| 25 |
+
``--max-worker-restart=4``, xdist worker-crash retry with serial fallback,
|
| 26 |
+
best-of-N attempt selection, active vs ignored test bookkeeping, scoring) is
|
| 27 |
+
preserved.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import re
|
| 36 |
+
import shlex
|
| 37 |
+
import shutil
|
| 38 |
+
import signal
|
| 39 |
+
import subprocess
|
| 40 |
+
import tempfile
|
| 41 |
+
import time
|
| 42 |
+
import traceback
|
| 43 |
+
import xml.etree.ElementTree as ET
|
| 44 |
+
from pathlib import Path
|
| 45 |
+
from typing import Any
|
| 46 |
+
|
| 47 |
+
WORKSPACE = Path(os.environ.get("PROGRAMGYM_WORKSPACE", "/workspace"))
|
| 48 |
+
STASHED_EXECUTABLE = Path("/opt/programgym-stashed-executable-do-not-modify")
|
| 49 |
+
METADATA_PATH = Path(
|
| 50 |
+
os.environ.get("PROGRAMGYM_METADATA", "/tests/programgym_task.json")
|
| 51 |
+
)
|
| 52 |
+
LOG_DIR = Path(os.environ.get("PROGRAMGYM_LOG_DIR", "/logs/verifier"))
|
| 53 |
+
WORKER_CRASH_PHRASE = "worker '"
|
| 54 |
+
XDIST_COLLAPSE_MARKERS = (
|
| 55 |
+
"maximum crashed workers reached",
|
| 56 |
+
"xdist: maximum crashed",
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
DEFAULT_HF_REPO_ID = "programgym/ProgramGym-Tests"
|
| 60 |
+
DEFAULT_HF_REVISION = "main"
|
| 61 |
+
|
| 62 |
+
# Oracle agent handoff files (see solution/solve.sh). Must not appear in the
|
| 63 |
+
# post-compile workspace snapshot or they pollute tree-scanning tests (dutree).
|
| 64 |
+
_ORACLE_HANDOFF_NAMES = (".programgym_oracle_reference",)
|
| 65 |
+
|
| 66 |
+
_TOOLCHAIN_BIN_DIR_CANDIDATES = (
|
| 67 |
+
"/usr/local/go/bin",
|
| 68 |
+
"/go/bin",
|
| 69 |
+
"/usr/local/cargo/bin",
|
| 70 |
+
"/root/.cargo/bin",
|
| 71 |
+
"/root/.ghcup/bin",
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def toolchain_bin_dirs() -> list[str]:
|
| 76 |
+
"""Return toolchain bin directories that exist on this image."""
|
| 77 |
+
candidates = list(_TOOLCHAIN_BIN_DIR_CANDIDATES)
|
| 78 |
+
candidates.extend(
|
| 79 |
+
str(path)
|
| 80 |
+
for path in sorted(Path("/usr/lib").glob("go-*/bin"))
|
| 81 |
+
if _is_accessible_dir(path)
|
| 82 |
+
)
|
| 83 |
+
seen: set[str] = set()
|
| 84 |
+
present: list[str] = []
|
| 85 |
+
for path in candidates:
|
| 86 |
+
if path in seen:
|
| 87 |
+
continue
|
| 88 |
+
seen.add(path)
|
| 89 |
+
if _is_accessible_dir(path):
|
| 90 |
+
present.append(path)
|
| 91 |
+
return present
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _is_accessible_dir(path: str | Path) -> bool:
|
| 95 |
+
"""Return whether path is a directory without failing on protected homes."""
|
| 96 |
+
try:
|
| 97 |
+
return Path(path).is_dir()
|
| 98 |
+
except OSError:
|
| 99 |
+
return False
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def bootstrap_toolchain_path() -> str:
|
| 103 |
+
"""Prepend discovered toolchain dirs to PATH (idempotent)."""
|
| 104 |
+
prepend = toolchain_bin_dirs()
|
| 105 |
+
current_parts = [part for part in os.environ.get("PATH", "").split(":") if part]
|
| 106 |
+
merged: list[str] = []
|
| 107 |
+
for path in prepend + current_parts:
|
| 108 |
+
if path not in merged:
|
| 109 |
+
merged.append(path)
|
| 110 |
+
new_path = ":".join(merged)
|
| 111 |
+
os.environ["PATH"] = new_path
|
| 112 |
+
return new_path
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def _bash_login_command(command: str) -> str:
|
| 116 |
+
"""Run ``command`` under bash -lc with an explicit PATH export."""
|
| 117 |
+
path = bootstrap_toolchain_path()
|
| 118 |
+
return f"export PATH={shlex.quote(path)}; {command}"
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def sha256(path: Path) -> str:
|
| 122 |
+
h = hashlib.sha256()
|
| 123 |
+
with path.open("rb") as f:
|
| 124 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 125 |
+
h.update(chunk)
|
| 126 |
+
return h.hexdigest()
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def write_json(path: Path, data: dict[str, Any]) -> None:
|
| 130 |
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
| 131 |
+
tmp.write_text(json.dumps(data, indent=2, sort_keys=True))
|
| 132 |
+
tmp.replace(path)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def _read_log_tail(path: Path | None, max_bytes: int = 65536) -> str:
|
| 136 |
+
if path is None or not path.exists():
|
| 137 |
+
return ""
|
| 138 |
+
data = path.read_bytes()
|
| 139 |
+
if len(data) <= max_bytes:
|
| 140 |
+
return data.decode(errors="replace")
|
| 141 |
+
return data[-max_bytes:].decode(errors="replace")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def _close_pipes(proc: subprocess.Popen[Any]) -> None:
|
| 145 |
+
for stream in (proc.stdout, proc.stderr):
|
| 146 |
+
if stream is not None:
|
| 147 |
+
try:
|
| 148 |
+
stream.close()
|
| 149 |
+
except OSError:
|
| 150 |
+
pass
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _terminate_process_tree(proc: subprocess.Popen[Any]) -> None:
|
| 154 |
+
try:
|
| 155 |
+
os.killpg(proc.pid, signal.SIGKILL)
|
| 156 |
+
except ProcessLookupError:
|
| 157 |
+
pass
|
| 158 |
+
try:
|
| 159 |
+
proc.kill()
|
| 160 |
+
except ProcessLookupError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
_PKILL_PATTERNS = (
|
| 165 |
+
f"{WORKSPACE}/eval/",
|
| 166 |
+
f"{WORKSPACE}/tests/",
|
| 167 |
+
"tail -f",
|
| 168 |
+
"development.log",
|
| 169 |
+
" less ",
|
| 170 |
+
" less$",
|
| 171 |
+
"/less ",
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def _pkill_aggressive() -> str:
|
| 176 |
+
"""Best-effort kill of branch pytest/subprocess trees (Modal gVisor fallback)."""
|
| 177 |
+
notes: list[str] = []
|
| 178 |
+
workspace = str(WORKSPACE)
|
| 179 |
+
patterns = list(_PKILL_PATTERNS) + [
|
| 180 |
+
f"pytest.*{workspace}",
|
| 181 |
+
f"xdist.*{workspace}",
|
| 182 |
+
]
|
| 183 |
+
for pattern in patterns:
|
| 184 |
+
result = subprocess.run(
|
| 185 |
+
["pkill", "-9", "-f", pattern],
|
| 186 |
+
capture_output=True,
|
| 187 |
+
text=True,
|
| 188 |
+
)
|
| 189 |
+
notes.append(f"pkill -9 -f {pattern!r}: rc={result.returncode}")
|
| 190 |
+
return "\n".join(notes)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def run_step(
|
| 194 |
+
command: str,
|
| 195 |
+
cwd: Path,
|
| 196 |
+
*,
|
| 197 |
+
timeout: int,
|
| 198 |
+
env: dict[str, str] | None = None,
|
| 199 |
+
step: str,
|
| 200 |
+
accept_failure: bool = False,
|
| 201 |
+
log_output: bool | None = None,
|
| 202 |
+
max_output_bytes: int = 65536,
|
| 203 |
+
) -> dict[str, Any]:
|
| 204 |
+
if log_output is None:
|
| 205 |
+
log_output = step == "run_tests" or timeout >= 60
|
| 206 |
+
|
| 207 |
+
started = time.monotonic()
|
| 208 |
+
stdout_path: Path | None = None
|
| 209 |
+
stderr_path: Path | None = None
|
| 210 |
+
stdout_f = None
|
| 211 |
+
stderr_f = None
|
| 212 |
+
|
| 213 |
+
if log_output:
|
| 214 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 215 |
+
log_id = f"{step}-{int(started * 1000)}"
|
| 216 |
+
stdout_path = LOG_DIR / f"run-step-{log_id}.stdout.log"
|
| 217 |
+
stderr_path = LOG_DIR / f"run-step-{log_id}.stderr.log"
|
| 218 |
+
stdout_f = stdout_path.open("w", encoding="utf-8")
|
| 219 |
+
stderr_f = stderr_path.open("w", encoding="utf-8")
|
| 220 |
+
popen_stdout: Any = stdout_f
|
| 221 |
+
popen_stderr: Any = stderr_f
|
| 222 |
+
else:
|
| 223 |
+
popen_stdout = subprocess.PIPE
|
| 224 |
+
popen_stderr = subprocess.PIPE
|
| 225 |
+
|
| 226 |
+
proc = subprocess.Popen(
|
| 227 |
+
["bash", "-lc", _bash_login_command(command)],
|
| 228 |
+
cwd=cwd,
|
| 229 |
+
env={**os.environ, **(env or {})},
|
| 230 |
+
stdout=popen_stdout,
|
| 231 |
+
stderr=popen_stderr,
|
| 232 |
+
start_new_session=True,
|
| 233 |
+
text=True,
|
| 234 |
+
)
|
| 235 |
+
timed_out = False
|
| 236 |
+
stdout = ""
|
| 237 |
+
stderr = ""
|
| 238 |
+
try:
|
| 239 |
+
if log_output:
|
| 240 |
+
proc.wait(timeout=timeout)
|
| 241 |
+
else:
|
| 242 |
+
stdout, stderr = proc.communicate(timeout=timeout)
|
| 243 |
+
except subprocess.TimeoutExpired:
|
| 244 |
+
timed_out = True
|
| 245 |
+
_terminate_process_tree(proc)
|
| 246 |
+
cleanup_lingering_processes(aggressive=True)
|
| 247 |
+
try:
|
| 248 |
+
proc.wait(timeout=5)
|
| 249 |
+
except subprocess.TimeoutExpired:
|
| 250 |
+
proc.kill()
|
| 251 |
+
if not log_output:
|
| 252 |
+
_close_pipes(proc)
|
| 253 |
+
finally:
|
| 254 |
+
if stdout_f is not None:
|
| 255 |
+
stdout_f.close()
|
| 256 |
+
if stderr_f is not None:
|
| 257 |
+
stderr_f.close()
|
| 258 |
+
|
| 259 |
+
if timed_out:
|
| 260 |
+
if log_output:
|
| 261 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 262 |
+
stderr_path, max_output_bytes
|
| 263 |
+
)
|
| 264 |
+
else:
|
| 265 |
+
output = ""
|
| 266 |
+
entry = {
|
| 267 |
+
"step": step,
|
| 268 |
+
"command": command,
|
| 269 |
+
"wall_time": time.monotonic() - started,
|
| 270 |
+
"output": output,
|
| 271 |
+
"returncode": 124,
|
| 272 |
+
"exception_info": f"timed out after {timeout}s",
|
| 273 |
+
}
|
| 274 |
+
else:
|
| 275 |
+
if log_output:
|
| 276 |
+
output = _read_log_tail(stdout_path, max_output_bytes) + _read_log_tail(
|
| 277 |
+
stderr_path, max_output_bytes
|
| 278 |
+
)
|
| 279 |
+
else:
|
| 280 |
+
output = stdout + stderr
|
| 281 |
+
entry = {
|
| 282 |
+
"step": step,
|
| 283 |
+
"command": command,
|
| 284 |
+
"wall_time": time.monotonic() - started,
|
| 285 |
+
"output": output,
|
| 286 |
+
"returncode": proc.returncode,
|
| 287 |
+
"exception_info": "",
|
| 288 |
+
}
|
| 289 |
+
if entry["returncode"] and not accept_failure:
|
| 290 |
+
raise RuntimeError(
|
| 291 |
+
f"{step} failed: {entry['exception_info'] or entry['output']}"
|
| 292 |
+
)
|
| 293 |
+
return entry
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def cleanup_lingering_processes(*, aggressive: bool = False) -> dict[str, Any]:
|
| 297 |
+
started = time.monotonic()
|
| 298 |
+
patterns = [
|
| 299 |
+
str(WORKSPACE / "executable"),
|
| 300 |
+
f"{WORKSPACE}/eval/",
|
| 301 |
+
f"{WORKSPACE}/tests/",
|
| 302 |
+
# lazygit --logs/-l tests spawn `tail -f` outside /workspace/.
|
| 303 |
+
"tail -f",
|
| 304 |
+
"development.log",
|
| 305 |
+
]
|
| 306 |
+
killed: list[int] = []
|
| 307 |
+
proc_root = Path("/proc")
|
| 308 |
+
proc_available = proc_root.exists()
|
| 309 |
+
if proc_available:
|
| 310 |
+
for proc_dir in proc_root.iterdir():
|
| 311 |
+
if not proc_dir.name.isdigit():
|
| 312 |
+
continue
|
| 313 |
+
pid = int(proc_dir.name)
|
| 314 |
+
if pid in {os.getpid(), os.getppid()}:
|
| 315 |
+
continue
|
| 316 |
+
try:
|
| 317 |
+
raw = (proc_dir / "cmdline").read_bytes()
|
| 318 |
+
except (FileNotFoundError, PermissionError, ProcessLookupError):
|
| 319 |
+
continue
|
| 320 |
+
cmdline = raw.replace(b"\0", b" ").decode(errors="replace")
|
| 321 |
+
if not any(pattern in cmdline for pattern in patterns):
|
| 322 |
+
continue
|
| 323 |
+
try:
|
| 324 |
+
os.kill(pid, signal.SIGKILL)
|
| 325 |
+
except (PermissionError, ProcessLookupError):
|
| 326 |
+
continue
|
| 327 |
+
killed.append(pid)
|
| 328 |
+
pkill_output = ""
|
| 329 |
+
if aggressive or not proc_available:
|
| 330 |
+
pkill_output = _pkill_aggressive()
|
| 331 |
+
output_parts = []
|
| 332 |
+
if killed:
|
| 333 |
+
output_parts.append("\n".join(str(pid) for pid in killed))
|
| 334 |
+
if pkill_output:
|
| 335 |
+
output_parts.append(pkill_output)
|
| 336 |
+
return {
|
| 337 |
+
"step": "cleanup_lingering_processes",
|
| 338 |
+
"command": "kill leftover branch processes referencing the workspace",
|
| 339 |
+
"wall_time": time.monotonic() - started,
|
| 340 |
+
"output": "\n".join(output_parts),
|
| 341 |
+
"returncode": 0,
|
| 342 |
+
"exception_info": "",
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
def extract_trusted_blob(tar_path: Path, dest: Path) -> None:
|
| 347 |
+
import tarfile
|
| 348 |
+
|
| 349 |
+
with tarfile.open(tar_path, "r:gz") as tf:
|
| 350 |
+
try:
|
| 351 |
+
tf.extractall(dest, filter="fully_trusted")
|
| 352 |
+
except TypeError:
|
| 353 |
+
tf.extractall(dest)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def find_results_xml() -> Path | None:
|
| 357 |
+
"""Return the junit xml path if pytest wrote one."""
|
| 358 |
+
for candidate in (WORKSPACE / "eval" / "results.xml", WORKSPACE / "results.xml"):
|
| 359 |
+
if candidate.exists():
|
| 360 |
+
return candidate
|
| 361 |
+
return None
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def remove_oracle_handoff_artifacts() -> list[str]:
|
| 365 |
+
"""Drop oracle-agent handoff files from /workspace before snapshot/restore."""
|
| 366 |
+
removed: list[str] = []
|
| 367 |
+
for name in _ORACLE_HANDOFF_NAMES:
|
| 368 |
+
path = WORKSPACE / name
|
| 369 |
+
if path.exists():
|
| 370 |
+
if path.is_dir():
|
| 371 |
+
shutil.rmtree(path)
|
| 372 |
+
else:
|
| 373 |
+
path.unlink()
|
| 374 |
+
removed.append(name)
|
| 375 |
+
return removed
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
def _remove_tree(path: Path) -> None:
|
| 379 |
+
"""Remove a file or directory tree, with a shell fallback for overlay races."""
|
| 380 |
+
if path.is_symlink() or path.is_file():
|
| 381 |
+
path.unlink(missing_ok=True)
|
| 382 |
+
return
|
| 383 |
+
if not path.is_dir():
|
| 384 |
+
path.unlink(missing_ok=True)
|
| 385 |
+
return
|
| 386 |
+
for attempt in range(3):
|
| 387 |
+
try:
|
| 388 |
+
shutil.rmtree(path)
|
| 389 |
+
if not path.exists():
|
| 390 |
+
return
|
| 391 |
+
except OSError:
|
| 392 |
+
if attempt == 2:
|
| 393 |
+
run_step(
|
| 394 |
+
f"rm -rf {shlex.quote(str(path))}",
|
| 395 |
+
path.parent,
|
| 396 |
+
timeout=120,
|
| 397 |
+
step="clear_workspace_fallback",
|
| 398 |
+
accept_failure=True,
|
| 399 |
+
)
|
| 400 |
+
if not path.exists():
|
| 401 |
+
return
|
| 402 |
+
raise
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
def ensure_workspace_dir() -> None:
|
| 406 |
+
"""Guarantee WORKSPACE exists as a writable directory (not a symlink/file)."""
|
| 407 |
+
if WORKSPACE.exists() and not WORKSPACE.is_dir():
|
| 408 |
+
if WORKSPACE.is_symlink() or WORKSPACE.is_file():
|
| 409 |
+
WORKSPACE.unlink()
|
| 410 |
+
else:
|
| 411 |
+
shutil.rmtree(WORKSPACE)
|
| 412 |
+
WORKSPACE.mkdir(parents=True, exist_ok=True)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def clear_workspace() -> None:
|
| 416 |
+
ensure_workspace_dir()
|
| 417 |
+
for path in list(WORKSPACE.iterdir()):
|
| 418 |
+
_remove_tree(path)
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
def restore_reference_executable() -> None:
|
| 422 |
+
"""Write the stashed reference binary into /workspace after a branch overlay.
|
| 423 |
+
|
| 424 |
+
Branch blobs may ship ``executable`` as a dangling symlink into
|
| 425 |
+
``target/release/...``; ``shutil.copy2`` would follow it and raise
|
| 426 |
+
``FileNotFoundError``. Drop whatever the blob left and copy the stashed
|
| 427 |
+
reference as a regular file.
|
| 428 |
+
"""
|
| 429 |
+
ensure_workspace_dir()
|
| 430 |
+
if not STASHED_EXECUTABLE.is_file():
|
| 431 |
+
raise FileNotFoundError(
|
| 432 |
+
f"missing stashed reference executable at {STASHED_EXECUTABLE}"
|
| 433 |
+
)
|
| 434 |
+
dest = WORKSPACE / "executable"
|
| 435 |
+
if dest.exists() or dest.is_symlink():
|
| 436 |
+
if dest.is_dir():
|
| 437 |
+
shutil.rmtree(dest)
|
| 438 |
+
else:
|
| 439 |
+
dest.unlink(missing_ok=True)
|
| 440 |
+
shutil.copy2(STASHED_EXECUTABLE, dest)
|
| 441 |
+
dest.chmod(0o755)
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
def snapshot_workspace(dest: Path) -> None:
|
| 445 |
+
if dest.exists():
|
| 446 |
+
shutil.rmtree(dest)
|
| 447 |
+
shutil.copytree(WORKSPACE, dest, symlinks=True)
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
def restore_workspace(source: Path) -> None:
|
| 451 |
+
clear_workspace()
|
| 452 |
+
shutil.copytree(source, WORKSPACE, dirs_exist_ok=True, symlinks=True)
|
| 453 |
+
ensure_workspace_dir()
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def remove_hashed_files(root: Path, hashes: set[str]) -> list[str]:
|
| 457 |
+
removed: list[str] = []
|
| 458 |
+
for path in root.rglob("*"):
|
| 459 |
+
if path.is_file() and not path.is_symlink():
|
| 460 |
+
try:
|
| 461 |
+
if sha256(path) in hashes:
|
| 462 |
+
path.unlink()
|
| 463 |
+
removed.append(str(path.relative_to(root)))
|
| 464 |
+
except OSError:
|
| 465 |
+
continue
|
| 466 |
+
return removed
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
def branch_tests(branch_info: dict[str, Any]) -> list[str]:
|
| 470 |
+
ignored = {
|
| 471 |
+
item["name"] for item in branch_info.get("ignored_tests", []) if "name" in item
|
| 472 |
+
}
|
| 473 |
+
return [name for name in branch_info.get("tests", []) if name not in ignored]
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
def ignored_tests(metadata: dict[str, Any]) -> set[str]:
|
| 477 |
+
result: set[str] = set()
|
| 478 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 479 |
+
result.update(
|
| 480 |
+
f"{branch}/{item['name']}"
|
| 481 |
+
for item in info.get("ignored_tests", [])
|
| 482 |
+
if "name" in item
|
| 483 |
+
)
|
| 484 |
+
return result
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def active_tests(metadata: dict[str, Any]) -> set[str]:
|
| 488 |
+
active: set[str] = set()
|
| 489 |
+
for branch, info in metadata.get("branches", {}).items():
|
| 490 |
+
if info.get("ignored"):
|
| 491 |
+
continue
|
| 492 |
+
ignored = {
|
| 493 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 494 |
+
}
|
| 495 |
+
active.update(
|
| 496 |
+
f"{branch}/{name}" for name in info.get("tests", []) if name not in ignored
|
| 497 |
+
)
|
| 498 |
+
return active
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def inject_not_run(
|
| 502 |
+
result: dict[str, Any], branch: str, tests: list[str], error_code: str
|
| 503 |
+
) -> None:
|
| 504 |
+
result["test_results"].extend(
|
| 505 |
+
{
|
| 506 |
+
"name": name,
|
| 507 |
+
"branch": branch,
|
| 508 |
+
"status": "not_run",
|
| 509 |
+
"extra": {"error_code": error_code},
|
| 510 |
+
}
|
| 511 |
+
for name in tests
|
| 512 |
+
)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def testcase_name(case: ET.Element) -> str:
|
| 516 |
+
classname = case.attrib.get("classname", "")
|
| 517 |
+
name = case.attrib.get("name", "")
|
| 518 |
+
return f"{classname}.{name}" if classname else name
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
# Only these tags under <testcase> represent a result. <system-out> /
|
| 522 |
+
# <system-err> are stdout/stderr captures and must not be treated as results
|
| 523 |
+
# (a leading <system-out> followed by <failure> would otherwise be classified
|
| 524 |
+
# as a stdout-only "passed").
|
| 525 |
+
JUNIT_RESULT_TAGS = {"skipped", "failure", "error"}
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
def parse_junit(
|
| 529 |
+
raw_xml: str, branch: str, expected: list[str], ignored: set[str]
|
| 530 |
+
) -> tuple[list[dict[str, Any]], list[str]]:
|
| 531 |
+
root = ET.fromstring(raw_xml)
|
| 532 |
+
got: set[str] = set()
|
| 533 |
+
results: list[dict[str, Any]] = []
|
| 534 |
+
for case in root.iter("testcase"):
|
| 535 |
+
name = testcase_name(case)
|
| 536 |
+
got.add(name)
|
| 537 |
+
extra: dict[str, Any] = {}
|
| 538 |
+
if "time" in case.attrib:
|
| 539 |
+
try:
|
| 540 |
+
extra["time"] = float(case.attrib["time"])
|
| 541 |
+
except ValueError:
|
| 542 |
+
extra["time"] = case.attrib["time"]
|
| 543 |
+
result_children = [c for c in case if c.tag in JUNIT_RESULT_TAGS]
|
| 544 |
+
# Collapse duplicate same-tag result children. Pytest's
|
| 545 |
+
# "pytest.internal" pseudo-test sometimes emits two identical <error>
|
| 546 |
+
# entries; treating that as a system_error would over-flag a real
|
| 547 |
+
# single failure. Mirrors upstream eval.py:816-820.
|
| 548 |
+
if len(result_children) > 1 and len({c.tag for c in result_children}) == 1:
|
| 549 |
+
result_children = [result_children[0]]
|
| 550 |
+
if not result_children:
|
| 551 |
+
status = "passed"
|
| 552 |
+
elif len(result_children) != 1:
|
| 553 |
+
status = "system_error"
|
| 554 |
+
extra["error_details"] = (
|
| 555 |
+
f"Expected 1 result for {name}, got {len(result_children)}: "
|
| 556 |
+
f"{[c.tag for c in result_children]}"
|
| 557 |
+
)
|
| 558 |
+
else:
|
| 559 |
+
first = result_children[0]
|
| 560 |
+
status = first.tag # "skipped" | "failure" | "error"
|
| 561 |
+
extra["message"] = first.attrib.get("message") or ""
|
| 562 |
+
if first.text:
|
| 563 |
+
extra["text"] = first.text
|
| 564 |
+
results.append(
|
| 565 |
+
{"name": name, "branch": branch, "status": status, "extra": extra}
|
| 566 |
+
)
|
| 567 |
+
|
| 568 |
+
active_expected = [name for name in expected if name not in ignored]
|
| 569 |
+
missing = [name for name in active_expected if name not in got]
|
| 570 |
+
results.extend(
|
| 571 |
+
{
|
| 572 |
+
"name": name,
|
| 573 |
+
"branch": branch,
|
| 574 |
+
"status": "not_run",
|
| 575 |
+
"extra": {"error_code": "missing_from_junit_xml"},
|
| 576 |
+
}
|
| 577 |
+
for name in missing
|
| 578 |
+
)
|
| 579 |
+
unexpected = got - set(expected) - ignored
|
| 580 |
+
warnings = (
|
| 581 |
+
[f"Branch {branch}: {len(unexpected)} test(s) in JUnit XML not in tests.json"]
|
| 582 |
+
if unexpected
|
| 583 |
+
else []
|
| 584 |
+
)
|
| 585 |
+
return results, warnings
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
def count_worker_crashes(raw_xml: str) -> int:
|
| 589 |
+
if WORKER_CRASH_PHRASE not in raw_xml:
|
| 590 |
+
return 0
|
| 591 |
+
try:
|
| 592 |
+
root = ET.fromstring(raw_xml)
|
| 593 |
+
except ET.ParseError:
|
| 594 |
+
return 0
|
| 595 |
+
crashes = 0
|
| 596 |
+
for case in root.iter("testcase"):
|
| 597 |
+
for child in case:
|
| 598 |
+
text = (child.get("message") or "") + " " + (child.text or "")
|
| 599 |
+
if (
|
| 600 |
+
child.tag in {"error", "failure"}
|
| 601 |
+
and WORKER_CRASH_PHRASE in text
|
| 602 |
+
and "crashed" in text
|
| 603 |
+
):
|
| 604 |
+
crashes += 1
|
| 605 |
+
break
|
| 606 |
+
return crashes
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
def run_output_indicates_xdist_collapse(output: str) -> bool:
|
| 610 |
+
lower = output.lower()
|
| 611 |
+
return any(marker in lower for marker in XDIST_COLLAPSE_MARKERS)
|
| 612 |
+
|
| 613 |
+
|
| 614 |
+
def count_junit_failures(raw_xml: str) -> int:
|
| 615 |
+
try:
|
| 616 |
+
root = ET.fromstring(raw_xml)
|
| 617 |
+
except ET.ParseError:
|
| 618 |
+
return 0
|
| 619 |
+
failures = 0
|
| 620 |
+
for case in root.iter("testcase"):
|
| 621 |
+
for child in case:
|
| 622 |
+
if child.tag in {"failure", "error"}:
|
| 623 |
+
failures += 1
|
| 624 |
+
break
|
| 625 |
+
return failures
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
def count_junit_passed(raw_xml: str) -> int:
|
| 629 |
+
try:
|
| 630 |
+
root = ET.fromstring(raw_xml)
|
| 631 |
+
except ET.ParseError:
|
| 632 |
+
return 0
|
| 633 |
+
passed = 0
|
| 634 |
+
for case in root.iter("testcase"):
|
| 635 |
+
if not any(child.tag in JUNIT_RESULT_TAGS for child in case):
|
| 636 |
+
passed += 1
|
| 637 |
+
return passed
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
def branch_attempt_metrics(
|
| 641 |
+
raw_xml: str, *, run_output: str, expected_tests: int
|
| 642 |
+
) -> tuple[int, int, int, int]:
|
| 643 |
+
"""Return (crashes, n_testcases, failures, missing_from_xml)."""
|
| 644 |
+
crashes = count_worker_crashes(raw_xml)
|
| 645 |
+
if run_output_indicates_xdist_collapse(run_output):
|
| 646 |
+
crashes = max(crashes, 1)
|
| 647 |
+
n_tests = count_testcases(raw_xml)
|
| 648 |
+
failures = count_junit_failures(raw_xml)
|
| 649 |
+
missing = max(0, expected_tests - n_tests)
|
| 650 |
+
return crashes, n_tests, failures, missing
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
def needs_serial_retry(
|
| 654 |
+
*,
|
| 655 |
+
serial: bool,
|
| 656 |
+
crashes: int,
|
| 657 |
+
missing: int,
|
| 658 |
+
failures: int,
|
| 659 |
+
n_tests: int,
|
| 660 |
+
expected_tests: int,
|
| 661 |
+
run_output: str,
|
| 662 |
+
) -> bool:
|
| 663 |
+
if serial:
|
| 664 |
+
return False
|
| 665 |
+
high_failure_rate = (
|
| 666 |
+
expected_tests > 0 and n_tests >= expected_tests and failures / n_tests >= 0.8
|
| 667 |
+
)
|
| 668 |
+
return (
|
| 669 |
+
crashes > 0
|
| 670 |
+
or missing > 0
|
| 671 |
+
or high_failure_rate
|
| 672 |
+
or run_output_indicates_xdist_collapse(run_output)
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def count_testcases(raw_xml: str) -> int:
|
| 677 |
+
try:
|
| 678 |
+
return sum(1 for _ in ET.fromstring(raw_xml).iter("testcase"))
|
| 679 |
+
except ET.ParseError:
|
| 680 |
+
return 0
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def scored_results(
|
| 684 |
+
result: dict[str, Any], metadata: dict[str, Any]
|
| 685 |
+
) -> list[dict[str, Any]]:
|
| 686 |
+
active = active_tests(metadata)
|
| 687 |
+
by_key = {
|
| 688 |
+
f"{test['branch']}/{test['name']}": test
|
| 689 |
+
for test in result["test_results"]
|
| 690 |
+
if f"{test['branch']}/{test['name']}" in active
|
| 691 |
+
}
|
| 692 |
+
return [
|
| 693 |
+
by_key.get(
|
| 694 |
+
key,
|
| 695 |
+
{
|
| 696 |
+
"branch": key.split("/", 1)[0],
|
| 697 |
+
"name": key.split("/", 1)[1],
|
| 698 |
+
"status": "not_run",
|
| 699 |
+
"extra": {"error_code": "missing_from_results"},
|
| 700 |
+
},
|
| 701 |
+
)
|
| 702 |
+
for key in sorted(active)
|
| 703 |
+
]
|
| 704 |
+
|
| 705 |
+
|
| 706 |
+
def summarize(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 707 |
+
scored = scored_results(result, metadata)
|
| 708 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 709 |
+
n_tests = len(scored)
|
| 710 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 711 |
+
# Multi-key reward: Harbor's default Mean aggregates each key independently
|
| 712 |
+
# (see harbor.metrics.base.aggregate_reward_dicts), so mean("resolved") is
|
| 713 |
+
# the proportion of tasks scoring a perfect pass-rate and mean of
|
| 714 |
+
# "almost_resolved" is the proportion scoring >= 0.95. "reward" stays the
|
| 715 |
+
# per-task pass-rate whose mean is the overall mean reward.
|
| 716 |
+
return {
|
| 717 |
+
"reward": pass_rate,
|
| 718 |
+
"resolved": 1.0 if pass_rate >= 1.0 else 0.0,
|
| 719 |
+
"almost_resolved": 1.0 if pass_rate >= 0.95 else 0.0,
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
def diagnostics(result: dict[str, Any], metadata: dict[str, Any]) -> dict[str, Any]:
|
| 724 |
+
scored = scored_results(result, metadata)
|
| 725 |
+
n_passed = sum(t["status"] == "passed" for t in scored)
|
| 726 |
+
n_tests = len(scored)
|
| 727 |
+
pass_rate = n_passed / n_tests if n_tests else 0.0
|
| 728 |
+
return {
|
| 729 |
+
"pass_rate": pass_rate,
|
| 730 |
+
"resolved": int(
|
| 731 |
+
bool(
|
| 732 |
+
n_tests
|
| 733 |
+
and n_passed == n_tests
|
| 734 |
+
and not result["test_branch_errors"]
|
| 735 |
+
and not result["error_code"]
|
| 736 |
+
)
|
| 737 |
+
),
|
| 738 |
+
"n_passed": n_passed,
|
| 739 |
+
"n_tests": n_tests,
|
| 740 |
+
"n_branch_errors": len(result["test_branch_errors"]),
|
| 741 |
+
"infra_error": int(bool(result["error_code"] or result["test_branch_errors"])),
|
| 742 |
+
"executable_hash_present": int(bool(result.get("executable_hash"))),
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def use_script_pty() -> bool:
|
| 747 |
+
return os.environ.get("PROGRAMGYM_SCRIPT_PTY", "").strip() == "1"
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
def script_pty_available() -> bool:
|
| 751 |
+
return shutil.which("script") is not None
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
def branch_env(
|
| 755 |
+
*,
|
| 756 |
+
serial: bool,
|
| 757 |
+
has_rerunfailures: bool,
|
| 758 |
+
extras: dict[str, str] | None = None,
|
| 759 |
+
) -> dict[str, str]:
|
| 760 |
+
addopts = ["--max-worker-restart=4"]
|
| 761 |
+
# A serial fallback is already a complete second execution. Re-running each
|
| 762 |
+
# failing test two more times makes large, failure-heavy suites prohibitively
|
| 763 |
+
# slow and adds little signal.
|
| 764 |
+
if has_rerunfailures and not serial:
|
| 765 |
+
addopts.extend(["--reruns=2", "--reruns-delay=1"])
|
| 766 |
+
env = {
|
| 767 |
+
"PYTEST_ADDOPTS": " ".join(addopts),
|
| 768 |
+
# Match upstream non-TTY regression environments (dirble log format, etc.).
|
| 769 |
+
"NO_COLOR": "1",
|
| 770 |
+
"TERM": "dumb",
|
| 771 |
+
"CLICOLOR": "0",
|
| 772 |
+
"CLICOLOR_FORCE": "0",
|
| 773 |
+
"COLORTERM": "",
|
| 774 |
+
}
|
| 775 |
+
if extras:
|
| 776 |
+
env.update(extras)
|
| 777 |
+
xdist_workers = os.environ.get("PROGRAMGYM_XDIST_WORKERS")
|
| 778 |
+
if serial:
|
| 779 |
+
xdist_workers = "1"
|
| 780 |
+
if xdist_workers:
|
| 781 |
+
env["PYTEST_XDIST_AUTO_NUM_WORKERS"] = xdist_workers
|
| 782 |
+
return env
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
_SERIAL_RUN_SH = ".programgym_run_serial.sh"
|
| 786 |
+
# ``eval/run.sh`` usually passes ``-n auto`` on the command line, which overrides
|
| 787 |
+
# ``PYTEST_ADDOPTS``. Rewrite to ``-n 0`` in a verifier-local copy for retries.
|
| 788 |
+
_RUN_SH_XDIST_RE = re.compile(r"-n\s*(?:auto|\d+)")
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
def prepare_serial_run_sh(run_sh: Path) -> Path:
|
| 792 |
+
"""Write a serial-only copy of ``eval/run.sh`` with xdist disabled."""
|
| 793 |
+
serial_sh = run_sh.with_name(_SERIAL_RUN_SH)
|
| 794 |
+
patched = _RUN_SH_XDIST_RE.sub("-n 0", run_sh.read_text())
|
| 795 |
+
serial_sh.write_text(patched)
|
| 796 |
+
serial_sh.chmod(0o755)
|
| 797 |
+
return serial_sh
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
def run_tests_command(*, serial: bool) -> str:
|
| 801 |
+
if serial:
|
| 802 |
+
inner = f"chmod +x ./eval/{_SERIAL_RUN_SH} && ./eval/{_SERIAL_RUN_SH}"
|
| 803 |
+
else:
|
| 804 |
+
inner = "chmod +x ./eval/run.sh && ./eval/run.sh"
|
| 805 |
+
if use_script_pty() and script_pty_available():
|
| 806 |
+
return f"script -q -c {shlex.quote(inner)} /dev/null"
|
| 807 |
+
return inner
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
BAKED_BLOB_DIR = Path(os.environ.get("PROGRAMGYM_BAKED_BLOB_DIR", "/tests/blobs"))
|
| 811 |
+
|
| 812 |
+
|
| 813 |
+
def resolve_blob_dir(instance_id: str, metadata: dict[str, Any]) -> Path:
|
| 814 |
+
"""Locate the per-instance blob directory.
|
| 815 |
+
|
| 816 |
+
Resolution order:
|
| 817 |
+
|
| 818 |
+
1. ``/tests/blobs/`` if pre-fetched into the task at generation time
|
| 819 |
+
(``programgym-adapter --download-blobs``). Verifier-only mount, so
|
| 820 |
+
agent never sees these.
|
| 821 |
+
2. ``PROGRAMGYM_BLOB_DIR`` env override pointing at an HF-cache-shaped
|
| 822 |
+
tree on disk (``<dir>/<instance_id>/tests/<branch>.tar.gz``). Useful
|
| 823 |
+
for offline reruns sharing a cache across many tasks.
|
| 824 |
+
3. ``huggingface_hub.snapshot_download`` from
|
| 825 |
+
``programgym/ProgramGym-Tests`` (default repo, ``main`` revision).
|
| 826 |
+
|
| 827 |
+
The returned directory contains ``tests/<branch>.tar.gz`` per active
|
| 828 |
+
branch — same shape as ``programgym/ProgramGym-Tests/<instance_id>/``
|
| 829 |
+
on HF.
|
| 830 |
+
"""
|
| 831 |
+
if BAKED_BLOB_DIR.exists() and (BAKED_BLOB_DIR / "tests").exists():
|
| 832 |
+
return BAKED_BLOB_DIR
|
| 833 |
+
|
| 834 |
+
local = os.environ.get("PROGRAMGYM_BLOB_DIR", "").strip()
|
| 835 |
+
if local:
|
| 836 |
+
candidate = Path(local) / instance_id
|
| 837 |
+
if candidate.exists():
|
| 838 |
+
return candidate
|
| 839 |
+
raise FileNotFoundError(
|
| 840 |
+
f"PROGRAMGYM_BLOB_DIR set but {candidate} does not exist"
|
| 841 |
+
)
|
| 842 |
+
|
| 843 |
+
repo_id = os.environ.get("PROGRAMGYM_HF_REPO") or metadata.get(
|
| 844 |
+
"hf_repo_id", DEFAULT_HF_REPO_ID
|
| 845 |
+
)
|
| 846 |
+
revision = os.environ.get("PROGRAMGYM_HF_REVISION") or metadata.get(
|
| 847 |
+
"hf_revision", DEFAULT_HF_REVISION
|
| 848 |
+
)
|
| 849 |
+
|
| 850 |
+
from huggingface_hub import snapshot_download
|
| 851 |
+
|
| 852 |
+
cache_root = Path(
|
| 853 |
+
snapshot_download(
|
| 854 |
+
repo_id,
|
| 855 |
+
repo_type="dataset",
|
| 856 |
+
revision=revision,
|
| 857 |
+
allow_patterns=f"{instance_id}/**",
|
| 858 |
+
)
|
| 859 |
+
)
|
| 860 |
+
blob_dir = cache_root / instance_id
|
| 861 |
+
if not blob_dir.exists():
|
| 862 |
+
raise FileNotFoundError(
|
| 863 |
+
f"HF blob directory missing for {instance_id} at {blob_dir}"
|
| 864 |
+
)
|
| 865 |
+
return blob_dir
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
def evaluate(metadata: dict[str, Any]) -> dict[str, Any]:
|
| 869 |
+
bootstrap_toolchain_path()
|
| 870 |
+
branches = metadata.get("branches", {})
|
| 871 |
+
active_branch_items = [
|
| 872 |
+
(name, info) for name, info in branches.items() if not info.get("ignored")
|
| 873 |
+
]
|
| 874 |
+
result: dict[str, Any] = {
|
| 875 |
+
"test_results": [],
|
| 876 |
+
"error_code": None,
|
| 877 |
+
"error_details": None,
|
| 878 |
+
"log": [],
|
| 879 |
+
"solution_branch": "submission",
|
| 880 |
+
"test_branches": [name for name, _ in active_branch_items],
|
| 881 |
+
"test_branch_errors": {},
|
| 882 |
+
"executable_hash": None,
|
| 883 |
+
"warnings": [],
|
| 884 |
+
}
|
| 885 |
+
|
| 886 |
+
instance_id = metadata["instance_id"]
|
| 887 |
+
|
| 888 |
+
compile_timeout = int(os.environ.get("PROGRAMGYM_COMPILE_TIMEOUT", "900"))
|
| 889 |
+
branch_timeout = int(os.environ.get("PROGRAMGYM_BRANCH_TIMEOUT", "3600"))
|
| 890 |
+
|
| 891 |
+
def fail_all(error_code: str, details: str) -> dict[str, Any]:
|
| 892 |
+
result["error_code"] = error_code
|
| 893 |
+
result["error_details"] = details
|
| 894 |
+
for branch, info in active_branch_items:
|
| 895 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 896 |
+
return result
|
| 897 |
+
|
| 898 |
+
with tempfile.TemporaryDirectory(prefix="programgym-eval-") as tmp:
|
| 899 |
+
compiled_snapshot = Path(tmp) / "compiled"
|
| 900 |
+
|
| 901 |
+
started = time.monotonic()
|
| 902 |
+
removed = remove_hashed_files(
|
| 903 |
+
WORKSPACE, set(metadata.get("eval_clean_hashes", []))
|
| 904 |
+
)
|
| 905 |
+
result["log"].append(
|
| 906 |
+
{
|
| 907 |
+
"step": "remove_hashed_files",
|
| 908 |
+
"command": "remove files matching eval_clean_hashes",
|
| 909 |
+
"wall_time": time.monotonic() - started,
|
| 910 |
+
"output": "".join(f"removed '{path}'\n" for path in removed),
|
| 911 |
+
"returncode": 0,
|
| 912 |
+
"exception_info": "",
|
| 913 |
+
}
|
| 914 |
+
)
|
| 915 |
+
|
| 916 |
+
compile_sh = WORKSPACE / "compile.sh"
|
| 917 |
+
if not compile_sh.exists():
|
| 918 |
+
return fail_all(
|
| 919 |
+
"missing_compile_sh", "submission did not contain compile.sh"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
seed = (
|
| 923 |
+
"if [ ! -d .git ]; then "
|
| 924 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 925 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 926 |
+
"git -c init.defaultBranch=gold init -q && "
|
| 927 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false add -A && "
|
| 928 |
+
"GIT_AUTHOR_DATE='2000-01-01T00:00:00Z' "
|
| 929 |
+
"GIT_COMMITTER_DATE='2000-01-01T00:00:00Z' "
|
| 930 |
+
"git -c user.email=gold@local -c user.name=gold -c commit.gpgsign=false commit -q --allow-empty -m gold; "
|
| 931 |
+
"fi"
|
| 932 |
+
)
|
| 933 |
+
try:
|
| 934 |
+
result["log"].append(
|
| 935 |
+
run_step(seed, WORKSPACE, timeout=300, step="seed_git")
|
| 936 |
+
)
|
| 937 |
+
compile_log = run_step(
|
| 938 |
+
"chmod +x ./compile.sh && ./compile.sh",
|
| 939 |
+
WORKSPACE,
|
| 940 |
+
timeout=compile_timeout,
|
| 941 |
+
step="compile",
|
| 942 |
+
accept_failure=True,
|
| 943 |
+
)
|
| 944 |
+
result["log"].append(compile_log)
|
| 945 |
+
if compile_log["returncode"]:
|
| 946 |
+
return fail_all("compile_failed", compile_log["output"])
|
| 947 |
+
executable = WORKSPACE / "executable"
|
| 948 |
+
if not executable.exists():
|
| 949 |
+
return fail_all(
|
| 950 |
+
"missing_executable",
|
| 951 |
+
"compile.sh completed but did not create ./executable",
|
| 952 |
+
)
|
| 953 |
+
STASHED_EXECUTABLE.parent.mkdir(parents=True, exist_ok=True)
|
| 954 |
+
# `move` (not copy) so /workspace doesn't keep a parallel copy of
|
| 955 |
+
# the agent's executable during the stash→restore window. Mirrors
|
| 956 |
+
# upstream `mv ./executable {STASHED}` (eval.py:472).
|
| 957 |
+
shutil.move(str(executable), STASHED_EXECUTABLE)
|
| 958 |
+
result["executable_hash"] = sha256(STASHED_EXECUTABLE)
|
| 959 |
+
result["log"].append(
|
| 960 |
+
run_step(
|
| 961 |
+
"pip3 install -q --disable-pip-version-check pytest-rerunfailures",
|
| 962 |
+
WORKSPACE,
|
| 963 |
+
timeout=120,
|
| 964 |
+
step="install_rerunfailures",
|
| 965 |
+
accept_failure=True,
|
| 966 |
+
)
|
| 967 |
+
)
|
| 968 |
+
has_rerunfailures = result["log"][-1]["returncode"] == 0
|
| 969 |
+
handoff_removed = remove_oracle_handoff_artifacts()
|
| 970 |
+
if handoff_removed:
|
| 971 |
+
result["log"].append(
|
| 972 |
+
{
|
| 973 |
+
"step": "remove_oracle_handoff",
|
| 974 |
+
"command": "remove oracle handoff artifacts from workspace",
|
| 975 |
+
"wall_time": 0.0,
|
| 976 |
+
"output": "".join(
|
| 977 |
+
f"removed '{name}'\n" for name in handoff_removed
|
| 978 |
+
),
|
| 979 |
+
"returncode": 0,
|
| 980 |
+
"exception_info": "",
|
| 981 |
+
}
|
| 982 |
+
)
|
| 983 |
+
snapshot_workspace(compiled_snapshot)
|
| 984 |
+
except Exception as exc:
|
| 985 |
+
return fail_all(type(exc).__name__, str(exc))
|
| 986 |
+
|
| 987 |
+
try:
|
| 988 |
+
blob_dir = resolve_blob_dir(instance_id, metadata)
|
| 989 |
+
except Exception as exc:
|
| 990 |
+
details = f"{type(exc).__name__}: {exc}"
|
| 991 |
+
for branch, info in active_branch_items:
|
| 992 |
+
result["test_branch_errors"][branch] = [
|
| 993 |
+
{
|
| 994 |
+
"error_code": "blob_resolution_failed",
|
| 995 |
+
"error_details": details,
|
| 996 |
+
}
|
| 997 |
+
]
|
| 998 |
+
inject_not_run(
|
| 999 |
+
result, branch, branch_tests(info), "blob_resolution_failed"
|
| 1000 |
+
)
|
| 1001 |
+
return result
|
| 1002 |
+
|
| 1003 |
+
for branch, info in active_branch_items:
|
| 1004 |
+
tests = branch_tests(info)
|
| 1005 |
+
blob = blob_dir / "tests" / f"{branch}.tar.gz"
|
| 1006 |
+
if not blob.exists():
|
| 1007 |
+
result["test_branch_errors"][branch] = [
|
| 1008 |
+
{"error_code": "missing_test_blob", "error_details": blob.name}
|
| 1009 |
+
]
|
| 1010 |
+
inject_not_run(result, branch, tests, "missing_test_blob")
|
| 1011 |
+
continue
|
| 1012 |
+
|
| 1013 |
+
best_xml = ""
|
| 1014 |
+
# Prefer a complete, clean XML result, then the result covering the
|
| 1015 |
+
# most expected tests, and only then the one with the most passes.
|
| 1016 |
+
# Pass-count-only ranking can retain a partial xdist result over a
|
| 1017 |
+
# complete serial result.
|
| 1018 |
+
best_quality = (-1, -1, -1)
|
| 1019 |
+
serial = bool(metadata.get("force_serial_branches"))
|
| 1020 |
+
branch_log: list[dict[str, Any]] = []
|
| 1021 |
+
branch_ignored = {
|
| 1022 |
+
item["name"] for item in info.get("ignored_tests", []) if "name" in item
|
| 1023 |
+
}
|
| 1024 |
+
n_expected = len([name for name in tests if name not in branch_ignored])
|
| 1025 |
+
|
| 1026 |
+
def merge_best_xml(raw_xml: str) -> None:
|
| 1027 |
+
try:
|
| 1028 |
+
parsed, warnings = parse_junit(
|
| 1029 |
+
raw_xml, branch, list(info.get("tests", [])), branch_ignored
|
| 1030 |
+
)
|
| 1031 |
+
except Exception as exc:
|
| 1032 |
+
result["test_branch_errors"][branch] = [
|
| 1033 |
+
{"error_code": "xml_parse_error", "error_details": str(exc)}
|
| 1034 |
+
]
|
| 1035 |
+
inject_not_run(result, branch, tests, "xml_parse_error")
|
| 1036 |
+
else:
|
| 1037 |
+
result["test_results"].extend(parsed)
|
| 1038 |
+
result["warnings"].extend(warnings)
|
| 1039 |
+
|
| 1040 |
+
while True:
|
| 1041 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1042 |
+
restore_workspace(compiled_snapshot)
|
| 1043 |
+
extract_trusted_blob(blob, WORKSPACE)
|
| 1044 |
+
restore_reference_executable()
|
| 1045 |
+
actual_hash = sha256(WORKSPACE / "executable")
|
| 1046 |
+
if actual_hash != result["executable_hash"]:
|
| 1047 |
+
result["test_branch_errors"][branch] = [
|
| 1048 |
+
{
|
| 1049 |
+
"error_code": "executable_hash_mismatch",
|
| 1050 |
+
"error_details": (
|
| 1051 |
+
f"expected {result['executable_hash']}, got {actual_hash}"
|
| 1052 |
+
),
|
| 1053 |
+
}
|
| 1054 |
+
]
|
| 1055 |
+
inject_not_run(result, branch, tests, "executable_hash_mismatch")
|
| 1056 |
+
break
|
| 1057 |
+
run_sh = WORKSPACE / "eval" / "run.sh"
|
| 1058 |
+
if not run_sh.exists():
|
| 1059 |
+
result["test_branch_errors"][branch] = [
|
| 1060 |
+
{
|
| 1061 |
+
"error_code": "missing_run_sh",
|
| 1062 |
+
"error_details": "eval/run.sh missing",
|
| 1063 |
+
}
|
| 1064 |
+
]
|
| 1065 |
+
inject_not_run(result, branch, tests, "missing_run_sh")
|
| 1066 |
+
break
|
| 1067 |
+
# Upstream rewrites thread→signal so xdist workers fail cleanly
|
| 1068 |
+
# instead of os._exit(1) on timeout. That works in fresh
|
| 1069 |
+
# containers per branch; here we reuse one container and
|
| 1070 |
+
# signal timeouts leave TUI/log-watcher subprocesses alive
|
| 1071 |
+
# (e.g. lazygit --logs + tail -f), wedging pytest for up to
|
| 1072 |
+
# branch_timeout. Keep the blob's thread method and rely on
|
| 1073 |
+
# cleanup_lingering_processes + serial fallback after crashes.
|
| 1074 |
+
env = branch_env(
|
| 1075 |
+
serial=serial,
|
| 1076 |
+
has_rerunfailures=has_rerunfailures,
|
| 1077 |
+
extras=metadata.get("branch_env"),
|
| 1078 |
+
)
|
| 1079 |
+
branch_log.append(
|
| 1080 |
+
run_step(
|
| 1081 |
+
"rm -f eval/results.xml results.xml",
|
| 1082 |
+
WORKSPACE,
|
| 1083 |
+
timeout=120,
|
| 1084 |
+
step="clean_stale_results",
|
| 1085 |
+
accept_failure=True,
|
| 1086 |
+
)
|
| 1087 |
+
)
|
| 1088 |
+
if serial:
|
| 1089 |
+
prepare_serial_run_sh(run_sh)
|
| 1090 |
+
run_entry = run_step(
|
| 1091 |
+
run_tests_command(serial=serial),
|
| 1092 |
+
WORKSPACE,
|
| 1093 |
+
timeout=branch_timeout,
|
| 1094 |
+
env=env,
|
| 1095 |
+
step="run_tests",
|
| 1096 |
+
accept_failure=True,
|
| 1097 |
+
)
|
| 1098 |
+
branch_log.append(run_entry)
|
| 1099 |
+
branch_log.append(cleanup_lingering_processes())
|
| 1100 |
+
xml_path = find_results_xml()
|
| 1101 |
+
if xml_path is None:
|
| 1102 |
+
if best_xml:
|
| 1103 |
+
merge_best_xml(best_xml)
|
| 1104 |
+
break
|
| 1105 |
+
if serial:
|
| 1106 |
+
result["test_branch_errors"][branch] = [
|
| 1107 |
+
{
|
| 1108 |
+
"error_code": "missing_results_xml",
|
| 1109 |
+
"error_details": "eval/results.xml was not produced",
|
| 1110 |
+
}
|
| 1111 |
+
]
|
| 1112 |
+
inject_not_run(result, branch, tests, "missing_results_xml")
|
| 1113 |
+
break
|
| 1114 |
+
serial = True
|
| 1115 |
+
continue
|
| 1116 |
+
raw_xml = xml_path.read_text(errors="replace")
|
| 1117 |
+
crashes, n_tests, failures, missing = branch_attempt_metrics(
|
| 1118 |
+
raw_xml,
|
| 1119 |
+
run_output=run_entry.get("output", ""),
|
| 1120 |
+
expected_tests=n_expected,
|
| 1121 |
+
)
|
| 1122 |
+
useful = count_junit_passed(raw_xml)
|
| 1123 |
+
quality = (
|
| 1124 |
+
int(crashes == 0 and missing == 0),
|
| 1125 |
+
n_tests,
|
| 1126 |
+
useful,
|
| 1127 |
+
)
|
| 1128 |
+
if quality > best_quality:
|
| 1129 |
+
best_xml = raw_xml
|
| 1130 |
+
best_quality = quality
|
| 1131 |
+
retry = needs_serial_retry(
|
| 1132 |
+
serial=serial,
|
| 1133 |
+
crashes=crashes,
|
| 1134 |
+
missing=missing,
|
| 1135 |
+
failures=failures,
|
| 1136 |
+
n_tests=n_tests,
|
| 1137 |
+
expected_tests=n_expected,
|
| 1138 |
+
run_output=run_entry.get("output", ""),
|
| 1139 |
+
)
|
| 1140 |
+
if not retry:
|
| 1141 |
+
merge_best_xml(best_xml)
|
| 1142 |
+
break
|
| 1143 |
+
serial = True
|
| 1144 |
+
for entry in branch_log:
|
| 1145 |
+
entry["branch"] = branch
|
| 1146 |
+
result["log"].extend(branch_log)
|
| 1147 |
+
|
| 1148 |
+
return result
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
def write_outputs(result: dict[str, Any], metadata: dict[str, Any]) -> None:
|
| 1152 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1153 |
+
write_json(LOG_DIR / "programgym_eval.json", result)
|
| 1154 |
+
write_json(LOG_DIR / "harbor_diagnostics.json", diagnostics(result, metadata))
|
| 1155 |
+
rewards = summarize(result, metadata)
|
| 1156 |
+
write_json(LOG_DIR / "reward.json", rewards)
|
| 1157 |
+
(LOG_DIR / "reward.txt").write_text(str(rewards["reward"]))
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
def main() -> None:
|
| 1161 |
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
| 1162 |
+
log_path = LOG_DIR / "programgym_eval.log"
|
| 1163 |
+
metadata = json.loads(METADATA_PATH.read_text())
|
| 1164 |
+
branches = metadata.get("branches", {})
|
| 1165 |
+
try:
|
| 1166 |
+
result = evaluate(metadata)
|
| 1167 |
+
except Exception as exc:
|
| 1168 |
+
error_code = type(exc).__name__
|
| 1169 |
+
result = {
|
| 1170 |
+
"test_results": [],
|
| 1171 |
+
"error_code": error_code,
|
| 1172 |
+
"error_details": str(exc),
|
| 1173 |
+
"log": [
|
| 1174 |
+
{
|
| 1175 |
+
"step": "evaluator_exception",
|
| 1176 |
+
"exception_info": traceback.format_exc(),
|
| 1177 |
+
"returncode": 1,
|
| 1178 |
+
}
|
| 1179 |
+
],
|
| 1180 |
+
"solution_branch": "submission",
|
| 1181 |
+
"test_branches": [
|
| 1182 |
+
name for name, info in branches.items() if not info.get("ignored")
|
| 1183 |
+
],
|
| 1184 |
+
"test_branch_errors": {
|
| 1185 |
+
"__evaluator__": [{"error_code": error_code, "error_details": str(exc)}]
|
| 1186 |
+
},
|
| 1187 |
+
"executable_hash": None,
|
| 1188 |
+
"warnings": [],
|
| 1189 |
+
}
|
| 1190 |
+
for branch, info in branches.items():
|
| 1191 |
+
if info.get("ignored"):
|
| 1192 |
+
continue
|
| 1193 |
+
inject_not_run(result, branch, branch_tests(info), error_code)
|
| 1194 |
+
log_path.write_text(traceback.format_exc())
|
| 1195 |
+
else:
|
| 1196 |
+
log_path.write_text("")
|
| 1197 |
+
write_outputs(result, metadata)
|
| 1198 |
+
|
| 1199 |
+
|
| 1200 |
+
if __name__ == "__main__":
|
| 1201 |
+
main()
|
githubnemo--compiledaemon.6cc7bd/tests/programgym_task.json
ADDED
|
@@ -0,0 +1,362 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"branches": {
|
| 3 |
+
"generated_module_01": {
|
| 4 |
+
"ignore_reason": "",
|
| 5 |
+
"ignored": false,
|
| 6 |
+
"ignored_tests": [],
|
| 7 |
+
"tests": [
|
| 8 |
+
"eval.tests.test_build_state_machine.test_build_command_is_argv_parsed_not_shell",
|
| 9 |
+
"eval.tests.test_build_state_machine.test_build_command_spaces_split_into_args",
|
| 10 |
+
"eval.tests.test_build_state_machine.test_build_dir_sets_build_working_directory",
|
| 11 |
+
"eval.tests.test_build_state_machine.test_build_ok_ordering",
|
| 12 |
+
"eval.tests.test_build_state_machine.test_default_build_command_is_go_build",
|
| 13 |
+
"eval.tests.test_build_state_machine.test_failing_build_forwards_inline_output",
|
| 14 |
+
"eval.tests.test_build_state_machine.test_failing_build_reports_error_and_failed_command",
|
| 15 |
+
"eval.tests.test_build_state_machine.test_first_directory_used_as_default_build_dir",
|
| 16 |
+
"eval.tests.test_build_state_machine.test_successful_build_reports_ok",
|
| 17 |
+
"eval.tests.test_cli_flags_and_help.test_bool_flag_with_true_value",
|
| 18 |
+
"eval.tests.test_cli_flags_and_help.test_default_work_delay_flag_parses",
|
| 19 |
+
"eval.tests.test_cli_flags_and_help.test_graceful_timeout_negative_rejected",
|
| 20 |
+
"eval.tests.test_cli_flags_and_help.test_help_lists_all_flags_with_defaults",
|
| 21 |
+
"eval.tests.test_cli_flags_and_help.test_help_short_flag_h",
|
| 22 |
+
"eval.tests.test_cli_flags_and_help.test_help_via_double_dash",
|
| 23 |
+
"eval.tests.test_cli_flags_and_help.test_polling_interval_accepts_value",
|
| 24 |
+
"eval.tests.test_cli_flags_and_help.test_polling_interval_non_numeric_rejected",
|
| 25 |
+
"eval.tests.test_cli_flags_and_help.test_repeated_build_flag_runs_all_commands",
|
| 26 |
+
"eval.tests.test_cli_flags_and_help.test_repeated_directory_flag_accumulates",
|
| 27 |
+
"eval.tests.test_cli_flags_and_help.test_unknown_flag_is_rejected",
|
| 28 |
+
"eval.tests.test_cli_flags_and_help.test_work_delay_non_numeric_rejected",
|
| 29 |
+
"eval.tests.test_color_output_modes.test_color_does_not_affect_restart_message",
|
| 30 |
+
"eval.tests.test_color_output_modes.test_color_off_failing_build_plain_error",
|
| 31 |
+
"eval.tests.test_color_output_modes.test_color_on_failing_build_prints_error",
|
| 32 |
+
"eval.tests.test_color_output_modes.test_color_on_success_build_still_prints_status",
|
| 33 |
+
"eval.tests.test_color_output_modes.test_color_success_emits_no_ansi_escape_sequences",
|
| 34 |
+
"eval.tests.test_exclude_match_and_color_fail.test_build_dir_relative_path_is_blendable",
|
| 35 |
+
"eval.tests.test_exclude_match_and_color_fail.test_build_dir_wins_over_default_directory",
|
| 36 |
+
"eval.tests.test_exclude_match_and_color_fail.test_color_failing_build_unknown_binary",
|
| 37 |
+
"eval.tests.test_exclude_match_and_color_fail.test_color_failing_build_with_diagnostics",
|
| 38 |
+
"eval.tests.test_exclude_match_and_color_fail.test_exclude_dir_match_skips_directory_from_watch",
|
| 39 |
+
"eval.tests.test_exclude_match_and_color_fail.test_excluded_subdir_change_does_not_trigger_build",
|
| 40 |
+
"eval.tests.test_exclude_match_and_color_fail.test_first_build_failure_stops_later_build_commands",
|
| 41 |
+
"eval.tests.test_exclude_match_and_color_fail.test_multiple_build_commands_run_in_registration_order",
|
| 42 |
+
"eval.tests.test_exclude_match_and_color_fail.test_multiple_directories_all_trigger_builds",
|
| 43 |
+
"eval.tests.test_exclude_match_and_color_fail.test_nonexistent_watch_dir_aborts_startup_inline",
|
| 44 |
+
"eval.tests.test_glob_pattern_matching.test_exclude_dir_malformed_glob_is_fatal",
|
| 45 |
+
"eval.tests.test_glob_pattern_matching.test_exclude_glob_that_does_not_match_still_builds",
|
| 46 |
+
"eval.tests.test_glob_pattern_matching.test_include_malformed_glob_is_fatal",
|
| 47 |
+
"eval.tests.test_glob_pattern_matching.test_repeated_include_flags_all_accumulate_and_second_matches",
|
| 48 |
+
"eval.tests.test_glob_pattern_matching.test_valid_include_glob_matches_file",
|
| 49 |
+
"eval.tests.test_incremental_coverage_directed.test_build_dir_is_used_but_excluded_from_watch",
|
| 50 |
+
"eval.tests.test_incremental_coverage_directed.test_color_fail_through_runner_start_command_failure",
|
| 51 |
+
"eval.tests.test_incremental_coverage_directed.test_default_directory_is_current_working_dir",
|
| 52 |
+
"eval.tests.test_incremental_coverage_directed.test_exclude_dir_wildcard_glob_matches_and_skips_subtree",
|
| 53 |
+
"eval.tests.test_incremental_coverage_directed.test_multiple_directories_abort_when_any_is_missing",
|
| 54 |
+
"eval.tests.test_incremental_coverage_directed.test_recursive_false_watches_only_root_dir",
|
| 55 |
+
"eval.tests.test_kill_and_restart_lifecycle.test_command_restarted_again_on_second_build",
|
| 56 |
+
"eval.tests.test_kill_and_restart_lifecycle.test_command_stop_restarts_on_successful_build",
|
| 57 |
+
"eval.tests.test_kill_and_restart_lifecycle.test_graceful_kill_timeout_escalates_to_hard_stop",
|
| 58 |
+
"eval.tests.test_kill_and_restart_lifecycle.test_graceful_kill_timeout_short_window_still_escalates",
|
| 59 |
+
"eval.tests.test_kill_and_restart_lifecycle.test_hard_kill_skips_graceful_messages_without_flag",
|
| 60 |
+
"eval.tests.test_kill_and_restart_lifecycle.test_run_dir_applies_to_child_command",
|
| 61 |
+
"eval.tests.test_polling_and_start_errors.test_command_that_cannot_start_is_fatal",
|
| 62 |
+
"eval.tests.test_polling_and_start_errors.test_polling_interval_flag_accepted",
|
| 63 |
+
"eval.tests.test_polling_and_start_errors.test_polling_mode_builds_on_change",
|
| 64 |
+
"eval.tests.test_runner_and_flusher.test_build_failure_does_not_restart_command",
|
| 65 |
+
"eval.tests.test_runner_and_flusher.test_command_forwarded_stderr_with_prefix",
|
| 66 |
+
"eval.tests.test_runner_and_flusher.test_command_forwarded_stdout_with_prefix",
|
| 67 |
+
"eval.tests.test_runner_and_flusher.test_command_restarted_after_successful_build",
|
| 68 |
+
"eval.tests.test_runner_and_flusher.test_command_stop_emits_stop_and_build_markers",
|
| 69 |
+
"eval.tests.test_runner_and_flusher.test_command_stop_waits_before_build",
|
| 70 |
+
"eval.tests.test_runner_and_flusher.test_log_prefix_false_removes_prefixes_and_timestamps",
|
| 71 |
+
"eval.tests.test_runner_and_flusher.test_no_command_uses_flusher_no_restart_message",
|
| 72 |
+
"eval.tests.test_runner_and_flusher.test_run_dir_sets_command_working_directory",
|
| 73 |
+
"eval.tests.test_runner_and_flusher.test_sigint_triggers_clean_shutdown_message",
|
| 74 |
+
"eval.tests.test_runner_and_flusher.test_sigterm_exits_cleanly",
|
| 75 |
+
"eval.tests.test_runner_and_flusher.test_sigterm_graceful_kill_uses_graceful_message",
|
| 76 |
+
"eval.tests.test_runner_and_flusher.test_sigterm_hard_stops_running_child",
|
| 77 |
+
"eval.tests.test_validation_errors.test_directory_is_file_does_not_fatal_startup",
|
| 78 |
+
"eval.tests.test_validation_errors.test_fatal_error_exit_code_is_nonzero",
|
| 79 |
+
"eval.tests.test_validation_errors.test_invalid_pattern_regexp_panics",
|
| 80 |
+
"eval.tests.test_validation_errors.test_nonexistent_directory_fatal",
|
| 81 |
+
"eval.tests.test_validation_errors.test_unmatched_pattern_regexp_panics",
|
| 82 |
+
"eval.tests.test_validation_errors.test_valid_pattern_accepted",
|
| 83 |
+
"eval.tests.test_validation_errors.test_work_delay_fatal_message_only_to_stderr_stream",
|
| 84 |
+
"eval.tests.test_validation_errors.test_work_delay_negative_rejected",
|
| 85 |
+
"eval.tests.test_validation_errors.test_work_delay_positive_accepted",
|
| 86 |
+
"eval.tests.test_validation_errors.test_work_delay_zero_rejected",
|
| 87 |
+
"eval.tests.test_verbose_and_command_args.test_run_command_argv_flag_reaches_child",
|
| 88 |
+
"eval.tests.test_verbose_and_command_args.test_verbose_announces_root_dir_that_exists",
|
| 89 |
+
"eval.tests.test_verbose_and_command_args.test_verbose_logs_watched_directories",
|
| 90 |
+
"eval.tests.test_verbose_and_command_args.test_whitespace_only_build_command_fails"
|
| 91 |
+
]
|
| 92 |
+
},
|
| 93 |
+
"generated_module_02": {
|
| 94 |
+
"ignore_reason": "",
|
| 95 |
+
"ignored": false,
|
| 96 |
+
"ignored_tests": [
|
| 97 |
+
{
|
| 98 |
+
"name": "eval.tests.test_polling_verbose_events_golden.test_polling_verbose_remove_named_differently_uses_basename",
|
| 99 |
+
"reasons": [
|
| 100 |
+
{
|
| 101 |
+
"id": "golden_docstring",
|
| 102 |
+
"message": "pytest test docstring mentions golden data that is not used in the body",
|
| 103 |
+
"path": "eval/tests/test_polling_verbose_events_golden.py",
|
| 104 |
+
"repair_hint": "Use the golden fixture mentioned in the docstring or remove the misleading claim.",
|
| 105 |
+
"severity": "error",
|
| 106 |
+
"stage": "static_lint"
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"id": "golden_no_equality",
|
| 110 |
+
"message": "pytest test references golden data without equality comparison",
|
| 111 |
+
"path": "eval/tests/test_polling_verbose_events_golden.py",
|
| 112 |
+
"repair_hint": "Compare observed output to golden data with equality after any explicit normalization.",
|
| 113 |
+
"severity": "error",
|
| 114 |
+
"stage": "static_lint"
|
| 115 |
+
}
|
| 116 |
+
]
|
| 117 |
+
}
|
| 118 |
+
],
|
| 119 |
+
"tests": [
|
| 120 |
+
"eval.tests.test_addfiles_root_exclude.test_root_exclude_skips_whole_walk_and_leaves_root_watched",
|
| 121 |
+
"eval.tests.test_addfiles_root_exclude.test_root_exclude_still_tracks_new_file_in_existing_root",
|
| 122 |
+
"eval.tests.test_directory_traversal.test_exclude_dir_full_path_skips_directory[{root}/skip-skip]",
|
| 123 |
+
"eval.tests.test_directory_traversal.test_exclude_dir_full_path_skips_directory[{root}/skip/-skip]",
|
| 124 |
+
"eval.tests.test_directory_traversal.test_exclude_dir_name_only_does_not_skip",
|
| 125 |
+
"eval.tests.test_directory_traversal.test_multiple_directories_all_traversed",
|
| 126 |
+
"eval.tests.test_directory_traversal.test_non_recursive_verbose_produces_no_directory_listing",
|
| 127 |
+
"eval.tests.test_directory_traversal.test_recursive_verbose_lists_every_directory",
|
| 128 |
+
"eval.tests.test_directory_traversal.test_recursive_verbose_walk_order_is_parent_before_child",
|
| 129 |
+
"eval.tests.test_dynamic_exclude.test_excluded_dynamic_subdir_not_tracked",
|
| 130 |
+
"eval.tests.test_dynamic_exclude.test_excluded_then_open_chain_counts_only_open",
|
| 131 |
+
"eval.tests.test_dynamic_exclude.test_open_dynamic_subdir_is_tracked_control",
|
| 132 |
+
"eval.tests.test_errors.test_bad_regexp_pattern_crashes_on_startup",
|
| 133 |
+
"eval.tests.test_errors.test_watch_non_recursive_missing_directory_exits",
|
| 134 |
+
"eval.tests.test_errors.test_watch_nonexistent_directory_exits_nonzero",
|
| 135 |
+
"eval.tests.test_filter_and_walk.test_exclude_dir_separator_glob_probe_matches_absolute",
|
| 136 |
+
"eval.tests.test_filter_and_walk.test_include_matches_deeply_nested_file",
|
| 137 |
+
"eval.tests.test_filter_and_walk.test_polling_custom_pattern_filters",
|
| 138 |
+
"eval.tests.test_filter_and_walk.test_polling_include_exclude_override",
|
| 139 |
+
"eval.tests.test_non_recursive_multi_dir.test_non_recursive_both_roots_listen",
|
| 140 |
+
"eval.tests.test_non_recursive_multi_dir.test_non_recursive_ignores_file_in_nested_subdir",
|
| 141 |
+
"eval.tests.test_non_recursive_multi_dir.test_non_recursive_verbose_prints_no_hierarchy_but_builds",
|
| 142 |
+
"eval.tests.test_notify_c_source.test_notify_c_edit_at_root_triggers_build",
|
| 143 |
+
"eval.tests.test_notify_c_source.test_notify_c_edit_in_recursive_subdir_triggers_build",
|
| 144 |
+
"eval.tests.test_notify_c_source.test_notify_c_remove_triggers_build",
|
| 145 |
+
"eval.tests.test_notify_c_source.test_notify_exclude_c_blocks_default_pattern",
|
| 146 |
+
"eval.tests.test_notify_remove.test_notify_delete_excluded_go_does_not_build",
|
| 147 |
+
"eval.tests.test_notify_remove.test_notify_delete_matched_go_triggers_build",
|
| 148 |
+
"eval.tests.test_notify_remove.test_notify_delete_matching_file_in_subdir_triggers",
|
| 149 |
+
"eval.tests.test_notify_remove.test_notify_delete_matching_with_include_only",
|
| 150 |
+
"eval.tests.test_notify_remove.test_notify_delete_then_recreate_same_path_builds_twice",
|
| 151 |
+
"eval.tests.test_notify_remove.test_notify_delete_txt_does_not_build",
|
| 152 |
+
"eval.tests.test_notify_tracking.test_matched_file_in_pre_existing_dir_still_triggers",
|
| 153 |
+
"eval.tests.test_notify_tracking.test_nested_new_subdir_tracked_recursively",
|
| 154 |
+
"eval.tests.test_notify_tracking.test_new_subdir_gets_tracked_when_recursive",
|
| 155 |
+
"eval.tests.test_notify_tracking.test_new_subdir_not_tracked_when_non_recursive",
|
| 156 |
+
"eval.tests.test_notify_tracking.test_non_matched_file_in_new_subdir_does_not_build",
|
| 157 |
+
"eval.tests.test_path_matching.test_custom_pattern_regexp_matching[\\\\.less$-a.go-1]",
|
| 158 |
+
"eval.tests.test_path_matching.test_custom_pattern_regexp_matching[\\\\.less$-a.less-2]",
|
| 159 |
+
"eval.tests.test_path_matching.test_custom_pattern_regexp_matching[^nosuch$-a.go-1]",
|
| 160 |
+
"eval.tests.test_path_matching.test_custom_pattern_regexp_matching[main-main.go-2]",
|
| 161 |
+
"eval.tests.test_path_matching.test_default_pattern_ignores_c_file_when_pattern_is_go_only",
|
| 162 |
+
"eval.tests.test_path_matching.test_default_pattern_ignores_txt_file",
|
| 163 |
+
"eval.tests.test_path_matching.test_default_pattern_matches_go_file",
|
| 164 |
+
"eval.tests.test_path_matching.test_exclude_go_blocks_default_pattern",
|
| 165 |
+
"eval.tests.test_path_matching.test_exclude_non_matching_extension_has_no_effect",
|
| 166 |
+
"eval.tests.test_path_matching.test_exclude_wins_over_include",
|
| 167 |
+
"eval.tests.test_path_matching.test_include_adds_extension_not_in_default_pattern",
|
| 168 |
+
"eval.tests.test_path_matching.test_include_does_not_suppress_disallowed_file",
|
| 169 |
+
"eval.tests.test_path_matching.test_no_mutation_keeps_single_build[extra0]",
|
| 170 |
+
"eval.tests.test_path_matching.test_no_mutation_keeps_single_build[extra1]",
|
| 171 |
+
"eval.tests.test_path_matching.test_no_mutation_keeps_single_build[extra2]",
|
| 172 |
+
"eval.tests.test_path_matching.test_no_mutation_keeps_single_build[extra3]",
|
| 173 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_notify_pattern_anchored_to_root_excludes_subdir",
|
| 174 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_notify_pattern_anchored_to_subdir_only",
|
| 175 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_notify_two_includes_or_admit_both_extensions",
|
| 176 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_polling_basename_pattern_still_builds_control",
|
| 177 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_polling_exclude_dir_skips_subdir",
|
| 178 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_polling_non_recursive_ignores_subdir_edit",
|
| 179 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_polling_non_recursive_root_edit_builds",
|
| 180 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_polling_non_recursive_verbose_prints_no_walk",
|
| 181 |
+
"eval.tests.test_pattern_path_and_polling_modes.test_polling_pattern_basename_ignores_anchored_regex",
|
| 182 |
+
"eval.tests.test_polling.test_factory_default_is_notify_and_works",
|
| 183 |
+
"eval.tests.test_polling.test_factory_polling_vs_notify_directory_listing",
|
| 184 |
+
"eval.tests.test_polling.test_polling_detects_go_change",
|
| 185 |
+
"eval.tests.test_polling.test_polling_ignores_txt_change",
|
| 186 |
+
"eval.tests.test_polling.test_polling_interval_range[large-interval]",
|
| 187 |
+
"eval.tests.test_polling.test_polling_interval_range[tiny-interval]",
|
| 188 |
+
"eval.tests.test_polling.test_polling_not_verbose_emits_no_raw_event_lines",
|
| 189 |
+
"eval.tests.test_polling.test_polling_verbose_emits_raw_event_lines",
|
| 190 |
+
"eval.tests.test_polling_c_source.test_polling_c_edit_in_recursive_subdir_builds",
|
| 191 |
+
"eval.tests.test_polling_c_source.test_polling_c_edit_triggers_build",
|
| 192 |
+
"eval.tests.test_polling_c_source.test_polling_exclude_c_blocks_default_pattern",
|
| 193 |
+
"eval.tests.test_polling_delete.test_polling_delete_nonmatching_txt_stays_alive",
|
| 194 |
+
"eval.tests.test_polling_delete.test_polling_delete_then_recreate_same_path_builds",
|
| 195 |
+
"eval.tests.test_polling_delete.test_polling_delete_watched_go_stays_alive",
|
| 196 |
+
"eval.tests.test_polling_delete.test_polling_delete_watched_verbose_stays_alive",
|
| 197 |
+
"eval.tests.test_polling_event_golden.test_polling_verbose_go_create_events_byte_exact",
|
| 198 |
+
"eval.tests.test_polling_event_golden.test_polling_verbose_go_write_single_event_not_double",
|
| 199 |
+
"eval.tests.test_polling_verbose_events_golden.test_polling_basename_dotted_pattern_boundary",
|
| 200 |
+
"eval.tests.test_polling_verbose_events_golden.test_polling_verbose_go_remove_event_byte_exact",
|
| 201 |
+
"eval.tests.test_polling_verbose_events_golden.test_polling_verbose_nonmatching_txt_no_file_line_no_build",
|
| 202 |
+
"eval.tests.test_polling_verbose_events_golden.test_polling_verbose_remove_named_differently_uses_basename"
|
| 203 |
+
]
|
| 204 |
+
},
|
| 205 |
+
"generated_module_03": {
|
| 206 |
+
"ignore_reason": "",
|
| 207 |
+
"ignored": false,
|
| 208 |
+
"ignored_tests": [],
|
| 209 |
+
"tests": [
|
| 210 |
+
"eval.tests.test_child_lifecycle_states.test_child_runs_with_run_dir_as_working_directory",
|
| 211 |
+
"eval.tests.test_child_lifecycle_states.test_command_stop_failed_build_stops_running_child",
|
| 212 |
+
"eval.tests.test_child_lifecycle_states.test_command_stop_successful_build_stops_then_restarts",
|
| 213 |
+
"eval.tests.test_child_lifecycle_states.test_failed_build_does_not_restart_or_kill_running_child",
|
| 214 |
+
"eval.tests.test_child_lifecycle_states.test_graceful_stop_reaps_whole_process_group",
|
| 215 |
+
"eval.tests.test_cli_error_and_log_behavior.test_log_prefix_false_prints_child_stderr_bare",
|
| 216 |
+
"eval.tests.test_cli_error_and_log_behavior.test_log_prefix_false_prints_child_stdout_bare",
|
| 217 |
+
"eval.tests.test_cli_error_and_log_behavior.test_log_prefix_true_labels_child_stderr_lines",
|
| 218 |
+
"eval.tests.test_cli_error_and_log_behavior.test_log_prefix_true_labels_child_stdout_lines",
|
| 219 |
+
"eval.tests.test_cli_error_and_log_behavior.test_nonexistent_command_fails_to_start_and_daemon_exits",
|
| 220 |
+
"eval.tests.test_fatal_signals.test_fatal_signal_reaps_whole_process_group_grandchild_too",
|
| 221 |
+
"eval.tests.test_fatal_signals.test_fatal_signal_to_daemon_process_group_kills_child",
|
| 222 |
+
"eval.tests.test_fatal_signals.test_graceful_kill_is_supported_on_posix",
|
| 223 |
+
"eval.tests.test_fatal_signals.test_nonfatal_signal_does_not_terminate_daemon",
|
| 224 |
+
"eval.tests.test_fatal_signals.test_nonfatal_signal_lives_then_rebuild_restarts_cleanly",
|
| 225 |
+
"eval.tests.test_fatal_signals.test_sigint_terminates_cleanly_and_kills_child",
|
| 226 |
+
"eval.tests.test_fatal_signals.test_sigquit_terminates_cleanly_and_kills_child",
|
| 227 |
+
"eval.tests.test_fatal_signals.test_sigterm_terminates_cleanly_and_kills_child",
|
| 228 |
+
"eval.tests.test_fatal_signals.test_sigterm_with_no_child_exits_cleanly",
|
| 229 |
+
"eval.tests.test_graceful_dispatch_paths.test_command_stop_graceful_kill_cooperative_child_restarts_gracefully",
|
| 230 |
+
"eval.tests.test_graceful_dispatch_paths.test_command_stop_graceful_kill_stubborn_child_falls_back_to_hard_stop",
|
| 231 |
+
"eval.tests.test_graceful_dispatch_paths.test_fatal_signal_graceful_kill_stubborn_child_falls_back_to_hard_stop",
|
| 232 |
+
"eval.tests.test_graceful_dispatch_paths.test_graceful_restart_succeeds_with_default_sigterm_child_disposition",
|
| 233 |
+
"eval.tests.test_graceful_termination.test_cooperative_child_with_stubborn_grandchild_graceful_stop_leaves_no_leak",
|
| 234 |
+
"eval.tests.test_graceful_termination.test_graceful_kill_delivers_sigterm_and_child_exits_cleanly",
|
| 235 |
+
"eval.tests.test_graceful_termination.test_graceful_kill_logs_graceful_stop_and_no_hard_fallback",
|
| 236 |
+
"eval.tests.test_graceful_termination.test_graceful_kill_sigterms_whole_group_child_and_grandchild",
|
| 237 |
+
"eval.tests.test_graceful_termination.test_graceful_timeout_falls_back_to_hard_stop_of_group",
|
| 238 |
+
"eval.tests.test_graceful_termination.test_graceful_timeout_of_zero_forces_immediate_hard_fallback",
|
| 239 |
+
"eval.tests.test_process_group.test_child_command_with_argv_args_runs_in_own_process_group",
|
| 240 |
+
"eval.tests.test_process_group.test_child_runs_in_its_own_new_process_group",
|
| 241 |
+
"eval.tests.test_process_group.test_grandchild_inherits_the_new_process_group",
|
| 242 |
+
"eval.tests.test_process_group.test_hard_stop_is_default_kill_on_restart_logs_hard_stop",
|
| 243 |
+
"eval.tests.test_process_group.test_hard_stop_kills_whole_process_subtree_on_restart",
|
| 244 |
+
"eval.tests.test_process_group.test_no_dangling_process_in_child_group_after_restart",
|
| 245 |
+
"eval.tests.test_process_group.test_rapid_burst_of_restarts_does_not_leak_process_group_members",
|
| 246 |
+
"eval.tests.test_process_group.test_restart_after_child_self_exits_starts_fresh_group_without_error",
|
| 247 |
+
"eval.tests.test_process_group.test_restart_cycles_keep_producing_fresh_process_groups"
|
| 248 |
+
]
|
| 249 |
+
}
|
| 250 |
+
},
|
| 251 |
+
"commit": "6cc7bd40f44f51eecad0bebf663a7c589107eabb",
|
| 252 |
+
"data_source": "synthetic_programgym",
|
| 253 |
+
"difficulty": "easy",
|
| 254 |
+
"difficulty_score": 1.4689378056654614,
|
| 255 |
+
"eval_clean_hashes": [
|
| 256 |
+
"8a3f9cfb60817beafe8625b259f6ec27743550d20bfd7543739b0dc58709e4ea"
|
| 257 |
+
],
|
| 258 |
+
"input_record": {
|
| 259 |
+
"commit": "6cc7bd40f44f51eecad0bebf663a7c589107eabb",
|
| 260 |
+
"commits": 130,
|
| 261 |
+
"contributors": 15,
|
| 262 |
+
"difficulty": "easy",
|
| 263 |
+
"difficulty_code_lines": 736,
|
| 264 |
+
"difficulty_has_tests": false,
|
| 265 |
+
"difficulty_product_code_lines": 736,
|
| 266 |
+
"difficulty_runtime_deps": 3,
|
| 267 |
+
"difficulty_score": 1.4689378056654614,
|
| 268 |
+
"difficulty_test_code_lines": 0,
|
| 269 |
+
"full_name": "githubnemo/CompileDaemon",
|
| 270 |
+
"github_stars": 1724,
|
| 271 |
+
"input_joern_zip": "go_joern/githubnemo__CompileDaemon.zip",
|
| 272 |
+
"joern_status": true,
|
| 273 |
+
"joern_time": 14.265690651955083,
|
| 274 |
+
"language": "go",
|
| 275 |
+
"pb_match": [
|
| 276 |
+
{
|
| 277 |
+
"pb_fullname": "go-critic/go-critic",
|
| 278 |
+
"rank": 264,
|
| 279 |
+
"similarity": 0.5660436153411865
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"pb_fullname": "mibk/dupl",
|
| 283 |
+
"rank": 166,
|
| 284 |
+
"similarity": 0.5796288251876831
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"pb_fullname": "mgechev/revive",
|
| 288 |
+
"rank": 362,
|
| 289 |
+
"similarity": 0.557904839515686
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"pb_fullname": "mfridman/tparse",
|
| 293 |
+
"rank": 739,
|
| 294 |
+
"similarity": 0.5082545280456543
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"pb_fullname": "cweill/gotests",
|
| 298 |
+
"rank": 287,
|
| 299 |
+
"similarity": 0.5622007846832275
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"pb_fullname": "incu6us/goimports-reviser",
|
| 303 |
+
"rank": 578,
|
| 304 |
+
"similarity": 0.5002689957618713
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"pb_fullname": "kyoh86/richgo",
|
| 308 |
+
"rank": 455,
|
| 309 |
+
"similarity": 0.5280124545097351
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"pb_fullname": "psampaz/go-mod-outdated",
|
| 313 |
+
"rank": 513,
|
| 314 |
+
"similarity": 0.48238086700439453
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"pb_fullname": "kisielk/errcheck",
|
| 318 |
+
"rank": 252,
|
| 319 |
+
"similarity": 0.5834534764289856
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"pb_fullname": "tomarrell/wrapcheck",
|
| 323 |
+
"rank": 367,
|
| 324 |
+
"similarity": 0.5260207653045654
|
| 325 |
+
}
|
| 326 |
+
],
|
| 327 |
+
"repo_age": 13.89,
|
| 328 |
+
"repo_path": "go/githubnemo__CompileDaemon",
|
| 329 |
+
"source": "commit:6cc7bd40f44f51eecad0bebf663a7c589107eabb",
|
| 330 |
+
"status": "done",
|
| 331 |
+
"url": "https://github.com/githubnemo/CompileDaemon"
|
| 332 |
+
},
|
| 333 |
+
"instance_id": "githubnemo__CompileDaemon.6cc7bd4",
|
| 334 |
+
"language": "go",
|
| 335 |
+
"module_iterations": [
|
| 336 |
+
{
|
| 337 |
+
"actual_iterations": 4,
|
| 338 |
+
"branch_name": "generated_module_01",
|
| 339 |
+
"iteration_limit": 5,
|
| 340 |
+
"module_index": 1,
|
| 341 |
+
"module_kind": "source",
|
| 342 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"actual_iterations": 5,
|
| 346 |
+
"branch_name": "generated_module_02",
|
| 347 |
+
"iteration_limit": 5,
|
| 348 |
+
"module_index": 2,
|
| 349 |
+
"module_kind": "source",
|
| 350 |
+
"termination_reason": "max_iterations"
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"actual_iterations": 5,
|
| 354 |
+
"branch_name": "generated_module_03",
|
| 355 |
+
"iteration_limit": 5,
|
| 356 |
+
"module_index": 3,
|
| 357 |
+
"module_kind": "source",
|
| 358 |
+
"termination_reason": "module_coverage_threshold_reached"
|
| 359 |
+
}
|
| 360 |
+
],
|
| 361 |
+
"repository": "githubnemo/CompileDaemon"
|
| 362 |
+
}
|
githubnemo--compiledaemon.6cc7bd/tests/test.sh
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
# Verifier exec may not inherit image ENV (Modal/gVisor, login-shell resets).
|
| 5 |
+
export PATH="/usr/local/go/bin:/go/bin:/usr/local/cargo/bin:/root/.cargo/bin:${PATH}"
|
| 6 |
+
|
| 7 |
+
mkdir -p /logs/verifier /logs/artifacts
|
| 8 |
+
|
| 9 |
+
write_failure() {
|
| 10 |
+
local code="$1"
|
| 11 |
+
local details="$2"
|
| 12 |
+
python3 - "$code" "$details" <<'PY'
|
| 13 |
+
import json
|
| 14 |
+
import sys
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
code, details = sys.argv[1:3]
|
| 18 |
+
try:
|
| 19 |
+
metadata = json.loads(Path("/tests/programgym_task.json").read_text())
|
| 20 |
+
n_tests = sum(
|
| 21 |
+
len([
|
| 22 |
+
name for name in info.get("tests", [])
|
| 23 |
+
if name not in {item.get("name") for item in info.get("ignored_tests", [])}
|
| 24 |
+
])
|
| 25 |
+
for branch, info in metadata.get("branches", {}).items()
|
| 26 |
+
if not info.get("ignored")
|
| 27 |
+
)
|
| 28 |
+
except Exception:
|
| 29 |
+
n_tests = 0
|
| 30 |
+
result = {
|
| 31 |
+
"test_results": [],
|
| 32 |
+
"error_code": code,
|
| 33 |
+
"error_details": details,
|
| 34 |
+
"log": [],
|
| 35 |
+
"solution_branch": "submission",
|
| 36 |
+
"test_branches": [],
|
| 37 |
+
"test_branch_errors": {
|
| 38 |
+
"__infra__": [{"error_code": code, "error_details": details}]
|
| 39 |
+
},
|
| 40 |
+
"executable_hash": None,
|
| 41 |
+
"warnings": [],
|
| 42 |
+
}
|
| 43 |
+
diagnostics = {
|
| 44 |
+
"pass_rate": 0.0,
|
| 45 |
+
"resolved": 0,
|
| 46 |
+
"n_passed": 0,
|
| 47 |
+
"n_tests": n_tests,
|
| 48 |
+
"n_branch_errors": 1,
|
| 49 |
+
"infra_error": 1,
|
| 50 |
+
"executable_hash_present": 0,
|
| 51 |
+
}
|
| 52 |
+
Path("/logs/verifier/programgym_eval.json").write_text(
|
| 53 |
+
json.dumps(result, indent=2, sort_keys=True)
|
| 54 |
+
)
|
| 55 |
+
Path("/logs/verifier/harbor_diagnostics.json").write_text(
|
| 56 |
+
json.dumps(diagnostics, indent=2, sort_keys=True)
|
| 57 |
+
)
|
| 58 |
+
Path("/logs/verifier/reward.json").write_text(
|
| 59 |
+
json.dumps(
|
| 60 |
+
{"reward": 0.0, "resolved": 0.0, "almost_resolved": 0.0},
|
| 61 |
+
indent=2,
|
| 62 |
+
sort_keys=True,
|
| 63 |
+
)
|
| 64 |
+
)
|
| 65 |
+
Path("/logs/verifier/reward.txt").write_text("0.0")
|
| 66 |
+
Path("/logs/verifier/programgym_eval.log").write_text(details)
|
| 67 |
+
PY
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
if ! command -v python3 >/dev/null 2>&1; then
|
| 71 |
+
write_failure "missing_python3" "python3 is required in the cleanroom image"
|
| 72 |
+
exit 0
|
| 73 |
+
fi
|
| 74 |
+
|
| 75 |
+
if ! python3 /tests/programgym_evaluator.py; then
|
| 76 |
+
if [ ! -s /logs/verifier/reward.txt ]; then
|
| 77 |
+
write_failure "evaluator_crashed" \
|
| 78 |
+
"programgym_evaluator.py exited non-zero with no reward written"
|
| 79 |
+
fi
|
| 80 |
+
fi
|
| 81 |
+
|
| 82 |
+
exit 0
|
githubnemo--compiledaemon.6cc7bd/tests/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca9aee75a81e6793506fa0125e2d237056c13c444e8e28c59f983900cb3c8666
|
| 3 |
+
size 9532
|
glauth--glauth.be396ae/environment/Dockerfile
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
|
| 38 |
+
RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# programgym-runtime-workspace-cleanup: v1
|
| 49 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
| 50 |
+
# Harbor synthetic ProgramGym adapter: run the agent as an unprivileged user.
|
| 51 |
+
# Keep tool/runtime state under /home/agent and reserve /workspace for the
|
| 52 |
+
# submission handed to the separate verifier. Keep the reference executable
|
| 53 |
+
# execute-only; the oracle temporarily restores owner read permission.
|
| 54 |
+
RUN id -u agent >/dev/null 2>&1 || useradd -m -s /bin/bash agent
|
| 55 |
+
RUN mkdir -p /home/agent \
|
| 56 |
+
&& chown -R agent:agent /home/agent /workspace \
|
| 57 |
+
&& chown agent:agent /workspace/executable \
|
| 58 |
+
&& chmod 111 /workspace/executable
|
| 59 |
+
ENV HOME=/home/agent
|
| 60 |
+
WORKDIR /workspace
|
glauth--glauth.be396ae/environment/download.sh
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# PROGRAMGYM download.sh for github.com/glauth/glauth/v2 (glauth LDAP server).
|
| 3 |
+
#
|
| 4 |
+
# This script is standalone and source-safe. It prefetches the pinned Go module
|
| 5 |
+
# dependencies of the selected build target (v2/glauth.go) into the default
|
| 6 |
+
# Go module cache so that the offline build stage can compile with no network.
|
| 7 |
+
# It performs no compilation, linking, test, or packaging.
|
| 8 |
+
#
|
| 9 |
+
# It is invoked as: source /source_ro/download.sh
|
| 10 |
+
# so it must not use `exit` in normal control flow and must leave exported
|
| 11 |
+
# environment variables usable by the subsequent offline build.
|
| 12 |
+
|
| 13 |
+
# The repository source tree is not mounted here, so the module metadata is
|
| 14 |
+
# embedded verbatim from v2/go.mod and v2/go.sum. It is reconstructed under the
|
| 15 |
+
# reserved build-env directory to satisfy the Go toolchain's module discovery
|
| 16 |
+
# from the working directory, then `go mod download` is run against that file.
|
| 17 |
+
# The resulting module cache (default GOMODCACHE under $HOME/.go) lives outside
|
| 18 |
+
# the reserved directory and survives into the offline build stage.
|
| 19 |
+
|
| 20 |
+
PREFETCH_DIR="/workspace/.programgym_build_env/go-prefetch"
|
| 21 |
+
mkdir -p "${PREFETCH_DIR}"
|
| 22 |
+
|
| 23 |
+
cat > "${PREFETCH_DIR}/go.mod" <<'GO_EOF'
|
| 24 |
+
module github.com/glauth/glauth/v2
|
| 25 |
+
|
| 26 |
+
go 1.21
|
| 27 |
+
|
| 28 |
+
require (
|
| 29 |
+
github.com/BurntSushi/toml v1.3.2
|
| 30 |
+
github.com/GeertJohan/yubigo v0.0.0-20190917122436-175bc097e60e
|
| 31 |
+
github.com/arl/statsviz v0.6.0
|
| 32 |
+
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
|
| 33 |
+
github.com/fsnotify/fsnotify v1.7.0
|
| 34 |
+
github.com/glauth/ldap v0.0.0-20240419171521-1f14f5c1b4ad
|
| 35 |
+
github.com/jinzhu/copier v0.4.0
|
| 36 |
+
github.com/pquerna/otp v1.4.0
|
| 37 |
+
github.com/prometheus/client_golang v1.18.0
|
| 38 |
+
github.com/prometheus/client_model v0.5.0
|
| 39 |
+
github.com/rs/zerolog v1.31.0
|
| 40 |
+
github.com/uptrace/opentelemetry-go-extra/otelsql v0.2.3
|
| 41 |
+
github.com/yaegashi/msgraph.go v0.1.4
|
| 42 |
+
go.opentelemetry.io/contrib/propagators/jaeger v1.21.1
|
| 43 |
+
go.opentelemetry.io/otel v1.21.0
|
| 44 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0
|
| 45 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
|
| 46 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0
|
| 47 |
+
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.21.0
|
| 48 |
+
go.opentelemetry.io/otel/sdk v1.21.0
|
| 49 |
+
go.opentelemetry.io/otel/trace v1.21.0
|
| 50 |
+
go.uber.org/mock v0.4.0
|
| 51 |
+
golang.org/x/crypto v0.18.0
|
| 52 |
+
gopkg.in/amz.v3 v3.0.0-20201001071545-24fc1eceb27b
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
require (
|
| 56 |
+
github.com/beorn7/perks v1.0.1 // indirect
|
| 57 |
+
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
|
| 58 |
+
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
| 59 |
+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
| 60 |
+
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
|
| 61 |
+
github.com/go-logr/logr v1.3.0 // indirect
|
| 62 |
+
github.com/go-logr/stdr v1.2.2 // indirect
|
| 63 |
+
github.com/golang/protobuf v1.5.3 // indirect
|
| 64 |
+
github.com/gorilla/websocket v1.5.0 // indirect
|
| 65 |
+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
|
| 66 |
+
github.com/mattn/go-colorable v0.1.13 // indirect
|
| 67 |
+
github.com/mattn/go-isatty v0.0.19 // indirect
|
| 68 |
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
| 69 |
+
github.com/prometheus/common v0.45.0 // indirect
|
| 70 |
+
github.com/prometheus/procfs v0.12.0 // indirect
|
| 71 |
+
github.com/rickb777/date v1.12.4 // indirect
|
| 72 |
+
github.com/rickb777/plural v1.2.0 // indirect
|
| 73 |
+
go.opentelemetry.io/otel/metric v1.21.0 // indirect
|
| 74 |
+
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
| 75 |
+
golang.org/x/net v0.17.0 // indirect
|
| 76 |
+
golang.org/x/sys v0.16.0 // indirect
|
| 77 |
+
golang.org/x/text v0.14.0 // indirect
|
| 78 |
+
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
|
| 79 |
+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
|
| 80 |
+
google.golang.org/grpc v1.59.0 // indirect
|
| 81 |
+
google.golang.org/protobuf v1.31.0 // indirect
|
| 82 |
+
)
|
| 83 |
+
GO_EOF
|
| 84 |
+
|
| 85 |
+
cat > "${PREFETCH_DIR}/go.sum" <<'GO_SUM_EOF'
|
| 86 |
+
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
| 87 |
+
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
| 88 |
+
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
| 89 |
+
github.com/GeertJohan/yubigo v0.0.0-20190917122436-175bc097e60e h1:Bqtt5C+uVk+vH/t5dmB47uDCTwxw16EYHqvJnmY2aQc=
|
| 90 |
+
github.com/GeertJohan/yubigo v0.0.0-20190917122436-175bc097e60e/go.mod h1:njRCDrl+1RQ/A/+KVU8Ho2EWAxUSkohOWczdW3dzDG0=
|
| 91 |
+
github.com/arl/statsviz v0.6.0 h1:jbW1QJkEYQkufd//4NDYRSNBpwJNrdzPahF7ZmoGdyE=
|
| 92 |
+
github.com/arl/statsviz v0.6.0/go.mod h1:0toboo+YGSUXDaS4g1D5TVS4dXs7S7YYT5J/qnW2h8s=
|
| 93 |
+
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
| 94 |
+
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
| 95 |
+
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI=
|
| 96 |
+
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
| 97 |
+
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
|
| 98 |
+
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
| 99 |
+
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
| 100 |
+
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
| 101 |
+
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
| 102 |
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
| 103 |
+
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=
|
| 104 |
+
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
| 105 |
+
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
| 106 |
+
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
| 107 |
+
github.com/glauth/ldap v0.0.0-20240419171521-1f14f5c1b4ad h1:2ERGXiofR9ISXg4evamCngs2EeuMhVJRuDwWGa6bS6s=
|
| 108 |
+
github.com/glauth/ldap v0.0.0-20240419171521-1f14f5c1b4ad/go.mod h1:5ueZMujvJ5nuYPyBj6uQTPV4R1YshboRa/osaP4Emfs=
|
| 109 |
+
github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA=
|
| 110 |
+
github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
| 111 |
+
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
| 112 |
+
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
|
| 113 |
+
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
| 114 |
+
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
| 115 |
+
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
| 116 |
+
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
| 117 |
+
github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo=
|
| 118 |
+
github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
|
| 119 |
+
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
| 120 |
+
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
| 121 |
+
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
| 122 |
+
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
| 123 |
+
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
| 124 |
+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
| 125 |
+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
| 126 |
+
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
| 127 |
+
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
| 128 |
+
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
| 129 |
+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
|
| 130 |
+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
|
| 131 |
+
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
|
| 132 |
+
github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
|
| 133 |
+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
| 134 |
+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
| 135 |
+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
| 136 |
+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
| 137 |
+
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
| 138 |
+
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
| 139 |
+
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
| 140 |
+
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
| 141 |
+
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
| 142 |
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
|
| 143 |
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
|
| 144 |
+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
| 145 |
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
| 146 |
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
| 147 |
+
github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg=
|
| 148 |
+
github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
|
| 149 |
+
github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
|
| 150 |
+
github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
|
| 151 |
+
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
| 152 |
+
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
| 153 |
+
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
|
| 154 |
+
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
|
| 155 |
+
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
| 156 |
+
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
|
| 157 |
+
github.com/rickb777/date v1.12.4 h1:+6IzcCCS/1t17DrmnEvrznyq7nM8vPwir6/UhlyohKw=
|
| 158 |
+
github.com/rickb777/date v1.12.4/go.mod h1:xP0eo/I5qmUt97yRGClHZfyLZ3ikMw6v6SU5MOGZTE0=
|
| 159 |
+
github.com/rickb777/plural v1.2.0 h1:5tvEc7UBCZ7l8h/2UeybSkt/uu1DQsZFOFdNevmUhlE=
|
| 160 |
+
github.com/rickb777/plural v1.2.0/go.mod h1:UdpyWFCGbo3mvK3f/PfZOAOrkjzJlYN/sD46XNWJ+Es=
|
| 161 |
+
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
| 162 |
+
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
| 163 |
+
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
| 164 |
+
github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A=
|
| 165 |
+
github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
| 166 |
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
| 167 |
+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
| 168 |
+
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
| 169 |
+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
| 170 |
+
github.com/uptrace/opentelemetry-go-extra/otelsql v0.2.3 h1:LNi0Qa7869/loPjz2kmMvp/jwZZnMZ9scMJKhDJ1DIo=
|
| 171 |
+
github.com/uptrace/opentelemetry-go-extra/otelsql v0.2.3/go.mod h1:jyigonKik3C5V895QNiAGpKYKEvFuqjw9qAEZks1mUg=
|
| 172 |
+
github.com/yaegashi/msgraph.go v0.1.4 h1:leDXSczAbwBpYFSmmZrdByTiPoUw8dbTfNMetAjJvbw=
|
| 173 |
+
github.com/yaegashi/msgraph.go v0.1.4/go.mod h1:vgeYhHa5skJt/3lTyjGXThTZhwbhRnGo6uUxzoJIGME=
|
| 174 |
+
github.com/yaegashi/wtz.go v0.0.2/go.mod h1:nOLA5QXsmdkRxBkP5tljhua13ADHCKirLBrzPf4PEJc=
|
| 175 |
+
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
| 176 |
+
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
| 177 |
+
go.opentelemetry.io/contrib/propagators/jaeger v1.21.1 h1:f4beMGDKiVzg9IcX7/VuWVy+oGdjx3dNJ72YehmtY5k=
|
| 178 |
+
go.opentelemetry.io/contrib/propagators/jaeger v1.21.1/go.mod h1:U9jhkEl8d1LL+QXY7q3kneJWJugiN3kZJV2OWz3hkBY=
|
| 179 |
+
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
|
| 180 |
+
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
| 181 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
|
| 182 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
|
| 183 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
|
| 184 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
|
| 185 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0 h1:digkEZCJWobwBqMwC0cwCq8/wkkRy/OowZg5OArWZrM=
|
| 186 |
+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0/go.mod h1:/OpE/y70qVkndM0TrxT4KBoN3RsFZP0QaofcfYrj76I=
|
| 187 |
+
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.21.0 h1:VhlEQAPp9R1ktYfrPk5SOryw1e9LDDTZCbIPFrho0ec=
|
| 188 |
+
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.21.0/go.mod h1:kB3ufRbfU+CQ4MlUcqtW8Z7YEOBeK2DJ6CmR5rYYF3E=
|
| 189 |
+
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
|
| 190 |
+
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
|
| 191 |
+
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
|
| 192 |
+
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
|
| 193 |
+
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
|
| 194 |
+
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
|
| 195 |
+
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
|
| 196 |
+
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
|
| 197 |
+
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
| 198 |
+
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
| 199 |
+
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
|
| 200 |
+
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
|
| 201 |
+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
| 202 |
+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
| 203 |
+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
| 204 |
+
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
|
| 205 |
+
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
| 206 |
+
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
| 207 |
+
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
| 208 |
+
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
| 209 |
+
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
| 210 |
+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
| 211 |
+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
| 212 |
+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
| 213 |
+
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
| 214 |
+
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
| 215 |
+
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
| 216 |
+
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
| 217 |
+
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
| 218 |
+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
| 219 |
+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
| 220 |
+
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
| 221 |
+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
| 222 |
+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
| 223 |
+
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
| 224 |
+
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 225 |
+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 226 |
+
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
| 227 |
+
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
|
| 228 |
+
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
| 229 |
+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
| 230 |
+
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
| 231 |
+
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
| 232 |
+
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
| 233 |
+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
| 234 |
+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
| 235 |
+
golang.org/x/tools v0.0.0-20200529172331-a64b76657301/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
| 236 |
+
golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
| 237 |
+
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
|
| 238 |
+
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
| 239 |
+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
| 240 |
+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
| 241 |
+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
| 242 |
+
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
| 243 |
+
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY=
|
| 244 |
+
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4=
|
| 245 |
+
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q=
|
| 246 |
+
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
|
| 247 |
+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
|
| 248 |
+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
|
| 249 |
+
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
|
| 250 |
+
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
| 251 |
+
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
| 252 |
+
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
| 253 |
+
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
| 254 |
+
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
| 255 |
+
gopkg.in/amz.v3 v3.0.0-20201001071545-24fc1eceb27b h1:tdSyAzD5FHJmZAZ13d5WexAo7YJkiyGphhzFfInMnDw=
|
| 256 |
+
gopkg.in/amz.v3 v3.0.0-20201001071545-24fc1eceb27b/go.mod h1:cE0dCGx2UfBTjLFlzEx4EXJUmoX6BXBoX9GjKOvqha4=
|
| 257 |
+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
| 258 |
+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
| 259 |
+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
| 260 |
+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
| 261 |
+
GO_SUM_EOF
|
| 262 |
+
|
| 263 |
+
# Run the prefetch from inside the generated module directory so the Go
|
| 264 |
+
# toolchain discovers the module root here rather than in the repository
|
| 265 |
+
# (which is not mounted during this stage). -modfile makes the module
|
| 266 |
+
# requirements explicit and literal.
|
| 267 |
+
cd "${PREFETCH_DIR}"
|
| 268 |
+
|
| 269 |
+
go mod download -modfile "${PREFETCH_DIR}/go.mod"
|
glauth--glauth.be396ae/environment/executable
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f10e768dfb736930e8d06adb760d1edefc8647ba6063d716ffd4091ebf347d1
|
| 3 |
+
size 56050144
|
glauth--glauth.be396ae/environment/programgym-go.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39042a078ea9ceebe3ecda4a7188f0f5b96e14a071d27923ba7f40b456e85ae3
|
| 3 |
+
size 59908810
|
glauth--glauth.be396ae/environment/workspace.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55a0612e079a1ab552c0364b9905b47c8a4618df1f17fd39b106c9c8dfd65e36
|
| 3 |
+
size 2567
|
glauth--glauth.be396ae/instruction.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are a helpful assistant that can interact with a computer.
|
| 2 |
+
|
| 3 |
+
This is a reverse-engineering benchmark. You are given a compiled binary and its documentation.
|
| 4 |
+
Your job is to write a new, original codebase from scratch that produces an executable with identical behavior.
|
| 5 |
+
You must figure out the behavior solely by running and interacting with the provided binary.
|
| 6 |
+
Writing original code based on observed behavior is the entire point of this benchmark.
|
| 7 |
+
|
| 8 |
+
Any approach that shortcuts this — finding existing source code, wrapping the binary,
|
| 9 |
+
or installing the original tool — does not count as a solution. It will be detected by an
|
| 10 |
+
automated judge, marked as a disqualification, and scored as a failure.
|
| 11 |
+
The trace will be posted to an online wall of shame.
|
| 12 |
+
|
| 13 |
+
<RULES>
|
| 14 |
+
## What is not allowed
|
| 15 |
+
|
| 16 |
+
### 1. Obtaining source code
|
| 17 |
+
|
| 18 |
+
The only source of truth about what the executable does is the executable itself and its
|
| 19 |
+
bundled documentation. You must not search the internet, package registries, or any external
|
| 20 |
+
source for information about this project's source code. Even if you recognize what the
|
| 21 |
+
executable is, you must reimplement it from behavioral observation alone.
|
| 22 |
+
|
| 23 |
+
This includes but is not limited to:
|
| 24 |
+
- Cloning or browsing the original GitHub repository, its forks, or mirrors
|
| 25 |
+
- Downloading the project from package registries: `cargo install <project>`, `go get github.com/<org>/<project>`, `pip install <project>`, `apt-get source <project>`, `npm install <project>`, etc.
|
| 26 |
+
- Fetching source tarballs from project websites (e.g., `curl https://lua.org/ftp/lua-5.5.0.tar.gz`)
|
| 27 |
+
- Using a package manager to download the project as a dependency and then reading its cached source (e.g., navigating into `~/.cargo/registry/src/` or `$(go env GOPATH)/pkg/mod/`)
|
| 28 |
+
- Searching the web for the project's source code or implementation details
|
| 29 |
+
|
| 30 |
+
### 2. Wrapping or reusing the original binary
|
| 31 |
+
|
| 32 |
+
Your submission must be a genuine reimplementation. The provided `./executable` is for
|
| 33 |
+
observation only — your final solution must not depend on it or any other pre-built version
|
| 34 |
+
of the same tool at runtime.
|
| 35 |
+
|
| 36 |
+
This includes but is not limited to:
|
| 37 |
+
- Writing a wrapper script that delegates to the original binary (e.g., `exec zstd "$@"`)
|
| 38 |
+
- Installing the tool from a package manager and shimming to it (e.g., `apt-get install nnn && cp $(which nnn) ./executable`)
|
| 39 |
+
- Writing a `compile.sh` that simply makes the provided binary executable (`chmod +x ./executable`) or copies it (`cp ./executable ./executable`)
|
| 40 |
+
- Building a binary whose main function shells out to an external tool (e.g., `Command::new("miniserve").args(args).exec()`)
|
| 41 |
+
- Re-linking prebuilt `.o` object files found in the workspace without writing new source code
|
| 42 |
+
|
| 43 |
+
### 3. Binary analysis of the provided executable
|
| 44 |
+
|
| 45 |
+
All information about the provided `./executable` must be obtained by interacting with it
|
| 46 |
+
through its normal user interface (CLI flags, stdin/stdout, etc.).
|
| 47 |
+
- You MUST NOT decompile `./executable` or use disassemblers (objdump, Ghidra, etc.) on it
|
| 48 |
+
- You MUST NOT use strace, ltrace, or similar tracing/instrumentation tools on `./executable`
|
| 49 |
+
|
| 50 |
+
Note: this restriction applies ONLY to the provided `./executable`. You are free to use any
|
| 51 |
+
analysis tools on binaries that you produce yourself during development.
|
| 52 |
+
|
| 53 |
+
## What IS allowed
|
| 54 |
+
|
| 55 |
+
- Running the executable with any inputs, flags, and arguments to observe its behavior
|
| 56 |
+
- Reading any documentation files bundled in the workspace
|
| 57 |
+
</RULES>
|
| 58 |
+
|
| 59 |
+
## Task context
|
| 60 |
+
|
| 61 |
+
We want to write the source code for a given executable.
|
| 62 |
+
The executable is located at `./executable` in the workspace root.
|
| 63 |
+
|
| 64 |
+
You also have access to the existing documentation.
|
| 65 |
+
|
| 66 |
+
## Your task
|
| 67 |
+
|
| 68 |
+
Implement the source code to generate an executable of exactly identical behavior as the original.
|
| 69 |
+
|
| 70 |
+
No project-specific dependencies are pre-installed.
|
| 71 |
+
You do NOT have access to the internet.
|
| 72 |
+
**IMPORTANT**: Make sure that the executable(s) and everything else that is an artifact is not committed, i.e., is in your `.gitignore` file.
|
| 73 |
+
Finally, commit your changes.
|
| 74 |
+
|
| 75 |
+
Make sure that you have a `./compile.sh` file that produces an executable `./executable` in the workspace root.
|
| 76 |
+
`compile.sh` should be executable and should install any dependencies needed to compile the executable.
|
| 77 |
+
If your compile.sh fails to compile on a fresh checkout, your task has failed.
|
| 78 |
+
|
| 79 |
+
## Important: This is a reverse-engineering benchmark
|
| 80 |
+
|
| 81 |
+
Your goal is to write original code from scratch that reproduces the executable's behavior.
|
| 82 |
+
The only way to learn what the executable does is to run it and read its bundled documentation.
|
| 83 |
+
|
| 84 |
+
Any attempt to obtain source code — whether successful or not — or to wrap/reuse the
|
| 85 |
+
provided binary will be detected by an automated judge, disqualified, and scored as zero.
|
| 86 |
+
See the full rules in the system prompt above. Key points:
|
| 87 |
+
|
| 88 |
+
- Do NOT search the internet, clone repos, or download the project from any package registry
|
| 89 |
+
- Do NOT wrap, shim, or delegate to the provided `./executable` or any installed version of the same tool
|
| 90 |
+
- Do NOT decompile the provided `./executable` or use strace/ltrace on it (analyzing your own binaries is fine)
|
| 91 |
+
- You SHOULD extensively test the executable to understand its behavior before writing code.
|
| 92 |
+
If you are dealing with a TUI, tmux/libtmux has been installed to help you test/inspect/it.
|
| 93 |
+
|
| 94 |
+
## Recommended Workflow
|
| 95 |
+
|
| 96 |
+
1. Explore all documentation files
|
| 97 |
+
2. Play with the executable to understand its behavior (however, you MUST NOT decompile `./executable` or perform any other form of binary or strace/ltrace analysis on it)
|
| 98 |
+
3. Write the source code to implement the behavior
|
glauth--glauth.be396ae/solution/solve.sh
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Oracle-only ceiling check. The reference is execute-only for normal agents;
|
| 3 |
+
# because the oracle runs as the owning `agent` user it can temporarily add read
|
| 4 |
+
# permission and encode the binary for Harbor's normal artifact handoff.
|
| 5 |
+
set -euo pipefail
|
| 6 |
+
test -f ./executable
|
| 7 |
+
chmod u+r ./executable
|
| 8 |
+
python3 - <<'PY'
|
| 9 |
+
import base64
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
Path(".programgym_oracle_reference").write_bytes(
|
| 13 |
+
base64.b64encode(Path("executable").read_bytes())
|
| 14 |
+
)
|
| 15 |
+
PY
|
| 16 |
+
chmod u-r ./executable
|
| 17 |
+
cat > compile.sh <<'EOF'
|
| 18 |
+
#!/usr/bin/env bash
|
| 19 |
+
set -euo pipefail
|
| 20 |
+
if [ -f ./.programgym_oracle_reference ]; then
|
| 21 |
+
python3 - <<'PY'
|
| 22 |
+
import base64
|
| 23 |
+
from pathlib import Path
|
| 24 |
+
|
| 25 |
+
Path("executable").write_bytes(
|
| 26 |
+
base64.b64decode(Path(".programgym_oracle_reference").read_bytes())
|
| 27 |
+
)
|
| 28 |
+
PY
|
| 29 |
+
fi
|
| 30 |
+
test -f ./executable
|
| 31 |
+
chmod +x ./executable
|
| 32 |
+
EOF
|
| 33 |
+
chmod +x compile.sh
|
glauth--glauth.be396ae/task.toml
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
schema_version = "1.3"
|
| 2 |
+
source = "ProgramGym"
|
| 3 |
+
artifacts = [
|
| 4 |
+
"/logs/verifier/programgym_eval.json",
|
| 5 |
+
"/logs/verifier/harbor_diagnostics.json",
|
| 6 |
+
"/logs/verifier/programgym_eval.log",
|
| 7 |
+
"/logs/verifier/reward.json",
|
| 8 |
+
"/logs/verifier/reward.txt",
|
| 9 |
+
# Keep agent/runtime state out of the submission handoff. In particular,
|
| 10 |
+
# Claude Code installs an absolute symlink under .local/bin; transferring it
|
| 11 |
+
# makes Python's safe tar extraction reject the entire workspace archive.
|
| 12 |
+
{ source = "/workspace", exclude = [
|
| 13 |
+
"executable",
|
| 14 |
+
".git",
|
| 15 |
+
".bashrc",
|
| 16 |
+
".cache",
|
| 17 |
+
".cc-switch",
|
| 18 |
+
".claude",
|
| 19 |
+
".local",
|
| 20 |
+
] },
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
[task]
|
| 24 |
+
name = "programgym/glauth--glauth.be396ae"
|
| 25 |
+
description = "Synthetic ProgramGym cleanroom reconstruction task for glauth/glauth"
|
| 26 |
+
authors = [{ name = "Harbor ProgramGym Synthetic Adapter" }]
|
| 27 |
+
keywords = ["programgym", "synthetic", "reverse-engineering", "cleanroom", "go"]
|
| 28 |
+
|
| 29 |
+
[metadata]
|
| 30 |
+
source = "ProgramGym"
|
| 31 |
+
instance_id = "glauth__glauth.be396ae"
|
| 32 |
+
repository = "glauth/glauth"
|
| 33 |
+
commit = "be396ae6356a0b50affcd6a947e5cfcc00bc49db"
|
| 34 |
+
language = "go"
|
| 35 |
+
difficulty = "easy"
|
| 36 |
+
difficulty_score = 1.7413092088995694
|
| 37 |
+
test_branches = 4
|
| 38 |
+
test_count = 242
|
| 39 |
+
|
| 40 |
+
[agent]
|
| 41 |
+
timeout_sec = 14400
|
| 42 |
+
user = "agent"
|
| 43 |
+
network_mode = "allowlist"
|
| 44 |
+
allowed_hosts = ["api.anthropic.com", "api.openai.com"]
|
| 45 |
+
|
| 46 |
+
[verifier]
|
| 47 |
+
timeout_sec = 7200
|
| 48 |
+
user = "root"
|
| 49 |
+
environment_mode = "separate"
|
| 50 |
+
|
| 51 |
+
[verifier.env]
|
| 52 |
+
PROGRAMGYM_XDIST_WORKERS = "8"
|
| 53 |
+
|
| 54 |
+
[verifier.environment]
|
| 55 |
+
build_timeout_sec = 1800
|
| 56 |
+
cpus = 8
|
| 57 |
+
memory_mb = 16384
|
| 58 |
+
storage_mb = 30720
|
| 59 |
+
gpus = 0
|
| 60 |
+
workdir = "/workspace"
|
| 61 |
+
|
| 62 |
+
[environment]
|
| 63 |
+
network_mode = "public"
|
| 64 |
+
build_timeout_sec = 1800
|
| 65 |
+
cpus = 8
|
| 66 |
+
memory_mb = 16384
|
| 67 |
+
storage_mb = 30720
|
| 68 |
+
gpus = 0
|
| 69 |
+
workdir = "/workspace"
|
glauth--glauth.be396ae/tests/Dockerfile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
ENV RUSTUP_DIST_SERVER="https://static.rust-lang.org"
|
| 4 |
+
ENV RUSTUP_UPDATE_ROOT="https://static.rust-lang.org/rustup"
|
| 5 |
+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
| 6 |
+
ENV CARGO_REGISTRIES_CRATES_IO_INDEX="sparse+https://index.crates.io/"
|
| 7 |
+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
| 8 |
+
ENV GOPROXY="https://proxy.golang.org,direct"
|
| 9 |
+
ENV GOSUMDB=sum.golang.google.cn
|
| 10 |
+
ENV GOTOOLCHAIN=auto
|
| 11 |
+
ENV UV_INSECURE_HOST=""
|
| 12 |
+
ENV UV_INDEX_URL="https://pypi.org/simple"
|
| 13 |
+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 14 |
+
ENV UV_CACHE_DIR=/workspace/.cache/uv
|
| 15 |
+
ENV npm_config_registry="https://registry.npmjs.org/"
|
| 16 |
+
ENV npm_config_strict_ssl=false
|
| 17 |
+
ENV npm_config_cache=/workspace/.cache/npm
|
| 18 |
+
ENV PIP_INDEX_URL="https://pypi.org/simple"
|
| 19 |
+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
| 20 |
+
ENV PIP_TRUSTED_HOST=""
|
| 21 |
+
ENV HOME=/workspace
|
| 22 |
+
ENV XDG_CACHE_HOME=/workspace/.cache
|
| 23 |
+
ENV PIP_CACHE_DIR=/workspace/.cache/pip
|
| 24 |
+
ENV PYTHONUSERBASE=/workspace/.local
|
| 25 |
+
ENV GOROOT=/usr/local/go
|
| 26 |
+
ENV GOPATH=/workspace/.go
|
| 27 |
+
ENV GOCACHE=/workspace/.cache/go-build
|
| 28 |
+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 29 |
+
ENV PATH=/opt/programgym-venv/bin:/usr/local/go/bin:/workspace/.go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
| 30 |
+
ENV PAGER=cat
|
| 31 |
+
ENV MANPAGER=cat
|
| 32 |
+
ENV LESS=-R
|
| 33 |
+
ENV TQDM_DISABLE=1
|
| 34 |
+
ENV VIRTUAL_ENV=/opt/programgym-venv
|
| 35 |
+
RUN apt-get update && apt-get install -y --no-install-recommends bash build-essential ca-certificates git make pkg-config python3 python3-pip curl wget xz-utils unzip zip bzip2 zstd patch file binutils python3-venv tar && rm -rf /var/lib/apt/lists/*
|
| 36 |
+
COPY programgym-go.tar.gz /tmp/programgym-go.tar.gz
|
| 37 |
+
RUN set -eux; rm -rf /usr/local/go; tar -C /usr/local -xzf /tmp/programgym-go.tar.gz; rm -f /tmp/programgym-go.tar.gz; if [ ! -x /usr/local/go/bin/go ]; then echo "official Go tarball did not create /usr/local/go/bin/go" >&2; exit 1; fi; /usr/local/go/bin/go version
|
| 38 |
+
RUN python3 -m venv /opt/programgym-venv && /opt/programgym-venv/bin/python -m pip install --no-cache-dir --only-binary=:all: pytest pytest-xdist coverage
|
| 39 |
+
WORKDIR /workspace
|
| 40 |
+
ADD workspace.tar.gz /workspace/
|
| 41 |
+
COPY executable /workspace/executable
|
| 42 |
+
COPY download.sh /workspace/download.sh
|
| 43 |
+
RUN chmod 755 /workspace/download.sh
|
| 44 |
+
RUN ["bash","-lc","set -euo pipefail; cd /workspace; set -a; source /workspace/download.sh; set +a; python3 - <<'PY' > /etc/profile.d/programgym_download_env.sh\nimport os\nimport re\nimport shlex\nignored = {\"OLDPWD\", \"PWD\", \"SHLVL\", \"_\"}\nvalid_name = re.compile(r\"^[A-Za-z_][A-Za-z0-9_]*$\")\nfor key in sorted(os.environ):\n if key in ignored or key.startswith(\"BASH_FUNC_\") or not valid_name.fullmatch(key):\n continue\n value = os.environ[key]\n if \"\\n\" in value:\n continue\n print(f\"export {key}={shlex.quote(value)}\")\nPY\n"]
|
| 45 |
+
ENV BASH_ENV=/etc/profile.d/programgym_download_env.sh
|
| 46 |
+
RUN chmod 111 /workspace/executable
|
| 47 |
+
WORKDIR /workspace
|
| 48 |
+
# programgym-runtime-workspace-cleanup: v1
|
| 49 |
+
RUN ["bash","-lc","rm -f -- /workspace/download.sh /workspace/reference/build.sh && rm -rf -- /workspace/.programgym_build_env"]
|
| 50 |
+
# Harbor uses tests/ as the separate verifier build context. Start with the
|
| 51 |
+
# same toolchain as the agent, then remove every cleanroom workspace artifact.
|
| 52 |
+
RUN rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true \
|
| 53 |
+
&& mkdir -p /workspace /tests
|
| 54 |
+
|
| 55 |
+
# Synthetic cleanroom Dockerfiles commonly install Ubuntu's pytest-xdist 2.5.0.
|
| 56 |
+
# Installing a newer pytest alone leaves that apt package importable and creates
|
| 57 |
+
# an incompatible mixed apt/pip stack (xdist 2.5 imports the removed py.log).
|
| 58 |
+
# Install and constrain the verifier test runner as one coherent pip toolchain.
|
| 59 |
+
RUN printf 'pytest<9\n' > /etc/pip-constraint.txt
|
| 60 |
+
ENV PIP_CONSTRAINT=/etc/pip-constraint.txt
|
| 61 |
+
RUN python3 -m pip install --no-cache-dir --disable-pip-version-check \
|
| 62 |
+
'pytest<9' 'pytest-xdist>=3,<4' pytest-rerunfailures pytest-timeout
|
| 63 |
+
|
| 64 |
+
COPY test.sh /tests/test.sh
|
| 65 |
+
COPY programgym_evaluator.py /tests/programgym_evaluator.py
|
| 66 |
+
COPY programgym_task.json /tests/programgym_task.json
|
| 67 |
+
COPY blobs/ /tests/blobs/
|
| 68 |
+
RUN chmod +x /tests/test.sh
|
glauth--glauth.be396ae/tests/blobs/tests/generated_module_01.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:461d30769b23182a2082f52d6bfc5281be5a4aa96ecfd004aae88342bbe32fe8
|
| 3 |
+
size 6959
|
glauth--glauth.be396ae/tests/blobs/tests/generated_module_02.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a35fabf59e0fd4e1aae8f74875052c949c1a96f1edfd945055d62a687abacfb
|
| 3 |
+
size 17387
|
glauth--glauth.be396ae/tests/blobs/tests/generated_module_03.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c772fba111d1de6bf8e77fa0db0a1e98400834168d8494232c362871433d00a
|
| 3 |
+
size 10142
|
glauth--glauth.be396ae/tests/blobs/tests/generated_module_04.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d69f07bb4d9f20c1e5fec8bfae73493b5c95f3c7b3cb0ce8f69e3a1b49defdc2
|
| 3 |
+
size 11733
|