Skip to content

Unify the two pagination stacks into one #30

Description

@OmarAlJarrah

Problem

Two parallel pagination implementations exist — pagination/* (Paginator + Page + strategies) and http/paging/* (PagedIterable + PagedResponse + PagingOptions) — with different close semantics. PagedIterable.byPage() leaks a connection unless the caller closes (PagedIterable.kt:100-105).

Proposed change

Collapse to one stack: a single Page<T> + driver, enriched with the links/status/headers that PagedResponse carries. Preserve the max-pages cap, per-page close, and interrupt-aware blocking. Eliminate the byPage leak.

Acceptance

  • One pagination surface
  • No connection leak on partial consumption
  • Tests + apiDump

Coordinate with async pagination + exception collapse.

Dependencies


Priority: high · Effort: large

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-coresdk-core toolkittech-debtsimplification / cleanup

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions