Check an instant in a range that includes the start and excludes the end.
Practical CEL4 test casesDocumented
What will I practise?
You can create a half-open time interval from three RFC 3339 strings.
How is it checked?
Your one expression must produce the expected result for all four JSON inputs.
When am I done?
When all tests pass and you can explain every condition in your expression.
Word problem
An event belongs to a time window when it occurs at or after the start and strictly before the end.
Exact requirements
Parse all values as timestamps.
Include an event exactly at start.
Exclude an event exactly at end.
Do not compare the source strings.
Required result
Write one CEL expression. It must return the expected value and type for all four prepared JSON inputs. Do not change the inputs to make an incomplete expression pass.
Recommended procedure
Translate each numbered requirement into one small boolean condition.
Run the starter expression and inspect which cases fail.
Add one condition at a time and run the complete suite again.
Mark the challenge complete only when you can explain every operator and every boundary.
Solve the challenge · browser test suite
Write one expression that passes every case
Edit the CEL expression, then run it against all prepared JSON inputs. A solution is complete only when every case passes.
4 test cases
Hint: The exact start is valid; the exact end no longer belongs to the window.
Each RFC 3339 string is converted with timestamp().
>= creates the inclusive start.
< creates the exclusive end.
The conjunction forms one half-open time interval.
What the test cases prove
Inside window: expected true (bool).
Exact start: expected true (bool).
Exact end: expected false (bool).
Before start: expected false (bool).
The cases are intentionally different. A solution that passes only the first case has not yet implemented the complete rule.
Common mistake
Do not optimise the expression for the first successful input. A requirement is implemented only when its positive case, negative case, and boundary case all produce the stated result.
Knowledge check
Can you point to the exact part of the solution that makes each false test case fail? If two different failures depend on the same condition, explain why.
Key takeaway
You can create a half-open time interval from three RFC 3339 strings.
Sources
CEL-DEV — official CEL overview.
CEL-LANG — official CEL language definition for operators, types, macros, presence, strings, and time values used in this challenge.