Skip to content

Persist agent eval metrics in Braintrust - #334

Merged
jlitola merged 27 commits into
mainfrom
jlitola/braintrust-eval-persistence
Sep 1, 2026
Merged

Persist agent eval metrics in Braintrust#334
jlitola merged 27 commits into
mainfrom
jlitola/braintrust-eval-persistence

Conversation

@jlitola

@jlitola jlitola commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • map accepted discovery and intent suite artifacts to one normalized Braintrust row per workload
  • persist prompts, neutral answers, status, token/cost/duration metrics, and detailed tool telemetry without adding agent tracing or fabricated quality scores
  • export after the concise CI report with narrowly scoped credentials and explicit failure aggregation
  • document local validation/query workflows and add an internal Braintrust operations skill

Validation

  • bun test — 3,745 passed, 0 failed
  • bun run typecheck
  • bun run format:check
  • bun run lint
  • bun run build
  • actionlint .github/workflows/agent-evals.yml
  • bun run plugins:check
  • internal skill validator
  • validate-only mapping of accepted artifacts — 23 rows
  • two local Braintrust exports/readbacks — 23 rows each
  • Luna preflight review — READY
  • Claude Opus review round 3 — clean

Pending operational validation

BRAINTRUST_API_KEY is not currently visible in the repository or selected organization Actions-secret inventory. The agent-eval label is intentionally not applied yet: a labeled run would spend the eval budget and then fail persistence. After the secret is available, apply the label and verify one 23-row CI experiment/readback.

jlitola added 10 commits August 31, 2026 14:40
Expose contained prompt paths and neutral final answers in the normalized report so downstream persistence can use the validated artifact boundary.
Validate imported suite evidence and produce deterministic allowlisted rows with prompt identity, usage metrics, and tool telemetry without invoking Braintrust.
Add the pinned SDK boundary and persist deterministic top-level eval spans without fabricating quality scores or tracing agent execution.
Provide strict local and CI arguments, credential-free validation, safe result artifacts, and shared Bun and bt eval entrypoints.
Export normalized suite rows after concise reporting, append the experiment link, and surface scenario, report, or persistence failures in the final job status.
Record the validated export contract, local and CI usage, PoC readback evidence, and the internal Braintrust inspection skill.
Keep the exporter contracts unchanged while making fixtures and workflow expression assertions type-safe and lint-clean.
Align the documented CI timing with the observed run and clarify that the accepted artifacts were exported locally through bt eval.
Reject empty suite inputs, preserve asserted metrics identity, and document current CI secret visibility and observed run timing.
Keep implementation, operations, and internal skill guidance aligned with per-suite workload-cell validation.
@jlitola jlitola added enhancement New feature or request agent-eval Authorize paid agent evals for the current same-repository PR head SHA labels Aug 31, 2026
Use Braintrust-native token, duration, tool, and cost fields while preserving GitHits-specific telemetry. Carry recorded span timestamps and document the pending native-root verification path.
Document the verified 23-row native-root experiment and distinguish accurate root metrics from the unresolved structural tool-span comparison path.
@jlitola jlitola added agent-eval Authorize paid agent evals for the current same-repository PR head SHA and removed agent-eval Authorize paid agent evals for the current same-repository PR head SHA labels Aug 31, 2026
@jlitola jlitola added agent-eval Authorize paid agent evals for the current same-repository PR head SHA and removed agent-eval Authorize paid agent evals for the current same-repository PR head SHA labels Aug 31, 2026
Define stable channel-aware experiment names and explicit latest-main base resolution for PR, local, and recurring main comparisons.
Add stable channel-aware experiment identities, explicit main baseline discovery, and safe base experiment readback while preserving the existing row and tool-span contract.
Route pull-request and main event context through environment-bound exporter arguments, guard non-main manual dispatches, and report experiment/base linkage in the workflow summary.
Document stable experiment identity, explicit main-baseline linkage, safe local operations, and the remaining live readback proof. Keep historical experiments and current quality-score boundaries explicit.
Make base readback mandatory through the SDK and publisher boundaries, preserve actual null results, and version the safe CLI result after adding base linkage.
Build the shell-array expansion assertion without embedding a template-like string, preserving the quoted argument contract while satisfying the linter.
Read the pinned SDK Experiment.name after publishing so reused local experiment names report the server-created identity. Keep validate-only names deterministic and document same-SHA main baseline eligibility.
@jlitola
jlitola marked this pull request as ready for review September 1, 2026 06:28
@jlitola
jlitola merged commit 40796bd into main Sep 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-eval Authorize paid agent evals for the current same-repository PR head SHA enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant