Skip to content

Phase 6c: Pagination #17

Description

@Wahbeh-Mohammad

Ship the pagination engine: pluggable page strategies, the page-level view, and the item-level view, both driven
by a single async generator.

Scope

  • Page — the public, resource-owning page type; strategy parse returns a promise.
  • Item view: copy items, close the page, then yield (PAGE-11, MUST). The snippet in
    sdk-design-nodejs/07 §7.1 and the Reference section of docs/knowledge/pagination.md both have the wrong
    ordering — fix both as part of this phase; the appendix-B conformance test does not catch the violation.
  • Re-express PAGE-5's "read everything synchronously inside parse" for a runtime with no synchronous body
    read: single-use-body discipline, no retention of the response or its body past the call, no close, no
    mutation — all preserved; only the literal synchrony is not.
  • Close-exactly-once obligations (PAGE-26/PAGE-27/PAGE-32) re-expressed as finally-block obligations on
    the single generator; PAGE-25PAGE-33 disposition table (this port has one async model, so the async
    generator is the engine).
  • Runtime-guarded [Symbol.asyncDispose] delegating to close()PAGE-12 requires telling consumers to wrap
    the page view in a scoped/auto-close construct, and await using is that construct.

Spec refs

Product spec §12 (PAGE-*). sdk-design: §7.1.

Dependencies

Phases 0–5c. Independent of 6a and 6b, but the most coupled to earlier phases: 4c's Runtime, 5a's
StepContext.options, 3b's Response body.

Docs

  • Design: docs/superpowers/specs/2026-07-28-phase6c-pagination-design.md
  • Plan: docs/superpowers/plans/2026-07-28-phase6c-pagination.md
  • Validation prompt: docs/validation-prompts/phase6c-pagination-validation-prompt.md

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions