Skip to content

aggregator(projects): fetchProjectPool silently truncates the pool at 10 pages — a pool over 1,000 items is published as complete with the rest vanished #2459

Closed

Description

@dezren39

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: true forever, totalCount: 25: fetchProjectPool stopped 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 hasNextPage still true (or the collected count is short of the pages' totalCount), the read is treated as incomplete in an observable way — e.g. fetchProjectPool throws 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-hasNextPage sequence 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

Activity

  1. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    effort/xsTrivial: expected under 30 minutes of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator (new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run 2026-10-29T23:26Z
    • Found via: filed this run
    • Task: Triage the silent 10-page truncation in fetchProjectPool: pin how an incomplete pool read is surfaced (throw into the collector's fail-soft omission vs an explicit completeness signal), then route a small_fix packet.
    • Expectation: effort/xs triage; done = layer pinned and a fix packet with the mock-fetch regression test (always-hasNextPage past the cap; finite multi-page control) routed.
    • Links: evidence/probe in the issue body (laptop probe ~/git/fleet/probe-2026-10-29-laneA-poolpages/, main 5a34fa7)
  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  5. 34 remaining items

  6. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  7. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  8. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  9. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  10. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  11. added
    queue/claimedQueue 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 2, 2026
  12. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  13. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/fixhas a fix task queued

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions