Skip to content

feat(runner): verbs-only bench run with --shape and --run-key - #264

Open
devin-ai-integration[bot] wants to merge 8 commits into
masterfrom
devin/1785443347-shared-run
Open

feat(runner): verbs-only bench run with --shape and --run-key#264
devin-ai-integration[bot] wants to merge 8 commits into
masterfrom
devin/1785443347-shared-run

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

The old surface duplicated a benchmark's identity across four places — the .bench.ts file, package.json, the CI workflow, and imperative bench create benchmark / bench create run commands — and drifted between them. This makes bench verbs-only: the benchmark is declared in the file and materialized when you run it, and a run is opened as a side effect. There is no create.

# before
bench create benchmark sandbox-burst-local --name 'Sandbox burst TTI (local)' --kind sandbox
ID=$(bench create run --benchmark sandbox-burst-local)
bench run tti.bench.ts --benchmark sandbox-burst-local --provider e2b --run-id "$ID"

# after
bench run benchmarks/sandbox/tti.bench.ts --shape burst --provider e2b --run-key "$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"

Two new flags on bench run:

  • --shape <name> — a bench file declares named shapes, each swapping in its own platform identity (slug/name, optional kind) and a stable knob (staggerDelayMs) while reusing the same task and participants. Scale knobs (--iterations/--concurrency) stay on the CLI, so no shape sets a value only to have it overridden. This is what collapses the per-shape slug/name/knob triple out of package.json and CI.

    shapes: {
      burst:     { slug: 'sandbox-burst-local',     name: 'Sandbox burst TTI (local)' },
      staggered: { slug: 'sandbox-staggered-local', name: 'Sandbox staggered TTI (local)', staggerDelayMs: 200 },
    }
  • --run-key <key> — sibling processes passing the same key get-or-create one shared run (per org + benchmark) instead of each opening its own, so parallel provider jobs land in one directly-comparable run. Each process registers only the participants it actually runs. Different shapes are different slugs, so one key value yields one run per shape — no per-shape key juggling. The binding is permanent, so a workflow re-run varies the key via GITHUB_RUN_ATTEMPT.

    if (args.runKey) {
      const { run } = await client.createRun(slug, { name, runKey: args.runKey }); // get-or-create
      for (const p of available) await client.upsertParticipant(slug, run.id, p.name, { totalTasks });
    } else { /* unchanged fresh-run path */ }

Benchmark materialization stays honest: a bare --benchmark X that merely retargets reporting at a benchmark this file doesn't name does not upsert (which would rename it); --shape/--name/the file's own slug do.

Call sites collapsed

  • package.json: every --slug … --name … [--stagger-delay-ms 200] triple → --shape burst / --shape staggered.
  • .github/workflows/sandbox-tti-benchmarks.yml: dropped the whole create-runs job; the provider matrix now runs bench run … --shape … --run-key "$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT" directly.

--slug remains a working alias for --benchmark.

Depends on

computesdk/benchmarks-platform#53 — POST /runs get-or-create by runKey.

Checks

pnpm typecheck clean; runner suite 65 passing, client suite 118 passing; all packages build.

Link to Devin session: https://app.devin.ai/sessions/82de2e18fab54e7bba63034865f0cb6c
Requested by: @HeyGarrison


Open in Devin Review

@HeyGarrison HeyGarrison self-assigned this Jul 30, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@open-cla

open-cla Bot commented Jul 30, 2026

Copy link
Copy Markdown

Contributor License Agreement

All contributors are covered by a CLA.

@superagent-security superagent-security 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.

Superagent found 2 supply chain issue(s)

Comment thread .github/workflows/sandbox-tti-benchmarks.yml Outdated
Comment thread .github/workflows/sandbox-tti-benchmarks.yml Outdated
Base automatically changed from devin/1785442068-tti-one-file to master July 30, 2026 20:30
devin-ai-integration[bot]

This comment was marked as resolved.

@superagent-security superagent-security 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.

Superagent found 1 security concern(s).

Comment thread .github/workflows/sandbox-tti-benchmarks.yml Outdated
HeyGarrison and others added 5 commits July 30, 2026 21:01
…nto one run

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… itself

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… the run own its size

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1785443347-shared-run branch from 592ed93 to 4680cc4 Compare July 30, 2026 21:01
@devin-ai-integration devin-ai-integration Bot changed the title feat(runner): bench create-run + --run-id so every provider reports into one run feat(runner): verb-first CLI + --run-id so every provider reports into one run Jul 30, 2026
…tion count

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread benchmarks/sandbox/tti.bench.ts Outdated
HeyGarrison and others added 2 commits July 30, 2026 21:41
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Retire the imperative create commands: the benchmark is declared in the
.bench.ts file (via optional named shapes) and materialized on run, and
a run is opened as a side effect. --shape selects a named variant
(swapping platform identity + stable knobs); --run-key get-or-creates a
shared run so sibling provider jobs converge on one comparable run.

Collapse the per-shape slug/name/knob triple out of package scripts and
the sandbox TTI workflow (drop the create-runs job; providers pass a
shared run key including GITHUB_RUN_ATTEMPT).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

1 similar comment
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration devin-ai-integration Bot changed the title feat(runner): verb-first CLI + --run-id so every provider reports into one run feat(runner): verbs-only bench run with --shape and --run-key Jul 31, 2026
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