Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Jin-Guo Liu and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ preflight:

## Run the budgeted bug-finding agent via Docker → writes ./out/submission.json.
## This RUNS the benchmark locally; it does NOT submit — submitting is a separate step
## (open a GitHub PR adding the file, see SUBMISSION.md). Config lives in submission.env
## (open a GitHub PR adding the file, see CONTRIBUTING.md). Config lives in submission.env
## (copy submission.env.example); run `make preflight` first to validate it.
run:
@if [ ! -f "$(ENV_FILE)" ]; then \
echo "No $(ENV_FILE) — copy submission.env.example and fill it in (then: make preflight)"; exit 1; fi
mkdir -p out
docker run --rm --env-file "$(ENV_FILE)" -v "$(PWD)/out:/out" $(IMAGE)
@echo "Wrote ./out/submission.json — now submit it via a GitHub PR (see SUBMISSION.md)."
@echo "Wrote ./out/submission.json — now submit it via a GitHub PR (see CONTRIBUTING.md)."

## Score all submissions in SUBS_DIR with the zero-trust backend (needs pred).
## Writes scored results + leaderboard.json into SCORED.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A benchmark that measures how efficiently AI models find bugs in reduction rules from the [problem-reductions](https://github.com/CodingThrust/problem-reductions) library (290+ rules).

The leaderboard is a static site (`site/`) published to **GitHub Pages**. Submitting is a **GitHub pull request** that adds `submissions/<handle>/<model>.json`; the submission is re-verified on the PR (after a maintainer approves the run) and the result must pass before merge. See `SUBMISSION.md` to run and submit.
The leaderboard is a static site (`site/`) published to **GitHub Pages**. Submitting is a **GitHub pull request** that adds `submissions/<handle>/<model>.json`; the submission is re-verified on the PR (after a maintainer approves the run) and the result must pass before merge. See [CONTRIBUTING.md](CONTRIBUTING.md) to run and submit.

## What this measures

Expand Down Expand Up @@ -46,7 +46,7 @@ class MyRunner(AgentRunner):

Then pass it to `Scheduler` in `benchmark/scheduler.py`. See `MiniSweRunner` for a full example.

A run is packaged as a `submission.json` (envelope around the per-rule rows, see `benchmark/submission.schema.json`) and submitted as a **GitHub pull request** that adds it under `submissions/`; the PR re-verifies every certificate with `pred` (after a maintainer approves the run) and must pass before merge. See `SUBMISSION.md`.
A run is packaged as a `submission.json` (envelope around the per-rule rows, see `benchmark/submission.schema.json`) and submitted as a **GitHub pull request** that adds it under `submissions/`; the PR re-verifies every certificate with `pred` (after a maintainer approves the run) and must pass before merge. See [CONTRIBUTING.md](CONTRIBUTING.md).

## How to run locally

Expand Down
18 changes: 9 additions & 9 deletions benchmark/tests/test_docs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Structural checks for the two root docs: README.md (overview) and SUBMISSION.md
Structural checks for the two root docs: README.md (overview) and CONTRIBUTING.md
(the single run-and-submit guide). No rendering, no external calls.
All tests are marked @pytest.mark.judgment.
"""
Expand All @@ -10,7 +10,7 @@

REPO_ROOT = Path(__file__).parent.parent.parent
README = REPO_ROOT / "README.md"
SUBMISSION = REPO_ROOT / "SUBMISSION.md"
GUIDE = REPO_ROOT / "CONTRIBUTING.md"


def _text(path: Path) -> str:
Expand Down Expand Up @@ -38,14 +38,14 @@ def test_readme_has_metrics_section(self):
assert "bugs/ktok" in t or "bugs_per_ktok" in t


class TestSubmission:
def test_submission_exists(self):
assert SUBMISSION.exists(), "SUBMISSION.md missing from repo root"
class TestGuide:
def test_guide_exists(self):
assert GUIDE.exists(), "CONTRIBUTING.md (run-and-submit guide) missing from repo root"

def test_submission_has_certificate_format(self):
t = _text(SUBMISSION)
def test_guide_has_certificate_format(self):
t = _text(GUIDE)
assert "source" in t and "bundle" in t and "violation" in t

def test_submission_has_github_pr_flow(self):
t = _text(SUBMISSION)
def test_guide_has_github_pr_flow(self):
t = _text(GUIDE)
assert "pull request" in t and "github pages" in t
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ CMD ["--calibrate"]
# Run (all config — any provider — in submission.env; key never baked in):
# docker run --rm --env-file submission.env -v "$PWD/out:/out" \
# problem-reductions-runner:v0.6.0
# # → ./out/submission.json (see submission.env.example / SUBMISSION.md)
# # → ./out/submission.json (see submission.env.example / CONTRIBUTING.md)
FROM runtime AS runner
ARG PR_REF
# Agent stack. requirements.txt pins mini-swe-agent (which pulls litellm) + anthropic.
Expand Down
2 changes: 1 addition & 1 deletion submissions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ submissions/<your-handle>/<model>.json
## How to submit

1. **Produce the file.** Run the dockerized runner at the fixed $20 budget (see
`../SUBMISSION.md`): `make run` → `out/submission.json`.
`../CONTRIBUTING.md`): `make run` → `out/submission.json`.
2. **Open a PR** adding it as `submissions/<your-handle>/<model>.json` — and nothing else
(a PR that also changes code won't be auto-scored; keep submissions in their own PR).
- An automated check validates the file against `benchmark/submission.schema.json`
Expand Down