GeezerVison is showing github.com — pm-aggregator: first /program hit after restart stalls ~26s — boot warm-up saturates the event loop and never warms the program assembly · Issue #9594 · developing-today/code
pm-aggregator: first /program hit after restart stalls ~26s — boot warm-up saturates the event loop and never warms the program assembly #9594DescriptionFollow-up to #5082 (closed): a distinct defect in the same surface family, first flagged as a watch item on #5082 (comment 6865079577) and re-sighted by pool-quota-steward run 369 (/api/program.json 17.83s first pass, 0.06s second; #5082 comment 6865203340).
Measured root cause (2026-11-13, laptop, live service):
- First /api/program.json after a service restart: 26.44s and 26.48s on two controlled restarts; every later hit ~0.03s. A 150ms poll through a restart shows exactly one 26.48s response (the first on the new process), then 0.03-0.06s throughout.
- The program legs themselves are fast in a clean process: items 0.02s, projects 0.01s, roadmap 0.29s, orchestration 0.02s, coverageCensus 0.03s (programRefs = 8).
- Warm TTL-expiry first pass is 0.023s — the TodayCache SWR conversion from fix(pm-aggregator): kill the residual first-pass latency tail (#5082) #9589 works; expiry is not the stall.
- The stall is event-loop queueing at boot: the first buildQuotaAnalytics is fully synchronous and measures 12.23s in a clean process (second build 0.00s), and the boot warm-up ran it plus three cold context assemblies on the single Bun event loop. Any request arriving in that window queues behind it.
- /program was the visible victim because programSources was the one major assembly the boot warm-up did NOT warm, so its first post-restart request always landed cold, inside/behind that backlog. Deploy restarts are frequent (three today), so first-pass-after-restart is the recurring shape of both sightings.
Fix (this lane): prime the aggregates cache at boot through the existing day-sliced SWR refresh (primeAttemptAggregates in analytics-store.ts) instead of the synchronous build, and warm programSources() alongside board/overview/today in server.ts. Request-path semantics unchanged: a /quota request landing before the prime settles still pays the synchronous cold build on its own path, as today.
Acceptance: >=5 cache-expiry cycles with first-pass /program and /api/program.json each cycle, a 6-way concurrent cold burst after restart, and a closing sweep of all aggregator surfaces in today's healthy ranges. Activitydeveloping-today commented on Nov 13, 2026 dezren39 commented on Nov 14, 2026 Cross-link: the resumed lane root-caused the steward 376/377 escalation (/program 503 on pass 1 in both runs, #5082 comments 6871649763/6872326046) to a distinct sibling mechanism — the uncached briefs latest-comments fan-out hitting its 8s abort cliff while the projector is occupied by its inline /reconcile sweep — filed as #9781 and fixed in this same PR #9596 (commit 0f99186). This issue (#9594, the post-restart boot stall) remains the boot half; #9781 is the steady-state half. #5082 stays closed.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|