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
7 changes: 7 additions & 0 deletions .changeset/evals-root-folder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"muxon": patch
---

Eval tasks, hidden checks, fixtures and model matrices moved from `harness/testdata/eval` to a root `evals/` folder. With no `--tasks`, `muxon eval basket` now reads `evals/tasks/*.json`. Matrices are `evals/matrices/{default,ci,opencode}.yaml`.

**Upgrade:** scripts that pass `--matrix testdata/eval/...` or `--tasks 'testdata/eval/*.json'` need the new paths.
4 changes: 2 additions & 2 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
DEEPINFRA_API_KEY: ${{ secrets.DEEPINFRA_API_KEY }}
run: |
./muxon eval basket \
--matrix testdata/eval/matrix-ci.yaml \
--tasks 'testdata/eval/*.json' \
--matrix ../evals/matrices/ci.yaml \
--tasks '../evals/tasks/*.json' \
--trials 1 \
--concurrency 2 \
--budget-usd 5 \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ lint:
cd harness && golangci-lint run

eval:
cd harness && go run ./cmd/muxon eval basket --matrix testdata/eval/matrix-opencode.yaml --tasks 'testdata/eval/*.json' --trials 1 --concurrency 2 --budget-usd 5 --trust
cd harness && go run ./cmd/muxon eval basket --matrix ../evals/matrices/opencode.yaml --tasks '../evals/tasks/*.json' --trials 1 --concurrency 2 --budget-usd 5 --trust
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ tasks:
desc: OpenCode Go basket
dir: harness
cmds:
- go run ./cmd/muxon eval basket --matrix testdata/eval/matrix-opencode.yaml --tasks 'testdata/eval/*.json' --trials 1 --concurrency 2 --budget-usd 5 --trust
- go run ./cmd/muxon eval basket --matrix ../evals/matrices/opencode.yaml --tasks '../evals/tasks/*.json' --trials 1 --concurrency 2 --budget-usd 5 --trust
4 changes: 2 additions & 2 deletions docs/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ The task file is JSON. `check.files` is copied into the workspace only after the
Commands:

```text
muxon eval basket --matrix harness/testdata/eval/matrix.yaml --trials 3 --budget-usd 20
muxon eval basket --matrix evals/matrices/default.yaml --trials 3 --budget-usd 20
make eval
muxon eval report <run-id>
muxon eval compare <run-a> <run-b>
muxon eval export-swebench --instance repo__repo-1 --model muxon+qwen3-32b -o predictions.jsonl
```

Each run lives in `.muxon/eval/runs/<run-id>/` (`run.json` plus `results.jsonl`). Rows also carry `run_id`, `provider`, `harness_sha`, `manifest_hash`, `salvaged_tool_calls`, `timeout_hit`, `reason`, and `overrides`. Prices in `models.yaml` are pinned 2026-10-14 (DeepInfra Qwen3.5-9B and Qwen3-32B, OpenAI gpt-5). `matrix-opencode.yaml` uses the OpenCode Go key: `OPENCODE_API_KEY`, or `~/.local/share/opencode/auth.json` under provider `opencode-go`. Its prices are the short-context rates from the OpenCode Go docs (Kimi K2.7 Code, GPT 6 Luna).
Each run lives in `.muxon/eval/runs/<run-id>/` (`run.json` plus `results.jsonl`). Rows also carry `run_id`, `provider`, `harness_sha`, `manifest_hash`, `salvaged_tool_calls`, `timeout_hit`, `reason`, and `overrides`. Prices in `models.yaml` are pinned 2026-10-14 (DeepInfra Qwen3.5-9B and Qwen3-32B, OpenAI gpt-5). `evals/matrices/opencode.yaml` uses the OpenCode Go key: `OPENCODE_API_KEY`, or `~/.local/share/opencode/auth.json` under provider `opencode-go`. Its prices are the short-context rates from the OpenCode Go docs (Kimi K2.7 Code, GPT 6 Luna).

`muxon eval compare` is the gate for a new tool or harness flag: same tasks, one override flipped, and the McNemar result says whether the outcomes actually moved.

Expand Down
4 changes: 2 additions & 2 deletions docs/harness-architecture/implementation-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ Files: `cmd/muxon/trust.go` (complete)

