Skip to content

feat: add HumanEval benchmark tasks - #16

Merged
yichen14 merged 8 commits into
proteus-evolve:mainfrom
dukewillbe185:feat/humaneval-benchmark
Aug 23, 2026
Merged

feat: add HumanEval benchmark tasks#16
yichen14 merged 8 commits into
proteus-evolve:mainfrom
dukewillbe185:feat/humaneval-benchmark

Conversation

@dukewillbe185

Copy link
Copy Markdown
Collaborator

Summary

  • add an OpenAI HumanEval BenchTask adapter with official gzipped JSONL discovery, caching, and PROTEUS_HUMANEVAL_PATH
  • keep canonical solutions and checks out of the task workspace, and isolate candidate execution from the trusted verifier through the injected grader sandbox
  • support prompt-defined helpers used by official HumanEval checks while the candidate entry point stays behind a subprocess proxy
  • wire humaneval:HumanEval/<id> into the CLI and update benchmark docs and the roadmap
  • add fabricated official-format tests to the pytest and no-pytest offline gates

Verification

  • ruff check .
  • pytest tests/ -q — 157 passed, 1 skipped
  • python tests/run_offline.py — 137 passed, 0 failed
  • official dataset compatibility check — all 164 canonical solutions passed
  • real-data spot check — HumanEval/0 seeded stub scored 0.0; canonical solution scored 1.0

The local Docker daemon was unavailable, so the official-data compatibility run used the repository's trusted test sandbox. Production grading still routes through run_python and never falls back to host execution.

Dataset

HumanEval is sourced from openai/human-eval under the MIT License. The dataset is downloaded on first use and is not vendored.

@yichen14

Copy link
Copy Markdown
Collaborator

Reviewed in full (architecture walk-through + local gate: ruff clean, 157 passed / 1 skipped, offline runner 137, test_humaneval.py 6/6 under a hard socket-level network block). The parent/worker isolation model carries over from the MBPP pack correctly, and the driver-side execution of prompt helpers is the right call for the official check functions. Two non-blocking follow-ups worth tracking:

1. Pin the dataset revision and verify a checksum

DATA_URL points at openai/human-eval master (proteus/bench/humaneval.py), so the first-use download is neither revision-pinned nor integrity-checked — the same finding already open against the MBPP pack. openai/human-eval is effectively frozen, so the practical risk is lower than MBPP's, but the reproducibility argument is identical: if upstream ever moves, scores drift silently and the manifest has no way to notice. Suggested fix (same shape for both packs): replace master with a commit SHA in the URL and compare a module-constant sha256 after download, keeping the PROTEUS_HUMANEVAL_PATH / explicit-path bypasses unverified as user-supplied.

2. Extract the shared isolation harness before a third benchmark lands

The _CODEC / _WORKER / _DRIVER scaffolding is ~150 lines duplicated from proteus/bench/mbpp.py (the codec block differs by 4 lines out of 95, essentially just the error-message prefix). That was the right trade for one sibling, but a third pack would make it three copies of security-critical code — and today the adversarial test suite (forged reports, early exit, module shadowing, patched builtins) lives only on the MBPP side while HumanEval inherits the properties by construction rather than by test. A shared proteus/bench/_isolation.py with one adversarial suite would let every pack inherit both the machinery and its tests.

Neither blocks this PR.

@yichen14

Copy link
Copy Markdown
Collaborator

Re-reviewed the update end to end — this is outstanding work.

Both review items landed properly: I re-verified the pins empirically (downloaded both pinned URLs; the sha256 constants match the real bytes), and _isolation.py + the shared adversarial suite is exactly the consolidation the packs needed. What impressed me most is what you did beyond the ask: the executor result channel moving to a dedicated inherited fd makes report forgery structurally impossible rather than merely unprofitable, the process-group SIGKILL at both tiers closes the stray-grandchild vector, and install_driver's O_EXCL | O_NOFOLLOW handling shows real attention to the symlink surface. The design doc is a bonus most contributions never include.

Local gate on b53393a: ruff clean, 165 passed / 1 skipped, offline runner 145, and all four benchmark suites (31 tests) pass under a hard socket-level network block.

Three PRs in (#12, #14, #16), each one raising the bar — thank you for the consistently excellent contributions. Merging.

@yichen14
yichen14 merged commit 49eeff3 into proteus-evolve:main Aug 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants