Update CEL crate to v0.11.0 and enhance documentation validation#7
Merged
Conversation
- Added test cases to 12 previously untested functions in documentation - Fixed role hierarchy bug in access control (required_level: 0 vs 1) - Corrected Python if-else syntax to CEL ternary operators - Fixed invalid has() usage with string literals vs field references - Enhanced business logic tests with proper validation contexts - Added comprehensive batch processing and rule composition validation - Updated all cookbook examples to verify CEL expressions actually work - Ensured mktestdocs tests validate business logic accuracy, not just syntax
- Document breaking changes from cel-interpreter to cel crate - Added comprehensive notes on API compatibility maintenance - Updated dependency versions and migration details
c4a5b1d to
2469587
Compare
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.
Update CEL crate to v0.11.0 and enhance documentation validation
Summary
This PR updates the underlying CEL implementation from v0.10.0 to v0.11.0 and improves our documentation testing to ensure all examples are properly validated.
CEL v0.11.0 Update
Breaking Changes
cel-interpreter→celIntoFunctiontraitArgumentsextractor for variadic argumentscel_interpreter::imports updated to::cel::API Compatibility
Documentation Validation Enhancements
Problem Identified
mktestdocswas only testing Python syntax, not whether CEL expressions actually worked correctlySolution Implemented
Files Enhanced
docs/how-to-guides/access-control-policies.md- Added hierarchical, time-based, and resource-specific access control validationdocs/how-to-guides/business-logic-data-transformation.md- Added comprehensive business rule validation with proper contextsdocs/how-to-guides/error-handling.md- Added security validation for safe expression evaluationdocs/how-to-guides/production-patterns-best-practices.md- Added performance monitoring and complex expression validationKey Fixes
required_level: 1→required_level: 0to allow guest access to public resourceshas('string')→has(field)macro usage1 + 1 == 2tests with meaningful business rule validationTesting Status
Migration Impact
For Users
For Developers
IntoFunctiontrait system (internal only)Future Compatibility
Analysis of upcoming cel-rust developments shows:
type()function (missing from current CEL spec compliance)Verification
Note: Warning messages in test output are expected and intentional - they test error conditions, security validation, and exception handling to ensure robust error handling works correctly.
This update maintains full backward compatibility while providing significant improvements to both the underlying CEL engine and our documentation quality assurance.