SDK design improvements: fold operator surface into @benchsdk/runner and add ergonomics/observability - #375
Open
dtice25 wants to merge 11 commits into
Open
SDK design improvements: fold operator surface into @benchsdk/runner and add ergonomics/observability#375dtice25 wants to merge 11 commits into
dtice25 wants to merge 11 commits into
Conversation
… bench check, telemetry observability, config validation, and diagnostics Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor License AgreementAll contributors are covered by a CLA. |
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>
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>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
devin/1787847959-benchsdk-operator-runner
branch
from
August 27, 2026 17:01
4094563 to
d43f867
Compare
…and improved error pretty-printing 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>
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>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the SDK-design improvements we discussed:
@benchsdk/runneris now the canonical operator package,@benchsdk/clientis a compatibility re-export shim, and a set of ergonomics/observability/validation fixes round out the surface.Breaking
TaskStepOptions.concurrencyis renamed toparallelInvocationsto avoid ambiguity withconfig.concurrency(max in-flight tasks). The old field is still accepted and logs a one-time deprecation warning.runWorkeris now a free function:runWorker(client, options). The legacycreateBenchmarkClient().runWorker(options)spelling is preserved in@benchsdk/client.Added
runBenchmarkWorker(options)one-shot operator helper in@benchsdk/runner— run a single participant's worker without a*.bench.tsfile.bench check <file.bench.ts>CLI command validates env vars, API connectivity, participant availability, and scoring weights before a run.validateBenchmarkConfig(config)returns structured{ field, message }[];defineBenchmarkConfigthrowsBenchmarkConfigErrorwith the same shape.defineOnComplete(handler)helper for typedonCompletecallbacks.RunWorkerOptions.processKeynow defaults toos.hostname().RunWorkerOptions.onTelemetryError/BenchmarkReporterConfig.onTelemetryErrorcallbacks expose heartbeat/log-upload/artifact telemetry failures.TaskErrornow includesstep,timeoutMs, and participant context for step timeouts.Fixed
console.warnby default instead of failing silently.@benchsdk/clientpublic API contract test now derives the expected type/value surface from@benchsdk/runnerrather than a hand-maintained list.Package boundaries
@benchsdk/clientnow depends only on@benchsdk/runnerand re-exports its entire surface.createBenchmarkClientis a thin wrapper that attaches the legacyrunWorkermethod.@benchsdk/runnerre-exports the low-level worker/API primitives (runWorker,BenchmarkReporter,createBenchmarkClient, etc.) so operators can import from one package.Verification
pnpm typecheckpasses.pnpm --filter @benchsdk/runner testpasses (96 tests).pnpm --filter @benchsdk/client testpasses (122 tests).pnpm exec bench run examples/*.bench.ts --dry-runandpnpm exec bench check examples/*.bench.ts --dry-runpass for all examples.Link to Devin session: https://app.devin.ai/sessions/f67b6ba526fe43619684b90f0d19e045
Open in Devin Desktop: https://app.devin.ai/desktop/session/f67b6ba526fe43619684b90f0d19e045?variant=devin
Requested by: @dtice25