refactor(usage): final round-6 nits on PR #871
- semantic.py: normalize both None and [] doc_types to null in the metadata so a future `metadata->'doc_types' IS NULL` query counts the all-types case consistently. - test: use a fixed past date in test_occurred_at_roundtrip instead of a future literal (deterministic, no "why this date" confusion). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c89f724585
commit
98de8f331f
@@ -185,7 +185,7 @@ async def test_occurred_at_roundtrip(storage, monkeypatch):
|
||||
_set_metering(monkeypatch, True)
|
||||
store = UsageEventStore(storage)
|
||||
eid = str(uuid.uuid4())
|
||||
when = datetime(2026, 6, 10, 12, 0, 0, tzinfo=timezone.utc)
|
||||
when = datetime(2026, 1, 15, 12, 0, 0, tzinfo=timezone.utc)
|
||||
await store.record_usage_event(
|
||||
metric="pages_chunks", value=1, event_id=eid, occurred_at=when
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user