From a80328eda5397097750c351684a11f9de62c4f03 Mon Sep 17 00:00:00 2001 From: Jason Ma Date: Thu, 2 Jul 2026 05:17:10 +0800 Subject: [PATCH] ci(main): install deps before Hermes secret-boundary Vitest (#6143) The build-hermes-sandbox-image job invoked the Hermes sandbox secret-boundary Vitest test (`npx vitest`) before the 'Set up Node' and 'Install root dependencies' steps. On a clean hosted runner there is no root node_modules, so npx pulled an ad-hoc vitest that could not resolve 'vitest/config' from the repo's vitest.config.ts, failing the job with 'Cannot find module vitest/config'. The ordering regressed in #5756 (commit 8120223922bf) when that lane moved from a shell test to Vitest but the Node setup/install steps stayed below it. Move 'Set up Node' and 'Install root dependencies' up to run right after base-image resolution, so both Hermes Vitest steps use the repository's pinned dependency set. No behavior change to the tests themselves; the smoke test already ran after these steps. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Jason Ma --- .github/workflows/sandbox-images-and-e2e.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sandbox-images-and-e2e.yaml b/.github/workflows/sandbox-images-and-e2e.yaml index dec64fcffa7..cbb6192c8c3 100644 --- a/.github/workflows/sandbox-images-and-e2e.yaml +++ b/.github/workflows/sandbox-images-and-e2e.yaml @@ -71,6 +71,15 @@ jobs: - name: Resolve Hermes base image uses: ./.github/actions/resolve-hermes-base-image + - name: Set up Node + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0 + with: + node-version: 22 + cache: npm + + - name: Install root dependencies + run: npm ci --ignore-scripts + - name: Build Hermes production image run: docker build -f agents/hermes/Dockerfile --build-arg BASE_IMAGE=${{ env.HERMES_BASE_IMAGE }} -t nemoclaw-hermes-production . @@ -102,15 +111,6 @@ jobs: path: /tmp/nemoclaw-hermes-sandbox-secret-boundary.log if-no-files-found: ignore - - name: Set up Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0 - with: - node-version: 22 - cache: npm - - - name: Install root dependencies - run: npm ci --ignore-scripts - - name: Run Hermes root entrypoint smoke Vitest test env: E2E_ARTIFACT_DIR: ${{ github.workspace }}/e2e-artifacts/live/hermes-root-entrypoint-smoke