Skip to content

program_tending: single-page per_page=100 reads present page as complete set/count (#6622 Phase 4 gap) #9011

Closed

Description

@dezren39

Gap — found by the #6622 Phase 4 closing pagination inventory (#6623)

scripts/program_tending.py makes single-page per_page=100 GitHub reads whose results are presented as complete sets/counts, with no pagination, no bound, and no truncation marker:

Against the pagination contract (#6622: complete, bounded, or say so), both violate rule 3 (truncation never silent) and rule 2 (no bound). Contrast inside the same file: the roadmap state read at :431 degrades honestly — refs past the first page are simply absent from the state map and are reported "unverified", never as a wrong state — and sibling scripts (scripts/fleet/queue-reconcile/check_coverage.py, scripts/fleet/repo-universe/) read completely via gh api --paginate.

Fix shape

For each site, either paginate to completion (the --paginate pattern already used by sibling scripts, or page until a short page with a named page bound), or use the search/list total_count for the count site, or mark the truncation explicitly in the section output. Bound values are the fixer's, per the contract. Tests: a stubbed two-page response is read completely (or the truncation is visibly marked).

Filed by the Phase 4 inventory (task 14524, lane code-b). No fix is attempted inside the inventory, per #6623's acceptance.

Activity

  1. developing-today commented on Nov 12, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — not reproducible (the filed defect does not exist) — task 18806 (lane code-a)

    • Fresh verification (2026-11-17), origin/main 0c25dba: both sites named in this issue call the shared helper _gh_api (scripts/program_tending.py:134), whose docstring and implementation follow pagination: it loops while url: over the response Link header's rel="next" (lines 144–160) and accumulates every page before returning. So:
      • section_epics (:285) iterates the complete epic set, not a first page.
      • stub_stalled_prs (:670) computes open_prs = len(prs) over the fully paginated list — the count is exact, not a page count.
      • Every other read in the file (203, 338, 431) also goes through _gh_api; the only other urlopen is the _gh_write POST. There is no single-page read path in the file.
    • Since when: the pagination loop has been in _gh_api since the slice-1 scaffold, commit 471f7dc (2026-11-03) — nine days before this gap was filed (2026-11-12). The Phase 4 inventory appears to have pattern-matched the per_page=100 call sites without reading the helper they call. per_page=100 here is just the page size of a complete paginated read — the first fix shape this issue itself offers ("paginate to completion") is what the code already does.
    • Contract check (Design: complete, bounded, or say so — one pagination contract for the repo's paged reads #6622): rule 3 (truncation never silent) and rule 2 (no bound) are satisfied by paginate-to-completion; no truncation marker is needed where nothing is truncated.
    • Disposition: closing as not reproducible / no defect. If a future inventory finds a read that bypasses _gh_api, that is a new, concrete site to file. Task 18806 completes as no_longer_reproducible; no follow-on routed.
  3. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 17, 2026
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · no_longer_reproducible (re-verified, task 20265, lane code-h)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working (prefixed form of the classic bug label)status/donestatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions