Before submitting
- I searched the open and closed issues for a related report.
- I removed credentials, tokens, private paths, and sensitive target data.
Area
CLI
Observed behavior
tests/boundary/cli/cliStartupImports.test.ts › "CLI one-shot command imports › loads summary projection and bundle delivery only when requested" fails on main. A plain rea analyze-javascript-application <dir> --json now loads AnalysisViewService and analysisViewResult at startup, although neither --detail summary nor --evidence_output was given:
- Expected
+ Received
Set {
+ "analysis-view-result",
+ "analysis-view-service",
"javascript-application",
}
❯ tests/boundary/cli/cliStartupImports.test.ts:363:6Pull requests whose CI runs this test fail on it. Four fork PRs did on 23 Nov: shard 11 or shard 5, plus Portable tests.
Reproduction
From a clean checkout with npm ci:
npm run build
npx vitest run tests/boundary/cli/cliStartupImports.test.ts -t "summary projection"Results on macOS arm64 with Node 24.22.1, one run each:
| Commit | Result |
|---|---|
c5361cbe8 (#13852) | passes |
97a95103d (#13861) parent | passes |
97a95103d (#13861) | fails |
a023edf89 (#13867) | fails |
1d4fadceb | fails |
836cb8a01 | fails |
Expected behavior
analyze-javascript-application --json loads only the javascript-application heavy module. The analysis-view and bundle-delivery modules load only with --detail summary or --evidence_output, as the test states.
Impact and scope
The impact is CLI startup cost and import isolation. I observed no change to results. Every CI run that includes this test fails until it is fixed. Other one-shot commands that reach a migrated service may load the same modules at startup; I did not test them.
REA version
source revision 836cb8a01
Runtime and platform
macOS arm64, Node.js 24.22.1; also GitHub Actions ubuntu-latest (CI)
Target and artifact context
a directory with one index.js (export const answer = 42;), as in the test
Interface
CLI
Earliest failure stage
Unknown
Relevant output or evidence
The test's own resolution hook reports the extra modules. A registerHooks resolve hook that logs the parent of each resolved dist/cli-runtime chunk shows this chain at 97a95103d, while the command runs with --json only:
cli-runtime/ArtifactInspectionExecution-*.js <- cli-runtime/electronFuses-*.js
cli-runtime/AnalysisViewService-*.js <- cli-runtime/ArtifactInspectionExecution-*.js
cli-runtime/analysisViewResult-*.js <- cli-runtime/AnalysisViewService-*.jsAnalysis or suspected cause
This section is source-derived. src/application/ArtifactInspectionExecution.ts statically imports projectRetainedAnalysis, requireAnalysisViewRetention and AnalysisViewRetention from ./analysisView/AnalysisViewService.js. #13861 moved ElectronFuseService onto executeArtifactInspection, and the JavaScript application command reaches it through the electronFuses chunk. So the runner's static import now loads the analysis-view modules on that startup path.
A possible fix, not tried: load AnalysisViewService in the runner only when a request asks for retention or a view.
Additional context
Last known good: 97a95103d's parent. First known bad: 97a95103d (#13861). Main's own CI was green at c5361cbe8.
Activity
2Checked this against current main (ca26f2ac8) before writing a patch, and the regression is no longer there — closing rather than shipping a fix for behaviour that is already absent.
Evidence:
tests/boundary/cli/cliStartupImports.test.tsonmain: 10 passed (10), afternpm run build:cachedso the run uses a currentdist(a staledist/cliBuiltinArguments.jsfails withclassifyCliEntrypoint is not a function, which is an environment error rather than this assertion).- The case named in the report —
loads summary projection and bundle delivery only when requested— asserts the set is exactly{javascript-application}for a plain--jsonrun, and that same case passes here. mainCI at 09:41 succeeded, and the most recent redmainrun (09:31) failed in Deep static checks, not in this boundary suite.- The import edges that could pull the service in eagerly are typed or dynamic today:
ArtifactInspectionExecution.tscarriesimport type { AnalysisViewRetention }(erased) and loads the service throughawait import(...).
For the forks that saw this: a branch based before ca26f2ac8 keeps the old startup graph, so rebasing onto current main should clear it. If it still reproduces on a current rebase, please reopen with the branch head and the shard, and I will take it from there.
Working on this — the startup graph should not pull
AnalysisViewServicefor a plainanalyze-javascript-applicationrun. I will report the import edge that brings it in, plus the control that the deferred path still loads when--detail summaryor--evidence_outputasks for it.