Provide a resumable iterator that stops on cursor expiry
The client SDK retries invalid cursors forever instead of telling callers to restart.
- Focused work estimate
- 2h 30m + prerequisites
- Priority in the scenario
- Medium
- Engineering practice
- SDK design
Estimated field mix
- Developer tooling60%
- API design40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional logistics platform lists shipments for partner dashboards. Offset pagination duplicates records during updates, while unrestricted filters create expensive database queries.
Setup prerequisites
- Create a local shipment dataset with synthetic tenants, equal timestamps, and concurrent update fixtures.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
- BAPIPAGE-101 · Define supported shipment filters and their exact semantics
- BAPIPAGE-102 · Validate bounded sort options instead of accepting SQL fragments
- BAPIPAGE-103 · Enforce tenant scope before applying user filters
- BAPIPAGE-104 · Encode opaque cursors bound to the normalized query
- BAPIPAGE-105 · Use keyset traversal for shipments sharing timestamps
- BAPIPAGE-106 · Define how mutable shipment updates affect an active traversal
- BAPIPAGE-107 · Bound total-count work independently of result pagination
- BAPIPAGE-108 · Review query plans for supported high-cardinality filters
Acceptance criteria
- Expose bounded async iteration with cancellation.
- Stop on terminal and invalid-cursor responses.
- Document restart behavior under the consistency contract.
Implementation constraints
- Do not silently restart and merge potentially duplicated records.
Verification to include
- Iterate a complete synthetic result set.
- Expire a cursor mid-run and surface the documented error.
Deliverables
- Client iterator example.
Rollout and recovery
Release with explicit cursor-lifecycle documentation.
Value of the work
For the engineer: Practice cursor design, query contracts, and consistency/performance tradeoffs.
For the team: Provide predictable list APIs that remain bounded and preserve tenant scope.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.