Before inheriting UTC sortedness for local calendar dates
A calendar reversal after timezone conversion differs from UTC order. Derive the minimum from actual values rather than trusting the flag.
Does the conversion retain monotonicity?
Timezone and local-date transformations need not preserve monotonicity. Recheck actual order and an independently derived minimum after conversion. UTC sortedness is a historical fact about the original representation, not approval of the transformed calendar sequence. Provide Truthound with a minimum date independently derived from the actual local-date list. [1, 2, 3]
The scope extends to other temporal operations
Polars #28560 reports stale sorted flags after timezone-aware date or truncation transformations, producing wrong min or sort results. Follow-up triage also identifies join_asof and group_by_dynamic under the reported timezone conditions. This does not imply every timezone and temporal conversion fails. [1]
Retain UTC and local values together
Preserve original UTC values, timezone policy, and local results. Independently compute the minimum from the actual list, withholding inconsistent values from date-boundary aggregates while checking order again. Do not generate the reference through the same sorted-flag shortcut. [1, 3]
The independent minimum 2010-03-04
The illustrative local dates are [2010-03-05,2010-03-05,2010-03-04,2010-03-05]. Direct date comparison gives required minimum 2010-03-04. That observed minimum passes; 2010-03-05 fails. One correct minimum still does not establish the whole sequence is sorted. [1, 3]
The minimum-comparison boundary
ColumnPairValidator in Truthound Python SDK 3.3.2 reconciles reported_min_date with independently_derived_min_date derived by the operator from actual local dates. Timezone data and transformation policies are fixed externally. Core does not clear sorted flags or execute timezone conversions; one minimum does not prove full order. [1, 2, 3]
Separate UTC and local-order contracts
Use a verified value-based sorting path and preserve UTC order and local-calendar order as separate contracts. Existing regressions under the actual conditions reduce another audit’s benefit. Never treat one representation’s flag as permission to skip examining a nonmonotonic transformation. [1, 3]
Application conditions
Retain UTC and local values and timezone policies, deriving the minimum without the same sorted shortcut.
Alternatives
Verify value-based sorting and retain UTC and local-calendar order as separate contracts.
Limitations
A matching minimum does not establish full order or every temporal aggregate and does not repair sorted flags.
Evidence
- Event checked
- Subject checked
- Modified
