Clarify ORCA track semantics and remove legacy unsealer
Browse files- README.md +8 -4
- tools/unseal_statement.py +0 -67
README.md
CHANGED
|
@@ -48,10 +48,14 @@ cp .env.example .env
|
|
| 48 |
--include-task-name task_011_cell_migration_wound_healing
|
| 49 |
```
|
| 50 |
|
| 51 |
-
The 16
|
| 52 |
-
an ORCA-configured image are never distributed;
|
| 53 |
-
official provider and follow the runtime
|
| 54 |
-
[local-image tutorial](https://github.com/ApodexAI/FrontierAgent/blob/main/benchmarks/frontierchallenge/docs/providers/orca.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
Verify a downloaded solve package with:
|
| 57 |
|
|
|
|
| 48 |
--include-task-name task_011_cell_migration_wound_healing
|
| 49 |
```
|
| 50 |
|
| 51 |
+
The 16 task definitions that execute ORCA and their inputs are included
|
| 52 |
+
normally. ORCA itself and an ORCA-configured image are never distributed;
|
| 53 |
+
evaluators obtain ORCA from its official provider and follow the runtime
|
| 54 |
+
repository's [local-image tutorial](https://github.com/ApodexAI/FrontierAgent/blob/main/benchmarks/frontierchallenge/docs/providers/orca.md).
|
| 55 |
+
|
| 56 |
+
Track membership follows what a task executes, not software named in supplied
|
| 57 |
+
files. For example, `task_098_orca_claisen_thermochemistry` reads precomputed
|
| 58 |
+
ORCA output without running ORCA, so it remains in the open track.
|
| 59 |
|
| 60 |
Verify a downloaded solve package with:
|
| 61 |
|
tools/unseal_statement.py
DELETED
|
@@ -1,67 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
"""Unseal one or more FrontierChallenge English task statements."""
|
| 3 |
-
from __future__ import annotations
|
| 4 |
-
|
| 5 |
-
import argparse
|
| 6 |
-
import gzip
|
| 7 |
-
import hashlib
|
| 8 |
-
import hmac
|
| 9 |
-
import io
|
| 10 |
-
import struct
|
| 11 |
-
import tarfile
|
| 12 |
-
from pathlib import Path
|
| 13 |
-
|
| 14 |
-
MAGIC = b"FCREF1\n"
|
| 15 |
-
PASSWORD = "apodex.ai"
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
def decrypt(blob: bytes, password: str) -> bytes:
|
| 19 |
-
if not blob.startswith(MAGIC):
|
| 20 |
-
raise ValueError("not a FrontierChallenge sealed archive")
|
| 21 |
-
offset = len(MAGIC)
|
| 22 |
-
salt = blob[offset:offset + 16]
|
| 23 |
-
tag = blob[offset + 16:offset + 48]
|
| 24 |
-
ciphertext = blob[offset + 48:]
|
| 25 |
-
material = hashlib.pbkdf2_hmac(
|
| 26 |
-
"sha256", password.encode("utf-8"), salt, 200_000, dklen=64
|
| 27 |
-
)
|
| 28 |
-
enc_key, mac_key = material[:32], material[32:]
|
| 29 |
-
expected = hmac.new(mac_key, ciphertext, hashlib.sha256).digest()
|
| 30 |
-
if not hmac.compare_digest(tag, expected):
|
| 31 |
-
raise ValueError("wrong password or corrupt archive")
|
| 32 |
-
blocks = (len(ciphertext) + 31) // 32
|
| 33 |
-
stream = b"".join(
|
| 34 |
-
hmac.digest(enc_key, struct.pack(">Q", counter), "sha256")
|
| 35 |
-
for counter in range(blocks)
|
| 36 |
-
)[:len(ciphertext)]
|
| 37 |
-
return bytes(left ^ right for left, right in zip(ciphertext, stream))
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
def unseal(task: Path, password: str, force: bool) -> None:
|
| 41 |
-
target = task / "instruction.md"
|
| 42 |
-
if target.exists() and not force:
|
| 43 |
-
raise FileExistsError(f"{target} already exists; use --force to replace it")
|
| 44 |
-
plaintext = decrypt((task / "statement.fcref").read_bytes(), password)
|
| 45 |
-
with gzip.GzipFile(fileobj=io.BytesIO(plaintext), mode="rb") as gz:
|
| 46 |
-
with tarfile.open(fileobj=gz, mode="r:") as tar:
|
| 47 |
-
member = tar.getmember("instruction.md")
|
| 48 |
-
handle = tar.extractfile(member)
|
| 49 |
-
if handle is None:
|
| 50 |
-
raise ValueError(f"instruction.md missing from {task / 'statement.fcref'}")
|
| 51 |
-
target.write_bytes(handle.read())
|
| 52 |
-
print(target)
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
def main() -> int:
|
| 56 |
-
parser = argparse.ArgumentParser()
|
| 57 |
-
parser.add_argument("tasks", nargs="+", type=Path)
|
| 58 |
-
parser.add_argument("--password", default=PASSWORD)
|
| 59 |
-
parser.add_argument("--force", action="store_true")
|
| 60 |
-
args = parser.parse_args()
|
| 61 |
-
for task in args.tasks:
|
| 62 |
-
unseal(task, args.password, args.force)
|
| 63 |
-
return 0
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
if __name__ == "__main__":
|
| 67 |
-
raise SystemExit(main())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|