Skip to content

Verify paging against a real server, and check the published bounds - #14

Merged
darksidemilk merged 1 commit into
mainfrom
api-paging-verification
Aug 16, 2026
Merged

Verify paging against a real server, and check the published bounds#14
darksidemilk merged 1 commit into
mainfrom
api-paging-verification

Conversation

@darksidemilk

Copy link
Copy Markdown
Member

Adds two things to the API validation workflow.

Reads the paging bounds from system/info and cross-checks them against x-fog-paging in the OpenAPI document, so the two cannot drift apart unnoticed. Depends on FOGProject/fogproject#1046.

Exercises paging against the live server, which nothing did before. FogApi's paging tests are all mocked, and the real-server contexts create one host and one group — you cannot page one row. So the truncation fix had never made a paged request to a real server, which is precisely what it was about.

The new step seeds 25 hosts, asks for them at a page size of 4, and checks:

  • the walk returned every row
  • no row repeated across a page boundary
  • -First 6 stopped at six
  • Get-FogHosts agrees with host/count

That last one is the check that would have caught the original bug on any server, without needing ten thousand rows — /count reports the true filtered total and ignores paging, so it is an independent answer.

It runs before the suite so the known Pester 6 failure cannot mask it, and the clone/settings work moves into its own step now that two steps need it.

⚠️ Contains a TEMP commit pinning the self-test at api-paging-limits and fix/fog16-paging-truncation to prove both. Reverted before merge.

Two additions.

The workflow now reads the paging bounds from system/info and cross-checks
them against x-fog-paging in the document, so the two cannot drift apart
unnoticed.

More importantly it exercises paging against the live server, which nothing
did before. The suite's paging tests are all mocked, and its real-server
contexts create one host and one group - you cannot page one row. So the
truncation fix had never made a paged request to a real server. This seeds 25
hosts, asks for them at a page size of 4, and checks the walk returned every
row with none repeated across boundaries, that -First stops early, and that
Get-FogHosts agrees with host/count. That last one is the check that would
have caught the original bug on any server, without needing ten thousand rows.

It runs before the suite so the known Pester 6 failure cannot mask it, and the
clone/settings work moves into its own step now that two steps need it.

TEMP: the self-test is pinned at api-paging-limits and the FogApi paging
branch to prove both. Reverted before merge.
@darksidemilk
darksidemilk merged commit 0021e55 into main Aug 16, 2026
1 check failed
@darksidemilk
darksidemilk deleted the api-paging-verification branch August 16, 2026 22:52
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.

1 participant