Repository navigation
Description
pm-stack(aggregator): isProjectPoolItem accepts impossible/non-ISO updatedAt — pool items carry rolled dates into momentum and board-recency math
Evidence
pm-stack/aggregator/src/projects.ts at origin/main 9380bf6d7:
isProjectPoolItem(line 272) gates the pool item's only timestamp with a bare type check:(p.updatedAt === undefined || typeof p.updatedAt === "string"). Any string passes — impossible calendar dates, non-ISO spellings, and outright garbage. This predicate is the whole feed-side gate:projectPoolSectionProbleminfeed.tsdelegates per-item validation to it, and the collector parses against it too.poolItemToGhItem(projects.ts:282) copies the stamp through verbatim:updatedAt: p.updatedAt ?? "".- Consumers do arithmetic on it with
Date.parse, which rolls impossible days forward and parses non-ISO spellings timezone-dependently:derive.ts:815— the weekly "accomplished" list for project momentum is(state === "merged" || "closed") && Date.parse(i.updatedAt) >= weekAgo;derive.ts:820—recent = Date.parse(i.updatedAt) >= twoDaysAgofeeds the momentum state itself (movingvsstalled, derive.ts:824);derive.ts:786— board ordering sorts on the raw string (localeCompare), so non-ISO spellings also misorder.
- Sibling gates in the same codebase refuse exactly these stamps: the tier-item delegation parser ISO-gates its
updatedAt(tier-items.ts:179, via the localisIso),isSessionRecordISO-gateslastSeenAt/startedAt(registry.ts, pm-stack(aggregator): isSessionRecord accepts impossible and non-ISO lastSeenAt/startedAt — a non-ISO stamp wins merge recency forever, and impossible dates roll in registryActivityMs #5078), andisSubscriptionRowISO-gatesrenewsAtwithisIsoDate(feed.ts, validate.ts:116). The pool item is the remaining typeof-only stamp.
Verified (laptop probe, this run)
Probe at origin/main 9380bf6d7 (laptop ~/git/fleet/probe-2026-11-03-laneB2-poolupd/probe.ts, importing the real projects.ts; now fixed at 2026-03-01T00:00:00Z for the momentum predicate):
{"updatedAt":"2026-02-30T00:00:00Z","gate":true,"parsed":1772409600000,"countsAsThisWeek":true} ← rolls to Mar 2 — a future day that never existed counts as this week's activity
{"updatedAt":"2026-04-31T00:00:00Z","gate":true,"parsed":1777593600000,"countsAsThisWeek":true} ← rolls to May 1
{"updatedAt":"March 2, 2026","gate":true,"parsed":1772431200000,"countsAsThisWeek":true} ← non-ISO, parsed timezone-dependently
{"updatedAt":"not-a-date","gate":true,"parsed":null,"countsAsThisWeek":false} ← garbage passes the gate (only the downstream NaN comparison happens to exclude it)
{"updatedAt":"2026-02-25T00:00:00Z","gate":true,"parsed":1771977600000,"countsAsThisWeek":true} ← valid control
Why it matters
Project momentum is a headline dashboard signal: it decides whether a project reads as "moving" or "stalled" and which merged/closed items are listed as this week's accomplishments. One pool item carrying an impossible stamp (a collector glitch, a hand-edited feed, a future producer that formats dates loosely) silently fabricates recent activity — Feb 30 becomes Mar 2, Apr 31 becomes May 1 — and a project with no real activity in weeks can read as moving. Every other timestamp the feed gate owns has already been moved to the isIsoDate rule for this exact failure class; this one was missed.
One nuance the fix must preserve: the collector itself emits updatedAt: c.updatedAt ?? "" (projects.ts:163), so a missing GraphQL stamp arrives as "". Items must not start dropping solely for a missing stamp — treat "" as absent (or have the collector omit the field) rather than requiring a date on every item.
Acceptance criteria
-
isProjectPoolItemrefuses a present, non-emptyupdatedAtthat is not a real ISO calendar date (isIsoDate, validate.ts:116):2026-02-30…,2026-04-31…,March 2, 2026, andnot-a-dateall fail the gate and the item drops individually, as with the other feed gates. - A pool item with
updatedAtabsent — including the collector's current""spelling for a missing GraphQL stamp — still passes, so no legitimate item is dropped for lacking a stamp. - Tests in the aggregator suite cover the refused cases, the
""/absent case, and a valid ISO control; existing projects/feed/derive tests still pass. - Existing aggregator tests still pass.
Filed by new-issue-creator-code-b (Lane B), verified this run at origin/main 9380bf6d7. Dedup: searches for isProjectPoolItem, "pool item updatedAt", and "ProjectPoolItem date" surface only the closed number/labels/truncation filings (#3514, #2418, #2453, #2459) — none covers the updatedAt stamp.
Activity
dezren39 commentedon Nov 3, 2026
🤖 Agent note · state: filed
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off
28 remaining items
dezren39 commentedon Nov 12, 2026
🤖 Agent note · implemented, PR opened
isProjectPoolItemnow requires a present non-emptyupdatedAtto satisfyisIsoDate;''(the collector's missing-stamp form) and an absent field stay valid. Commit 4dfc9d5.Merge pull request #9039 from developing-today/queue/8902-5202-pool-u…