GeezerVison is showing github.com — split(pm-stack): server.ts (5,251 lines) under the production line limit (#12671) · Issue #13052 · developing-today/code
split(pm-stack): server.ts (5,251 lines) under the production line limit (#12671) #13052Labels queue/parkedQueue task is parked (waiting on CI, time, or an event)status/parkedDeliberately paused with a recorded resume condition DescriptionSplit 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.
- Aggregator suites pass.
Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on 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.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. dezren39 commented on Nov 23, 2026 Split landed: PR #13093 (#13093), OPEN + MERGEABLE, branch xaltha/13052-split-server-ts, commit 2f9a5b8a9.
Module map (all under the 2500-line guard limit):
server.ts — 5,299 → 1,813: read routes, the dispatch, fetchHandler, bootstrap + timers
server-wiring.ts (412): config, stores, source selection, consumers, source-side sinks, fail-soft facet fallbacks
server-contexts.ts (809): cached page/API assemblies (board, roadmap, today, overview, attention, program) + health assembly, provenance priming, SLO summaries
server-pages.ts (716): standalone token pages (Needs-Drew answer page, decision-set pages), PWA manifest
server-write-routes.ts (744): report-record resolution, identity-registry admin + stack-token exchange, prompt/comment/action route families
server-alert-routes.ts (330): alert throat — push subscriptions, test sends, incident intake, alerts/notifications pages
server-decision-routes.ts (457): Needs-Drew answers + decision-set submit/defer/request-info/drafts routes
server-respond.ts (34): json/jsonCompact/html/service-worker Response constructors
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.
Evidence:
dezren39 commented on Nov 24, 2026
Triage verdict — oc-code-01, 2026-11-24 (queue task 22278)
Fresh check against origin/main:
pm-stack/aggregator/src/server.ts is 5,793 lines on main, still over the 2,500 guard limit. The grandfather entry is still in .github/scripts/check-production-line-limit.sh:53, so the issue is not resolved.
- The split is in open PR refactor(pm-aggregator): split server.ts (5,299 lines) under the production line limit (#13052) #13093 (
xaltha/13052-split-server-ts, state OPEN, mergeable UNKNOWN at check time). Its body claims a verbatim move to server-wiring.ts, server-contexts.ts and similar modules, plus removal of the grandfather entry. Its evidence was recorded against a 5,299-line base, and main has since grown to 5,793.
Verdict: in progress, not a new packet. The remaining step is to rebase PR #13093 onto current main, confirm the line-multiset diff still holds with the newer lines, and merge it. No new follow-on packet is filed; the existing PR is the vehicle.
No code changed in this pass. developing-today-fleet commented on Nov 24, 2026 🤖 Agent note · bound
- Agent: fleet monitor
- Session / ID: task 23124 · repo-fleet-monitor run 2026-11-24 (digest 2026-11-24T11:14:44Z)
- Found via: monitor reconciliation (Duty 1B PR↔queue binding)
- Task: Bound task 23124 to PR refactor(pm-aggregator): split server.ts (5,299 lines) under the production line limit (#13052) #13093 (refactor(pm-aggregator): split server.ts (5,299 lines) under the production line limit (#13052) #13093), verified this run as the implementation of issue split(pm-stack): server.ts (5,251 lines) under the production line limit (#12671) #13052 (title, branch and files read). The pickup happened out of band (session branch xaltha/13052-…, PR authored under Drew's account; the issue carried no work/queue claim labels and, for split(pm-stack): render.ts (8,515 lines) under the production line limit (#12671) #13051, no agent note — recorded as a protocol gap under Duty 4). Task 23124 is parked on the PR (reason pr-bound-shepherd, ~30 min): the resuming lane shepherds PR refactor(pm-aggregator): split server.ts (5,299 lines) under the production line limit (#13052) #13093 — review CI, merge when green, do NOT re-implement.
- Expectation: PR refactor(pm-aggregator): split server.ts (5,299 lines) under the production line limit (#13052) #13093 merged or handed back with a checkpoint.
dezren39 commented on Nov 25, 2026
Shepherd completion — IW-347, 2026-11-25 (queue task 23124)
PR #13093 MERGED — merge commit 1caf1475062b, 2026-11-25T13:04:21Z; this issue read back CLOSED/completed.
What it took
The split commit sat unmergeable since 2026-11-24 (two Batch A attempts blocked on rebase conflicts): main's server.ts had grown 5,299 → 5,996 lines since the branch point, almost entirely insertions (735 added / 38 changed lines) inside regions the split moved. The rebase was done as a mechanical three-way replay: base lines were mapped to their split destinations (kept in server.ts or moved to one of the seven seam modules), then main's edit script was applied at the mapped positions, with hand placement only where the split had reorganised code (imports, the wiring store constructions, the #9608 outage-queue gate → server-wiring.ts, the CF-9 edition-drift block → server-contexts.ts, the #14064 default-view change → server-decision-routes.ts). A second replay round absorbed the search-timing change (#1212) that landed on main during the work. No behaviour change intended or made beyond what main itself added.
One defect in the original PR was found and fixed on the branch: test/nav.test.ts's route-reachability scan read only server.ts, so it could never pass after the split (the original PR missed it). The scan now covers the seam modules; the assertion is unchanged (commit 64e9c1e8852).
Verification (laptop worktree route — the aggregator's bun suite is bun-local by design)
tsc --noEmit: clean.
- Full aggregator suite on the final tree: 3,720 pass / 11 fail / 1 error (3,731 tests). Every failure is pre-existing or a load-timing artifact, each checked: collect-fleet-feed ×2 + the 1 error reproduce identically on a pristine-main control; the assembly-deadline (×7) and feed-attention (×2) failures pass in isolation on this branch (23/23 and 4/4) and the deadline family is a known full-suite timing flake on main as well; nav reachability 12/12.
- Line-limit guard:
server.ts no longer appears (was grandfathered at 5,996 lines); no server-*.ts module is over the limit; the grandfather entry is removed. (The guard still fails on unrelated pre-existing files on main — foreign_libsql.rs, edge.ts, etc. — not touched by this PR.)
Final branch head pushed: 8e453f2a6a7 (split + nav scan fix + search-timing helper exports).
MetadataMetadataqueue/parkedQueue task is parked (waiting on CI, time, or an event)status/parkedDeliberately paused with a recorded resume condition DevelopmentNo branches or pull requestsIssue actions
|