Skip to content

Compare Workshop evals on pull requests - #476

Open
AshishKumar4 wants to merge 1 commit into
mainfrom
evals/github-pr-report
Open

AshishKumar4 wants to merge 1 commit into
mainfrom
evals/github-pr-report

Conversation

@AshishKumar4

@AshishKumar4 AshishKumar4 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Run the existing Workshop trajectory suite on pull requests that change the agent's code, prompts, tool surface, or the eval machinery itself. Each run evaluates the PR's base commit and head commit in parallel, three trials per task, on the eval default model from packages/workshop-evals/src/config.ts, and keeps the raw trajectories.

Baselines are cached per base commit: the baseline arm reuses workshop-evals-baseline-<base sha> when a trusted PR run has already produced one, and otherwise measures the base itself and caches the result if validate-results.ts finds every cohort complete and free of infrastructure failures. Keying on the commit is what keeps a reused baseline honest; a broken run is compared against but never cached.

A deterministic reducer compares matching task/model cohorts and publishes one neutral Check. Infrastructure failures, unequal trial counts, and eval-definition changes between the two commits are reported as non-comparable; agent failures count as failed trials.

Inference goes through the AI Gateway and token the manual eval workflow and Bonk already use (CF_AI_GATEWAY_NAME, CF_AI_GATEWAY_ACCOUNT_ID, CF_AI_GATEWAY_TOKEN), over HTTPS, so per-trial cost is reported and no new repository secret is needed. The existing manual eval workflow remains unchanged. This adds no gating or eval tasks.

Merge #495 first so the eval default is GLM 5.3 Flash when this lane starts producing baselines.

@github-actions github-actions Bot added the delivery Changes to CI or release delivery label Sep 10, 2026
@github-actions

Copy link
Copy Markdown

Preview: pr476-evals-github-pr-report

https://pr476-evals-github-pr-report-router.cloudflare-os-previews.workers.dev

Dashboard · deleted when this PR closes

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 10, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 10, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

@AshishKumar4
AshishKumar4 marked this pull request as draft September 10, 2026 23:52
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 11, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

@ask-bonk

ask-bonk Bot commented Sep 11, 2026

Copy link
Copy Markdown

[P2] .github/workflows/workshop-evals.yml:107: Validation failures skip artifact upload, causing compare to fail before publishing a neutral non-comparable check. This occurred in run 34544382186. Upload results with if: always() and handle empty/missing reports, or publish a fallback neutral check.

github run

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 11, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

@AshishKumar4
AshishKumar4 force-pushed the evals/github-pr-report branch 3 times, most recently from 31fd93b to 1a9a280 Compare September 11, 2026 00:29
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 11, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 11, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

@AshishKumar4
AshishKumar4 force-pushed the evals/github-pr-report branch 2 times, most recently from cad4717 to 108e487 Compare September 11, 2026 19:14
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 11, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

@AshishKumar4
AshishKumar4 force-pushed the evals/github-pr-report branch 2 times, most recently from 2735269 to 607dd32 Compare September 14, 2026 16:46
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown

Posted 2 actionable inline findings.

github run

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown
  • [P2] comparison.ts:198-200: Embedded commit metadata is trusted without matching the evaluated SHAs. A change to resolveEvalCommit can label candidate results as the baseline commit, bypassing definition-change detection.
  • [P2] comparison.ts:96: Suite-level collection failures with no assertions are discarded, allowing validateEvalResults to store an incomplete baseline. Validate failed/empty suites before flattening assertions.

github run

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown
  • [P2] .github/workflows/workshop-evals-pr.yml:261: Definition checks omit workflow-level execution settings. A PR changing Node version or AI Gateway transport compares against a stored baseline using old settings while still marking matching cohorts comparable. Persist and compare an execution-config fingerprint, or include these runtime inputs in definition detection.

github run

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown
  • [P2] comparison.ts:196: Results are parsed before checking definition changes. An incompatible eval/report schema change therefore aborts comparison instead of publishing the intended neutral “eval definition changed” result. Check revisions first or handle schema mismatches as non-comparable.

github run

@AshishKumar4
AshishKumar4 added this pull request to stack #497 September 14, 2026 19:48
@AshishKumar4
AshishKumar4 marked this pull request as ready for review September 14, 2026 19:50
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

devin-ai-integration[bot]

This comment was marked as resolved.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown

LGTM!

github run

devin-ai-integration[bot]

This comment was marked as resolved.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown

Posted 1 actionable inline finding.

github run

duration: z.number().nonnegative(),
meta: z.object({
harness: z.object({
run: z.object({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P2] Handle the library’s generic failed-run shape

createHarness records failures thrown outside the custom partial-run attachment with createFailedHarnessRun, whose run contains session.events, usage: {}, and errors: [{ type, message }], but no Workshop metadata, model, or output. A valid results file containing such an infrastructure failure is therefore rejected by this schema, so comparison exits without the intended neutral non-comparable report. Parse generic failed runs as infrastructure failures at the report/cohort level instead of treating the whole report as malformed.

export function validateEvalResults(text: string, expectedTrials: number): void {
const files = parseResults("baseline", text);
for (const file of files) {
if (file.assertionResults.length === 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P2] Reject suite-level failures after completed trials

Vitest records file-level errors such as an afterAll failure in testResults[i].message while retaining all completed assertionResults. This loop checks message only when there are zero assertions, so a three-trial report with a teardown failure passes validation, is cached, and is later compared as infrastructure-clean. Reject any nonempty file-level error before caching.

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown

Posted 2 actionable inline findings.

github run

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown

LGTM!

github run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delivery Changes to CI or release delivery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant