Fzz1 commited on
Commit
58e101c
·
verified ·
1 Parent(s): 95fba99

pyshadowB: grading made safe against planted files in the rest of the corpus, 17583 tasks (22668 rows; 1790 security-domain, counted only): python path 15425, empty tests/pytest.ini 17583, test file to a fresh temp dir 13538, pytest config pinned 0, test path pinned to /tests 83, env script not sourced 2139; ; strict kill gate; tars rebuilt, tar==parquet; killed and river splits untouched; every other row and package byte-identical

Browse files
README.md CHANGED
@@ -78,6 +78,22 @@ cf = load_dataset("Fzz1/tb-full-data", "calibforge") # cf["calibforge_clean"]
78
 
79
 
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  ## Fix (2026-11-10): the current directory stays importable; grader test path pinned; env script not sourced, 1186 tasks
82
 
83
  **Python path (585 tasks).** In these tasks of the python-path fix above, every changed python call in `tests/test.sh` now also appends the current directory at the end of `sys.path` (before, only the tasks classified as needing it did), because some tests import modules installed under it. It stays after every installed module, so a planted file there still cannot replace a real one.
 
78
 
79
 
80
 
81
+ ## Fix (2026-11-10): grading made safe against planted files in the rest of the corpus, 17583 tasks
82
+
83
+ This extends the fixes above (which covered the 1,240 tasks of the current CalibForge seed set) to every other task with a package here.
84
+
85
+ **Python path (15425 tasks).** Every python call in `tests/test.sh` that put the current directory first on `sys.path` (`python -m ...` or `python -c ...`) now removes it before anything is imported and appends it at the end instead, so the tests can still import from it but a planted module never replaces a real one.
86
+
87
+ **pytest config (17583 tasks).** An empty `tests/pytest.ini` wherever `tests/` has no pytest config of its own, so a config search that reaches `/tests` stops there instead of climbing to `/`.
88
+
89
+ **Test file location (13538 tasks).** These `tests/test.sh` wrote the test file into the shared `/tmp` directory and ran pytest on it there, so a `conftest.py` or `pytest.ini` planted in `/tmp`, or a `pytest.ini` at `/`, would be loaded. They now write it into a fresh `mktemp -d` directory with an empty `pytest.ini` next to it and run pytest on that file.
90
+
91
+ **Test path (83 tasks).** These `tests/test.sh` chose the test file between `/tests` (uploaded fresh at grading) and another location the solver can create or edit; the variable is now always the `/tests` value. Honest runs already used it, and a planted copy elsewhere is no longer picked.
92
+
93
+ **Env script (2139 tasks).** These `tests/test.sh` sourced the uv or cargo env script, which the installer does not overwrite when a copy is already there, so a planted one could redefine commands or set pytest options. They now set `PATH` directly (all the script does) and unset `PYTEST_ADDOPTS` / `PYTEST_PLUGINS`.
94
+
95
+ Nothing else in these packages changes; the recorded `solution` and labels stay. 1790 of the tasks are security-domain tasks (counted, not named). Fixed rows: `calibforge_1030c800_fast` 533, `calibforge_clean` 2037, `calibforge_clean_v2` 1951, `calibforge_clean_v2_fast` 1951, `calibforge_fresh900_fast` 303, `calibforge_pick353_fast` 347, `calibforge_repair` 2007, `tmax_clean` 6080, `tmax_repair` 7459. 2 tasks with a python call that cannot be changed mechanically (a script on stdin) keep it for now. 1 task that use `/tmp` for the test outside this pattern keep it for now. `repair_hint` keeps any earlier note and adds the new one(s).
96
+
97
  ## Fix (2026-11-10): the current directory stays importable; grader test path pinned; env script not sourced, 1186 tasks
98
 
99
  **Python path (585 tasks).** In these tasks of the python-path fix above, every changed python call in `tests/test.sh` now also appends the current directory at the end of `sys.path` (before, only the tasks classified as needing it did), because some tests import modules installed under it. It stays after every installed module, so a planted file there still cannot replace a real one.
