← Back to Pull requests

Add the SWE-bench benchmark's dataset manifest, trajectory, grader and report types #94

Closed
unknown closed this pull request without merging on Oct 16, 2026 20:06 UTC
View on GitHub
unknown unknown commented on Oct 15, 2026 19:50 UTC
Author

First of three PRs for the Fast Substrate RL benchmark on SWE-bench Verified (go/substrate-rl-benchmarks, Fast rung). This one holds the data types and nothing that talks to a cluster:

  • dataset.go: the JSONL manifest, one record per SWE-bench instance (digest-pinned task image, gold patch, test patch, the harness eval script, FAIL_TO_PASS / PASS_TO_PASS, the repo's log parser), plus selection by id, limit and an exclusion list.

  • trajectory.go and trajectories/: the YAML rollout a task replays (run a command or write a file, with think time, timeout, expected exit, one reward step). The built-in swebench-gold does what a SWE agent does with the gold patch standing in for the model's edit, and ships swebench-grade.py into the sandbox. Grading matches the SWE-bench harness: the grader parses the log with the repo's parser and checks the FAIL_TO_PASS and PASS_TO_PASS tests under the harness's rules (skips, truncated parametrized ids, invalid runs). Neither the script's nor the test command's exit code is the verdict.

  • events.go: one JSON line per operation (create, ttfi, wake, step, task, suspend, delete, step_barrier, park, run) with wall time, attempts, exit code, reward and an output tail.

  • report.go: percentiles, failure and retry counts per event, a per-step table, the most frequent errors, and the unresolved instances in exclude-file format.
  • Tests cover manifest parsing and selection, trajectory validation and rendering (including the json template function and write.file), the report, and the grader (benchmarking/swebench/tests, added in PR 3 alongside the Python tooling).

    The layout mirrors substrate's internal/benchmarking/boomer so a user class can be lifted into that harness later; it is not imported because Go does not allow importing another module's internal packages.

    Diff: 229 lines (+171 / -58) across 2 files Reviewer: tomergee Review duration: 1455m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 229 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.325
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #94"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37.0% (MEDIUM) · Higher = larger blast radius
    37.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%