feat: port core SDLC graders to hud.native#381
Merged
Conversation
lorenss-m
reviewed
Mar 25, 2026
| result[key] = value | ||
| except (TypeError, ValueError): | ||
| result[key] = f"<{type(value).__name__}: not serializable>" | ||
| return result |
Contributor
There was a problem hiding this comment.
Surely we have something like this in the rest of the codebase we can reuse
lorenss-m
requested changes
Mar 25, 2026
Contributor
lorenss-m
left a comment
There was a problem hiding this comment.
Small comment in the file, otherwise would also be nice to add this into the docs! Make a SDK reference file for this
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
lorenss-m
approved these changes
Mar 27, 2026
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.

ported the core generic grader primitives from
hud-sdlc-libintohud.nativeso env authors can use first-party evaluators in the SDK without depending on SDLC specific codeadded hud/native/graders.py with:
Grade.from_subscores,Grader,BashGrader,Grader.any/Grader.allinstead of copying SDLC local types, here we reuse hud-python's existing
SubScore/EvaluationResulttypes.Grade.from_subscoresnormalizes positive weights to sum to 1.0 and preserves negative weights as penalties so it fits the current hud-python evaluation semantics. no SDLC specific graders are ported herethere are tests in hud/native/tests/test_graders.py
Note
Medium Risk
Introduces new grading utilities that execute arbitrary shell commands via
BashGrader, which can impact safety/behavior depending on how scenarios use it. Also changes telemetry argument/result serialization, which could affect what data is emitted in traces.Overview
Adds first-party grading primitives under
hud.native(Grade.from_subscores,Graderwithany/all, andBashGrader) to buildEvaluationResultobjects fromSubScores, including weight normalization, penalty handling, name de-duping, and metadata propagation.Introduces
hud.utils.serialization(json_safe_value/json_safe_dict) and switches telemetry instrumentation to use it for more robust JSON-safe span serialization; adds test coverage and new docs page wired into the docs nav.Written by Cursor Bugbot for commit f93def9. This will update automatically on new commits. Configure here.