fix(analytics): 扫描器水位>=/无水位自卫/迟到测试判别力/分片flush

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-04 20:30:34 +08:00
parent aa59461b03
commit 956f243fce
2 changed files with 33 additions and 7 deletions
+3 -2
View File
@@ -137,9 +137,10 @@ async def test_late_arriving_history_scanned(make_client):
r1 = await scanner.run_incremental(session)
await session.commit()
assert r1["hits"] == 1
# 迟到行:timestamp 很老(fetched_at 现在)
# 迟到行:timestamp 比 m_old 的还老(fetched_at 现在)——
# 错误的 timestamp 水位实现会漏掉它,fetched_at 水位必须抓到
session.add(_msg("m_late", "迟到的私单", dt.datetime(2026, 9, 4, 12, 0),
ts=1767000000000))
ts=1735000000000))
await session.commit()
r2 = await scanner.run_incremental(session)
await session.commit()