GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising · Issue #6532 · developing-today/code

github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532

New issue
Copy link
New issue
Copy link
Closed
Closed
github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising#6532
Copy link
Labels
app/github-backupinfra/github-backup estate mirror systemkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 6, 2026
Issue body actions

github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising

infra/github-backup/bin/ghb_common.py inventory_owner() (the GraphQL inventory every github-backup consumer builds on: the weekly reconcile.py sweep, clone_all.py planning, manifest regeneration) advances its pagination cursor with no validation: when a page reports hasNextPage: true, the loop takes pageInfo.endCursor as the next after unconditionally (ghb_common.py:126-127). If that cursor is null (or empty), after stays falsy, the after variable is omitted from the next request (:75-77), and the loop re-fetches the first page forever — appending the same repos on every iteration, issuing a real gh api graphql call each time, never returning. Every other malformed-response shape in this function was hardened to raise instead of being misread (#3229: top-level errors, null repositoryOwner, null repositories connection, missing nodes/pageInfo all raise RuntimeError); the non-advancing cursor is the one malformed shape left unguarded.

Evidence (file:line, origin/main 2bcd46e0dc)

  • ghb_common.py:126-127: if conn["pageInfo"]["hasNextPage"]: after = conn["pageInfo"]["endCursor"] — no check that the cursor is a non-empty string, and no check that it differs from the cursor just used. A repeated (stuck) cursor loops the same way.
  • ghb_common.py:75-77: the next request includes after only if after: — a null/empty cursor therefore silently restarts at page 1 rather than failing.
  • ghb_common.py:96-124 (contrast): the function's own stated contract — a successful gh exit carrying a failed/malformed inventory must raise, never be read as data (github-backup(inventory): a null repositoryOwner is silently read as 'this owner has no repos' — reconcile drops the owner's mirrors from plan.json and MANIFEST.json and exits 0 #3229 comment, :96-102). The cursor path violates that contract by hanging instead of raising.
  • Callers hang with it: reconcile.py main() calls inventory(cfg["owners"]) → inventory_owner per owner before any plan/report is written, so one malformed page wedges the whole weekly correctness sweep (its timer surfaces failures via exit code — a hang surfaces nothing).

Verification (laptop probe, this run)

Probe ~/git/fleet/probe-ghb-cursor/ against the real ghb_common.py at origin/main 2bcd46e0dc, with ghb_common.run stubbed to return canned GraphQL pages:

  • Malformed page (hasNextPage: true, endCursor: null, one node): inventory_owner was still looping after 6 identical page fetches — the probe aborted it there; without the abort it never returns (each iteration appends a duplicate repo and makes another API call).
  • Control (two well-formed pages, cursors c1 → c2, second page hasNextPage: false): returns 2 repos in exactly 2 calls.

Why it matters

The reconcile sweep is the github-backup system's correctness floor — the guarantee that no repo is missed. A single malformed pagination response (API change, partial response, proxy-mangled page) turns it into a silent infinite loop: no report, no exit-code failure for the timer to surface, unbounded duplicate accumulation in memory, and a stream of identical GraphQL calls against the API quota until something external kills it. The function's other malformed shapes all fail loud within one call; this one should too.

Acceptance criteria

  • inventory_owner raises RuntimeError (the function's existing failure mode, naming the owner and the malformed cursor) when a page reports hasNextPage: true with a null, empty, or non-advancing (same-as-just-used) endCursor, instead of issuing another request.
  • Well-formed multi-page inventories are unchanged: pages are fetched in order, each repo appears once, and the final page's hasNextPage: false ends the loop (existing test_inventory_owner.py suite passes unchanged).
  • A regression test in infra/github-backup/tests/test_inventory_owner.py pins the malformed-cursor page: the stubbed transport is called a bounded number of times and the call raises.
  • inventory()'s per-owner error recording picks the failure up as an owner-level error (the github-backup(inventory): a null repositoryOwner is silently read as 'this owner has no repos' — reconcile drops the owner's mirrors from plan.json and MANIFEST.json and exits 0 #3229 path), so reconcile.py reports it and exits non-zero rather than hanging.

Filed by the new-issue-creator (lane B) after verification this run; not a duplicate of #3229/#3240 (state-file atomicity) or #3282/#3283 (github-backup contracts/audit) — this is the pagination loop's missing cursor guard specifically.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  2. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-1984

  3. dezren39
    added
    app/github-backupinfra/github-backup estate mirror system
    on Nov 6, 2026
  4. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (lane B, new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b, run 2026-11-06 08:50 CST
    • Found via: filed this run
    • Task: Triage the inventory_owner pagination-cursor hang: confirm the non-advancing endCursor loop in infra/github-backup/bin/ghb_common.py and route the raise-instead-of-loop fix with a regression test.
    • Expectation: effort s — done looks like a triage verdict on this issue, then a fix that raises RuntimeError on a null/empty/repeated cursor with the existing test_inventory_owner.py suite green.
    • Links: probe ~/git/fleet/probe-ghb-cursor/ (laptop); body file hidden_files/issue-ghb-inventory-cursor-loop.md
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  6. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    agent-note:v1

    • task: 11190
    • lane: code-l
    • event: picked_up
    • detail: Claimed by lane code-l for triage of issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 (direct execution lane). Verifying the reported pagination defect against current main before routing.

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-l
    • Session / ID: task 11190
    • Found via: queue claim
    • Task: triage issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 — confirm the inventory_owner null/empty endCursor pagination defect at current main, scope the fix path, record blockers/ordering
    • Expectation: findings posted on issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 with file:line evidence; fix routed as a follow-up task if the defect is confirmed
    • Links: issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 — github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532
  7. 28 remaining items

  8. dezren39
    added
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  9. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker lane code-s (repo-worker-code)
    • Session / ID: task 11213
    • Found via: queue claim
    • Task: Triage issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 — github-backup ghb_common inventory_owner paginates forever when a page reports hasNextPage with a null/empty endCursor
    • Expectation: effort s — triaged at current main with evidence: fix path scoped, or closed with evidence if already handled/superseded; blockers/ordering recorded
    • Links: n/a yet
  10. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (triage)

    • Agent: queue worker lane code-s (repo-worker-code)
    • Session / ID: task 11213
    • Found via: queue claim
    • Task: Triage issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 — ghb_common inventory_owner non-advancing cursor loop
    • Verdict: CONFIRMED live at current main ab35bef4ca, and the fix already exists. Fresh reads: infra/github-backup/bin/ghb_common.py at main still advances unconditionally (if conn["pageInfo"]["hasNextPage"]: after = conn["pageInfo"]["endCursor"]), and the next request omits after when falsy — the hang stands exactly as filed (filer's probe at 2bcd46e0dc reproduced 6 identical page-1 fetches).
    • Routing: PR fix(github-backup): reject malformed inventory pagination cursors #6574 (branch queue/11193-6532-inventory-cursor-fix, from task 11193) already implements every acceptance criterion: a non-empty, never-before-seen cursor is required or RuntimeError names the owner and the malformed cursor; regression tests cover null, empty, and repeated cursors with bounded transport calls and owner-level error recording via inventory(); the well-formed two-page control is retained. PR fix(github-backup): reject malformed inventory pagination cursors #6574 checks: scripts-test (3.12 / 3.14) SUCCESS. No duplicate fix enqueued from this triage; merging PR fix(github-backup): reject malformed inventory pagination cursors #6574 (including its Codex-findings disposition) stays with task 11193's owner lane.
    • Labels: moved to the PR-open stage (queue/needs-review, status/needs-review, work/assigned kept) to match PR fix(github-backup): reject malformed inventory pagination cursors #6574's actual state.
    • Expectation: done for triage — issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 closes when PR fix(github-backup): reject malformed inventory pagination cursors #6574 merges
    • Links: PR fix(github-backup): reject malformed inventory pagination cursors #6574 · task 11193 (fix owner)
  11. dezren39
    added
    queue/needs-reviewQueue task finished and is awaiting review
    status/needs-reviewReady for review
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 8, 2026
  12. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-l
    • Session / ID: task 13334
    • Found via: queue claim (direct execution lane), pr_shepherd for PR fix(github-backup): reject malformed inventory pagination cursors #6574 (batch issue Unowned PR batch from branch disposition (2026-11-07) #7297 part 1)
    • Task: Shepherd PR fix(github-backup): reject malformed inventory pagination cursors #6574 — fix(github-backup): reject malformed inventory pagination cursors (issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532). Fresh verification: PR OPEN, not draft, no hard-stop labels; checks pass (scripts-test 3.12 + 3.14), merge state CLEAN; no Codex review findings to disposition; diff reviewed and matches intent (malformed/repeated endCursor now raises a bounded RuntimeError naming owner and cursor; regression coverage for null/empty/repeated cursors). Merged under the standing merge criteria.
    • Expectation: task 13334 completed as pr_opened/merged; issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532 closes via the PR if it carries the closing keyword, otherwise follow-up note.
    • Links: PR fix(github-backup): reject malformed inventory pagination cursors #6574, issue github-backup(ghb_common): inventory_owner paginates forever when a page says hasNextPage with a null/empty endCursor — the reconcile sweep hangs re-fetching page 1 instead of raising #6532, issue Unowned PR batch from branch disposition (2026-11-07) #7297
  13. dezren39
    closed this as completedon Nov 8, 2026
  14. developing-today
    added
    status:done
    on Nov 8, 2026
  15. dezren39
    removed
    status/needs-reviewReady for review
    queue/needs-reviewQueue task finished and is awaiting review
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/github-backupinfra/github-backup estate mirror systemkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.