You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
split(pm-stack): server.ts (5,251 lines) under the production line limit (#12671) #13052
Split pm-stack/aggregator/src/server.ts under the production line limit
pm-stack/aggregator/src/server.ts is 5,251 lines (measured on main, 2026-11-23; it was 4,748 when #12671 was filed — it is still growing unguarded-by-size in practice).
It is grandfathered in .github/scripts/check-production-line-limit.sh (limit 2500 production lines, extended to pm-stack TypeScript under #12671). Per the guard's convention, this issue is the one that removes its grandfather entry: the entry is deleted in the same PR that lands the split.
Done when
server.ts (or its successor modules) are each under the 2500-line guard limit, split along the server's existing seams (routes, consumers, wiring) without behaviour change.
The pm-stack/aggregator/src/server.ts grandfather entry is removed from the guard script in the same PR.
xaltha picking this up: splitting pm-stack/aggregator/src/server.ts (5,251 lines) along its routes/consumers/wiring seams into modules under the 2500-line production limit, no behaviour change, and removing the server.ts grandfather entry from .github/scripts/check-production-line-limit.sh in the same PR. Claim check at pickup: issue OPEN, unassigned, no open PR touches aggregator/src/server.ts (nearest neighbours: #12771 touches activity.ts, #12905 touches scheduler/scripts — neither touches server.ts). Branch: xaltha/13052-split-server-ts.
Dispatch order is unchanged: route literals stay in server.ts (pinned there by nav/board-view/roadmap-view/freshness/ui-overhaul source tests) and each moved family is delegated to at its original position. The move is verbatim — a line-multiset diff against the old file shows every original line preserved except one deliberate alias (hotListConsumer) for TS narrowing over the imported consumer binding. The server.ts grandfather entry is removed from check-production-line-limit.sh in the same PR.
bunx tsc --noEmit: output identical to main (one pre-existing escalation-tick.ts error)
Guard: server.ts warning gone with the entry removed, no new errors (only the 3 pre-existing Rust over-limit files on main remain); guard contract tests all pass
Activity
developing-today commentedon Nov 23, 2026
CODE-4763
dezren39 commentedon Nov 23, 2026
xaltha picking this up: splitting
pm-stack/aggregator/src/server.ts(5,251 lines) along its routes/consumers/wiring seams into modules under the 2500-line production limit, no behaviour change, and removing the server.ts grandfather entry from.github/scripts/check-production-line-limit.shin the same PR. Claim check at pickup: issue OPEN, unassigned, no open PR touchesaggregator/src/server.ts(nearest neighbours: #12771 touches activity.ts, #12905 touches scheduler/scripts — neither touches server.ts). Branch:xaltha/13052-split-server-ts.refactor(pm-aggregator): split server.ts into seam modules under the …
dezren39 commentedon Nov 23, 2026
Split landed: PR #13093 (#13093), OPEN + MERGEABLE, branch
xaltha/13052-split-server-ts, commit2f9a5b8a9.Module map (all under the 2500-line guard limit):
server.ts— 5,299 → 1,813: read routes, the dispatch,fetchHandler, bootstrap + timersserver-wiring.ts(412): config, stores, source selection, consumers, source-side sinks, fail-soft facet fallbacksserver-contexts.ts(809): cached page/API assemblies (board, roadmap, today, overview, attention, program) + health assembly, provenance priming, SLO summariesserver-pages.ts(716): standalone token pages (Needs-Drew answer page, decision-set pages), PWA manifestserver-write-routes.ts(744): report-record resolution, identity-registry admin + stack-token exchange, prompt/comment/action route familiesserver-alert-routes.ts(330): alert throat — push subscriptions, test sends, incident intake, alerts/notifications pagesserver-decision-routes.ts(457): Needs-Drew answers + decision-set submit/defer/request-info/drafts routesserver-respond.ts(34):json/jsonCompact/html/service-worker Response constructorsDispatch order is unchanged: route literals stay in
server.ts(pinned there by nav/board-view/roadmap-view/freshness/ui-overhaul source tests) and each moved family is delegated to at its original position. The move is verbatim — a line-multiset diff against the old file shows every original line preserved except one deliberate alias (hotListConsumer) for TS narrowing over the imported consumer binding. Theserver.tsgrandfather entry is removed fromcheck-production-line-limit.shin the same PR.Evidence:
bun test: 3328 pass / 3 fail / 1 error (baseline on main: 3326 / 5 / 1; the 3 remaining failures are the pre-existing sandbox-timeout failures — collect-fleet-feed aggregator(collect-fleet-feed): --out takes the next token blindly and unknown args are ignored — trailing --out crashes at startup with a raw TypeError, '--out --weird' writes the feed to a file named --weird, and a typo'd --otu silently overwrites the default feed #3509 ×2, deriveEpicEta aggregator(forecast): capped resampling trials are recorded as completions, publishing optimistic P50/P80 dates #6386 — a strict subset of baseline)bunx tsc --noEmit: output identical to main (one pre-existingescalation-tick.tserror)