Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c4c1036
feat: add benchmark folder
joshblack Aug 26, 2026
5de02fb
feat: add benchmark scenarios
joshblack Aug 26, 2026
ebc72b2
feat: add run to benchmark
joshblack Aug 27, 2026
742ebe4
test: add host for local testing
joshblack Aug 27, 2026
73c5a55
refactor: update scenario implementation
joshblack Aug 27, 2026
de0d665
refactor: update model implementation
joshblack Aug 27, 2026
797a9c4
test: add test file for benchmarks
joshblack Aug 27, 2026
ab2f28e
feat: add benchmark functionality
joshblack Aug 27, 2026
0a0c7fa
feat: add trial concept for individual treatment runs
joshblack Aug 28, 2026
f1a7eda
feat: add plan concept for ordering trials and storing order across s…
joshblack Aug 28, 2026
249e755
refactor: update benchmarks, scenario, treatment, and run
joshblack Aug 28, 2026
ff1dc6b
refactor: add virtual and system sandboxes
joshblack Aug 28, 2026
dc9807c
feat: add sandbox interface for testing
joshblack Aug 31, 2026
4a6ea53
refactor: remove host arg from runTrial
joshblack Sep 1, 2026
cc2cc26
refactor: mock virtual sandbox instead of adding custom implementation
joshblack Sep 1, 2026
e05cb5c
refactor: change defineScenario to defineConfig
joshblack Sep 1, 2026
4abe367
feat: build through experiments run flow
joshblack Sep 1, 2026
18cfd65
feat: support running trials
joshblack Sep 1, 2026
46a22c4
feat: improve copilot cli message parsing and run trial behavior
joshblack Sep 1, 2026
68ad168
refactor: move run into trial and plan
joshblack Sep 2, 2026
8506898
refactor: add support for testing trial runs
joshblack Sep 2, 2026
c8eb054
test: fill out trial tests
joshblack Sep 2, 2026
daa9b02
feat: update output format and serialize, deserialize
joshblack Sep 3, 2026
dc21648
feat: restore table emit behavior
joshblack Sep 3, 2026
dc35b3b
test: add tests and changeset
joshblack Sep 3, 2026
e3784de
refactor: update to new config
joshblack Sep 3, 2026
07c41a4
chore: update design system benchmark
joshblack Sep 3, 2026
e6c44b6
fix: make config const generic so the type does not have to be explicit
joshblack Sep 3, 2026
d09dff1
refactor: update tests and benchmark summaries
joshblack Sep 3, 2026
02f360f
ci: add workflows for benchmark
joshblack Sep 3, 2026
d3b45e1
feat: switch up output format, change website
joshblack Sep 3, 2026
2f0e34a
refactor: remove baseline results
joshblack Sep 3, 2026
db929c3
feat: move towards benchmark trends
joshblack Sep 3, 2026
cb59e18
refactor: clean up benchmark models and sandbox cleanup
joshblack Sep 3, 2026
aa64c16
refactor: move benchmark scenarios to stacked change
joshblack Sep 3, 2026
2e98455
chore: log sandbox commands
joshblack Sep 4, 2026
b469cc3
chore: align benchmark support lockfile
joshblack Sep 4, 2026
02edbcd
fix: accept sub-agent user messages
joshblack Sep 4, 2026
3bc0e0c
fix: remove stale package exports
joshblack Sep 4, 2026
8a88259
fix: exclude walkthrough skill from artifacts
joshblack Sep 4, 2026
f6be5ce
fix: collect benchmark output token metrics
joshblack Sep 4, 2026
24dfd15
fix: restore benchmark overview interactions
joshblack Sep 4, 2026
3897fc6
fix: preserve scenario path and browser tests
joshblack Sep 4, 2026
5ca8506
refactor: remove cli package entrypoint
joshblack Sep 4, 2026
031cf72
docs: shorten benchmark changesets
joshblack Sep 4, 2026
1c3bc63
docs: update benchmark API documentation
joshblack Sep 4, 2026
3f36743
refactor: remove baseline experiment
joshblack Sep 4, 2026
f57a0f5
test: consolidate experiment coverage
joshblack Sep 4, 2026
ac56793
fix: resolve benchmark support integration
joshblack Sep 4, 2026
47d2719
refactor: derive artifact directory from output
joshblack Sep 4, 2026
e58491f
fix: address benchmark review feedback
joshblack Sep 4, 2026
76ed0da
fix: address remaining benchmark review feedback
joshblack Sep 4, 2026
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
5 changes: 5 additions & 0 deletions .changeset/bright-benchmarks-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Add benchmark configuration, discovery, execution, and output APIs through `@primer/agent-eval/benchmark` and explicitly named package-root exports. The CLI can now select and run benchmarks from a benchmarks directory.
5 changes: 5 additions & 0 deletions .changeset/calm-experiments-unify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Move experiment APIs to `@primer/agent-eval/experiment`, replacing `findExperiment`, package-root `run`, and package-root `defineConfig` with `getExperiment`, `runExperiment`, and `defineExperimentConfig`. Remove the legacy experiment loading helpers in favor of `getExperiment` and `listExperiments` with explicit source directories.
5 changes: 5 additions & 0 deletions .changeset/fresh-experiment-configs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Add `ExperimentConfigSchema` and update experiment configuration to use model variants, the new treatment API, and the new sandbox interface. Scenarios continue to support IDs and `{path, name?}` entries through the exported `ExperimentScenarioConfig` and `InlineScenarioConfig` types.
5 changes: 5 additions & 0 deletions .changeset/gentle-scenarios-unify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Move scenario APIs to `@primer/agent-eval/scenario`, replacing `defineScenario`, `findScenario`, and `ResolvedScenario` with `defineConfig`, `getScenario`, and `Scenario`. Add scenario schemas and remove the legacy `@primer/agent-eval/scenarios` entry point and `loadScenarioDirectory`.
5 changes: 5 additions & 0 deletions .changeset/happy-output-maps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Replace `createAgentEvalOutput`, `parseAgentEvalOutput`, `AgentEvalOutput`, and `AgentEvalOutputResult` with the experiment `output` and `deserialize` helpers, `ExperimentOutput`, and `TrialResult`. Experiment output now uses keyed maps, model variants, per-session agent metrics, and directory-oriented artifact fields.
5 changes: 5 additions & 0 deletions .changeset/kind-trials-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Add package-root trial and treatment schemas, types, execution helpers, and comparison helpers, replacing `TreatmentResult` with `TrialResult`. Trials continue to run optional Playwright browser tests and combine them with standard scenario test results.
5 changes: 5 additions & 0 deletions .changeset/lucky-sandboxes-open.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Add `@primer/agent-eval/sandbox` for sandbox runtimes, configuration, constants, and the plugin and MCP types previously exported from the experiment entry point. Replace the concrete `Sandbox` class with the `Sandbox` interface plus `SystemSandbox` and `VirtualSandbox`.
5 changes: 5 additions & 0 deletions .changeset/neat-models-vary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Replace `ExperimentModelConfig`, `ModelInfo`, and `resolveModelConfigs` with model variant configuration, schemas, and expansion helpers. Low-level model helpers and types are no longer exported from the package root or experiment entry point.
5 changes: 5 additions & 0 deletions .changeset/plain-scenarios-discover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Update scenario discovery to support explicit hosts, skip template directories, and recognize `browser.test.ts`. Inline scenario paths remain supported without package discovery requirements and continue to recognize `scenario.browser.test.ts`.
5 changes: 5 additions & 0 deletions .changeset/portable-results-bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Add `--output-dir` for portable experiment and benchmark bundles with artifact and walkthrough paths relative to `output.json`. Remove `--artifacts` and derive the artifact directory from `--output-dir` or the directory containing `--output`.
5 changes: 5 additions & 0 deletions .changeset/quick-copilot-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': patch
---

