////

Adopt cursor pagination as a shared primitive, not a one-off endpoint feature

Cursor(keyset) 기반 페이지네이션은 엔드포인트별로 개별 구현하는 대신, 인코딩·디코딩 로직을 공유 유틸리티로 추출하고 동일한 계약을 여러 도메인과 런타임에 노출하는 공유 원시(shared primitive)로 설계해야 한다. Offset 페이지네이션은 레코드 삽입·삭제 시 불안정해지고 서비스 간 계약이 분기되기 때문이다.

////

Summary#

Cursor(keyset) 기반 페이지네이션은 엔드포인트별로 개별 구현하는 대신, 인코딩·디코딩 로직을 공유 유틸리티로 추출하고 동일한 계약을 여러 도메인과 런타임에 노출하는 공유 원시(shared primitive)로 설계해야 한다. Offset 페이지네이션은 레코드 삽입·삭제 시 불안정해지고 서비스 간 계약이 분기되기 때문이다.

Problem#

Offset pagination becomes unstable when records are inserted or deleted during scrolling, and separate services/endpoints drift into incompatible pagination contracts.

Solution#

Introduce opaque keyset cursors for stable forward paging, keep offset mode only where jump-to-page is still needed, and hoist cursor encode/decode logic into a shared utility so multiple domains and runtimes expose the same contract.

Failure Modes#

  • Each endpoint reimplements cursors differently, producing incompatible semantics.
  • Cursor payloads leak internal sort keys or become non-deterministic.
  • Offset pagination is removed too early and breaks legitimate jump-navigation use cases.

Sources#

  • https://github.com/Comfy-Org/ComfyUI/pull/14373
  • https://github.com/Comfy-Org/ComfyUI/pull/14216
  • https://github.com/Comfy-Org/ComfyUI/pull/13853
  • https://github.com/Comfy-Org/ComfyUI/pull/14349
  • https://github.com/Comfy-Org/ComfyUI/pull/14241
  • https://github.com/Comfy-Org/ComfyUI/pull/14363
  • https://github.com/Comfy-Org/ComfyUI/pull/14014
  • https://github.com/Comfy-Org/ComfyUI/pull/13400
  • https://github.com/Comfy-Org/ComfyUI/pull/14381
  • https://github.com/Comfy-Org/ComfyUI/pull/14368
  • https://github.com/Comfy-Org/ComfyUI/pull/14372
  • https://github.com/Comfy-Org/ComfyUI/pull/14371
  • https://github.com/GitHubDaily/GitHubDaily/pull/267
  • https://github.com/GitHubDaily/GitHubDaily/pull/52
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2305
  • https://github.com/react/react/pull/36173
  • https://github.com/react/react/pull/36727
  • https://github.com/react/react/pull/36726
  • https://github.com/thedaviddias/Front-End-Checklist/pull/664
  • https://github.com/thedaviddias/Front-End-Checklist/pull/680
  • mined_at: 2026-06-10T16:20:46Z

Revalidation History (consolidated)#

  • 2026-06-10 ~ 2026-09-03: 40+회 ok 연속 판정. 커서 페이지네이션 권장과 offset 병행 조건은 최신 관행에 부합함.

Sagwan Revalidation 2026-09-09T08:54:24Z#

  • verdict: ok
  • note: 커서 페이지네이션 권장과 offset 보완 원칙은 여전히 최신 관행에 부합함

Sagwan Revalidation 2026-09-11T00:00:00Z#

  • verdict: revise
  • note: [vault: Core API Cursor Pagination Contracts 캡슐 존재 확인][public: getknit.dev 2026 pagination best practices 확인] 사실 내용 유효. 구조 개선: Summary 산문화, 관련 캡슐 연결 추가, 재검증 이력 압축.

Sagwan Revalidation 2026-09-11T23:46:37Z#

  • verdict: ok
  • note: 커서 페이지네이션 공유 원시 원칙은 2026년 현재도 업계 표준이며, 내용·실패 모드·출처 PR 모두 유효하다.

Sagwan Revalidation 2026-09-15T17:12:26Z#

  • verdict: ok
  • note: 커서 공유 원시와 offset 보완 원칙은 현재 관행에도 부합함

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1