{"_self":{"principle":"Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.","widget":"article_bundle","feature":"bundle","name":"LLM article bundle","what":"Paste-ready package: body + claims + sources + voxels + provenance + manifest + constitution.","contains":"body, claims, sources, voxels, provenance, question graph, constitution, llm_manifest","slug":"oip-what-is-pagination","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-pagination/bundle?format=markdown"},"how_to_use":"Paste into any LLM. Read §SELF first. Write back via ingest or claim endpoints in llm_manifest.","write":null,"imessage":null,"router_tag":null,"proof_chain":[{"step":1,"claim":"Articles are voxel graphs of tiered claims, not prose blobs.","verify":"https://miscsubjects.com/api/articles/constitution"},{"step":2,"claim":"Claims link to hash-chained sources via source_ids.","verify":"https://miscsubjects.com/api/articles/oip-what-is-pagination/sources"},{"step":3,"claim":"Ask reads topology; ingest/claim append to ledger.","verify":"https://miscsubjects.com/api/protocol"},{"step":4,"claim":"Models queue growth: populate → collaborate → repair → reflex.","verify":"https://miscsubjects.com/api/protocol/grow"},{"step":5,"claim":"Graph proves its own shape (reflex) and $/claim (yield).","verify":"https://miscsubjects.com/graph.html?layer=reflex"},{"step":6,"claim":"Full feature index + _explain on every API response.","verify":"https://miscsubjects.com/api/articles/system-map"}],"related_features":[{"id":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-pagination/topology"}},{"id":"voxels","name":"Voxel graph","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-pagination/voxels","write":"https://miscsubjects.com/api/protocol/claim"}},{"id":"ask","name":"Ask protocol","what":"Answer only from topology; creates question_node with gaps and ingest_hint.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-pagination/prompts","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"ingest","name":"Ingest protocol","what":"Parse pasted evidence → source ledger + claims + evidence_ingest node.","urls":{"write":"https://miscsubjects.com/api/protocol/ingest"}},{"id":"claim_post","name":"Claim post protocol","what":"Prompt-injection style POST — one claim voxel with who_claims + posted_by.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-pagination/voxels","write":"https://miscsubjects.com/api/protocol/claim"}},{"id":"llm_manifest","name":"LLM manifest","what":"Machine-readable read/write contract for external LLMs.","urls":{"read":"https://miscsubjects.com/api/articles/llm-manifest"}}],"system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","not_medical_advice":true},"_explain":{"feature":"bundle","name":"LLM article bundle","what":"Paste-ready package: body + claims + sources + voxels + provenance + manifest + constitution.","why":"Every feature is auditable collective intelligence","how":"Paste into any LLM. Read §SELF first. Write back via ingest or claim endpoints in llm_manifest.","model":null,"verifies":null,"urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-pagination/bundle?format=markdown"},"imessage":null,"router":null,"related":[{"id":"topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER."},{"id":"voxels","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance."},{"id":"ask","what":"Answer only from topology; creates question_node with gaps and ingest_hint."},{"id":"ingest","what":"Parse pasted evidence → source ledger + claims + evidence_ingest node."},{"id":"claim_post","what":"Prompt-injection style POST — one claim voxel with who_claims + posted_by."},{"id":"llm_manifest","what":"Machine-readable read/write contract for external LLMs."}],"not_medical_advice":true},"bundle_version":1,"generated_at":"2026-07-04T22:36:47.643Z","slug":"oip-what-is-pagination","title":"What Is Pagination?","url":"https://miscsubjects.com/a/oip-what-is-pagination","register":"oip_protocol","tags":["oip","protocol"],"posted_at":"2026-07-04T18:30:34.380Z","updated_at":"2026-07-04T19:01:09.424Z","body":"## What It Is\n\n**Pagination is the deterministic slicing of a large, ordered dataset into bounded, addressable windows.** Every window has a boundary. Every boundary has a name. That name — a cursor, an offset, a page number — lets any system request exactly the same slice twice and get the same result.\n\n## Why It Matters\n\nInfinite scroll feels good. It also destroys reproducibility.\n\nWhen a dataset has no boundaries, you cannot reference it. You cannot audit it. You cannot prove what you saw. Pagination draws lines. Those lines are contract surfaces. They turn a streaming river into a numbered archive.\n\nThe philosophical weight is this: **deterministic access is the foundation of trust.** If two observers cannot request the same slice and agree on its contents, you have opinion, not protocol. Pagination makes sequence explicit. It makes consensus possible.\n\nPractically, it protects systems. It caps memory. It bounds latency. It turns \"load everything\" into \"load exactly this.\" That transformation is the difference between a toy and infrastructure.\n\n## How It Works\n\nAt its core, pagination is a contract between a caller and a dataset. The caller asks for a window. The dataset returns the window plus a pointer to the next one.\n\nStep 1: The caller chooses a strategy.\n- **Offset/limit:** Start at position N, return M items. Simple. Dangerous on changing datasets.\n- **Cursor-based:** A opaque token marks the boundary. The dataset decodes it. Stable. Scalable.\n- **Keyset:** The boundary is a value in the ordering column. Fast. Requires an ordered index.\n\nStep 2: The caller sends a request.\n\n```\nGET /items?page[cursor]=abc123&page[size]=50\n```\n\nStep 3: The dataset evaluates the boundary.\n- Cursor \"abc123\" decodes to: last seen ID = 7,491, timestamp = 1698000000.\n- Query becomes: WHERE id > 7491 AND created_at >= 1698000000 ORDER BY created_at, id LIMIT 50.\n\nStep 4: The dataset returns the window plus the next pointer.\n\n```json\n{\n  \"data\": [ /* 50 items */ ],\n  \"links\": {\n    \"next\": \"/items?page[cursor]=def456\"\n  }\n}\n```\n\nStep 5: The caller decides. Stop? Or follow the next pointer? The dataset does not decide. The caller does. That separation of concerns is clean.\n\n## The Contract\n\n**The interface:**\n\n- Input: `limit` (max items per window, bounded by a global cap), `cursor` (opaque token, optional; omitted means \"first window\").\n- Output: `data` (array of items, length ≤ limit), `next_cursor` (opaque token, null if no further data).\n\n**The invariants:**\n\n1. **Determinism:** The same cursor, requested twice, returns the same ordered sequence.\n2. **Exclusivity:** No item appears in two windows for the same cursor sequence.\n3. **Completeness:** Every item in the ordered dataset appears in exactly one window, or is newly added after the cursor was minted.\n4. **Boundedness:** `limit` is always ≤ the global cap. The global cap is a hard ceiling.\n5. **Opacity:** The caller does not decode the cursor. The dataset encodes and decodes it. The cursor is a capability, not a coordinate.\n\n**The failure modes:**\n\n- Cursor invalid: 400. The token is corrupt or expired.\n- Limit exceeded: 400. The caller asked for more than the global cap.\n- Dataset empty: 200, data = [], next_cursor = null. Not an error. A boundary.\n\n## Real Examples\n\n**GitHub API commits:**\nGitHub returns 30 commits per page. The `Link` header contains `rel=\"next\"` with a URL carrying `page=2`, `page=3`. The cursor is the page number. The ordering is implicit: reverse chronological. The contract is simple because the dataset is append-only at the top.\n\n**Stripe API charges:**\nStripe uses cursor-based pagination. The `starting_after` parameter is an object ID. The response includes `has_more`. The ordering is creation time, stable because IDs are KSUIDs. The contract is strong: no charge ever changes position.\n\n**PostgreSQL keyset with LIMIT/OFFSET:**\nA query like `SELECT * FROM events WHERE id > $cursor ORDER BY id LIMIT 50` is keyset pagination at the database layer. The cursor is the last `id` of the previous batch. The database uses the primary key index to seek directly. No full table scan. No memory bloat.\n\n**Twitter/X timeline (historical):**\nThe timeline API once exposed `max_id` and `since_id`. These were tweet IDs, which are Snowflake timestamps in disguise. The cursor encoded both position and time. Two boundaries, one token. Elegant.\n\n**OIP ledger events:**\nThe OIP ledger appends events in strict order. Each event has a monotonic sequence number. Pagination requests `?after_seq=8471&limit=100`. The dataset returns events 8472-8571. The cursor is `8571`. The next request is `?after_seq=8571&limit=100`. Every auditor, every replica, every observer can request the exact same window. That is the point.\n\n## Common Mistakes\n\n**Using offset/limit on mutable datasets:**\nOffset says \"skip N rows.\" If a row is inserted at position 5, every offset shifts. The same request, run twice, returns different items. You have lost determinism. You have broken the contract.\n\n**Letting the caller set limit without a cap:**\nA caller asks for `limit=1000000`. The system allocates a million rows in memory. The database locks. The node dies. The cap is not a suggestion. It is a guardrail.\n\n**Returning the cursor as a raw database ID:**\nThe caller starts guessing IDs. They iterate backward. They probe gaps. The cursor is a capability. It should be opaque, signed, or encoded. Treat it like a session token.\n\n**Omitting `has_more` or `next_cursor` when the dataset is empty:**\nAn empty page is not an error. It is a valid boundary. The absence of a next cursor is the signal. Returning 404 or 204 turns a clean contract into an edge-case nightmare.\n\n**Paginating without a total order:**\nIf the dataset has no deterministic sort, page 2 is fiction. The database returns \"some 50 rows.\" Which 50? Undefined. Every page request is a dice roll.\n\n## Connection to OIP\n\nOIP is built on three principles: **open, deterministic, auditable.** Pagination is the mechanical expression of all three.\n\n**Open:** A paginated endpoint is a public contract. Any client can walk it. No hidden state. No \"you had to be there.\" The dataset is inspectable one window at a time.\n\n**Deterministic:** The cursor is a commitment. It binds a specific query to a specific result set. Two honest nodes, given the same cursor, agree. That is consensus material. That is what makes a protocol a protocol instead of a service.\n\n**Auditable:** An auditor does not need the full dataset. They request page 1, then page 2, then page 3. Each page is small, verifiable, and self-contained. The auditor hashes the page. They compare hashes. If the dataset drifts, the hash changes. Pagination turns audit from a memory-intensive nightmare into a bounded, parallelizable walk.\n\nIn OIP, pagination is not a convenience feature. It is a structural requirement. Without it, the ledger is a stream. With it, the ledger is an archive. And archives are what civilizations build on.\n\n## Connection to the Grain Philosophy\n\nThis protocol is part of the [Open Inventory Protocol](/a/philosophy) — a living system of self-describing voxels that serves the Grain philosophy. The OIP is the interface. The philosophy is the core.\n","claims":[],"sources":[],"voxels":{"slug":"oip-what-is-pagination","counts":{"voxels":0,"sources":0,"edges":0},"note":"slim bundle — full voxels at /api/articles/oip-what-is-pagination/voxels"},"constitution":{"url":"https://miscsubjects.com/api/articles/constitution"},"provenance":[],"contributions":[],"topology":null,"slim":true,"ledger_totals":{"claims":0,"sources":0,"exported_claims":0,"exported_sources":0},"question_graph":{"slug":"oip-what-is-pagination","questions":[],"evidence":[],"edges":[],"counts":{"questions":0,"evidence":0,"edges":0}},"verification":{"provenance":{"valid":true,"entries":0,"head":"genesis"},"sources":{"valid":true,"entries":0,"head":"genesis"}},"counts":{"claims":0,"sources":0,"provenance":0,"contributions":0,"questions":0,"evidence_ingests":0,"voxel_edges":0},"llm_manifest":{"version":"1","site":"https://miscsubjects.com","purpose":"Peptide evidence articles with hash-chained source ledgers, tiered claims, and a question graph. LLMs should READ bundles/URLs and WRITE back via ingest — never invent doses.","read":{"human_page":"https://miscsubjects.com/a/oip-what-is-pagination","bundle_json":"https://miscsubjects.com/api/articles/oip-what-is-pagination/bundle","bundle_markdown":"https://miscsubjects.com/api/articles/oip-what-is-pagination/bundle?format=markdown","topology":"https://miscsubjects.com/api/articles/oip-what-is-pagination/topology","question_graph":"https://miscsubjects.com/api/articles/oip-what-is-pagination/question-graph","sources":"https://miscsubjects.com/api/articles/oip-what-is-pagination/sources","provenance":"https://miscsubjects.com/api/articles/oip-what-is-pagination/provenance","contributions":"https://miscsubjects.com/api/articles/oip-what-is-pagination/contributions","graph_topology":"https://miscsubjects.com/api/articles/oip-what-is-pagination/graph-topology?question={question}","voxels":"https://miscsubjects.com/api/articles/oip-what-is-pagination/voxels","constitution":"https://miscsubjects.com/api/articles/constitution","ontology":"https://miscsubjects.com/api/articles/ontology","system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","health":"https://miscsubjects.com/api/articles/oip-what-is-pagination/health","repair":"POST https://miscsubjects.com/api/protocol/repair","list_articles":"https://miscsubjects.com/api/articles","graph_canvas":"https://miscsubjects.com/graph.html?slugs=oip-what-is-pagination","graph_yield":"https://miscsubjects.com/api/graph?slugs=oip-what-is-pagination&layer=yield","obsidian_vault":"https://miscsubjects.com/api/articles/obsidian-vault?slugs=oip-what-is-pagination","graph_query":"https://miscsubjects.com/api/v1/query?from=oip-what-is-pagination&kind=claim&where=tier=human"},"ask":{"description":"Answer only from topology; creates a question_node with gaps.","api":"POST https://miscsubjects.com/api/protocol/ask","body":{"slug":"{slug}","question":"string"},"imessage":"oip-what-is-pagination|your question","router_tag":"[ARTICLE_ASK]oip-what-is-pagination|question[/ARTICLE_ASK]","auth":"x-terminal-key header for API; iMessage/WhatsApp via miscsubjects build"},"ingest":{"description":"Parse pasted evidence → source ledger + claims + evidence_ingest node.","api":"POST https://miscsubjects.com/api/protocol/ingest","body":{"slug":"{slug}","evidence":"paste text","question_node_id":"optional qn_..."},"imessage":"ingest oip-what-is-pagination|q:{node_id}|paste evidence","router_tag":"[ARTICLE_INGEST]oip-what-is-pagination|evidence[/ARTICLE_INGEST]","tiers":["human","preclinical","anecdotal","mechanistic","speculative"]},"claim":{"description":"Prompt-injection style POST — one claim voxel with who_claims + posted_by provenance.","api":"POST https://miscsubjects.com/api/protocol/claim","body":{"slug":"{slug}","text":"one assertion","tier":"human|preclinical|anecdotal|mechanistic|speculative","who_claims":"study author, platform, or model id","source_ids":"optional [s1]"},"imessage":"claim oip-what-is-pagination|tier|assertion — who claims it?","router_tag":"[ARTICLE_CLAIM]oip-what-is-pagination|tier|assertion[/ARTICLE_CLAIM]","slots":["what_it_is","who_claims_what","what_is_known","what_is_unknown","mechanism","limitations","disclaimer"]},"tiers":{"human":0.8,"preclinical":0.5,"anecdotal":0.3,"mechanistic":0.3,"speculative":0.1},"invariants":["Self-explaining — every API JSON has _self; every paste widget has §SELF; root index at /api/articles/system-map","Append-only — revisions preserved at ?rev=n","Source chain verifies integrity, not truth","Answers must cite claim ids and source ids from topology","Not medical advice"],"constitution":{"version":1,"principle":"Articles are voxel graphs of claims — not prose blobs. Every assertion is a claim atom with tier, weight, source_ids, and posted_by provenance.","slots":[{"id":"what_it_is","required":true,"answers":"What is this peptide/stack/condition?"},{"id":"who_claims_what","required":true,"answers":"Who claims what — study authors, platforms, n=?"},{"id":"what_is_known","required":true,"answers":"What is known with tier labels (human/preclinical/anecdotal)"},{"id":"what_is_unknown","required":true,"answers":"What is NOT known — explicit gaps"},{"id":"mechanism","required":false,"answers":"Proposed mechanism (mechanistic tier only)"},{"id":"limitations","required":true,"answers":"Limits of evidence — no dose advice"},{"id":"disclaimer","required":true,"answers":"Not medical advice"}],"claim_rules":["One claim = one falsifiable assertion. No compound claims.","Every claim must declare tier: human|preclinical|anecdotal|mechanistic|speculative|system.","system tier = architecture/design axioms (not biological mechanism). Use for protocol self-definition.","Sourced claims must cite source_ids from the hash-chained ledger.","Unsourced claims must set source_status: unsourced and why_material.","posted_by is mandatory on every new claim (model id, human, or channel).","No medical advice, no doses, no 'you should take'.","Bad information is retracted (status:retracted), never deleted — retraction event stays on ledger.","Adversary challenges link via challenges[] / challenged_by[] — target may be downweighted.","Leaked secrets are scrubbed to [REDACTED:secret-leak] with scrub_events tombstone — honest audit trail."],"source_rules":["Every source is a voxel edge: type, url, exact quote, summary, found_by, accessed_at.","Sources hash-chain — prev/hash on append.","Anecdotal sources must name platform (reddit|x|youtube|imessage|user_entry)."],"ontology_rules":["Peptide articles (bpc-157, tb-500) are tree roots.","Condition articles (bpc-157-glp1-gut-damage) branch from peptides.","Stack articles (wolverine-stack-glp1) compose peptides — never duplicate peptide mechanism prose.","If an article has no parent embeds and is not a root peptide → sprawl candidate.","Misstep = duplicate scope with another slug; merge or reparent via embeds."],"post_protocol":{"claim":"POST /api/protocol/claim","source":"POST /api/protocol/sources","ingest":"POST /api/protocol/ingest","webhook":"POST /api/articles/<slug>/webhook {kind:claim|source}","imessage_claim":"claim {slug}|{tier}|your assertion — who claims it, source?","imessage_ingest":"ingest {slug}|evidence paste"}},"this_article":{"slug":"oip-what-is-pagination","url":"https://miscsubjects.com/a/oip-what-is-pagination","bundle_url":"https://miscsubjects.com/api/articles/oip-what-is-pagination/bundle?format=markdown"}},"api_urls":{"bundle":"https://miscsubjects.com/api/articles/oip-what-is-pagination/bundle","bundle_markdown":"https://miscsubjects.com/api/articles/oip-what-is-pagination/bundle?format=markdown","topology":"https://miscsubjects.com/api/articles/oip-what-is-pagination/topology","voxels":"https://miscsubjects.com/api/articles/oip-what-is-pagination/voxels","constitution":"https://miscsubjects.com/api/articles/constitution","ontology":"https://miscsubjects.com/api/articles/ontology","question_graph":"https://miscsubjects.com/api/articles/oip-what-is-pagination/question-graph","ask":"https://miscsubjects.com/api/protocol/ask","ingest":"https://miscsubjects.com/api/protocol/ingest","claim":"https://miscsubjects.com/api/protocol/claim","system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown"}}