Repository navigation
Description
Problem
fetchProjectPool (pm-stack/aggregator/src/projects.ts:153-175) paginates the org Project pool with a hard cap of 10 pages (for (let page = 0; page < 10; page++), :159; query page size items(first: 100) at :28, so at most 1,000 items). When the loop exits because the cap was hit — hasNextPage still true — the function returns the partial pool exactly as if it were complete: no throw, no truncation marker, no log. The page's own totalCount is available on every response and is even parsed by projectPageInfo (projects.ts:142-149), but fetchProjectPool never compares it against what it collected.
The sole caller, the fleet-feed collector (pm-stack/aggregator/scripts/collect-fleet-feed.ts:558), treats only a thrown error or a zero-length result as failure (either omits the projects section, :559-568). A truncated pool is published into the fleet feed as the whole pool, and the aggregator then resolves refs and renders /projects, board and program counts from it — every item past page 10 silently vanishes from every dashboard surface, with nothing anywhere saying the pool is incomplete.
Evidence (verified this run, main 5a34fa7)
Laptop probe ~/git/fleet/probe-2026-10-29-laneA-poolpages/ (verbatim projects.ts + model.ts from main, Bun, using the injectable fetchFn the module provides for tests):
- Mock fetch returning 2 items per page,
hasNextPage: trueforever,totalCount: 25:fetchProjectPoolstopped after exactly 10 fetch calls and returned 20 items — 5 items short of the stated totalCount — with no error and no truncation signal. - Control (3 pages, then
hasNextPage: false, totalCount 6): returned all 6 items in 3 calls — the finite path is correct; only the cap exit is silent.
Why it matters
The Project pool is the dashboard's live resolution source for GitHub items (#910 stage 5, projects.ts header). A silently truncated pool is worse than an omitted section: an omitted section makes the aggregator fall back to its previous chain and the health views can say the section is missing, while a partial pool looks authoritative — items simply stop existing on the board, /projects counts understate, and nobody is alerted as the real pool grows past 1,000 items.
Acceptance criteria
- When the 10-page cap is reached with
hasNextPagestill true (or the collected count is short of the pages'totalCount), the read is treated as incomplete in an observable way — e.g.fetchProjectPoolthrows so the collector's existing fail-soft path omits the section and logs why, or the truncation is otherwise surfaced (collector log + a completeness signal in the published section) — triage pins which. - A pool that fits within the cap is returned complete and unchanged (existing pagination behaviour and tests keep passing).
- Regression test with a mock
fetchFn: an always-hasNextPagesequence past the cap produces the pinned incomplete-read behaviour instead of a silently partial array; a finite multi-page sequence still returns every item.
Dedup / related
- cold-store-reaper: Drive list_backups never follows nextPageToken — prune-backups retention plans from a silently truncated listing #2426 (cold-store-reaper Drive
list_backupspagination) is the same failure pattern in a different component; this is the Project-pool collector read, distinct code and consumer. - /projects: make the Project pool browsable — filters, counts, grouping by Kind/Status, honest truncation #1208 (/projects browsability, "honest truncation") is about rendering the pool in the UI, not the collector's fetch cap.
- Searched open+closed issues for
fetchProjectPool, pagination/totalCount and pool truncation: no covering issue.
Activity
developing-today commentedon Oct 29, 2026
CODE-1256
dezren39 commentedon Oct 29, 2026
🤖 Agent note · filed
34 remaining items
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 2, 2026
🤖 Agent note · done