# pagination-resume pydantic_v2.BaseModel, pydantic_v2.dataclass, dataclasses.dataclass, typing.TypedDict, msgspec.Struct
  initial checkpoint = None
  > GET https://api.example.com/v1/users?limit=3
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: trace-secret, cookie: session=cookie-secret] b''
  first page = [1,2] continuation='a' status=200 attempts=1
  server value='a' encoded="a" progress={'pages': 1, 'items': 2}
  resumed progress={'pages': 0, 'items': 0}
  > GET https://api.example.com/v1/users?cursor=a&limit=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: new-trace, cookie: session=new-cookie] b''
  caller arguments supplied again ['3']
  exhausted checkpoint = None
  initial caller cursor = None
  > GET https://api.example.com/v1/users?cursor=start
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  partial first item = '1'
  partial boundary = None
  > GET https://api.example.com/v1/users?cursor=start
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  partial page repeats from boundary ['1', '2']
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  previous page item = '1'
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  partial next page item = '2'
  previous server boundary = 'a'
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  restart buffered page ['2', '3']
  closed checkpoint = 'a'
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  checkpoint during fetch ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='checkpoint.fetching') [field_path=('checkpoint', 'fetching')] invalid_state
  fetching checkpoint preserves traversal ['5']
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  resumed cursor cycle ['4'] ! ProtocolDataError: ProtocolDataError(reason='pagination_cycle') [location=BodySelector(pointer='/next_cursor')] pagination_cycle
  cycle checkpoint = 'a'
  resumed zero item limit sends nothing []
  > GET https://api.example.com/v1/archive/a2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  path continuation 'a2' ['6']
  path continuation '..' [] ! DecodeError: DecodeError(operation_id='listArchive', reason='unencodable', location='path.cursor') [operation_id='listArchive', location=('path', 'cursor'), body_bytes=b'', truncated=False, cause=ParameterEncodingError("A path value cannot make its segment '.' or '..', which URL normalization removes")] unencodable
  non-JSON continuation ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  nonfinite continuation ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  removed cursor cap ! TypeError: PaginationOptions.__init__() got an unexpected keyword argument 'max_cursor_bytes' []
  removed page cap ! TypeError: PaginationOptions.__init__() got an unexpected keyword argument 'max_page_bytes' []
  offsets initial checkpoint = None
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  offsets first page = [1,2] continuation=2 status=200 attempts=1
  offsets server count = 2
  > GET https://api.example.com/v1/users?offset=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  offsets resumed ['3']
  offsets negative ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  offsets boolean ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  offsets text ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  numbered initial checkpoint = None
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  numbered first page = [1,2] continuation=2 status=200 attempts=1
  numbered server count = 2
  > GET https://api.example.com/v1/users?page=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  numbered resumed ['3']
  numbered negative ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  numbered boolean ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  numbered text ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  initial offset = None
  > GET https://api.example.com/v1/users?offset=7
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  partial offset item = '1'
  partial offset boundary = None
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/v1/users?page=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  total ends a first run at its last page ['1', '2', '3']
  > GET https://api.example.com/v1/users?page=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/v1/users?page=3
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  total resumed counts from its page to an empty page ['3']
  > GET https://api.example.com/v1/users?page=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/v1/users?page=3
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  total resumed counts from its page to an error ['3'] ! NotFoundError: Error code: 404 - {"detail":"no page"} [operation_id='listUsers', status_code=404, body=b'{"detail":"no page"}', body_bytes=b'{"detail":"no page"}', truncated=False]
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  follow first page = [1] continuation='https://api.example.com/v1/users?cursor=a' status=200 attempts=1
  follow server URL='https://api.example.com/v1/users?cursor=a'
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  follow resumed ['2']
  follow other origin ! ProtocolDataError: ProtocolDataError(reason='value') [location=BodySelector(pointer='/next')] value
  follow userinfo ! ProtocolDataError: ProtocolDataError(reason='value') [location=BodySelector(pointer='/next')] value
  follow relative URL ! ProtocolDataError: ProtocolDataError(reason='value') [location=BodySelector(pointer='/next')] value
  follow fragment ! ProtocolDataError: ProtocolDataError(reason='value') [location=BodySelector(pointer='/next')] value
  follow bad percent ! ProtocolDataError: ProtocolDataError(reason='malformed') [location=BodySelector(pointer='/next')] malformed
  follow wrong type ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  linked first page = [1] continuation='https://api.example.com/v1/users?page=2' status=200 attempts=1
  linked server URL='https://api.example.com/v1/users?page=2'
  > GET https://api.example.com/v1/users?page=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  linked resumed ['2']
  linked other origin ! ProtocolDataError: ProtocolDataError(reason='value') [location=HeaderSelector(name='Link', occurrence='all')] value
  linked userinfo ! ProtocolDataError: ProtocolDataError(reason='value') [location=HeaderSelector(name='Link', occurrence='all')] value
  linked relative URL ! ProtocolDataError: ProtocolDataError(reason='value') [location=HeaderSelector(name='Link', occurrence='all')] value
  linked fragment ! ProtocolDataError: ProtocolDataError(reason='value') [location=HeaderSelector(name='Link', occurrence='all')] value
  linked bad percent ! ProtocolDataError: ProtocolDataError(reason='malformed') [location=HeaderSelector(name='Link', occurrence='all')] malformed
  linked wrong type ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='state') [field_path=('state',)] invalid_value
  supplied URL checkpoint='https://api.example.com/v1/users?cursor=a' key kept=False
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  supplied URL removes echoed key ['3'] ! ProtocolDataError: ProtocolDataError(reason='pagination_cycle') [location=BodySelector(pointer='/next')] pagination_cycle
  supplied URL checkpoint='https://api.example.com/v1/users?cursor=a&sig=stale' sig kept=True
  initial body cursor = None
  > POST https://api.example.com/v1/searches
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 37] b'{"query":"original","cursor":"start"}'
  body first page = [1] continuation='a' status=200 attempts=1
  body checkpoint is cursor only = 'a'
  > POST https://api.example.com/v1/searches
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 36] b'{"query":"replacement","cursor":"a"}'
  caller supplies replacement body ['2']
  required body supplied again ! TypeError: SearchesAllPagination.resume() missing 1 required keyword-only argument: 'body' []
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: first] b''
  bound first page = [1] continuation='a' status=200 attempts=1
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: s1] b''
  > GET https://api.example.com/v1/users?cursor=b
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: s2] b''
  caller resupplies binding ['2', '3']
  > GET https://api.example.com/v1/users?cursor=a&limit=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  literal binding on resumed first page ['4']
  > GET https://api.example.com/v1/users?cursor=a&since=2026-01-02
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/v1/users?cursor=b&since=2026-01-03
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  typed binding target keeps the caller's argument ['5', '6']
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  page limit ['1'] ! SessionLimitError: SessionLimitError(reason='pages', limit=1) [limit=1] pages
  limited checkpoint = 'a'
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  resume starts fresh page limit ['2']
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  item limit at partial page ['1'] ! SessionLimitError: SessionLimitError(reason='items', limit=1) [limit=1] items
  limited partial boundary = None
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  caller chooses larger item limit ['1', '2']
  > GET https://api.example.com/v1/users
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/v1/users?cursor=a
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  item limit in a later page ['1', '2', '3'] ! SessionLimitError: SessionLimitError(reason='items', limit=3) [limit=3] items
  limited boundary before its page = 'a'
  async initial checkpoint = None
  async initial resumed = {'pages': 0, 'items': 0}
  > GET https://api.example.com/v1/users?limit=2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, cookie: session=cookie-secret] b''
  async first item=1
  async partial checkpoint = None
  async complete page cursor = 'a'
  > GET https://api.example.com/v1/users?cursor=a&limit=1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, cookie: session=new-cookie] b''
  async supplied arguments ['3']
  async closed checkpoint = 'a'
