Skip to content

fix(studio): drop removed SpanEvaluationContext fields to fix Web typecheck#642

Merged
marcusds merged 1 commit into
mainfrom
fix-studio-span-evaluation-context-typecheck/mschwab
Jul 10, 2026
Merged

fix(studio): drop removed SpanEvaluationContext fields to fix Web typecheck#642
marcusds merged 1 commit into
mainfrom
fix-studio-span-evaluation-context-typecheck/mschwab

Conversation

@marcusds

@marcusds marcusds commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The CI / Web typecheck job is red: the generated SDK type SpanEvaluationContext only exposes evaluation_id and test_case_id, but Studio code still references three fields that were removed from the schema — evaluation_run_id, evaluation_sha, and metadata.

Changes

  • src/util/intakeTelemetry.ts — drop the stale field refs from getEvaluationContextSummary and hasEvaluationContext; keep evaluation_id / test_case_id.
  • src/components/IntakeDetail/IntakeComponents/spanKeyValues.test.tsxevaluation_context: { metadata: {} }{} (still exercises the empty-context path).

Verification

  • pnpm --filter nemo-studio-ui typecheck (tsc) — clean
  • pnpm --filter nemo-studio-ui typecheck:go (tsgo, CI/pre-push variant) — clean
  • pnpm --filter nemo-studio-ui test src/components/IntakeDetail/IntakeComponents/spanKeyValues.test.tsx — 7/7 pass

Note: packages/sdk/generated/ is gitignored and regenerated in CI, so if the API is later changed to re-add these fields, the consumers can be restored instead.

Summary by CodeRabbit

  • Bug Fixes
    • Improved evaluation context handling when metadata is absent.
    • Updated evaluation summaries to use evaluation or test case identifiers.
    • Prevented unsupported context fields from being treated as valid evaluation context.

The generated SpanEvaluationContext type only exposes evaluation_id and
test_case_id, but intakeTelemetry.ts and spanKeyValues.test.tsx still
referenced evaluation_run_id, evaluation_sha, and metadata, breaking the
Web typecheck CI job.

Signed-off-by: mschwab <[email protected]>
@marcusds
marcusds requested review from a team as code owners July 10, 2026 20:56
@github-actions github-actions Bot added the fix label Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9fd1dc2d-38a4-4d60-b911-bd783af523d7

📥 Commits

Reviewing files that changed from the base of the PR and between 9903a5f and 97de59d.

📒 Files selected for processing (2)
  • web/packages/studio/src/components/IntakeDetail/IntakeComponents/spanKeyValues.test.tsx
  • web/packages/studio/src/util/intakeTelemetry.ts

📝 Walkthrough

Walkthrough

Changes

Evaluation context handling

Layer / File(s) Summary
Canonical context detection and validation
web/packages/studio/src/util/intakeTelemetry.ts, web/packages/studio/src/components/IntakeDetail/IntakeComponents/spanKeyValues.test.tsx
Telemetry summaries and presence checks now use only evaluation_id or test_case_id; the empty-context test uses {} instead of an empty metadata object.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing deprecated SpanEvaluationContext fields to restore typecheck.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-studio-span-evaluation-context-typecheck/mschwab

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 23686/30808 76.9% 61.7%
Integration Tests 13754/29457 46.7% 19.8%

@marcusds
marcusds added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit 00d8b94 Jul 10, 2026
58 checks passed
@marcusds
marcusds deleted the fix-studio-span-evaluation-context-typecheck/mschwab branch July 10, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants