Skip to content

feat(benchmark): add EdgeBench adapter contracts - #2875

Open
steven-kid wants to merge 4 commits into
huangruiteng:mainfrom
steven-kid:codex/edgebench-adapter-20260808
Open

feat(benchmark): add EdgeBench adapter contracts#2875
steven-kid wants to merge 4 commits into
huangruiteng:mainfrom
steven-kid:codex/edgebench-adapter-20260808

Conversation

@steven-kid

Copy link
Copy Markdown
Collaborator

Summary

  • add a fail-closed EdgeBench/SForge readiness contract for one public task
  • add a bounded no-execution run plan and compact final_result.json reducer
  • expose edgebench-preflight, edgebench-run-plan, and edgebench-result-reduce
  • document SForge ownership, 12-hour/cost gates, and the public evidence boundary

Validation

  • python3 examples/edgebench-benchmark-adapter-smoke.py
  • python3 examples/benchmark-core-adapter-contract-smoke.py
  • python3 examples/cli-benchmark-dispatch-command-modularization-smoke.py
  • python3 examples/benchmark-developer-workflow-doc-smoke.py
  • python3 examples/cli-agents-last-exam-command-modularization-smoke.py
  • PYTHONPATH=$PWD workspace/.venv/bin/python -m pytest -q tests/benchmarks tests/test_benchmark_ledger_countability.py tests/test_cli_entrypoint.py (62 passed)
  • ruff check and ruff format --check on changed Python surfaces
  • loopx check public boundary scan: 6 files clean
  • CLI output base/head differential on a complete exact-main archive: 97/97 rows, no candidate-only rows, no review signals

Holds

  • no EdgeBench task, Docker container, model API, upload, or submission was run
  • standard premerge selected 18 checks; 17 passed and the output-budget canary timed out only while materializing an origin/main worktree from the local partial clone. The same differential passed in 23 seconds against a complete archive of the exact base commit.
  • benchmark-sensitive changes require maintainer review; this PR is not eligible for self-merge

wangyuchao.404 and others added 3 commits August 8, 2026 12:57
Add fail-closed SForge preflight, bounded single-task planning, and compact result reduction without launching benchmark work.

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Document the provider ownership split, no-execution command flow, long-run cost gate, and compact evidence boundary.

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Exercise ready and blocked preflight, forged contract rejection, budget limits, compact result reduction, CLI behavior, and public boundaries.

Co-authored-by: TRAE CLI <noreply@bytedance.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes

Reviewed exact head 8fd614ae. The no-execution boundary and CLI wiring are well done, but the compact result reducer can mark an impossible metric as countable.

Findings

  • P1: reduce_edgebench_final_result accepts any finite best_pass_rate, including values outside [0, 1]. loopx/benchmark_adapters/edgebench.py:230-231 reads it with _optional_number, and the blocker block at lines 244-256 never checks range. I reproduced best_pass_rate=1.5 with valid round counts and runtime; the function returns countable=True with first_blocker="compact_edgebench_result_ready". A pass rate above 1 is not valid EdgeBench evidence and must fail closed before the compact result can be counted.

Minimum fix: reject best_pass_rate outside [0, 1] (and negative values) with a stable blocker such as edgebench_pass_rate_out_of_range; add negative smoke coverage for 1.5 and -0.1.

Validation

  • examples/edgebench-benchmark-adapter-smoke.py: passed.
  • tests/benchmarks + tests/test_benchmark_ledger_countability.py + tests/test_cli_entrypoint.py: 62 passed.
  • benchmark-core-adapter-contract-smoke.py, cli-benchmark-dispatch-command-modularization-smoke.py, benchmark-developer-workflow-doc-smoke.py: passed.
  • ruff check, py_compile, git diff --check: passed.
  • GitHub pytest/build on this head: passed.

Merge decision: hold until the pass-rate range validation and negative smoke are added.

Reject compact EdgeBench results whose best_pass_rate falls outside [0,1], and cover upper and lower out-of-range values.

Co-authored-by: TRAE CLI <noreply@bytedance.com>
@steven-kid

Copy link
Copy Markdown
Collaborator Author

Addressed the requested pass-rate validation in 6e85bcc4.

  • reduce_edgebench_final_result now adds the stable blocker edgebench_pass_rate_out_of_range whenever best_pass_rate is outside [0, 1].
  • Added focused negative coverage for both 1.5 and -0.1.
  • Boundary values remain valid: 0.0 and 1.0 stay countable when the other compact fields are valid.

Validation:

  • python3 examples/edgebench-benchmark-adapter-smoke.py
  • direct reproduction: 1.5/-0.1 -> countable=False, 0.0/1.0 -> countable=True
  • python3 examples/benchmark-core-adapter-contract-smoke.py
  • python3 examples/cli-benchmark-dispatch-command-modularization-smoke.py
  • python3 examples/benchmark-developer-workflow-doc-smoke.py
  • focused pytest: 62 passed
  • Ruff lint/format, py_compile, git diff --check, and public boundary scan passed
  • standard premerge automatic checks: 18/18 passed; benchmark-sensitive maintainer review hold remains

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Reviewed exact head 6e85bcc4. No blocking findings.

The prior pass-rate validation gap is fixed: best_pass_rate outside [0, 1] now returns countable=False with edgebench_pass_rate_out_of_range, and boundary values 0.0/1.0 remain countable. Negative coverage for 1.5 and -0.1 is included.

Validation

  • examples/edgebench-benchmark-adapter-smoke.py: passed.
  • examples/benchmark-core-adapter-contract-smoke.py, cli-benchmark-dispatch-command-modularization-smoke.py, benchmark-developer-workflow-doc-smoke.py: passed.
  • tests/benchmarks + tests/test_benchmark_ledger_countability.py + tests/test_cli_entrypoint.py: 62 passed.
  • Direct reproduction: 1.5/-0.1 -> countable=False; 0.0/1.0 -> countable=True.
  • ruff check, git diff --check: passed.
  • GitHub build/dependency-review on this head: pass; pytest pending at review time.

Merge decision: approved after reviewer.

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