Skip to content

aggregator(projects): isProjectPoolItem accepts any number — NaN, Infinity, 1.5, -3 and 0 pass the pool gate and render as repo#NaN-style fabricated references #3514

Closed

Description

@dezren39

Problem

isProjectPoolItem (pm-stack/aggregator/src/projects.ts:236-252) — the shared per-item gate for the feed's GitHub Project pool (the collector parses against it, poolFromFeed in feed.ts:266-271 filters with it) — checks the issue/PR number with a bare type test at projects.ts:243:

typeof p.number === "number" &&

Every real number comes from the GitHub GraphQL API (projects.ts:37-38, mapped at :135-149), where number is always a positive integer. The gate admits values no producer can emit: fractional, negative, zero, NaN, and Infinity (the last two arrive via hand/corrupt feed JSON as null-adjacent spellings or via a JS producer bug — typeof NaN === "number").

Consumers trust the gate: the pool renders the number verbatim in link text — render.ts:5132, :5402, :5415 interpolate ${esc(p.repo)}#${p.number} — so a poisoned item renders as developing-today/code#NaN, …#1.5, or …#-3, a fabricated cross-reference that matches no real issue (and a ref/number pair that can disagree with each other, since neither is checked against the other).

Verified this run (laptop probe, real code)

Probe: ~/git/fleet/probe-2026-11-01-laneB-subsdate/probe2.ts on the laptop — verbatim copy of pm-stack/aggregator at main 5abd39a (feed.ts sha256 cf7ea03d…, validate.ts sha256 1f72539a…, matched to the sandbox clone). Output (probe2.log), base item valid in every other field:

  • control number: 12 → isProjectPoolItem = true (correct)
  • number: 1.5 → true
  • number: -3 → true
  • number: 0 → true
  • number: NaN → true
  • number: Infinity → true

Why it matters

The pool section is the dashboard's cross-project work view; its items are rendered as repo#number links throughout /projects and the board cards. A gate that admits impossible numbers lets one corrupt feed item fabricate references and pollute derived state keyed off the pool, instead of dropping just that item — the per-item drop is the gate's documented contract (feed.ts:239-248).

Acceptance criteria

  • isProjectPoolItem requires number to be a positive integer (Number.isInteger(n) && n > 0): 1.5, -3, 0, NaN, and Infinity items fail the gate and drop individually in poolFromFeed (the section itself survives).
  • Valid positive-integer items pass unchanged.
  • Regression tests cover the five rejected values plus the valid control, following the existing projects/feed gate test pattern.

Dedup

Searched open + closed for isProjectPoolItem / pool number: #2418 (open) covers the same function's unchecked labels field — a different field with a different failure (render crash); this filing is the number field only. #2453 (closed) was the non-array projects crash. No issue covers the number's value domain.

Activity

  1. developing-today commented on Nov 1, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/lowNice to have; do when convenient
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 1, 2026
  3. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane B, slug new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b, run 2026-11-01 04:50 CST
    • Found via: filed this run
    • Task: Triage the isProjectPoolItem number gate (projects.ts:243) — bare typeof accepts NaN/Infinity/1.5/-3/0; real GraphQL numbers are positive integers
    • Expectation: effort/s; done = number must be a positive integer, bad items drop individually in poolFromFeed, regression tests for the five rejected values
    • Links: queue packet packets/packet-3514-triage.json (hidden_files)
  4. added
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  5. 18 remaining items

  6. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: parked
    task: 6137
    lane: c29174f1-48e0-4b13-b4ff-9b73ab67e9ab (openchamber-scheduled-lane)
    note: Parked 20 minutes after the CI poll window expired with PR #4478's basic guard still pending. Resume by checking PR/merge-queue state fresh; local targeted tests are green (74 pass), and the full-suite failures reproduced on clean origin/main were unrelated. Branch queue/6137-3514-project-pool-number @ 639d849.
    links: #4478

  7. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Verification clarification for task 6137 / PR #4478: targeted feed/projects tests pass (74/74). The full aggregator suite reported a failure and a missing package import error; the brief-surfaces failure reproduces on clean origin/main, while the package error was not independently checked there. PR #4478 remains parked pending CI.

  8. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Verification correction for task 6137 / PR #4478: targeted feed/projects tests pass (74/74). The full aggregator suite reported a brief-surfaces test failure and an import error for missing package web-push. The brief-surfaces failure reproduces on clean origin/main; the package error was not independently verified there. Both are unrelated to this diff. PR #4478 remains parked pending CI.

  9. 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
  10. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked-up
    task: 6137
    lane: 9aca43b4-5439-4939-9f71-323f5d32521b (openchamber-scheduled-lane, repo-worker-code)
    note: Resumed the parked task and revalidated issue OPEN and PR #4478 OPEN on the canonical branch queue/6137-3514-project-pool-number @ 639d849; no held/Drew-owned restriction or competing PR. Checking fresh CI/merge readiness before taking the verified terminal action.
    links: #4478

  11. added a commit that references this issue on Nov 2, 2026
  12. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done
    task: 6137
    lane: 9aca43b4-5439-4939-9f71-323f5d32521b (openchamber-scheduled-lane, repo-worker-code)
    note: Fixed and merged PR #4478 at merge SHA 381fecb. The positive-integer number gate and regression cases are in; focused tests pass 74/74 and the available basic config guard passed. Full bun test reported 1171 pass, 2 fail, 1 import error; the brief-surfaces failure and local missing-web-push import failure were reproduced on clean origin/main. Coverage gap: PR did not run proxy-fallback or aggregator-test checks because nix-ci.yml and pm-aggregator-tests.yml are push-to-main only; focused tests were run locally.
    links: #4478

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/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 jobtask/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