Skip to content

feat(opencode): add eval command for agent benchmark harness - #105

Merged
DevFlex-AI merged 2 commits into
devfrom
eval-harness
Jul 31, 2026
Merged

feat(opencode): add eval command for agent benchmark harness#105
DevFlex-AI merged 2 commits into
devfrom
eval-harness

Conversation

@DevFlex-AI

@DevFlex-AI DevFlex-AI commented Jul 31, 2026

Copy link
Copy Markdown

Issue for this PR

Roadmap item "Agent evaluation benchmark harness" (README, Later section). No linked issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds bolt eval, a first increment of the agent evaluation benchmark harness. Eval cases are markdown files (same frontmatter convention as agent/command config): the frontmatter carries model/agent/timeout overrides, optional fixture files, and grading checks; the body is the prompt. The harness runs each case against an in-process server in its own isolated temp workspace, waits for the session to go idle, auto-approves tool permissions (questions and plan mode stay denied), grades the workspace, and reports pass/fail plus cost and tokens from session.get. Exit code 1 when any case fails; --format json emits one ndjson object per case plus a summary, --keep preserves workspaces for debugging.

A case looks like:

---
expect:
  - type: file_contains
    path: out.txt
    text: hello
  - type: command
    run: bun test
---
Create out.txt containing hello.

Check types in v1 are deterministic (file_exists, file_contains with text or regex, command exit code). Execution reuses the same in-process SDK path as bolt run (per-directory instance routing via createOpencodeClient's directory), so no server process or new plumbing is needed. This also lays the measurement groundwork for best-of-N ranking and model routing.

How did you verify your code works?

New subprocess end-to-end tests in packages/opencode/test/cli/eval/eval-process.test.ts using the cliIt fixture and the mock LLM: a passing case where the scripted model writes a file via the bash tool, a failing case, JSON report assertions, and the no-cases-found error path. bun test and bun typecheck pass in packages/opencode.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/adevloper152s-projects?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DevFlex-AI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8528d41c-776d-484f-9d57-db8b5d8328af

📥 Commits

Reviewing files that changed from the base of the PR and between 4e2f9d1 and 2ecacd6.

📒 Files selected for processing (4)
  • packages/opencode/src/cli/cmd/eval.ts
  • packages/opencode/src/cli/cmd/eval/case.ts
  • packages/opencode/src/index.ts
  • packages/opencode/test/cli/eval/eval-process.test.ts

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

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@DevFlex-AI
DevFlex-AI merged commit f66e234 into dev Jul 31, 2026
11 of 12 checks passed
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.

1 participant