diff --git a/infra/github-backup/bin/ghb_common.py b/infra/github-backup/bin/ghb_common.py index 88f24f1b69..340dc2b29b 100644 --- a/infra/github-backup/bin/ghb_common.py +++ b/infra/github-backup/bin/ghb_common.py @@ -5,6 +5,16 @@ Config lives in ../config.json next to this file's parent directory. The backup tree (default ~/backups/github) holds only data + generated state (plan.json, MANIFEST.json, logs); all logic lives in the repo. + +Pagination contract (#6622): a paged read is complete, bounded, or +says so. (1) The cursor is validated where read — its type first +(a present-but-malformed cursor is an error, never end-of-pages) +and its progress second (it must advance). (2) The volume is +bounded: every page loop carries a page/result bound whose breach +is an error naming the listing. (3) Truncation is never silent: +a read that stops short paginates to completion, fails closed, +or marks the truncation explicitly. The closing inventory that +dispositioned every paginated loop in the repo is on issue #6623. """ import contextlib, json, os, shutil, subprocess, sys, tempfile diff --git a/pkgs/cold-store-reaper/cold_store.py b/pkgs/cold-store-reaper/cold_store.py index bfdb4502b5..aa0f7c4cd0 100755 --- a/pkgs/cold-store-reaper/cold_store.py +++ b/pkgs/cold-store-reaper/cold_store.py @@ -14,6 +14,16 @@ Secrets: client_id / client_secret / refresh_token live in credentials.json (mode 600) under the cold-store home. They are loaded, never printed. + +Pagination contract (#6622): a paged read is complete, bounded, or +says so. (1) The cursor/token is validated where read — type and +progress (a truncated page must hand back a usable, advancing +token). (2) The volume is bounded: every listing loop carries the +LIST_MAX_PAGES / LIST_MAX_RESULTS bound, whose breach is an error +naming the listing. (3) Truncation is never silent: a listing +either completes, fails closed, or says it stopped. The closing +inventory that dispositioned every paginated loop in the repo is +on issue #6623. """ from __future__ import annotations diff --git a/pkgs/fleet/crates/fleet-dispatch-test/src/lib.rs b/pkgs/fleet/crates/fleet-dispatch-test/src/lib.rs index d103af385a..cf5e298bcb 100644 --- a/pkgs/fleet/crates/fleet-dispatch-test/src/lib.rs +++ b/pkgs/fleet/crates/fleet-dispatch-test/src/lib.rs @@ -17,6 +17,14 @@ //! caller invokes it, and `submit` dispatches a workflow_dispatch //! run explicitly. No Actions triggers are enabled by this crate. //! +//! Pagination contract (#6622): a paged read is complete, +//! bounded, or says so — the cursor is validated where read, the +//! volume is bounded by a named page/result bound whose breach +//! errors, and truncation is never silent (a count reads to +//! completion or via the source's `total_count`, never a page +//! presented as exact). `fetch_all_pages` is this crate's +//! implementation; the repo-wide closing inventory is on #6623. +//! //! Execution homes (phase 2, Drew's corrected design): ONE repo — //! the fleet repo (default `dezren39/fleet`, config //! `[dispatch-test] fleet_repo`) — holds the other fleet repos as diff --git a/pkgs/id/crates/id-worlds/src/world_net.rs b/pkgs/id/crates/id-worlds/src/world_net.rs index bf46810442..1ce343d8e9 100644 --- a/pkgs/id/crates/id-worlds/src/world_net.rs +++ b/pkgs/id/crates/id-worlds/src/world_net.rs @@ -35,6 +35,24 @@ //! `WorldClient` method against these rules is recorded on issue //! #6670. A lax extraction found later is filed as a follow-up //! issue, not patched silently and not defaulted around. +//! +//! ## The pagination contract (#6622) +//! +//! A paged read is complete, bounded, or says so: +//! +//! 1. The cursor is validated where read — its type first (where +//! the terminator is `null`, a present-but-non-string cursor is +//! a malformed reply, never end-of-pages) and its progress +//! second (it must satisfy the protocol's advance rule). +//! 2. The volume is bounded: every page loop carries a page-count +//! or accumulated-result bound whose breach is an error naming +//! the listing. +//! 3. Truncation is never silent: a read that stops short either +//! paginates to completion, fails closed, or marks the +//! truncation explicitly in its output. +//! +//! The closing inventory dispositioning every paginated loop in +//! the repo against these rules is recorded on issue #6623. use std::collections::HashMap; use std::sync::{