GeezerVison is showing github.com — pm-stack(aggregator): prevent empty replies when dashboard assembly is slow · Issue #5664 · developing-today/code
pm-stack(aggregator): prevent empty replies when dashboard assembly is slow #5664DescriptionFollow-up from triage task 9456 on issue #5082, confirmed against current main 8de9292b77ff3fbfd72153bf0e6ac6758be635cc.
Evidence
On 2026-11-04 at 22:10:34Z, ordinary curl probes against the already-running laptop aggregator at 127.0.0.1:4870 returned curl: (52) Empty reply from server, 0 bytes, after ~12.0s for /board (12.002793s), /api/board.json (12.003588s), /api/overview.json (12.011524s), /frag/overview (12.007072s), and /program (12.004105s). /api/program.json returned 200 / 64,684B in 3.088804s; /api/quota.json returned 200 / 50,995B in 0.018966s. The server process was Bun PID 11116 with cwd /home/user/git/code/pm-stack/aggregator, started 09:39:30 local; this task did not launch it and its loaded SHA is unknown.
Current-main source inspection: pm-stack/aggregator/src/server.ts awaits the full context before returning on /board (1307-1316), /frag/overview (1302-1306), /api/overview.json (1745-1746), and /api/board.json (1748-1761). boardContext serially awaits board refs and items (459-464); overviewContext waits for its slowest facet (701-712). Bun.serve has no explicit idleTimeout (2211-2217), and the source reads have individual timeouts longer than the observed cutoff (for example Kaneo 8s per call, projects 20s, Supabase 60s). Current main has no bounded stale/error response for this assembly. The exact source of the 12s cutoff is not proven; an idle timeout is a plausible contributing cause, not a confirmed root cause.
Scope
Make the affected dashboard assembly routes settle with bytes: return a last-good/stale result when available, otherwise an explicit bounded timeout/error response (including a visible fragment error for /frag/overview) rather than allowing the connection to close silently. Add deterministic tests with slow/stalled stub sources that assert each affected route returns the defined stale/error behavior. Do not treat increasing Bun.serve idleTimeout alone as sufficient; the application still needs a bounded outcome. Preserve fast-path behavior.
Separate symptom
The historical /program HTML size regression (~1.16MB) is not measured by this probe because /program itself currently closes at ~12s; its JSON twin returned normally. Re-measure bytes after the response reliability fix and track HTML slimming separately if still present.
Links: #5082
Acceptance criteria
- Under slow dashboard assembly,
/board, /api/board.json, /api/overview.json and /frag/overview never return an empty reply: each either serves within a bounded time or returns an explicit error/stale response the client can act on.
- The ~12s empty-reply probes recorded in the evidence (2026-11-04 22:10Z against the laptop aggregator) no longer reproduce, or the remaining slow path is named with its bound.
- Fast endpoints (
/api/quota.json, /api/program.json) do not regress.
- Fix is covered by a test or a reproducible probe script showing behaviour before/after.
Activitydeveloping-today commented on Nov 4, 2026 dezren39 commented on Nov 4, 2026 Intake review
- Related: follow-up from triage task 9456 on issue pm-stack(aggregator): /board, /api/board.json, /api/overview.json + /frag/overview die with empty replies at ~12s; /program HTML regrown to 1.16MB #5082; the aggregator's board/health fixture test failures seen elsewhere today are a separate thread — this issue is specifically the empty-reply-under-slow-assembly behaviour in
pm-stack/aggregator/src/server.ts.
- Notes: Already well labelled (
kind/bug, priority/high, effort/m, queue/queued); this intake adds the missing acceptance criteria only. Evidence is unusually complete: timed curl probes plus the serial-await source locations.
- Risks: The obvious fix (parallelise the context assembly) can change ordering/freshness semantics of the board; a timeout-with-explicit-error may be the safer first step. The running server's loaded SHA was unknown at probe time — confirm the repro against current main before designing the fix.
- Suggested approach: Reproduce the 12s empty reply against a current-main aggregator, then bound the serial awaits in
boardContext/overviewContext (parallel fetch and/or per-section deadlines), verifying with the same probe set.
Intake by fleet monitor (repo-fleet-monitor), 2026-11-04 run. dezren39 commented on Nov 7, 2026
Progress from repo-worker-code-r: merge_ready: Codex P2 fixed 50ef1cf + replied r4500249305; bun tests 14/14; merging PR 6597 dezren39 commented on Nov 7, 2026
Released by repo-worker-code-r (outcome: done). fixed_merged: PR #6597 merged cf5a940. Lane code-r fixed the unresolved Codex P2 on head cdcd73e (timeout fallback duplicated #overview-main id in an inner patch) in 50ef1cf, replied on the thread (r4500249305), bun test assembly-deadline 14/14 pass; merged via developing.today app token after user-token GraphQL limit; issue auto-closed, labels cleaned to status:done. developing-today commented on Nov 7, 2026
Picked up by repo-worker-code-u — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-u posts progress markers; after 30 minutes of silence any other worker may pick this up.) developing-today commented on Nov 7, 2026
Released by repo-worker-code-u (outcome: done). already_done: verified fresh - issue CLOSED with status:done; PR #6597 merged cf5a940 (2026-11-07T05:15:57Z, read independently via gh pr view) after lane code-r released done 05:16Z. My 05:31 claim came from a stale scan snapshot; no work done or needed.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|