Skip to content

fleet fallback: fetch_markers silently truncates at its 10-page cap (#6622 Phase 4 gap) #9012

Closed

Description

@dezren39

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

pkgs/fleet/crates/fleet-queue/src/fallback.rs fetch_markers pages issue comments at per_page=100 for page in 1..=10 and breaks on a short page. The volume bound exists (10 pages / 1000 comments — contract rule 2 satisfied), but when the loop ends by hitting the cap rather than a short page, it returns the accumulated markers as if complete: no error, no marker of truncation.

That matters because the markers are the fallback queue's claim/lease state (the function's own doc: "The marker's own embedded ts is authoritative"). Comments are returned chronologically, so on an issue with more than 1000 comments the newest markers — the live claim and heartbeat markers the lease math reads — are exactly the ones silently missing. The read feeds a safety decision (who owns this issue), which under the contract (#6622 rule 3) must fail closed or say so, never present a truncated read as the set. Contrast the same contract's operator-drain disposition (#6615: a visible truncation notice) and the janitor's fail-closed full-page rule (#6618).

Fix shape

When the loop exits by exhausting the page cap with a full last page, fail closed with an error naming the issue (or return the truncation explicitly for the caller to surface) — never return the partial marker set as complete. A test with a stubbed >10-page comment stream pins it. Bound value (10 pages) is unchanged unless the fixer re-sizes it.

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 · done (already_done)

  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · already_done (re-verified, task 20263, lane code-h)

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions