Skip to content

test(extapi): disable the cursor-advances case until the API is fixed - #2221

Merged
giokur merged 2 commits into
mainfrom
test/disable-cursor-pagination-case
Sep 17, 2026
Merged

giokur merged 2 commits into
mainfrom
test/disable-cursor-pagination-case

Conversation

@giokur

@giokur giokur commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Why

ExtApi: Cursor advances to a disjoint page has failed on all five nightlies on record: 09-11,
09-14, 09-15, 09-16, 09-17. The cause is a product defect, filed as
https://app.clickup.com/t/86akk8pyu.

Cursor pagination over-fetches limit + 1 precisely to detect a next page, truncates back to limit,
then re-derives the answer from the truncated list:

boolean hasNextPage = pageItems.size() == normalizedPagination.getLimit();

That cannot distinguish the two cases:

rows remaining repository returns after truncation flag says truth
more than limit limit + 1 limit true true
exactly limit limit limit true false

So hasNextPage is true on every exactly-full page and the endCursor it advertises leads to an
empty one. Three sites share the shape — OrganizationQueryService:64, DeviceService:213,
TicketService:101 — and DeviceService:131, in the same class as one of them, already does it the
right way.

On the 09-17 nightly the first call returned one customer with hasNextPage true and cursor
NmFhYjQ5YzY4OGFjYzk1NTRiMTE5OTk3 (ObjectId 6aab49c688acc9554b119997); following it returned
nothing.

What changed

@Disabled("Wait for bug fix") on the one method, and a two-line note pointing at the ticket.

The assertion is left as it is. It states the contract we want — follow a cursor the API advertised
and get rows back — and relaxing it to tolerate an empty page would lock the defect in.

Scope

Only this case. Its siblings in the class still cover page size, a malformed cursor and a cursor
pointing past the end, and all of them pass. In particular ExtApi: Cursor pointing past the end returns an empty page passing is what shows empty pages themselves are handled correctly and only the
flag is wrong.

Effect

Removes the last standing red from the external API phase of every nightly.

🤖 Generated with Claude Code

`ExtApi: Cursor advances to a disjoint page` has failed on all five nightlies on
record — 09-11, 09-14, 09-15, 09-16, 09-17 — and the cause is a product defect.

Cursor pagination over-fetches `limit + 1` to detect a next page, truncates to
`limit`, then re-derives the answer from the truncated list:

    boolean hasNextPage = pageItems.size() == normalizedPagination.getLimit();

That cannot tell "exactly full" from "full and more to come", so the flag is true
on every exact-multiple boundary and the endCursor it returns leads to an empty
page. Three sites share it: OrganizationQueryService:64, DeviceService:213 and
TicketService:101. DeviceService:131, in the same class, already does it the
right way.

Filed as https://app.clickup.com/t/86akk8pyu.

Disabled rather than weakened. The assertion states the contract we want — follow
a cursor the API advertised and get rows — and relaxing it to tolerate an empty
page would lock the defect in.

Only this case is disabled. Its siblings still cover page size, a malformed
cursor and a cursor pointing past the end, and all of them pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

🦩 Flamingo Code Review

No findings on the current head.

Mode: advisory


Need another pass? Commits pushed after this review are not reviewed automatically.

  • Review the new commits — the commits added since this review
  • Review the whole diff again — ignoring what was already reviewed

Prefer typing? Comment @flamingo-review, or @flamingo-review full. To review every push on this pull request, add the flamingo-review-always label.

React 👍/👎 on inline comments to teach the reviewer.

Started 2026-09-17 06:34 UTC · updated 2026-09-17 06:34 UTC · workflow run

@giokur
giokur enabled auto-merge (squash) September 17, 2026 07:06
@giokur
giokur merged commit e906a0b into main Sep 17, 2026
10 of 11 checks passed
@giokur
giokur deleted the test/disable-cursor-pagination-case branch September 17, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants