Skip to content
EN · PT

Gate: pagination-honored

A function promising the whole set does not silently return the first page.

Property Value
Checker pagination-honored
Confronts code
Blocking by default — new project yes
Blocking by default — existing project no — informs

Confronts a function against the promise its name makes: whoever says “list all” cannot deliver the first hundred without warning.

It is the COST/SCALE class of defect — the one that shows up in no test, because the test runs with three records and production runs with three thousand. Nothing in the code is wrong: the query is valid, the type is the expected one, the suite passes. The defect is the difference between what the name promises and what the function delivers when the data grows.

The distinction that gives the ruler: a CALLER’s limit is not a defect — whoever passed the limit knows there is more. A HIDDEN limit is: a default value the caller does not see makes the function promise the set and return a slice. The hundred-and-first row is never processed, and no one is notified.

When the module has sisters that paginate, the proof is by ASYMMETRY: the author knew the pattern, and the one that does not paginate is forgetfulness, not decision. Without sisters paginating the verdict is weaker, and it only accuses when the name promises a set unambiguously.

gates:
- name: pagination-honored
on: [code]
check: pagination-honored

Source: checker · its spec