Skip to content

feat(bench): run SWE-Gym through Harbor - #1239

Merged
i386 merged 2 commits into
mainfrom
public/harbor-swegym-integration
Aug 11, 2026
Merged

feat(bench): run SWE-Gym through Harbor#1239
i386 merged 2 commits into
mainfrom
public/harbor-swegym-integration

Conversation

@i386

@i386 i386 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • route Terminal-Bench and SWE-Gym through pinned Harbor ff69e554
  • add single-task SWE-Gym generation and official swegym-lite dataset selection
  • wire host-side Mesh API key/session handling and normalize Harbor metrics
  • fix Mesh linear-proposal pending-token handoff after accepted proposals

Root cause

Mesh advanced the authoritative decode position after an accepted linear proposal but did not retain those committed proposal tokens as the next plugin-host pending suffix. The host tracker then rejected later proposal queries with a pending-token count mismatch.

Validation

  • Sol high-rigor review: clean
  • cargo test -p skippy-bench: 78 passed
  • cargo test -p skippy-server --lib: 394 passed
  • cargo test -p mesh-native-serving-plugin-host: 31 passed
  • official Harbor SWE-Gym task reached 10 trajectory steps with no pending-suffix lifecycle errors; the local Qwen run timed out at 20 minutes before verifier completion

Do not merge this PR independently of the private-fork landing sequence.

Summary by CodeRabbit

  • New Features

    • Added SWE-Gym Lite evaluation support.
    • Added Harbor-based execution for Terminal-Bench and SWE-Gym, with task selection, session options, endpoints, and job artifacts.
    • Added standardized metrics based on Harbor trial results.
  • Documentation

    • Updated evaluation setup and usage guidance with pinned Harbor instructions, dataset details, and smoke-test examples.
  • Bug Fixes

    • Improved handling of incomplete evaluation trials.
    • Prevented duplicate token suffixes during linear decoding and ensured pending tokens are forwarded correctly.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request is currently a draft. Reviews will not take place until the PR is marked as ready for review.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The benchmark runner now uses pinned Harbor for Terminal-Bench and SWE-Gym Lite. It shares command generation, synchronization, artifacts, and metrics. Linear decoding now forwards accepted proposal tokens to pending input without duplicate suffixes.

Changes

Harbor evaluation integration

