sched: address R3 blockers on pagination, intervals, and fail-closed polling

This commit is contained in:
lda
2026-09-08 10:39:45 +07:00 Verified
parent 73cb08e5ca
commit be8b40e184
4 changed files with 233 additions and 52 deletions
+8 -2
View File
@@ -164,11 +164,17 @@ def test_history_pagination_over_resolved_utc(tmp_path: Path) -> None:
)
page = store.list_occurrences("a", limit=2)
assert page["total"] == 3
assert page["next_cursor"] == "2"
assert page["next_cursor"] is not None
assert "|" in str(page["next_cursor"])
assert len(page["occurrences"]) == 2 # type: ignore[arg-type]
second = store.list_occurrences("a", cursor="2", limit=2)
second = store.list_occurrences(
"a", cursor=page["next_cursor"], limit=2 # type: ignore[arg-type]
)
assert second["next_cursor"] is None
assert len(second["occurrences"]) == 1 # type: ignore[arg-type]
# Legacy integer offsets remain accepted.
legacy = store.list_occurrences("a", cursor="2", limit=2)
assert len(legacy["occurrences"]) == 1 # type: ignore[arg-type]
def test_inspection_payload_carries_contract_fields(tmp_path: Path) -> None: