-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
category::testingTest coverage and qualityTest coverage and qualityseverity::lowMinor issues or enhancementsMinor issues or enhancements
Description
Current Coverage Status
Latest measurement (Oct 31, 2025):
- Main package: 72.2% statement coverage
- pg package: 91.9% statement coverage
- Gap to 80% target: 7.8 percentage points
This issue tracks the final push to reach our 80% coverage goal. We've already made excellent progress (from 55.6% in issue #51), and now need focused test additions for specific functions.
Priority Functions Needing Coverage
Priority 1: Functions <70% (Biggest Impact)
-
callContains- 56.5% coverage- Test JSON array contains with
?operator - Test NULL handling in contains operations
- Test empty string/array edge cases
- Test contains with special characters needing escaping
- Test JSON array contains with
-
visitExistsOneComprehension- 64.0% coverage- Test zero matches scenario
- Test exactly one match (happy path)
- Test multiple matches scenario (should fail/error)
- Test with empty arrays
-
visitMapComprehension- 66.7% coverage- Test complex transformations (arithmetic, string operations)
- Test nested map() operations
- Test map with filter conditions
- Test map with different return types
-
callIndexOf- 67.7% coverage- Test offset parameter edge cases
- Test not-found scenarios (should return -1)
- Test negative offsets
- Test offset beyond string length
-
callSubstring- 68.0% coverage- Test single-argument version (substring from index to end)
- Test two-argument version (substring with length)
- Test negative indices
- Test out-of-bounds scenarios
-
visitAllComprehension- 69.2% coverage- Test with empty arrays
- Test all true scenario
- Test all false scenario
- Test nested all() operations
- Test all() with complex conditions
Priority 2: Functions 70-79% (Polish)
-
visitFilterComprehension- 70.4% coverage- Test complex filter conditions (multiple ANDs/ORs)
- Test filter with nested field access
- Test filter on JSON arrays
-
visitExistsComprehension- 72.0% coverage- Test exists on empty arrays
- Test exists with complex predicates
- Test nested exists() operations
Functions Explicitly Excluded
These functions are intentionally not targeted (0% coverage is acceptable):
getFieldElementType- Only used in rare ElementType scenarioscallQuote- Intentionally returns error (not part of CEL standard)visitTransformListComprehension- Not reachable by pattern analyzervisitTransformMapComprehension- Not implementedvisitTransformMapEntryComprehension- Not implementedvisitStructMsg- Not supported in standard CEL
Success Criteria
- Main package coverage reaches 80%+
- All 8 priority functions reach 80%+ individual coverage
- All tests pass with
make test - Code passes linting with
make lint - No regressions in existing functionality
Related Issues
- Closes Test Coverage Gaps - Only 55.6% Coverage #51 (original coverage tracking issue)
Metadata
Metadata
Assignees
Labels
category::testingTest coverage and qualityTest coverage and qualityseverity::lowMinor issues or enhancementsMinor issues or enhancements