Skip to content

feat(bench): bench fork command + ciRunId run-action link - #550

Merged
dtice25 merged 2 commits into
masterfrom
devin/1792794652-bench-fork-ciRunId
Oct 24, 2026
Merged

dtice25 merged 2 commits into
masterfrom
devin/1792794652-bench-fork-ciRunId

Conversation

@dtice25

@dtice25 dtice25 commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Companion to benchmarks-platform#857 — the bench side of the provider self-serve flow: link every run to its producing Actions run, and bench fork to create a private tracked fork of a catalog benchmark.

ciRunId passthrough

POST /runs now accepts ciRunId (validated same-org server-side). @benchsdk/runner's run() passes COMPUTESDK_RUN_ID — the platform injects it into every Actions job env — in both createRun calls, so a benchmark run dispatched in an Actions job links back to that job's ci_runs row and GET /runs/{runId} returns an actionRun link to the owning org.

bench fork <slug>

New top-level command in @benchsdk/cli:

bench fork dax                        # fork as `dax` in your org
bench fork dax --as dax-mine          # your own slug
bench fork dax --ref <sha>            # pin upstream instead of tracking
bench fork dax --source-org other     # fork a different curator org (default: computesdk)

GET /benchmarks/~/computesdk/{slug} returns the platform's source descriptor (new getForeignBenchmark + BenchmarkSourceDescriptor in @benchsdk/api); fork then PUT /benchmarks/{newSlug} with config.upstream = {org, slug, source}. upstream is provenance only — the fork is a normal private org benchmark that stays private; the run command it prints (bench run <source.path> --benchmark <new> --provider <you>) executes inside the provider's own Actions checkout.

Known pre-existing failure

pnpm typecheck in @benchsdk/runner fails on ~7 errors in test files (scoring.test.ts, runner.test.ts, bench-config.test.ts — p95/p99/label drift on scoring types). Verified present on clean master, unrelated to this diff.

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

- POST /runs now accepts ciRunId (same-org validated); the runner passes
  COMPUTESDK_RUN_ID which is injected into every Actions job env, linking
  each benchmark run back to its producing Actions run.
- New 'bench fork <slug>' creates a private org benchmark whose
  config.upstream records the catalog source (tracks upstream ref by
  default, --ref pins, --as renames, --source-org overrides the curator org).
- GET /benchmarks/{slug} and /~/[org]/[slug] now return the platform's
  source descriptor; the client exposes it via getForeignBenchmark.

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

@dtice25
dtice25 marked this pull request as ready for review October 24, 2026 16:46
@open-cla

open-cla Bot commented Oct 24, 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 all 3 findings on 666a577

Fixed by Devin (3)

  • Existing benchmark configuration lost on fork
  • Fork run instructions point outside clone
  • Pinned fork runs an unpinned revision

View all findings in Devin Review

Devin Review

- Re-forking onto an existing slug merges upstream into its config via
  PATCH instead of replacing config wholesale (keeps scoring/display).
- Printed run instructions cd into the clone and git checkout --ref,
  so the pinned fork actually runs the pinned revision.

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