Keep the sweep of a reader whose cursor is a tuple, so Workday and SuccessFactors boards over 100 pages finish across pulls, and end a read incomplete on a page with nothing new while a cursor follows, whatever the total, which SuccessFactors now hands back on a repeated page

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-05 09:51:16 +02:00
1 parent 85aed0807b
commit 7f37270eb3
6 files changed
+219 -18

No files matched your search

+7 -1
View File
@@ -618,7 +618,13 @@ def test_the_page_cap_leaves_a_board_incomplete(
def fake_get(client, url, host, slug, *, method="GET", payload=None):
calls.append(payload)
return _page("workable.json") # always another page
# Always another page of roles not read yet: a page of nothing new
# would be a stall, which ends the read before the cap.
page = json.loads(_page("workable.json"))
page["total"] = 100
for result in page["results"]:
result["id"] = f"{result['id']}-{len(calls)}"
return json.dumps(page).encode()
monkeypatch.setattr(ats, "MAX_PAGES", 3)
monkeypatch.setattr(ats, "_get", fake_get)