⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@apetraru-uipath
Copy link
Contributor

@apetraru-uipath apetraru-uipath commented Jan 14, 2026

Refactor GuardrailValidationResult to use enum-based result field

Summary

This PR refactors GuardrailValidationResult to align with the new API response format. The model now uses an enum-based result field as the primary indicator of validation status, replacing the boolean validation_passed field.

Changes

Updated GuardrailValidationResultType Enum

  • Removed: FAILED, SKIPPED
  • Added:
    • VALIDATION_FAILED = "validation_failed"
    • ENTITLEMENTS_MISSING = "entitlements_missing"
    • FEATURE_DISABLED = "feature_disabled"
  • Kept: PASSED = "passed"

Simplified GuardrailValidationResult Model

  • Removed: validation_passed boolean field
  • Updated: result field now has alias="result" and is the primary field
  • Kept: reason field for explanatory text

Updated DeterministicGuardrailsService

  • Removed all validation_passed parameters from instantiations
  • Changed FAILED to VALIDATION_FAILED enum value
  • Simplified instantiations to only include result and reason

Test Updates

  • Replaced all validation_passed assertions with result enum checks
  • Updated 27 tests to use the new format
  • All tests pass ✅

Documentation

  • Updated comments in _evaluators.py to reflect new result types

Breaking Changes

⚠️ This is a breaking change:

  • The validation_passed field has been removed
  • Code that directly instantiates GuardrailValidationResult must use the result enum field instead
  • Enum values have changed: FAILEDVALIDATION_FAILED, SKIPPED removed

Version

Bumped version from 0.1.4 to 0.1.5

@apetraru-uipath apetraru-uipath changed the title Add result field for GuardrailValidationResult to support skip result feat: add result field for guardrail validation result to support skip result Jan 14, 2026
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_result_enhancement branch 3 times, most recently from 576e4d8 to 85c5f45 Compare January 14, 2026 14:53
@apetraru-uipath apetraru-uipath changed the title feat: add result field for guardrail validation result to support skip result feat: add result field for guardrail validation result to support entitlements checks Jan 14, 2026
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_result_enhancement branch 2 times, most recently from 5df5987 to 25d2d09 Compare January 14, 2026 15:08
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_result_enhancement branch from 25d2d09 to d9c744c Compare January 14, 2026 16:26
@apetraru-uipath apetraru-uipath merged commit 9511431 into main Jan 15, 2026
13 checks passed
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.

2 participants