Depends on: 7.1
Read: [benchmarks](../benchmarks.md), [observability § Eval](./observability.md#eval-integration)
Files: `internal/eval/task.go`, `cmd/muxon/eval.go`, `testdata/eval/fix-test.json`
Files: `internal/eval/task.go`, `cmd/muxon/eval.go`, `evals/tasks/fix-test.json`
Done when: **Milestone A** documented in repo README.

---
Expand Down Expand Up @@ -735,7 +735,7 @@ Files: `internal/tools/impl/test.go`, `git.go`
### Step 9.5 — Eval basket × matrix

Depends on: 7.7
Files: `testdata/eval/*.json`, nightly workflow optional
Files: `evals/tasks/*.json`, nightly workflow optional
Done when: **Milestone C** `results.jsonl` + report stub.

### Step 9.6 — resume
Expand Down
2 changes: 1 addition & 1 deletion docs/harness-architecture/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Session: 4.2M in (3.1M cached) / 180k out (40k reasoning) ~$1.14 (worker 92%,
## Eval integration

- `muxon eval run task.json` copies the fixture into a fresh temp workspace, runs the director, then runs the task's hidden `check` (files copied in only after the agent exits). Reward is 1 only when that check exits 0. A timeout is reward 0 with `timeout_hit`.
- `muxon eval basket --matrix testdata/eval/matrix.yaml --trials 3` writes `.muxon/eval/runs/<run-id>/results.jsonl` and `run.json`. `--budget-usd` stops scheduling once spent cost reaches the cap.
- `muxon eval basket --matrix evals/matrices/default.yaml --trials 3` writes `.muxon/eval/runs/<run-id>/results.jsonl` and `run.json`. `--budget-usd` stops scheduling once spent cost reaches the cap.
- `muxon eval report <run-id>` groups by model and capability overrides and prints a task-clustered 95% bootstrap interval. `muxon eval compare <run-a> <run-b>` pairs tasks and prints an exact McNemar p-value.
- `muxon run --eval tasks/fix-test-001.json` still appends one row to the workspace `.muxon/eval/results.jsonl` from `session.end`. That path is not the hidden grader.
- Weekly workflow (`.github/workflows/eval.yml`) runs the DeepInfra slice. The frontier row is manual. A harness change that helps the frontier row while hurting the 9B row is a regression.
Expand Down
34 changes: 34 additions & 0 deletions evals/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Evals

Self-graded tasks for `muxon eval`. The runner lives in [`harness/internal/eval`](../harness/internal/eval).

| Path | Contents |
|------|----------|
| `tasks/*.json` | One task per file: prompt, fixture, hidden check, timeout, tags |
| `checks/<task-id>/` | Hidden grader files, copied into the workspace only after the agent exits |
| `fixtures/<name>/` | Mini repos each task starts from |
| `matrices/*.yaml` | Model matrices for `eval basket` (`default`, `ci`, `opencode`) |

## Run

From the repo root:

```sh
make eval
```

Or directly, from `harness/`:

```sh
go run ./cmd/muxon eval basket --matrix ../evals/matrices/default.yaml --tasks '../evals/tasks/*.json' --trials 3 --budget-usd 20
```

With no `--tasks`, the CLI looks for `evals/tasks/*.json` from the repo root or `harness/`. Results go to `.muxon/eval/runs/<run-id>/`.

## Add a task

1. Add a fixture under `fixtures/<name>/`, or reuse one.
2. Add `checks/<task-id>/` with the hidden test or script.
3. Add `tasks/<name>.json`. `fixture` and `check.files` resolve relative to `tasks/`, so use `"fixture": "<name>"` and `"files": "checks/<task-id>"`.

`fixtures/go-failing-test` is a copy of `harness/testdata/fixtures/go-failing-test`, which the Go unit tests use. Edit them separately.
3 changes: 3 additions & 0 deletions evals/fixtures/go-failing-test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module example.com/failing

go 1.24
5 changes: 5 additions & 0 deletions evals/fixtures/go-failing-test/sum.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package sum

func Sum(a, b int) int {
return a - b
}
9 changes: 9 additions & 0 deletions evals/fixtures/go-failing-test/sum_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package sum

import "testing"

func TestSum(t *testing.T) {
if Sum(2, 3) != 5 {
t.Fatalf("expected 5")
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions harness/cmd/muxon/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,16 @@ func evalRunID(cmd *cobra.Command) string {

func defaultTaskGlob() string {
candidates := []string{
filepath.Join("testdata", "eval", "*.json"),
filepath.Join("harness", "testdata", "eval", "*.json"),
filepath.Join("evals", "tasks", "*.json"),
filepath.Join("..", "evals", "tasks", "*.json"),
}
for _, c := range candidates {
matches, _ := filepath.Glob(c)
if len(matches) > 0 {
return c
}
}
return filepath.Join("testdata", "eval", "*.json")
return candidates[0]
}

func resolveResults(outDir, arg string) (string, error) {
Expand Down
2 changes: 2 additions & 0 deletions harness/internal/eval/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ func fixtureCandidates(name string, extra []string) []string {
wd, _ := os.Getwd()
bases = append(bases,
wd,
filepath.Join(wd, "evals", "fixtures"),
filepath.Join(wd, "..", "evals", "fixtures"),
filepath.Join(wd, "testdata", "fixtures"),
filepath.Join(wd, "harness", "testdata", "fixtures"),
filepath.Join(wd, "..", "testdata", "fixtures"),
Expand Down
26 changes: 26 additions & 0 deletions harness/internal/eval/task_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package eval

import (
"path/filepath"
"testing"
)

func TestRepoEvalTasksResolve(t *testing.T) {
tasks, err := LoadTasks(filepath.Join("..", "..", "..", "evals", "tasks", "*.json"))
if err != nil {
t.Fatal(err)
}
for _, pt := range tasks {
t.Run(pt.Task.ID, func(t *testing.T) {
if _, err := taskSource(pt.Task, TrialOptions{TaskDir: pt.TaskDir}); err != nil {
t.Errorf("fixture: %v", err)
}
if pt.Task.Check.Files == "" {
return
}
if _, err := findDir(pt.Task.Check.Files, []string{pt.TaskDir, filepath.Join(pt.TaskDir, "..")}); err != nil {
t.Errorf("check files: %v", err)
}
})
}
}
Loading