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
_isIsoDateTime (lib/src/spec_rules/concept_rules.dart, unchanged on main) accepts any string that contains T and that DateTime.tryParse accepts. tryParse rolls out-of-range fields over instead of rejecting them, so impossible timestamps pass invalid-generated and invalid-verified:
Value
Accepted
Parsed as (UTC)
2026-13-40T17:46:35Z
yes
2027-02-09T17:46:35Z
2026-09-11T25:61:61Z
yes
2026-09-12T02:02:01Z
2026-02-30T10:00:00Z
yes
2026-03-02T10:00:00Z
2026-09-11T17:46 (no offset)
yes
the reader's local time zone
Date-only values are already strict: parseIsoDate round-trips its result and rejects non-canonical spellings. Timestamps have no equivalent check.
Proposal
Add one strict timestamp parser, for example parseOkfTimestamp. It would accept the ISO 8601 extended format with an explicit offset, check each field's range, and round-trip the value.
Use that parser everywhere a timestamp is read:
the invalid-generated / invalid-verified rules
OkfGeneration.atDateTime and OkfVerification.isUsable
staleness
graph metadata
Today these paths separately accept String or DateTime through _scalarString, _parseDateTime and DateTime.tryParse. One parser simplifies them and makes them agree.
Summary
_isIsoDateTime(lib/src/spec_rules/concept_rules.dart, unchanged onmain) accepts any string that containsTand thatDateTime.tryParseaccepts.tryParserolls out-of-range fields over instead of rejecting them, so impossible timestamps passinvalid-generatedandinvalid-verified:2026-13-40T17:46:35Z2027-02-09T17:46:35Z2026-09-11T25:61:61Z2026-09-12T02:02:01Z2026-02-30T10:00:00Z2026-03-02T10:00:00Z2026-09-11T17:46(no offset)Date-only values are already strict:
parseIsoDateround-trips its result and rejects non-canonical spellings. Timestamps have no equivalent check.Proposal
Add one strict timestamp parser, for example
parseOkfTimestamp. It would accept the ISO 8601 extended format with an explicit offset, check each field's range, and round-trip the value.Use that parser everywhere a timestamp is read:
invalid-generated/invalid-verifiedrulesOkfGeneration.atDateTimeandOkfVerification.isUsableToday these paths separately accept
StringorDateTimethrough_scalarString,_parseDateTimeandDateTime.tryParse. One parser simplifies them and makes them agree.Once Adopt OKF spec 62432a0: every timestamp is an ISO 8601 datetime with an explicit offset #56 lands, a missing offset should be reported too, because OKF now requires an explicit one.
The findings stay advisory, as they are today. The fix only makes them fire on invalid values.