Repository navigation
chore(startup): remove server-init.ts, a module nothing imports - #10780
Merged
diegosouzapw merged 1 commit intoAug 20, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
maxmad64bis
force-pushed
the
fix/server-init-dead-code
branch
from
August 19, 2026 21:59
1c66985 to
6379d57
Compare
5 tasks done
This was referenced Aug 20, 2026
src/server-init.ts (183 lines) imported 20 modules and started 17 initializations, but nothing ever imported it — the real boot path is the Next.js instrumentation hook (src/instrumentation-node.ts), which already wires every job it registered. Four comments across the codebase pointed contributors at "server-init.ts" as the place a job runs from; corrected them to name instrumentation-node.ts instead. Updated the tests that asserted on the dead module directly (its own wiring-check suite, a security-hardening probe, and two scheduler-wiring guards) to assert on instrumentation-node.ts / initCloudSync.ts, the paths that actually run in production.
maxmad64bis
force-pushed
the
fix/server-init-dead-code
branch
from
August 20, 2026 10:37
6379d57 to
a4cc241
Compare
Contributor
Author
|
Rebased onto The conflict came from #10775, which landed first and touched the same module: it removed
Re-ran after the rebase: the 7 affected test files pass (105 tests, 0 failing, 4 skipped), All 7 red checks on this run are inherited base-red, none of them from this diff:
|
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…osouzapw#10780) Merged — validated together with a batch of related maxmad64bis PRs in one combined worktree (typecheck:core clean, complexity/cognitive-complexity/file-size/changelog gates green, focused tests passing). Thanks for the contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
src/server-init.tsis never imported. The Next.js instrumentation hook(
src/instrumentation-node.ts) is the boot path that runs, and it already performs everyinitialization this module declares — checked call by call.
happened in fix(server): wire credential health scheduler into serve boot #7432 (credential health) and [BUG] Claude adaptive-thinking corrupts tool calls & leaks </think> on Cursor/OpenAI path; Thinking Budget UI is a no-op #5312 (thinking budget), and both left regression tests
asserting the wiring must not live there.
arenaEloSync.ts,openrouterProviderStats.ts,modelsDevSync.ts,pricingSync.ts— the real caller isinstrumentation-node.tsin all four), and the doc and.env.examplereferences that pointed atthe file.
Related Issues
Validation
module (82 pass, 2 skipped),
npm run test:vitest(368/368),npm run check:docs-allnpm run lintTests Added Or Updated
tests/integration/integration-wiring.test.tstests/integration/security-hardening.test.tstests/unit/lib/jobRegistry/boot-wiring.test.tstests/unit/cleanup-column-fix.test.mjstests/unit/thinking-budget-hydration-5312.test.ts(comment only)Assertions that only read the
server-init.tssource are removed, or redirected to the live path(
instrumentation-node.ts,initCloudSync.ts), so they now cover the module that actually runs.Coverage Notes
it. The live boot path keeps its coverage and is now asserted directly instead of through the
dead module.
Reviewer Notes
docs/i18n/still name the file. They are generated and catch up on thenext translation run.
src/server-init.tsand two test files. Both are independentlymergeable; whichever lands second needs a trivial rebase.
npm run check:docs-allstill reports two failures (BOT_TOKEN/BOT_URLabsent from.env.example, executors count inARCHITECTURE.md). Both are pre-existing and outside thisdiff — the diff touches one line in each of
.env.exampleandENVIRONMENT.md.