refactor(benchsdk): split SDK into @benchsdk/api, @benchsdk/worker, and @benchsdk/client umbrella - #336
Open
dtice25 wants to merge 4 commits into
Open
refactor(benchsdk): split SDK into @benchsdk/api, @benchsdk/worker, and @benchsdk/client umbrella#336dtice25 wants to merge 4 commits into
dtice25 wants to merge 4 commits into
Conversation
…nd @benchsdk/client umbrella - Add @benchsdk/api: typed REST client and shared platform types. - Add @benchsdk/worker: runWorker runtime, BenchmarkReporter, metrics, participants. - Keep @benchsdk/client as a backwards-compatible umbrella that re-exports from the focused packages and exposes client.runWorker(). - Update pnpm workspace and lockfile for the two new packages. - Adjust public-api.contract.test.ts to parse the new barrel .d.ts shape with workspace re-exports. 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. |
…orker artifacts are available Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…t.client matches type, and build all packages in release workflow Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… scale image 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 begins the benchsdk v2 migration by splitting the SDK into focused, single-purpose packages:
@benchsdk/api— typed REST client (createBenchmarkClient) and shared platform data types. No worker runtime.@benchsdk/worker— therunWorkerengine,BenchmarkReporter,createSystemMetricsCollector, and participant helpers. Depends on@benchsdk/api.@benchsdk/client— remains a backwards-compatible umbrella package. It re-exports from@benchsdk/apiand@benchsdk/worker, and itscreateBenchmarkClientreturns a client that still exposesrunWorker(options)so existing consumers and tests compile unchanged.What changed
packages/benchsdk/src/client.tsintopackages/benchsdk-api/src/client.tswith the REST methods only.runWorkerimplementation intopackages/benchsdk-worker/src/worker.tsas a standalonerunWorker(client, options)function.reporter.ts,metrics.ts, andparticipants.tsinto@benchsdk/worker.packages/benchsdk/src/client.tsis now a thin wrapper that creates an@benchsdk/apiclient and attachesrunWorker.packages/benchsdk/src/reporter.ts,metrics.ts, andparticipants.tsare now re-export shims from@benchsdk/worker.pnpm-workspace.yamland their dependencies topnpm-lock.yaml.packages/benchsdk/src/__tests__/public-api.contract.test.tssoVAL-SDK-090parses the new.d.tsbarrel shape, which now contains both local type declarations and re-exports from workspace packages.Verification
pnpm -r --filter "./packages/**" buildpasses for@benchsdk/api,@benchsdk/worker,@benchsdk/client, and@benchsdk/runner.pnpm typecheckpasses.pnpm --filter @benchsdk/client testpasses (119 passed, 1 skipped).pnpm --filter @benchsdk/runner testpasses (86 passed).pnpm -r --filter "./packages/benchsdk" --filter "./packages/benchsdk-api" --filter "./packages/benchsdk-worker" lintpasses (runner lint is missing eslint in its dev deps, pre-existing).What comes next
@benchsdk/runnerto import from@benchsdk/apiand@benchsdk/workerdirectly instead of@benchsdk/client.@benchsdk/apiso bothbenchmarksandbenchmarks-platformshare one source of truth.metrics.timing(...)/metrics.count(...)) and platform-side scoring.This is a foundation-only PR; no benchmark schema or runner behavior is changed yet.
Link to Devin session: https://app.devin.ai/sessions/e5c1507360b24f6f89327ccc975ae961
Requested by: @dtice25