LearnNewsExamplesServices
Frontmatter
id18868
titleNo CI check compiles the App worker from an installed copy
stateClosed
labels
enhancementaitestingbuild
assigneesneo-opus-ada
createdAtSep 18, 2026, 1:38 PM
updatedAtSep 18, 2026, 2:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/18868
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 18, 2026, 2:50 PM

No CI check compiles the App worker from an installed copy

Closed v13.2.0/archive-v13-2-0-chunk-21 enhancementaitestingbuild
neo-opus-ada
neo-opus-ada commented on Sep 18, 2026, 1:38 PM

Context

PR #18851 (#18849) fixes three portal views whose marked import resolved only at the repository root. In a consumer, build-all failed on them with three Module not found. No check in this repository could have failed on it. The same class — a specifier that resolves at the repository root but not in an installed copy — produced #17868, #17943 and #17997.

The Problem

The one check that builds this package from outside itself, check-consumer-runtime-build, never compiles the App worker:

  • buildWorker() in buildScripts/util/check-consumer-runtime-build.mjs compiles configFactory({worker: 'data', insideNeo: 'false'}), plus Main.
  • Its marked coverage is a list. createFixture() writes apps/probe/data/ConsumerOnly.mjs, which imports the two src/ importers by name (component/Markdown, app/content/Component). The three portal importers were not on the list.
  • .github/workflows/consumer-runtime-build.yml is path-filtered, and no path under apps/, examples/ or docs/app/ is in the filter. A PR that edits only portal files does not run it.

The engine's own build-all job (#18835) cannot see the class: at the repository root, the old specifier resolves.

The Architectural Reality

  • The App worker's importApp() (src/worker/App.mjs) is one lazy context over (apps|docs/app|examples|src)/**/app.mjs, and its webpackExclude keeps node_modules/neo.mjs. Corrected while implementing: in consumer mode the App config (webpack.config.appworker.mjs) moves that context to the workspace root. There, webpack's context walk rewrites every ./node_modules/… file to a bare request that the context's ^\.\/ regExp drops, so the context reaches no shipped app. The Institution compiled the portal views (#18849's ./node_modules/neo.mjs/apps/portal/...) because its build-all runs all.mjs -f -n, which is framework mode. create-app's template runs all.mjs -n. Compiling the App config as the framework from an installed copy reaches every shipped app, with no list to maintain.
  • The workflow header records why the check packs, installs and compiles for real: a path-reasoning probe passed where a physical build failed. This ticket extends the physical build and keeps that decision.
  • The check installs from npm pack, so .npmignore applies. apps/**/*.mjs is excluded except for listed apps, and apps/portal is listed (!/apps/portal/**/*.mjs). A tarball's App-worker compile therefore reaches the same portal views the Institution's git install compiled.
  • Current job: 72–81 s on GitHub runners (last 5 runs, 2026-09-16/17).

The Fix

check-consumer-runtime-build also compiles the App worker's own config (webpack.config.appworker.mjs) from the installed copy, as the framework standing in the consumer, in at least one mode, and fails on any compile error. consumer-runtime-build.yml runs on PRs that touch the App worker's context roots. Widen the path filter, or drop it if the job fits the budget.

Acceptance Criteria

  • The check compiles the App worker from the installed package and fails on any webpack error.
  • Red first: with one of PR #18851's three specifiers reverted, the check fails and names that file. Restored, it passes.
  • A PR that changes only apps/portal/** runs the job.
  • Job wall-clock stays ≤ 5 min on GitHub runners, measured over ≥ 3 runs (operator budget, 2026-09-18).
  • The fixture's two hand-listed marked importers are deleted if the App-worker compile covers them, or the PR says why they stay.

Out of Scope

  • Whether a consumer's App worker should reach the engine's own apps/ at all (#18849's out-of-scope: whether apps/portal ships).
  • A static lint for relative node_modules/ specifiers.

Avoided Traps

  • A specifier grep as the guard. It catches one spelling of the class. It cannot report a target the installed package does not contain (an npmignored path), which a build from the installed copy reports as Module not found.

Related

#18849 · PR #18851 · #18835 · #17868 · #17943 · #17997 · PR #17882 (the guard's origin)

Decision Record impact: none.

Sweeps: live latest-open 20 at 2026-09-18T11:35Z, none equivalent. All-state search for check-consumer-runtime-build: #18849 and closed siblings, none covering the App worker. KB ticket search: none. A2A lane-claims: none on this scope. Memory Core: the guard was built Data-worker-scoped in PR #17882, with no decision against an App-worker arm. Own open assignments: no overlap.

Origin Session ID: 6ed6621f-e2e4-4b9d-9a95-744679cb3c59 Retrieval Hint: "consumer runtime build App worker installed copy root-only specifier portal marked"

tobiu referenced in commit 848be1f - "feat(consumer-build): the consumer runtime build compiles every app the package ships in the App worker (#18868) (#18872) on Sep 18, 2026, 2:50 PM
tobiu closed this issue on Sep 18, 2026, 2:50 PM