Repository navigation
Description
Context
A pre-cut witness for #61 installed Engine dev at neomjs/neo@b2db92c5b7 (packed the way the 13.2 publish packs it) into a DevIndex worktree at bf6fc43 and ran the Pages workflow's own build, npm run build-all -- -l no -p no. It exits 1.
The cause is a deliberate engine change: neomjs/neo#17429 (merged 2026-08-20, after the 13.1.0 tag) removed the two DevIndex special cases from the engine when DevIndex left the neo repo. 13.2.0 is the first release without them. DevIndex still relies on both.
The Problem
Measured on 2026-10-07:
- The build fails. The app worker's webpack build reports 24 errors such as
Can't resolve 'tty'innode_modules/cli-width, plusstring_decoder,stream,node:events,node:child_processandnode:path. Every error is reached through./apps/ lazy ^\.\/.*\.mjs$→./devindex/services/{Manager,cli,GitHub,Storage,config}.mjs. The engine's worker dynamic imports (src/worker/{App,Canvas,Data}.mjs) let webpack bundle every.mjsunderapps/that theirwebpackExcludedoes not name. 13.1.0's regex nameddevindex(?:\/|\\)services(added in Bug: Webpack matches absolute paths, invalidating the ^\.\/ magic comment anchor neo#9583); 13.2's does not. - Every build carries the contributor index. 13.1's app-worker config deleted
apps/devindex/resources/data/from the build output ("Exception for devindex app: Do not deploy the data folder"); 13.2 copies the app'sresources/whole. After the build,dist/development,dist/productionanddist/esmeach hold the 23 MBusers.jsonlthatpostinstallpulls. The site serves the index once, atapps/devindex/resources/data/users.jsonlunder the mount. The copies are dead weight in every Pages artifact: two today, three once dist/esm ships.
DevIndex itself is unaffected while its lock holds neo.mjs 13.1.0. The first deploy after the bump to 13.2.0 fails.
The Architectural Reality
apps/is the browser tree. The engine's worker contexts scan it so an app's modules can load by path. Node-side code that sits there needs an engine exclusion, and a consumer-named exclusion is what #17429 rightly removed.apps/devindex/services/is the Data Factory (learn/data-factory): Node-only (inquirer,child_process, the GitHub API), run through thedevindex:*npm scripts. No browser module imports it; its importers arepackage.json,buildScripts/{assemblePagesSite,publishWorkingSet,pullDevIndexData}.mjs, eight specs undertest/playwright/unit/app/devindex/and the data-factory guides. Its own engine imports climb three levels (../../../node_modules/neo.mjs/src/core/Base.mjs).- Precedent: Relocate cloud-deployment examples under ai/ to unbreak build-all neo#12270 moved Node-only code out of a tree the worker contexts scan (
examples/cloud-deployment→ai/examples/) rather than excluding it. - Witness: with
apps/devindex/services/moved outsideapps/, the same build exits 0 (16.8 s, 0 webpack errors), and dist/esm's app imports contain nonode_modules/neo.mjspath (23 importing modules, 0 hits).
The Fix
- Move
apps/devindex/services/toservices/at the workspace root, besidebuildScripts/. Its engine imports become../node_modules/neo.mjs/.... Class names (DevIndex.services.*) stay. Update every importer: the sixdevindex:*scripts, the three build scripts, the eight specs and the guides' paths. assemblePagesSite.mjscopies each build withoutapps/devindex/resources/data/, so the index ships once.
Both changes are inert on 13.1.0: the move leaves nothing for its exclusion to match, and the builds have no data folder to skip. So this lands before the publish, and the bump to 13.2.0 is a lock change only.
Acceptance Criteria
- No
.mjsunderapps/imports a Node builtin or a Node-only package; the Data Factory lives inservices/, and everydevindex:*script, build script, spec and guide path follows it. -
npm run build-all -- -l no -p noexits 0 on the locked 13.1.0 and on a packed Enginedevtarball (the 13.2 candidate). - The assembled
_siteholdsusers.jsonlonce, atapps/devindex/resources/data/, and in no build directory (assembly spec). - The unit suite passes.
Out of Scope
- The dist/esm and dev-mode entries and the Portal rows (Every DevIndex environment is live under /devindex/ and linked from the Portal #61).
- The bump to 13.2.0 itself (Dependabot or the post-publish bump).
- Any engine change: the engine stays free of consumer names.
Avoided Traps
- Re-adding a DevIndex clause to the engine's
webpackExclude. It reverses #17429 and keeps a consumer's layout in four engine files. resolve.fallback: falsefor Node builtins in the engine's webpack configs. It would compile the Node-only modules into the worker chunks and hide every future browser import of a builtin until runtime.
Decision Record impact
none
Related
#61 (blocked by this), neomjs/neo#17429 (removed the exceptions), neomjs/neo#9583 (added the exclusion), neomjs/neo#12270 (the move precedent).
Live latest-open sweep: neomjs/devindex open #61, #1, #9 and neomjs/neo's latest 20 open issues at 2026-10-07T10:53Z, re-read 10:56Z; no equivalent. gh search issues for "devindex services webpack" and "13.2 devindex": none.
A2A claim sweep: the latest 30 messages; no claim on DevIndex's build or the 13.2 bump.
MC sweep: "devindex build-all fails webpack node builtins apps/devindex/services", 6 results. They show why the exclusion existed (neomjs/neo#9583) and the #12270 move precedent; no prior decision against moving the folder.
Own-assignment sweep (devindex): #61 and #1. #61 owns the entries, not the build.
Origin Session ID: 9aa8aa9b-2502-458b-976b-eec8a223218e
Retrieval Hint: "devindex neo.mjs 13.2 build-all webpack apps/devindex/services Data Factory move"
Activity
test(devindex): the run-boundary preload comment drops its ticket ref (…
Merge pull request #65 from neomjs/grace/64-data-factory-out-of-apps