Problem
CursorPaginationStrategy takes two (Response) -> … lambdas that each read a single-use body; a test already works around the double-drain with an IdentityHashMap cache (CursorPaginationTest.kt:47). That's a correctness trap in a public API.
Proposed change
Replace the two body-reading lambdas with one extractor returning items + next cursor together. After the fix, delete the test's caching workaround as proof.
Acceptance
Dependencies
Priority: medium · Effort: medium
Problem
CursorPaginationStrategytakes two(Response) -> …lambdas that each read a single-use body; a test already works around the double-drain with anIdentityHashMapcache (CursorPaginationTest.kt:47). That's a correctness trap in a public API.Proposed change
Replace the two body-reading lambdas with one extractor returning items + next cursor together. After the fix, delete the test's caching workaround as proof.
Acceptance
Dependencies
Priority: medium · Effort: medium