data/calibforge_1030c800_fast.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:27a4565cda3558ee907f453e31799bfc8846399032dacfe52af77c2789e08abd
3
- size 2788120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3dbd4f3442705085e6b6ff5f825cff7ac9075206b742908b4ade43449f223e8
3
+ size 2788550
data/calibforge_clean.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:71132be7f8cc4b6eb856c6367652912eebce03ca921e02217dfe7c9866784a33
3
- size 12597996
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4b846c388afa46e78427018743ec1ca1e76406d79e3bc7f62f74a9eaf2c59bd
3
+ size 12590936
data/calibforge_clean_v2.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0e6e617ab33a96ebd75e54f0191978f26dec13da50912d2b64e0e181ca161e56
3
- size 10055281
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9a118f018eba33501cb9a757b29f8e14ac6a6a05c19b9b606f900dbe79e2961
3
+ size 10064656
data/calibforge_clean_v2_fast.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:51fab2e439869876d44c8a07fe6c3cb604b3b27b089837cd4a811932622fae61
3
- size 9666589
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44d5dacc2be3d894cb909fd556e8f94c0f3fabfe3f7831e14c092ef17862f1b7
3
+ size 9675123
data/calibforge_fresh900_fast.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9d5385cd75d80f13045a1e0ec47a9ed7d9a9ed7a18efdefbb69cea07267bcf3e
3
- size 3880263
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e0906bbdc2babda7e76a499b73c09af3c8db97866519cff654439e4dd72e7d0
3
+ size 3881092
data/calibforge_pick353_fast.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:49adf62be3842d0360f2d58bcecc427c0c41a322606b98d81d76642470ce3733
3
- size 1218251
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22d40506a3fb4e4c5deb2e03b08dc67014c9a9fc15b18389e2623fd9aff491c6
3
+ size 1221178
data/calibforge_repair.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0ec3049eabc6dd36d2451bb8a5fc0c1b16121c3e0c3ea764b46c8cf583e22eef
3
- size 5596674
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cdcdd7cf01e0b27da3fdba31558d78c09ca9cd56b8d9882a97461822155d0e1
3
+ size 5609232
data/tasks-calibforge_1030c800_fast.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b18a3aab43b5c90a9b8fe1c01969ebebcfe4bf3931e4c635946cd5e6052a683f
3
- size 177735680
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6af725556c34d961cf65926ce0783bac5f2f502746cb305da0faf9ceeb49e4a
3
+ size 178114560
data/tasks-calibforge_clean.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dfe93a7b55f42fcea4fd62cffa984c042a4712e504c4e60374bb0fd8390f69e1
3
- size 1153628160
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7532f3d485974bc2d7046ddd4bd116156ab99d7fb7aca46484fc209c892b3600
3
+ size 1155092480
data/tasks-calibforge_clean_v2.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:04b1e0b4b4d2d14e9e14b848ecdc286fca735e9f0f2ee26e2676fd4e5222faeb
3
- size 472197120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62e91b9309da391ae67d2b7322494099362ba53025a2856e7e5d8be056d041c9
3
+ size 473600000
data/tasks-calibforge_clean_v2_fast.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:527ee1b3edec0970b233db9a759340f3d0098817f253498da7072bcea7f354fa
3
- size 472207360
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8330550727ce08e9efd047bcab77e17b7b63448d907011922450e1aaf805382b
3
+ size 473600000
data/tasks-calibforge_fresh900_fast.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:90d6f2d181755ed277bf3657e9f2ea50a8ca174932d2b5d08c9e807e7b0f731b
3
- size 178513920
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58fd1bbd853ef0d61d5a4c0f9c3698699fa2fa2525f5c580f8621c05b4696b73
3
+ size 178739200
data/tasks-calibforge_pick353_fast.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2bec957071fd767dfa0cde19ae673b8d472fc51b8769ca443cfffb8c43da314f
3
- size 98109440
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:906c0a2d32adc22ce50019b815447e33c03257678a4041b3e1edbf2fb19376fd
3
+ size 98375680
data/tasks-calibforge_repair.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:583aacc92d56760abad3dec49167afc1ecf10853b1540ff53cc5fe8a88770027
3
- size 784363520
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:497c62945c8f1cba00d1a7503043ffb5b73b1e0a48b3811b4b0f2cad90c00a00
3
+ size 785858560
data/tasks-tmax_clean.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7464cfb41e7bd02b0dccee1455e2101ce993fb3a8c3229be6c462b5c4dec33ed
3
- size 66478080
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99ef696d846e780df39550be60666f23c704672b13fd1b955f6c2eb090007e93
3
+ size 71229440
data/tasks-tmax_repair.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dcdad1e2b9fced15ff69835ee1460cc504b1a54e625b8fadc1529b014316601e
3
- size 88115200
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d302f4d1b63df6ee58c12224f9e4fdd51fb16cb73255d8dbaefee37b1318f553
3
+ size 93982720
data/tmax_clean.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9c36bd0f0d972be0cb7a7851095c824aa3ac8bea63dcfb0cb26a6eb0cb01b305
3
- size 41275340
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55a4be85575f5e2c7c9ba7c942b95559fddab01c3c784c0fddbfab85c799ea92
3
+ size 41280031
data/tmax_repair.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:74ac04d60afdfce381d249c2cf8c0de424fd5a6071f09ef8fc0edec54d30bb97
3
- size 43950800
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a758067addcc9cfd7e0b5188de27942748e62f4287e3f05b361a2a6a8e4a16d3
3
+ size 43982120