Skip to content

feat(usage): report application and judge costs separately - #104

Merged
dcramer merged 15 commits into
mainfrom
fix/judge-harness-usage
Sep 10, 2026
Merged

dcramer merged 15 commits into
mainfrom
fix/judge-harness-usage

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #102.

Preserve every judge-model run and report its usage separately from the application under test.

What changed:

  • UsageSummary.costUsd is a typed, optional, non-negative USD value; omit it when unknown and use 0 only for known-free runs.
  • Judge calls run through judgeHarness + ctx.runJudge(...); each normalized run is retained under its score's judgeRuns.
  • GitHub, terminal, and local report UI show application, judge, and combined tokens and cost.
  • Partial costs are never presented as complete totals, including across cases and shards.
  • AI SDK, OpenAI Agents, and Pi judge adapters preserve normalized usage; Pi maps its native total USD cost to costUsd.
  • Persisted report workspaces use schema v2. Raw Vitest task.meta readers and producers must upgrade together.
  • Public docs, llms.txt, repo instructions, examples, and the bundled agent skill use session.events and the judge-harness pattern.

Verification:

  • typecheck, lint, docs check, docs build
  • 99 reporting/UI tests plus 34 judge/reporter tests
  • full suite passes except the known root-permission test (chmod cannot make the fixture unreadable as root)
  • browser QA at 1440×900 confirmed workspace and case usage breakdowns

via David Cramer.

--

View Junior Session [Sentry]

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vitest-evals-docs Ready Ready Preview Sep 10, 2026 1:49pm UTC

Request Review

Co-Authored-By: David Cramer <david@sentry.io>
@sentry-junior sentry-junior Bot changed the title fix(judges): Track judge harness usage fix(judges): include judge usage in reports Sep 10, 2026
Co-Authored-By: David Cramer <david@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
@sentry-junior sentry-junior Bot changed the title fix(judges): include judge usage in reports feat(usage): report application and judge costs separately Sep 10, 2026
Comment thread packages/github-reporter/src/collect.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/github-reporter/src/collect.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/report-ui/src/app/model.ts
Comment thread packages/core/src/report/metadata.ts
Co-Authored-By: David Cramer <david@sentry.io>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 496a008. Configure here.

Comment thread packages/github-reporter/src/summary.ts
@dcramer
dcramer merged commit 3f0e822 into main Sep 10, 2026
16 checks passed
@dcramer
dcramer deleted the fix/judge-harness-usage branch September 10, 2026 13:58

This branch was successfully deployed

1 active deployment
Preview — 936e14f6 Deployed Sep 10, 2026 by vercel[bot]
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.

Track and report judge harness usage

1 participant