Commit c6b8786
fix(facts): truncate Fact::new timestamps to microseconds
Linux's Utc::now() returns nanosecond precision; our LanceDB schema
stores Timestamp(Microsecond, UTC). On Linux CI the nanosecond tail
was dropped at storage time, so equality checks after roundtrip
failed (facts_roundtrip_through_record_batch, get_finds_inserted_fact).
macOS's Utc::now() was already microsecond-truncated in practice, so
local tests didn't catch this.
Fix: Fact::new() now truncates `created_at` via
chrono::SubsecRound::trunc_subsecs(6). In-memory timestamps now
always match what the schema can store, so roundtrip is lossless.
Any caller that sets `created_at` / `occurred_at` directly with
nanosecond precision is still on the hook — but Fact::new covers
the common path and the extract/collect pipelines use
from_timestamp-style constructors that are microsecond-based.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 290ccf0 commit c6b8786
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | | - | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
0 commit comments