Layer / File(s) Summary
Evaluation contracts and registry
crates/skippy-bench/src/cli.rs, crates/skippy-bench/src/evals.rs, crates/skippy-bench/src/evals/registry.rs, crates/skippy-bench/README.md
Adds SWE-Gym, Harbor run arguments, pinned Harbor constants, and updated evaluation documentation.
Harbor command and repository execution
crates/skippy-bench/src/evals/adapters/*, crates/skippy-bench/src/evals/sync.rs
Routes both evaluations through Harbor, generates launcher scripts, validates task IDs, normalizes job names, and checks out the pinned revision.
Harbor artifacts, metrics, and validation
crates/skippy-bench/src/evals/run.rs, crates/skippy-bench/src/evals.rs
Reports Harbor job artifacts, parses trial rewards, handles missing results, and validates commands, synchronization, metrics, and fixtures.

Linear decode pending-token handling

Layer / File(s) Summary
Pending proposal token handoff
crates/skippy-server/src/frontend/linear_proposal/execution.rs, crates/skippy-server/src/frontend/local_generation/linear_decode.rs
Allows unsized token callbacks, injects proposal execution, and appends accepted proposal tokens to pending input once.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant EvalCLI
  participant HarborAdapter
  participant HarborRepository
  participant HarborJobs
  EvalCLI->>HarborRepository: sync pinned Harbor revision
  EvalCLI->>HarborAdapter: build evaluation command
  HarborAdapter->>HarborJobs: launch Terminal-Bench or SWE-Gym
  HarborJobs-->>EvalCLI: write job and trial artifacts
  EvalCLI->>HarborJobs: parse rewards and calculate metrics
Loading

Possibly related PRs

Suggested labels: Do not merge

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.85% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main feature: running SWE-Gym through the new Harbor integration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch public/harbor-swegym-integration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
crates/skippy-server/src/frontend/local_generation/linear_decode.rs (1)

298-330: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Exercise the receipt-to-query path in this test.

This test calls append_pending_linear_proposal_tokens and query_linear_proposal separately. It does not execute the call at lines 209-212 through try_execute_linear_proposal.

A regression that removes the receipt handoff, or clears pending tokens before the next query, would still pass. Drive a ready proposal and its receipt through try_execute_linear_proposal, then assert that the next PendingTokenIngress::propose call receives [41, 42] exactly once.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-server/src/frontend/local_generation/linear_decode.rs` around
lines 298 - 330, The test accepted_proposal_tokens_are_pending_on_the_next_query
currently bypasses try_execute_linear_proposal and therefore does not verify
receipt handoff. Update it to drive a ready proposal and its receipt through
try_execute_linear_proposal, then assert the subsequent
PendingTokenIngress::propose call receives [41, 42] exactly once, preserving the
existing no-proposal and pending-token expectations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/skippy-bench/src/evals/adapters/harbor.rs`:
- Around line 56-65: Remove the redundant format! wrapper inside the task_path
construction in the task_id map closure, returning the existing shell_quote
result directly while preserving the current task_root path selection and
fallback behavior.

In `@crates/skippy-bench/src/evals/run.rs`:
- Line 195: Remove the obsolete Terminal-Bench parsing path throughout the
evaluation code: delete terminal_bench_metrics, terminal_bench_output_path, and
the legacy parser test, then remove any now-unused imports or helpers. Update
stale documentation that describes Terminal-Bench token metrics or the
raw/terminal-bench format, while preserving the Harbor-based dispatch for
EvalId::TerminalBench.

---

Nitpick comments:
In `@crates/skippy-server/src/frontend/local_generation/linear_decode.rs`:
- Around line 298-330: The test
accepted_proposal_tokens_are_pending_on_the_next_query currently bypasses
try_execute_linear_proposal and therefore does not verify receipt handoff.
Update it to drive a ready proposal and its receipt through
try_execute_linear_proposal, then assert the subsequent
PendingTokenIngress::propose call receives [41, 42] exactly once, preserving the
existing no-proposal and pending-token expectations.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c91e9e97-9bf9-43d7-b365-49f5861ce6d7

📥 Commits

Reviewing files that changed from the base of the PR and between bdd0beb and c3f2661.

📒 Files selected for processing (9)
  • crates/skippy-bench/README.md
  • crates/skippy-bench/src/cli.rs
  • crates/skippy-bench/src/evals.rs
  • crates/skippy-bench/src/evals/adapters/harbor.rs
  • crates/skippy-bench/src/evals/adapters/mod.rs
  • crates/skippy-bench/src/evals/registry.rs
  • crates/skippy-bench/src/evals/run.rs
  • crates/skippy-bench/src/evals/sync.rs
  • crates/skippy-server/src/frontend/local_generation/linear_decode.rs

Comment thread crates/skippy-bench/src/evals/adapters/harbor.rs
Comment thread crates/skippy-bench/src/evals/run.rs
@i386
i386 marked this pull request as ready for review August 11, 2026 20:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/skippy-bench/src/cli.rs (1)

150-170: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Wire cacheline_state into the Cacheline evaluation or remove the option. The parsed --cacheline-state value is never read, so a supplied path has no effect.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/skippy-bench/src/cli.rs` around lines 150 - 170, Wire the parsed
cacheline_state option into the Cacheline evaluation flow so the supplied
PathBuf controls the smoke state directory and its assertion files. Locate the
evaluation entry point and pass this value through its configuration or function
parameters; if no Cacheline evaluation consumes it, remove the cacheline_state
field and CLI argument instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@crates/skippy-bench/src/cli.rs`:
- Around line 150-170: Wire the parsed cacheline_state option into the Cacheline
evaluation flow so the supplied PathBuf controls the smoke state directory and
its assertion files. Locate the evaluation entry point and pass this value
through its configuration or function parameters; if no Cacheline evaluation
consumes it, remove the cacheline_state field and CLI argument instead.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 72c255b0-7742-4d99-a9c5-42e72569f107

📥 Commits

Reviewing files that changed from the base of the PR and between c3f2661 and acb9587.

📒 Files selected for processing (8)
  • crates/skippy-bench/README.md
  • crates/skippy-bench/src/cli.rs
  • crates/skippy-bench/src/evals.rs
  • crates/skippy-bench/src/evals/adapters/harbor.rs
  • crates/skippy-bench/src/evals/adapters/terminal_bench.rs
  • crates/skippy-bench/src/evals/run.rs
  • crates/skippy-server/src/frontend/linear_proposal/execution.rs
  • crates/skippy-server/src/frontend/local_generation/linear_decode.rs
💤 Files with no reviewable changes (1)
  • crates/skippy-bench/src/evals/adapters/terminal_bench.rs
🚧 Files skipped from review as they are similar to previous changes (4)
  • crates/skippy-bench/src/evals/run.rs
  • crates/skippy-bench/src/evals/adapters/harbor.rs
  • crates/skippy-bench/README.md
  • crates/skippy-bench/src/evals.rs

@i386 i386 removed the Do not merge label Aug 11, 2026
@ndizazzo
ndizazzo self-requested a review August 11, 2026 21:38
@i386
i386 merged commit 3db374e into main Aug 11, 2026
47 checks passed
@i386
i386 deleted the public/harbor-swegym-integration branch August 11, 2026 21:49
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