Skip to content

benchsdk: benchmark result filters on api + cli - #537

Merged
dtice25 merged 3 commits into
masterfrom
devin/1792717357-bench-result-filters
Oct 23, 2026
Merged

dtice25 merged 3 commits into
masterfrom
devin/1792717357-bench-result-filters

Conversation

@dtice25

@dtice25 dtice25 commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Client/CLI half of the benchmark result filters feature (platform half: computesdk/benchmarks-platform#848, spec: docs/2026-10-23-benchmark-result-filters-mcp-tools.md in that PR). Makes "how did e2b's create step do over the last 7 days?" a three-command answer.

@benchsdk/api:

  • getBenchmarkResults + listRuns accept participants / since / until / timeZone (+ steps on results) and sourceOrg, which routes through /benchmarks/~/{sourceOrg}/{slug} for shared-slug disambiguation.
  • listRuns now returns BenchmarkRunList = { items, filter?, upgrade? } instead of a bare array — breaking, but the only in-repo consumers (benchsdk tests, benchmarks/scale scripts) are updated here.
  • BenchmarkResultsOverview gains filter (server echo) and upgrade; items[] gains steps?: BenchmarkRunStepOverview[] (with real firstStartedAt/lastCompletedAt now that the platform populates them).
  • Query serialization joins participants/steps as comma lists; steps: 'all' passes through.

@benchsdk/cli (bench runs list + bench results):

  • New flags: --participant <list>, --steps <list>|all (results only — the /runs route rejects it), --since/--until (YYYY-MM-DD, ISO, or relative 24h/7d/2w resolved client-side to ISO instants), --day YYYY-MM-DD (sugar for since=until=that day; conflicts with --since/--until), --tz (IANA zone, defaults to the machine's), --source-org.
  • --json prints the raw response including the filter echo. When a filter flag was sent but the response carries no filter, the command fails loudly ("platform does not support result filters yet") instead of printing unfiltered results under a filtered-looking command.
  • results table: one row per run×participant as before, plus a Steps table (run×participant×step) when --steps is sent.
  • Filters require a benchmark slug on runs list (the all-benchmarks listing has no filter) and are rejected with --run (single-run results).
  • USAGE, per-command help, README, and .agents/skills/benchsdk-cli/SKILL.md ("Investigating one provider") updated.

Changeset for a minor bump of both packages. pnpm typecheck clean; benchsdk (128 tests) and benchsdk-cli (32 tests) pass — one env-gated live integration test (integration.test.ts) still fails against the live platform at updateRun (untouched path, pre-existing).

Link to Devin session: https://app.devin.ai/sessions/d90b25244b0649fba4f9f0f0a9648365
Open in Devin Desktop: https://app.devin.ai/desktop/session/d90b25244b0649fba4f9f0f0a9648365?variant=devin
Requested by: @dtice25

@benchsdk/api: getBenchmarkResults and listRuns accept participants /
since / until / timeZone (+ steps on results) and sourceOrg (routes via
/benchmarks/~/{sourceOrg}/{slug}). listRuns now returns
{ items, filter?, upgrade? }; both responses carry the server's filter
echo. New types: BenchmarkRunFilterInput, BenchmarkResultsFilterEcho,
BenchmarkRunStepOverview, BenchmarkUpgradePayload, BenchmarkRunList,
ListRunsOptions.

@benchsdk/cli: bench runs list + bench results gain --participant,
--steps (results only), --since/--until (YYYY-MM-DD, ISO, or relative
24h/7d/2w resolved client-side), --day, --tz (defaults to machine zone),
--source-org. --json prints the raw response including the filter echo;
a filter flag against a platform without the feature exits non-zero.
Results table gains one row per run x participant x step with --steps.

Includes a changeset for a minor bump of both packages. Callers updated:
benchsdk tests and benchmarks/scale scripts (listRuns returns a page).

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

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

…n minting

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dtice25
dtice25 marked this pull request as ready for review October 23, 2026 02:13
@open-cla

open-cla Bot commented Oct 23, 2026

Copy link
Copy Markdown

Contributor License Agreement

All contributors are covered by a CLA.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin resolved the finding on e52436a

Fixed by Devin (1)

  • Empty filter lists return unfiltered results

View all findings in Devin Review

Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dtice25
dtice25 merged commit 9c7058e into master Oct 23, 2026
5 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