GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(pm-aggregator): split server.ts (5,299 lines) under the production line limit (#13052) by dezren39 · Pull Request #13093 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes #13052

What

pm-stack/aggregator/src/server.ts was 5,299 lines and grandfathered in .github/scripts/check-production-line-limit.sh. This PR splits it along its existing seams (wiring, contexts, pages, routes) with no behaviour change, and removes the server.ts grandfather entry from the guard in the same PR, per the guard's convention.

Module map

Module Lines Contents
server.ts 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 (#8568), decision-set pages (#8766), PWA manifest
server-write-routes.ts 744 Report-record resolution, identity-registry admin + stack-token exchange (#9604/#9605), prompt / comment / action route families
server-alert-routes.ts 330 Alert throat (#3676): 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

Every module is under the 2,500-line guard limit. The dispatch order in handler is unchanged: the route literals stay in server.ts (several test suites pin them there — nav.test.ts, board-view-8521, roadmap-view-8723, freshness-fallback-3976, ui-overhaul), and each moved route family is delegated to at its original position, returning null when its routes do not match.

The move is verbatim: a line-multiset diff of the new file set against the old server.ts shows every original line preserved except one deliberate alias (const hotListConsumer = githubHotListConsumer) needed because TS does not narrow an imported binding inside the boot closure the way it narrowed the module-local one.

Evidence

  • bun test (pm-stack/aggregator): 3328 pass / 3 fail / 1 error — baseline on main was 3326 pass / 5 fail / 1 error; 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 the baseline set. The two baseline assembly-deadline PM aggregator /program still stalls on a cold first request #10383 failures pass in this run.
  • bunx tsc --noEmit: output identical to main (one pre-existing error in src/escalation-tick.ts, untouched).
  • check-production-line-limit.sh: server.ts no longer listed (warning gone, entry removed, no new errors); the only remaining failures are the three pre-existing over-limit Rust files on main. Guard contract tests (check-production-line-limit.test.sh) all pass, including "every grandfather entry names an existing file".

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f730f6f0-7764-445e-8877-cad98939f74e
Commits

Reviewing files that changed from the base of the PR and between e8c2bc5 and 8e453f2.

Files selected for processing: 10

  • .github/scripts/check-production-line-limit.sh
  • pm-stack/aggregator/src/server-alert-routes.ts
  • pm-stack/aggregator/src/server-contexts.ts
  • pm-stack/aggregator/src/server-decision-routes.ts
  • pm-stack/aggregator/src/server-pages.ts
  • pm-stack/aggregator/src/server-respond.ts
  • pm-stack/aggregator/src/server-wiring.ts
  • pm-stack/aggregator/src/server-write-routes.ts
  • pm-stack/aggregator/src/server.ts
  • pm-stack/aggregator/test/nav.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T08:08:17.059445Z 2f9a5b8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 23, 2026
split(pm-stack): server.ts (5,251 lines) under the production line limit (#12671) #13052
Closed
AUDIT-7 Lane 1 follow-up: rebase-and-merge queue for 90 blocked PRs (batches A–H) #13903
Closed
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch A merge attempt BLOCKED; no conflict resolution, commit, or push made. Rebase-and-merge onto current main conflicts in .github/scripts/check-production-line-limit.sh:53 and pm-stack/aggregator/src/server.ts at lines 9, 67, 135, 220, 2288, and 4149. The guard entry can retain both server.ts (#13052) and sources/live.ts (#13053), but server.ts has broad overlapping extraction-vs-newer-main route/import changes (notably the dispatch block at 220–2172 and another at 2288–2968, with the alert dispatch at 4149–4188). Integrating main’s additions across the split route modules safely requires semantic relocation and validation beyond a conflict-only merge; preserving both sides mechanically would duplicate/skip routes. Leaving this worktree unmerged per the additive-resolution rule.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch A merge attempt BLOCKED (task 21622, issue #13903); no conflict resolution, commit, or push made. Fresh worktree off origin/main at 3828de1, local git merge --no-ff of PR head 2f9a5b8 conflicts in 2 files / 7 hunks:

  • .github/scripts/check-production-line-limit.sh:53 - mechanical (keep both exemptions: server.ts split(pm-stack): server.ts (5,251 lines) under the production line limit (#12671) #13052 HEAD + sources/live.ts split(pm-stack): sources/live.ts (2,532 lines) under the production line limit (#12671) #13053 incoming).
  • pm-stack/aggregator/src/server.ts hunks at 9, 67, 135 (import blocks), 220-2172 (imports + wiring + read routes vs extracted module imports), 2288-2968 (write routes vs handleWriteRoutes), 4149-4188 (alert subscription routes vs handleAlertIntakeRoutes) - NOT mechanical.

Why not mechanical: the PR branched at fa75486 (single commit on top), and main has since added 518 lines to server.ts plus 8 new source modules that do not exist anywhere in the PR head tree (verified via git grep/cat-file -e on PR head): outage-queue.ts, webhook-listener.ts, notify-relay.ts, prompt-attachments.ts, pm-core-jobs.ts, pm-core-wiring.ts, prompt-ws.ts, metadata-ingestion.ts. Main-side routes/wiring inside the conflicted regions with no counterpart in the split modules: /api/actions/outage-queue.json, /api/actions/outage-queue/confirm, /api/actions/outage-queue/reject, /webhooks/github, /assets/prompt-badge.js, /chat, notify-relay + prompt-attachment + sync-block wiring. Taking the PR side would silently drop these features; taking main's side would un-split.

Named blocker: needs semantic relocation - rebase the extraction onto current main and relocate main's newer routes/wiring into the correct seam modules (server-write-routes.ts / server-alert-routes.ts / server-wiring.ts / server-contexts.ts), then re-verify (typecheck + aggregator tests + route smoke). Requesting the PR author rebase and relocate; leaving this unmerged per the additive-resolution rule.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 24, 2026
pm-aggregator /health: SLO budgets read 'exhausted' inside target; feed permanently 'stale' at its own cadence #14062
Closed
fleet: ready PRs are left unmerged (20 open; the merge sweep has filed nothing since 2026-11-17) #12280
Open
@dezren39
dezren39 force-pushed the xaltha/13052-split-server-ts branch from 2f9a5b8 to e797ccb Compare November 25, 2026 12:50
dezren39 added 3 commits November 25, 2026 06:53
@dezren39
refactor(pm-aggregator): split server.ts into seam modules under the …
f776fad
…production line limit (#13052)
@dezren39
test(pm-aggregator): scan the split server modules in the nav reachab…
64e9c1e
…ility check (#13052)
@dezren39
fix(pm-aggregator): export the search-timing helpers from server-cont…
8e453f2
…exts (#13052)
@dezren39
dezren39 force-pushed the xaltha/13052-split-server-ts branch from e797ccb to 8e453f2 Compare November 25, 2026 13:03
@developing-today-fleet
developing-today-fleet Bot merged commit 1caf147 into main Nov 25, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@developing-today-fleet
developing-today-fleet Bot deleted the xaltha/13052-split-server-ts branch November 25, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

split(pm-stack): server.ts (5,251 lines) under the production line limit (#12671)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.