Skip to content

Pagination Schemes 0.11.0: scoped coverage and independent temporal guarantees - #691

Merged
michielbdejong merged 2 commits into
mainfrom
codex/pagination-coverage
Oct 24, 2026
Merged

michielbdejong merged 2 commits into
mainfrom
codex/pagination-coverage

Conversation

@michielbdejong

@michielbdejong michielbdejong commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

A traversal can return every page without describing what key range was exhaustively observed, how stale the view may be, or whether pages share a snapshot. Pagination Schemes 0.11.0 adds four opt-in contracts: coverage, freshness, consistency, and closedPrefix. Existing documents and traversal flags keep their meaning.

For an exhaustive ascending unique-key cursor, after=9 → [10,12,15] now derives (9,15] for the effective selection and authorization scope. Separately declared initial/terminal guarantees control unbounded ends and empty tails. Explicit range-window coverage inherits the existing bounds/cap rules and needs no sorted output. Unknown guarantees stay unknown.

Freshness describes convergence or a bounded lag, independently of response/read snapshot coherence. Read snapshots require captured, carried and verified tokens; equality across polling loops is not global snapshot identity. Closed-prefix metadata describes later first visibility without implying immutable records or append-only membership. Allocation order alone cannot justify it.

Add JSON Schema definitions, semantic validation after overrides, two synthetic OpenAPI examples, and a per-response Python reference observer with scoped provenance and conservative composition. Tests cover incomplete/capped responses, wrong bounds/order, empty/final pages, exact large IDs, late visibility, mixed snapshots and pinning failures. The normative text explains stale equal observations, concurrency, lifecycle/property boundaries, and consumer compatibility. No provider overlay or Syncables/PostgreSQL runtime is upgraded; persistence remains follow-up work.

Validation: all 450 tests across 13 extension folders and all 32 validator example documents passed using pinned Python requirements. Pagination contributes 148 tests. Checked local documentation links, JSON snippets and whitespace. AI session disclosure included.

Closes #686.

Michiel de Jong added 2 commits October 24, 2026 08:37
Add Pagination Schemes 0.11.0 coverage, freshness, consistency and
closedPrefix contracts, with exact boundaries, explicit unknown defaults,
snapshot pinning, scoped provenance and conservative composition rules.
Extend schema/document validation and add a reference observer, synthetic
examples and regression tests. Existing traversal behavior is unchanged.

Claude-Session: codex://threads/01a11a49-4322-7813-aa0d-2f70ada2be33
Codex-Session: codex://threads/01a11a49-4322-7813-aa0d-2f70ada2be33
A later watermark cannot retroactively repair an older possibly stale
coverage observation. State that temporal compatibility requirement and
retain both observations independently in the regression example.

Claude-Session: codex://threads/01a11a49-4322-7813-aa0d-2f70ada2be33
Codex-Session: codex://threads/01a11a49-4322-7813-aa0d-2f70ada2be33
@michielbdejong
michielbdejong merged commit 5cbf7bc into main Oct 24, 2026
22 checks passed
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.

Pagination Schemes: declare scoped range coverage, consistency and finality guarantees

1 participant