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 — cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing · Issue #2426 · developing-today/code

cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing #2426

New issue
Copy link
New issue
Copy link
Closed
#3431
Closed
cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing#2426
#3431
Copy link
Assignees
dezren39
Labels
app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

cold-store-reaper: Drive list_backups never follows nextPageToken — retention plans from a silently truncated listing

Evidence (verified this run, main 5a34fa7)

ColdStore.list_backups (pkgs/cold-store-reaper/cold_store.py:992-1031) issues exactly one Drive files.list request per db folder with pageSize: 1000 and reads only resp["files"]. It never looks at nextPageToken and never sends a pageToken, so when a db-backups/<db>/ folder holds more than one page of files, every file past the first page is invisible to all consumers.

The listing is ordered createdTime desc (cold_store.py:1011), so the invisible files are the oldest ones — precisely the files retention exists to trash:

  • prune_backups (cold_store.py:1092+) builds its 30 daily / 12 weekly / 12 monthly plan (_retention_plan, cold_store.py:1048) from list_backups rows only. Files beyond page 1 are never kept, never pruned, and never reported as unparseable — they silently accumulate in Drive forever.
  • The plan's "distinct days/weeks/months present" computation is likewise computed over a truncated set whenever the folder exceeds one page.

Probe (this run, sandbox python3, real cold_store.py with a stubbed http_request emulating the Drive API — page 1 returns 2 files plus nextPageToken: tok2, page 2 returns a third, older file):

rows returned: 2 ['d1-20261029T010000Z-a.sql', 'd1-20261028T010000Z-a.sql']
requests made: 1
any request carried pageToken: False

The third (oldest, 2025-01-01) backup is dropped with no error.

Probe kept at ~/workspace/goals/keep-the-four-repos-healthy/hidden_files/probe-2026-10-29-laneB-drivepage/probe.py.

Contrast in the same file

The S3 listing path paginates correctly: _parse_s3_list_page returns the continuation token (cold_store.py:138-172) and its caller loops over pages — the test suite even asserts the page sequence ("fake pages are 2, 2, 1", tests/test_cold_store.py:1325). The Drive path has no equivalent loop, and the test fake (FakeDrive) implements no pagination at all, so the gap is untestable today.

Why it matters

Retention is the only mechanism that bounds Drive growth for DB backups, and it runs nightly (scripts/nightly-backup.sh step 4: prune-backups --apply). Parseable backups are capped by retention itself (~54 per db), but unparseable names are never pruned by design (reported only), pre-retention/manual files count too, and any folder that crosses 1000 files permanently hides its oldest members from the one tool meant to remove them. The failure is silent: the nightly run reports success while Drive grows.

Related but distinct: #1632 is the same class of bug in the S3 listing loop (continuation-token handling); this issue is the Drive files.list path, which never paginates at all.

Acceptance criteria

  • list_backups follows nextPageToken until the listing is exhausted, preserving newest-first order across pages.
  • A folder whose listing spans multiple pages yields the full row set; prune_backups plans over the complete set (an over-page oldest excess file appears in the prune plan in a test).
  • The FakeDrive test double implements Drive pagination (honours pageSize / emits nextPageToken), with a regression test that a multi-page folder is fully listed.
  • Existing cold-store test suites still pass.

Activity

Next
  1. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1238

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b
    • Session / ID: new-issue-creator-code-b cron run 2026-10-29 15:50 CDT
    • Found via: filed this run
    • Task: Filed after verifying with a stubbed-transport probe against the real cold_store.py (main 5a34fa7): list_backups made exactly one Drive files.list request, returned only page 1 (2 of 3 files), and never sent a pageToken — the oldest backup was silently invisible to prune_backups' retention plan.
    • Expectation: effort s; done when list_backups follows nextPageToken to exhaustion and a multi-page FakeDrive regression test shows an over-page oldest file entering the prune plan.
    • Links: cold-store-reaper: s3_list_objects loops forever on a truncated page with a missing, empty, or repeated continuation token #1632 (S3 analogue, distinct transport) cold-store-reaper: s3_list_objects loops forever on a truncated page with a missing, empty, or repeated continuation token #1632
  4. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 1, 2026
  6. 13 remaining items

  7. dezren39
    added
    queue/queuedHas a queued queue task
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  8. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: picked up

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: OpenCode session ses_e5e69bc0053ffenuZSvop6dady; queue task 5320
    • Found via: atomic claim from repo-health-code-pilot
    • Task: Revalidate and fix cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing #2426 Drive pagination in ColdStore.list_backups, with FakeDrive pagination and regression tests.
    • Expectation: Preserve one-page ordering and existing error behavior while following every nextPageToken; avoid touching other Drive or S3 listing paths.
    • Links: cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing #2426 · queue task 5320
  9. developing-today
    added
    status:in-review
    on Nov 1, 2026
  10. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  11. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    CI resume

    PR #3431 is open, but both python: unittest suites and worker: local proof are still queued. The task is parked for 20 minutes; resume by re-reading PR checks and proceed only when they settle. The branch is queue/5320-2426-drive-list-backups at ad55d9803; local full tests passed (88 passed, 1 skipped).

    🤖 Agent note · state: parked

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: OpenCode session ses_e5e69bc0053ffenuZSvop6dady; queue task 5320
    • Found via: repo-health-code-pilot
    • Task: Opened PR fix(cold-store): paginate Drive backup listings #3431 for cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing #2426, then parked while CI remains queued.
    • Expectation: Resume once the queued checks complete; verify checks and diff before any merge.
    • Links: fix(cold-store): paginate Drive backup listings #3431 · cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing #2426 · branch queue/5320-2426-drive-list-backups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator 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.