fix(api): align evaluation invocation step key with SDK slug#3862
Merged
mmabrouk merged 2 commits intorelease/v0.87.2from Feb 27, 2026
Merged
fix(api): align evaluation invocation step key with SDK slug#3862mmabrouk merged 2 commits intorelease/v0.87.2from
mmabrouk merged 2 commits intorelease/v0.87.2from
Conversation
The API generated evaluation step keys using application_revision.slug (a short hex like '6b39282c8e87') while the SDK used application_revision.name (a human-readable string like 'RAG E2E Pipeline'). This mismatch caused the frontend to fail matching results to their columns, so evaluation outputs were never displayed. Changed the API to use application_revision.name, consistent with the SDK and every other call site of get_slug_from_name_and_id.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Railway Preview Environment
Updated at 2026-02-27T18:04:28.691Z |
junaway
approved these changes
Feb 27, 2026
Contributor
|
Missing from the migration. Thanks, @mmabrouk. lgtm ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Evaluation outputs were missing in the Eval Run Details UI because invocation results could not be matched to their invocation column. The match key is
step_key.This PR aligns API step key generation with SDK behavior for application invocation steps.
Root cause
For each evaluation run:
stepsandmappings) inapi/oss/src/core/evaluations/service.py.step_keyinsdk/agenta/sdk/evaluations/preview/evaluate.py.step_key.The SDK uses the revision slug directly:
application_slug = application_revision.slugstep_key = "application-" + application_slugThe API previously recomputed a value with:
get_slug_from_name_and_id(str(application_revision.slug), application_revision.id)That recomputation can diverge from the stored revision slug, depending on how the revision slug was created. When they diverge, frontend joins fail and invocation outputs do not render.
Fix
In
api/oss/src/core/evaluations/service.py:get_slug_from_name_and_id.application_revision.slug.New behavior:
step_key = "application-" + application_revision.slugThis guarantees parity with SDK result logging.
Why this is safe
Research notes
During debugging, we verified:
attributes.ag.data.outputs.