Accept sub-agent `user.message` events without `agentMode` and preserve their routing fields. Collect output token counts from `model.message` events while retaining compatibility with older Copilot output.
5 changes: 5 additions & 0 deletions .changeset/steady-trial-results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': patch
---

Exclude the temporary `agent-browser` walkthrough skill from downloaded trial artifacts.
5 changes: 5 additions & 0 deletions .changeset/tender-benchmarks-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': patch
---

Compare benchmark test success rates instead of passed-test totals and report equal metrics as a 0% change.
5 changes: 5 additions & 0 deletions .changeset/tidy-cli-entrypoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/agent-eval': minor
---

Remove the `@primer/agent-eval/cli` package entry point. Use the `agent-eval` executable for CLI usage and the package root or API entry points for programmatic usage.
100 changes: 0 additions & 100 deletions .github/workflows/baseline.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: benchmark
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
inputs:
concurrency:
description: Number of trials to run in parallel
required: false
default: '1'
type: string
docker-image:
description: >-
Docker container image to use for running trials.
Must be a Debian-based Node image with apt-get and a node user (e.g. node:26.5.0-slim).
required: false
default: 'node:26.5.0-slim'
type: string

concurrency:
group: weekly-design-system-benchmark
cancel-in-progress: false

permissions:
contents: read

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: set up pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- name: set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: build project
run: pnpm run build
- name: run benchmark
env:
CONCURRENCY: ${{ inputs.concurrency }}
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
DOCKER_IMAGE: ${{ inputs.docker-image || 'node:26.5.0-slim' }}
run: script/run-benchmark.sh
- name: prepare benchmark artifact
if: ${{ always() }}
run: |
mkdir -p workflow-artifact
if [[ -d results ]]; then
mv results workflow-artifact/results
fi
- name: upload benchmark results
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: benchmark-${{ github.run_id }}
path: workflow-artifact
if-no-files-found: error
retention-days: 90
compression-level: 9
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main
workflow_run:
workflows:
- baseline
- benchmark
types:
- completed
branches:
Expand All @@ -31,13 +31,13 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
- name: download baseline results
- name: download evaluation results
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api --paginate \
"/repos/$GITHUB_REPOSITORY/actions/artifacts?per_page=100" \
--jq '.artifacts[] | select(.expired == false and (.name | test("^baseline-[0-9]+$"))) | [.created_at, .id] | @tsv' |
--jq '.artifacts[] | select(.expired == false and (.name | test("^benchmark-[0-9]+$"))) | [.created_at, .id] | @tsv' |
sort |
cut -f2 |
while read -r artifact_id; do
Expand Down
55 changes: 34 additions & 21 deletions .github/workflows/experiment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@ permissions:
contents: read

jobs:
setup:
runs-on: ubuntu-latest
outputs:
run-date: ${{ steps.run.outputs.date }}
steps:
- name: Set run date
id: run
run: echo "date=$(date -u +%F)" >> "$GITHUB_OUTPUT"

run:
needs: setup
runs-on: ubuntu-latest
strategy:
fail-fast: true
Expand All @@ -53,33 +63,38 @@ jobs:
CONCURRENCY: ${{ inputs.concurrency }}
DOCKER_IMAGE: ${{ inputs.docker-image || 'node:26.5.0-slim' }}
EXPERIMENT_NAME: ${{ inputs.experiment }}
OUTPUT_FILE: output-${{ matrix.order }}.json
RUN_DATE: ${{ needs.setup.outputs.run-date }}
SHARD: ${{ matrix.order }}/${{ strategy.job-total }}
run: |
set -o pipefail
run_directory="results/experiments/$EXPERIMENT_NAME/$RUN_DATE"
node packages/agent-eval/dist/cli.js \
--concurrency "$CONCURRENCY" \
--docker-image "$DOCKER_IMAGE" \
--experiment "$EXPERIMENT_NAME" \
--experiments experiments \
--scenarios scenarios \
--artifacts artifacts \
--output "$OUTPUT_FILE" \
--output "$run_directory/output-${{ matrix.order }}.json" \
Comment thread
joshblack marked this conversation as resolved.
--shard "$SHARD"
- name: Prepare experiment artifact
if: ${{ always() }}
run: |
mkdir -p workflow-artifact
if [[ -d results ]]; then
mv results workflow-artifact/results
fi
- name: Upload experiment results
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: experiment-shard-${{ github.run_id }}-${{ matrix.order }}
path: |
output-${{ matrix.order }}.json
artifacts
path: workflow-artifact
if-no-files-found: error
retention-days: 1
compression-level: 9

merge:
needs: run
needs: [setup, run]
runs-on: ubuntu-latest
steps:
- name: download experiment results
Expand All @@ -89,27 +104,25 @@ jobs:
merge-multiple: true
- name: merge experiment results
run: |
cd "results/experiments/${{ inputs.experiment }}/${{ needs.setup.outputs.run-date }}"
jq --slurp '
. as $outputs
| ([$outputs[].treatments[]] | unique_by(.config.name)) as $treatments
| $outputs[0]
| .treatments = $treatments
| .results = [
$outputs[] as $output
| $output.results[]
| . as $result
| ($output.treatments[] | select(.id == $result.treatmentId).config.name) as $name
| .treatmentId = ($treatments[] | select(.config.name == $name).id)
]
{
experimentId: .[0].experimentId,
scenarios: (reduce .[].scenarios as $scenarios ({}; . * $scenarios)),
treatments: (reduce .[].treatments as $treatments ({}; . * $treatments)),
trials: (reduce .[].trials as $trials ({}; . * $trials))
}
' output-*.json > output.json
rm output-*.json
- name: Prepare experiment artifact
run: |
mkdir -p workflow-artifact
mv results workflow-artifact/results
- name: upload experiment results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: experiment
path: |
output.json
artifacts
path: workflow-artifact
if-no-files-found: error
retention-days: 90
compression-level: 9
2 changes: 1 addition & 1 deletion .github/workflows/report-workflow-failures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Report workflow failures
on:
workflow_run:
workflows:
- baseline
- benchmark
- deploy
- update-pnpm
- update-sandbox-tools
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ out
# Generated files
artifacts/
results/
output.json
Loading
Loading