fix: show expiry-filter sample stats so ops map filter effect is visible

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-02 10:48:40 +08:00
parent 3e492eb46c
commit 56f58a12bd
6 changed files with 143 additions and 27 deletions
+3 -1
View File
@@ -14,6 +14,8 @@ def test_filter_min_hours():
{"ts_ms": ts_10h, "expiry_ymd": ymd, "side": "P"},
]
assert hours_to_expiry_at(ts_20h, ymd) == 20
kept = filter_rows_min_hours_to_expiry(rows, min_hours=12)
kept, meta = filter_rows_min_hours_to_expiry(rows, min_hours=12)
assert len(kept) == 1
assert kept[0]["side"] == "C"
assert meta["raw_sample_count"] == 2
assert meta["filtered_sample_count"] == 1