ENVIRONMENT / SWE-BENCH

SWE-bench Verified

A patch must fix the issue without breaking the rest.

Open benchmark
src/ports.py · patch preview- return [int(t) for t in raw.split(",")]+ return [int(t) for t in raw.split(",")+ if t.strip()]FAIL_TO_PASS → passPASS_TO_PASS → pass
TASKCode repair
ACTIONrepository patch
BUDGETOne illustrative instance
REWARDresolved · 0 / 1

01 / TASK SPEC

Meet the task.

TASK BRIEF

Empty fields between delimiters cause an exception

parse_ports(",80,,443,") should return [80, 443] but calls int() on empty strings. Keep normal behavior; non-numeric fields must still raise.

def parse_ports(raw):
    return [int(t) for t in raw.split(",")]

Original repair task.

CANDIDATE PATCH / SEPARATE JUDGEAGENT WORKSPACEissue + base repository + candidate patchCLEAN JUDGE REPOSITORYbase + candidate patch + hidden test_patchFAIL_TO_PASS: all passPASS_TO_PASS: all passresolved = 1
Evidence visualization

02 / EPISODE REPLAY

Replay observation through submission.

Pick a step to see tool calls, budget and verdict reasons.

Crucible / swe-benchDEMO EPISODE
STEP 01 / 05

Reproduce the issue

parse_ports(",80,,443,")
→ ValueError: invalid literal for int()

Reproduce before patching.

1 / 5

03 / VERIFIER → REWARD

Every score traces back to evidence.

Itemized verdicts keep evidence; reward follows explicit formulas and gates.

VERIFIER REPORT

What passed? What failed?

  • PASS
    FAIL_TO_PASS

    Repair tests for empty fields, empty input and whitespace pass.

  • PASS
    PASS_TO_PASS

    Regression tests for normal parsing and invalid fields pass.

  • NOTE
    Verification basis

    resolved only when both sets fully pass.

REWARD / DEMO EXAMPLE

1Demo example
R = 1[all FAIL_TO_PASS ∧ all PASS_TO_PASS]
  = 1[true ∧ true] = 1
FAIL_TO_PASS1.000
PASS_TO_PASS1.000

Fixing the issue and preserving behavior are both required.

04 / ENVIRONMENT SPEC

Make reproduction conditions explicit.

Environment spec
task_specIssue, base commit, image, test config
observationIssue and base repository
action_spaceEdit files, self-check, submit patch
verifierApply the patch to a clean repo; run hidden tests
artifactsPatch, build and test logs, verifier version

Evidence and verification integrity

  • gold patch and test_patch never enter the Agent environment.
  • Pin base and image; distinguish build failures from test failures.

SWE-bench Verified: 500 human-validated instances, judged by FAIL_TO_PASS and PASS_TO_PASS.

Official benchmark reference ↗