feat(benchmark): add EdgeBench adapter contracts - #2875
Conversation
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
left a comment
There was a problem hiding this comment.
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_resultaccepts any finitebest_pass_rate, including values outside[0, 1].loopx/benchmark_adapters/edgebench.py:230-231reads it with_optional_number, and the blocker block at lines 244-256 never checks range. I reproducedbest_pass_rate=1.5with valid round counts and runtime; the function returnscountable=Truewithfirst_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>
|
Addressed the requested pass-rate validation in
Validation:
|
huangruiteng
left a comment
There was a problem hiding this comment.
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.
Summary
final_result.jsonreduceredgebench-preflight,edgebench-run-plan, andedgebench-result-reduceValidation
python3 examples/edgebench-benchmark-adapter-smoke.pypython3 examples/benchmark-core-adapter-contract-smoke.pypython3 examples/cli-benchmark-dispatch-command-modularization-smoke.pypython3 examples/benchmark-developer-workflow-doc-smoke.pypython3 examples/cli-agents-last-exam-command-modularization-smoke.pyPYTHONPATH=$PWD workspace/.venv/bin/python -m pytest -q tests/benchmarks tests/test_benchmark_ledger_countability.py tests/test_cli_entrypoint.py(62 passed)ruff checkandruff format --checkon changed Python surfacesloopx checkpublic boundary scan: 6 files cleanHolds
origin/mainworktree from the local partial clone. The same differential passed in 23 seconds against a complete archive of the exact base commit.