You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unify CEL's two definitions of "today": today() is local, days_since/days_until are UTC #2843
A Play author has no way to know which function follows which clock. Two conditions that read as equivalent are not:
node.due_date == today() // local
days_until(node.due_date) == 0 // UTC
East of UTC after local midnight, and west of UTC before it, these disagree.
Why this is worth fixing rather than documenting
Found as the root cause of a test flake in #2777: a fixture built a date from Utc::now() while the condition it fed used today(). The mismatch was invisible under the host timezone and reproduced deterministically under TZ=Pacific/Auckland. That instance was patched downstream, but the underlying inconsistency is still there for the next author.
The failure mode is bad: a Play works for months, then misfires for users in one hemisphere, on some days, with no error. Nothing in the condition text hints that two date functions disagree.
Not urgent
No shipped Play mixes the two. The Linear recipe uses today() only. This is a latent trap rather than a live bug.
Deciding which way to unify
Both directions are defensible and the choice has real consequences:
Local everywhere — matches what a user means by "today" when they look at a calendar. But cron scheduling and derived identity (ADR-074) reason about wall clock across devices, so a local-date rule fires at different absolute instants per device.
UTC everywhere — consistent across devices and sync, but today() would stop meaning the user's today, which is almost certainly what a Play author intends when they compare against a due_date a human typed.
Worth deciding deliberately rather than by whichever call site is edited next.
Acceptance Criteria
today(), days_since() and days_until() agree on which clock defines a date
The choice is recorded with its rationale (ADR or a comment at the definitions), including what it means for multi-device firing
A test pins the agreement — ideally one that fails under a non-UTC TZ if they diverge again
architecture/playbook-system.md's Built-in CEL Functions table states which clock applies
Activity
Address round 5: pin the reverse-segment branch, rewrite schema param…
Address round 5: pin the reverse-segment branch, rewrite schema param…
Add the Linear-style methodology recipe, installable from onboarding …
mstomar125 commentedon Sep 23, 2026
Frontend: 5264 passed