LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-vega
createdAtNov 17, 2026, 5:13 AM
updatedAtNov 18, 2026, 5:02 PM
githubUrlhttps://github.com/neomjs/neo/issues/21215
authorneo-fable-mnemosyne
commentsCount3
parentIssue21213
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[x] 72 A new workspace starts the engine''s file server and opens its app
closedAtNov 18, 2026, 5:02 PM

server-start runs a file server of the engine's own

Closed v14.0.0/archive-v14-0-0-chunk-3 enhancementdependenciesaibuild
neo-fable-mnemosyne
neo-fable-mnemosyne commented on Nov 17, 2026, 5:13 AM

No curated labels: it is a cut item for Engine 14 and has to be merged by Fri Nov 20, together with neomjs/create-app#72 and the private package repository's change.

Staging: back in 14.0, as the clean cut (the steward of the cut on 2026-11-18, #21213, comment 6967621246). Her decision of 2026-11-17 (comment 6955736494) had moved the row to the first 14.x minor while review by another family was scarce; that reason fell away on 2026-11-18. The gate counts three pull requests, merged with the e2e suites green by Fri Nov 20: this one, neomjs/create-app#72 and the private package repository's server-start. If they are not merged by then, the staging of 2026-11-17 stands: the file server as an additive change in the first 14.x minor, the deletion in the next major. If a tier turns red on a server cause after the merge and before the lock (Sun Nov 22, 18:00 CET), the three are reverted, not repaired forward, and that staging stands as well. The Fix, the ledger and criteria 1 to 12 below are the clean cut again; criteria 13 to 15 come from @neo-opus-ada's read of 2026-11-18 (comment 6967673674).

Context

npm run server-start is webpack serve -c ./buildScripts/webpack/webpack.server.config.mjs --open. The config has no entry: webpack is started to serve the working directory. webpack-dev-server alone keeps 155 of the engine's 560 lockfile entries installed (28 %). In a generated workspace the same script ends the first run on a directory listing of the workspace root.

Sub of #21213 (its intended solution, point 4). Source: https://github.com/orgs/neomjs/discussions/21210, row 1d. @tobiu's input governs the cut: 14.0 is the window for breaking changes, a clean cut with an upgrade note and no deprecated entry.

The Problem

A dev server that bundles nothing costs the engine and every workspace its largest dependency tree, and with it the upkeep that tree brings: of 58 Dependabot pull requests since 2026-08-17 that name one package, 5 sit in this tree. Dev mode needs files served, a few headers, and one warning.

The Architectural Reality

  • package.json:54 defines server-start; package.json:52 runs buildScripts/util/check-installed-dependencies.mjs before it (preserver-start); package.json:144 lists webpack-dev-server.
  • buildScripts/webpack/webpack.server.config.mjs does four things besides starting webpack: it serves process.cwd() statically with watch: false (:156 to :169); it reads the port from process.env.PORT (:141), which is how an agent seat's launcher tells the server its port; it serves the engine's release-notes directory at its own path while the static server keeps every other dot-directory closed (:144 to :154); and it exports createDevelopmentThemeFreshnessHooks (:43), which warns about stale development themes at startup and at most once per interval while theme CSS is requested. The hook warns; it builds nothing.
  • Callers of the script, all with the same flags, npm run server-start -- --port ${PORT} --no-open: test/playwright/playwright.config.mjs:52, playwright.config.clipboard.mjs:39, playwright.config.component.mjs:38, playwright.config.e2e.mjs:106, playwright.config.matrix.mjs:66, playwright.config.visual.mjs:65.
  • Named by the config path: .claude/launch.json:7 (it runs npx webpack serve -c … directly), .github/workflows/classify-test-scope.yml (:216, :270, :275, :406), test/playwright/unit/buildScripts/util/WorkflowScopeClassifier.spec.mjs:952, test/playwright/unit/buildScripts/util/developmentThemeAssets.spec.mjs (it imports the hook from the config file, :12 to :14), test/playwright/unit/buildScripts/fixtures/neoAppPackage.json:37, buildScripts/create/component.mjs:198, buildScripts/README.md, learn/agentos/RunningTheFleetCockpit.md, learn/benefits/body/FourEnvironments.md.
  • src/index.js exists only as webpack's default entry for this server.
  • Every arm of the first-run measurement rendered the generated app on a 40-line Node file server.
  • Design authority: "**Script:** webpack serve -c ./buildScripts/webpack/webpack.server.config.mjs --open" (buildScripts/README.md, the section on npm run server-start). The record makes today's behavior intended; this ticket changes the record with the behavior, as selected in #21213.

The Fix

A Node script under buildScripts/ (its placement is the implementer's, per structural-pre-flight) serves the working directory and replaces webpack serve in server-start. webpack-dev-server leaves package.json and the lockfile. buildScripts/webpack/webpack.server.config.mjs and src/index.js are deleted. The freshness hook moves to a module of its own, so its spec keeps importing it without the server.

Contract Ledger Matrix

Target surface Source of authority Proposed behavior Fallback Docs Evidence
npm run server-start package.json:54 Starts the engine's file server on the working directory none buildScripts/README.md the six Playwright tiers green
--port <n>, --no-open, PORT the six Playwright configs; webpack.server.config.mjs:141 Unchanged: --port and PORT select the port, --no-open suppresses the browser a taken port fails loudly buildScripts/README.md a unit spec per flag; .claude/launch.json starts the server
--open [path] today's --open (package.json:54); the generator's leaf, neomjs/create-app#72 Opens the default browser on the path under the served root, and on the root without a path none buildScripts/README.md a unit spec; the first-run witness of neomjs/create-app#72
Served paths webpack.server.config.mjs:144 to :169 The working directory, with .mjs and .wasm MIME types and range requests; a directory URL answers with its index.html, and without one with a plain listing, as today's server does; the release-notes directory; no other dot-directory 404 buildScripts/README.md a spec that requests .git/config and the release notes
buildScripts/webpack/webpack.server.config.mjs this ticket Deleted, no deprecated entry none, by the clean cut the 14.0 upgrade note the path search below returns nothing
The Host header webpack-dev-server 6.1.0, allowedHosts: 'auto' (@neo-opus-ada, comment 6967673674) An IP literal, localhost and *.localhost are served; any other host gets a 403. The server listens on every interface, as today none buildScripts/README.md a spec that sends Host: rebind.example

Acceptance Criteria

  • server-start starts no webpack process; webpack-dev-server is in neither package.json nor package-lock.json.
  • The six Playwright configs are unedited and their tiers pass on the pull request's head.
  • PORT=<n> npm run server-start -- --no-open and npm run server-start -- --port <n> --no-open both listen on <n>.
  • .mjs and .wasm files are served with their MIME types, and a range request gets a 206.
  • The release-notes directory is served at the path the Portal requests; /.git/config and /.env are not served.
  • A directory URL with an index.html serves it (/apps/portal/), and one without answers with a listing of links. npm run server-start -- --open apps/portal/ opens that path.
  • The development-theme freshness warning fires as before; developmentThemeAssets.spec.mjs passes against the hook's new module.
  • git grep -nE "webpack\.server\.config|webpack serve|webpack-dev-server" -- . ':!package-lock.json' ':!apps/portal/resources/data' ':!resources/data' returns nothing: .claude/launch.json, classify-test-scope.yml, the two specs and the fixture, create/component.mjs, the README and the two guides are updated.
  • A multi-window check passes on the new server: a child window opens from the workstation or an example and loads its styles.
  • The pull request states the lockfile entry count before and after.
  • Paired, in the same hour as the merge: the private package repository's server-start, which runs the engine's webpack binary with the deleted config path (@neo-opus-vega has it). The Institution is not a consumer: its server-start and server-start-ci run a webpack.server.config.mjs of its own with its own webpack-dev-server (read at its e8477f6f), so it can move in any later minor. The pull request names both facts.
  • Post-merge: the 14.0 upgrade note tells a workspace created before 14 how its server-start script changes.
  • A request whose Host is not an IP literal, localhost or a *.localhost name gets a 403, and a spec sends Host: rebind.example to assert it. The server keeps listening on every interface, so a phone on the LAN reaches it by IP.
  • Every file extension among the served tree's tracked and built files maps to a type other than application/octet-stream. The spec derives the extension list from the tree, never from the table it checks.
  • The pull request's own e2e run reports its slowest engine step against the 285 s bar of #21287 before the merge. @neo-opus-ada's reason: a server without validators answers every reload with a full 200 where today's answers 304, and the fifteen shards have about 12 % headroom. Serving ETag or Last-Modified and honouring the conditional request keeps today's behaviour.

Out of Scope

  • The generator's side (its server-start, its webpack-dev-server entry, opening the generated app): neomjs/create-app#72.
  • webpack as the builder of dist/development and dist/production: deferred in the source Discussion until a measurement exists.
  • Building stale themes on request: the hook keeps warning only.

Avoided Traps

  • Keeping the old config as a deprecated entry. Rejected with the clean cut; the live consumers are few and named.
  • A server without the Host check. Every tier sends Host: localhost, so no tier can see that a page on any site could rebind its own name to 127.0.0.1 and read the served directory.
  • A MIME table checked against itself. It passes with the extension it forgot.
  • A server dependency from npm. The point is fewer packages; node:http covers the contract.
  • Hot reload. The engine does not use it; watch is already false.

Decision Record

OPTIONAL: the command line and the served paths are recorded here and in buildScripts/README.md.

Signal Ledger

  • claude: AUTHOR_SIGNAL by @neo-fable-mnemosyne @ body 2026-11-17T04:06:35Z
  • gpt: APPROVED by @neo-gpt-euclid @ body 2026-11-17T04:06:35Z (comment 19669886)
  • gemini: APPROVED by @neo-gemini-julia @ body 2026-11-17T04:06:35Z (#21213, comment 6941565480); she wrote the option-card for this row (comment 19669197)
  • Steward: @neo-opus-vega restored the row to 14.0 on 2026-11-18 (#21213, comment 6967621246) and holds it.
  • claude, peer read: @neo-opus-ada on 2026-11-18 (comment 6967673674): the row fits the Friday gate with criteria 13 and 14 and the timing guard of criterion 15.

Unresolved Dissent

None.

Unresolved Liveness

Windows is unmeasured for this server; neomjs/create-app#71 carries a Windows arm for the first run.

Discussion Criteria Mapping

Source item Mode Where it lands
Row 1d: a file server of the engine's own, the old path deleted judged The Fix, the Contract Ledger, criteria 1 and 8
STEP_BACK point 2: one command line, callers updated together, no deprecated entry judged criteria 2, 3 and 8
STEP_BACK point 8: the freshness inspector certifies SCSS output only judged criterion 7, Out of Scope
The steward's gate: paired consumers, merged by Fri Nov 20 judged the first lines, criterion 11

Related

Live latest-open + closed sweep: checked latest 20 open + open and closed search ("webpack dev server", "server-start", "webpack-dev-server"; #96 read, closed not planned in 2019, a different question; #20132 and #21157 read, both about the freshness check, which this keeps) at 2026-11-17T04:12Z; no equivalent or prior exclusion found. Backlog band: 85 open, red; folded into its owning epic #21213 as a sub. MC sweep: "webpack dev server only serves static files; replace webpack with esbuild or own bundler; dist/development not needed for dev mode", 6 results, no prior decision. Own-assignment sweep: 4 open, none overlapping (#21213 is the parent). A2A sweep: latest 12 messages, no claim on this scope.

Holder since 2026-11-18: @neo-opus-vega, who is also the steward of the cut. I drafted the design, so its pull request gets no formal review from me; she routes the reviews.

Origin Session ID: b3758981-efde-4777-921c-8c57fe3a804e Retrieval Hint: "server-start file server replaces webpack serve webpack-dev-server removed"