Conversation
Tonours
force-pushed
the
fix/date-interval-inclusive-start
branch
from
September 10, 2026 16:41
d08a614 to
1e7d0c9
Compare
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (2)
🛟 Help
|
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.

What
One rule, applied everywhere it had been written down: a date interval is half-open,
[start, end).datasource-toolkit—interval()now emitsGreaterThanOrEqualon aDatecolumn, as it already did onDateonly. CoversToday,Yesterday,PreviousWeek/Month/Quarter/Year,PreviousXDaysand the…ToDatefamily.datasource-toolkit—FilterFactory.getPreviousPeriodFilter, the comparison window of the growth charts, gets the same inclusive start and a proper exclusive end (it usedendOf, which dropped the period's final millisecond).workflow-executor— the deterministic condition evaluator deliberately mirrored the old asymmetry; it now mirrors the new rule.Why
On a
Datecolumn both bounds were strict, so a record stored at exactly local midnight satisfied none of them: notToday, notYesterday, notPreviousMonth. It was unreachable by every date filter the product offers. Rows that no question can return is the defect here — the fix stands on its own, with or without a second agent generation in the picture.The blast radius is larger than "one instant per day" suggests. Columns fed by an import or by a business date are routinely truncated to midnight; for a project whose timezone matches the truncation zone, the unreachable set is not a row, it is a table. #1231 fixed this for
Dateonlyand leftDatebehind.The v1/v2 observation that surfaced it — the same
Todayquestion returning the row on a v1 liana and not on a v2 agent — is a consequence of the defect, not the reason to fix it. v1 was right.Why the other two files
Fixing only
interval()would have moved the disagreement rather than ended it:deterministic-condition-evaluator.tssays in a comment that it replicates the toolkit's bound precisely so that they agree; the comment and the test that pinned it both move with the rule.Scope and safety
The change is monotone. A row that satisfied an interval still satisfies it; rows are only added. Nothing empties, no screen breaks, no query shape is new — the
Orthat appears for a datasource without a nativeGreaterThanOrEqualis the pre-existingcomparison.tsfallback, the same shape the search decorator already emits on every field type.It is still a behaviour change: counts go up and a KPI can move. It should ship as a minor with a release note, not as a silent patch — hence
feat:rather thanfix:.Not changed:
Dateonly(already inclusive), the upper bound (inclusive on both ends would put a midnight record in two days and double-count it), and the operator set advertised to the frontend.How to test
datasource-toolkit489/489,workflow-executor1783 passed / 7 skipped,agentchart routes 24/24,datasource-customizergreen. Thedatasource-sequelizeanddatasource-mongooseintegration suites need database containers; without them every failure is a connection error and there are zero assertion mismatches.The invariant is pinned in two places rather than asserted through expected operator strings:
time.test.tsevaluates an instant at local midnight throughConditionTree.matchand checks it is inTodayand in no other day;deterministic-condition-evaluator.test.tschecks the same tiling property for the evaluator.Known limitation
The other SDKs (Python, PHP, Ruby) carry the same
interval()and keep the strict bound until this is ported. Until then Node v2 agrees with v1 lianas and differs from its sibling SDKs on the boundary instant.Definition of Done
General
Security