ADR-0045: Native DateTimeOffset payloads with explicit query semantics¶
Accepted for the narrow NEXT-RUNTIME slice, 12 October 2026. Native arrays, other temporal types and broader EF models remain deferred.
AgentMemory's existing native timestamps justify one native payload type. Existing application converters to UTC ticks retain their current precedence and rejection rules; requiring them for native data would require a storage rewrite.
Decision¶
Use a native DateTimeOffset mapping with no EF value converter. The existing GraphPropertyBinding transport boundary constructs driver ZonedDateTime and decodes through its checked ToDateTimeOffset method. Exact driver commit f8a4020c589489a92c969856d6a624619080d276 preserves tick precision and numeric offsets; conversion rejects sub-tick precision, date overflow and unsupported offsets. A named zone is represented by its effective numeric offset. An unchanged tracked read performs no write. A later assignment cannot preserve an IANA identity that DateTimeOffset does not contain.
The default EF ValueComparer uses EqualsExact and hashes wall-clock ticks plus offset, detecting offset-only payload edits. EF remains the sole tracker. Application-provided value comparers retain EF's normal authority over mutation detection. Native temporal PK/alternate/FK identity and concurrency-token roles reject explicitly, including converters whose provider representation is temporal. Native identity and CLR instant equality are not interchangeable. Existing application keys and integer versions continue working.
LINQ binary comparisons normalize native operands to UTC using a null-guarded datetime conversion; ordering normalizes as well, preserving existing null ordering. Original temporal values are projected and saved. The small syntax IR gains a UTC instant expression/order flag rather than a second query pipeline. Mixed native/explicit-converted property comparisons reject. Contains, object.Equals, arithmetic and temporal aggregates do not acquire accidental support. Fluent Cypher preserves its native equality/order contract and uses the same transport/projector binding.
Schema manifests report ZONED DATETIME. Ontology mappings, scaffolding policy and migration generation are not silently expanded.
Evidence and consequences¶
The user-facing rules are in nulls, types and time; the detailed semantic matrix is a maintainer-local record. The driver-only read spike proves nine null/offset/boundary/tick round trips, native-versus-instant equality, adjacent ticks, named-zone normalization and four rejection cases on Community 2026.09.0. All 766 provider units pass. Four native provider live facts and one existing explicit-converter fact pass, including 69 new CLR predicate oracles and 63 existing converted ones, node and identified-edge payloads, native Fluent values, rollback/bulk/integer concurrency and unchanged named-zone reads. One unit test initially omitted ValueGeneratedNever for its integer key; correcting its mapping produced a clean run. No runtime workaround was needed.
Normalization can prevent direct index seeks/order satisfaction; correctness takes precedence and no performance claim is made. Record a future index-aware optimization with a differential oracle and actual plan/work evidence. This slice does not qualify native temporals on the separate 5.26 read-only profile. Final immutable source/package qualification remains a separate gate.
Pinned EF source: CoreTypeMappingParameters. Pinned driver source: ZonedDateTime. Native comparison contract: Neo4j ordering/equality.