diigo-cache: a short page before the stated end peeks at the next page
The real fill failed at "diigo returned 44 items for page 167 of 168": diigo's `total` overstates what load_user_items returns, so the true last page looked short and the guard took it for a capped page size. A short page that isn't the last by `total` now fetches the next page (paced like any diigo call): empty means the data really ends there — accepted, with a "total-overstated" notice logging total vs actual; anything else means items would be skipped — refused, the message now giving both counts. The fake gains an account whose total claims 60 more than it has; a fill on it runs to done. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
f4b68f1b59
commit
f5d57f73d3
4 files changed
+65
-17
No files matched your search
@@ -131,6 +131,14 @@ describe("fill job (goal 1e)", () => {
|
||||
expect(status?.error).toMatch(/page size not honored/);
|
||||
});
|
||||
|
||||
it("fills to the real end when diigo's total overstates its items", async () => {
|
||||
const stub = await wired("fake-overstated-webapp");
|
||||
await stub.startFill();
|
||||
await drain(stub);
|
||||
expect(await stub.fillStatus()).toMatchObject({ state: "done" });
|
||||
expect((await stub.page(3, PAGE_SIZE)).items).toHaveLength(50);
|
||||
});
|
||||
|
||||
it("a job saved under another page size fails instead of resuming; a new start replaces it", async () => {
|
||||
const stub = await wired();
|
||||
// the shape a 24-per-page job left in storage (no pageSize field)
|
||||
|
||||
Reference in new issue
Block a user