Skip to content

fix(release): bundle AI runtime in installer smoke#103556

Merged
vincentkoc merged 3 commits into
mainfrom
fix/beta3-installer-ai-runtime
Jul 10, 2026
Merged

fix(release): bundle AI runtime in installer smoke#103556
vincentkoc merged 3 commits into
mainfrom
fix/beta3-installer-ai-runtime

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 10, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

The release install-smoke lane could reuse only root dist/ from the candidate Docker image, then pack a metadata-only bundled @openclaw/ai. Stable-to-candidate installation succeeded, but openclaw doctor failed because the AI package had no runtime files.

Fixes #103552

Why This Change Was Made

  • Run the installer packaging harness, Docker fixtures, package builder, and integrity checker from the trusted workflow revision.
  • Check the candidate out as a nested source tree and keep candidate installers, package metadata, root dist/, and AI dist/ as the product under test.
  • Restore root and AI build trees from the same Docker image through one shared rollback-safe helper used by npm and Bun smoke lanes.
  • Resolve strict bundled-AI validation from package exports, actual OpenClaw dist imports, and the AI package's relative-import closure.

Exact image-backed proof now fails closed when import closure is broken and local rebuilds are disabled. The updater stage/swap code is unchanged. Installing separately packed root and AI candidates already succeeds; this repairs the harness-only bundled tarball.

User Impact

Release validation now exercises a complete candidate package for stable-to-candidate npm updates. A malformed metadata-only bundled AI runtime fails during package integrity validation instead of surfacing later as a doctor module-load error.

Evidence

  • Original failure: https://github.com/openclaw/openclaw/actions/runs/29076524932/job/86309758690
  • Focused tests: node scripts/run-vitest.mjs test/scripts/check-openclaw-package-tarball.test.ts test/scripts/check-package-dist-imports.test.ts test/scripts/test-install-sh-docker.test.ts test/scripts/ci-workflow-guards.test.ts - 134/134 passed
  • Static gates: actionlint .github/workflows/install-smoke.yml, bash -n on the three changed shell scripts, node --check on both package-check modules, shellcheck -S error on the three shell scripts, targeted oxfmt --check, and git diff --check
  • Fresh structured autoreview: no findings, patch correct, confidence 0.86
  • Blacksmith Testbox attempts 29078442062 and 29078741828 both stopped during checkout hydration before the test command ran. Hosted exact-head PR checks remain required before landing.

@vincentkoc vincentkoc self-assigned this Jul 10, 2026
@vincentkoc
vincentkoc force-pushed the fix/beta3-installer-ai-runtime branch from 5b3cec9 to 3d7b9e7 Compare July 10, 2026 08:17
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: L maintainer Maintainer-authored PR labels Jul 10, 2026
@vincentkoc
vincentkoc force-pushed the fix/beta3-installer-ai-runtime branch from 3d7b9e7 to f628dc5 Compare July 10, 2026 08:19
@vincentkoc
vincentkoc force-pushed the fix/beta3-installer-ai-runtime branch from f628dc5 to 0a7de77 Compare July 10, 2026 08:27
@vincentkoc
vincentkoc marked this pull request as ready for review July 10, 2026 08:32
@steipete

steipete commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Resolved at 3118589702f43c584abc59f11673959111fd5888.

The original concern was that the custom exports resolver selected wildcard patterns in object order rather than Node's package-exports precedence, so a broad pattern could bypass a more-specific null exclusion.

The custom resolver has now been removed. The strict bundled-artifact check keeps an explicit three-entry @openclaw/ai runtime contract, asks Node itself to resolve all three specifiers from the extracted package root in one subprocess, compares the resolved file URLs, and reuses the existing relative-import closure checker. Focused regressions cover a null export and a missing relative runtime import; 132/132 focused tests and the final immutable full installer smoke are green. See the final proof comment below.

@steipete

steipete commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Land-ready proof for exact head e92771a1c2d326bf05e26d2ba0b2b9b4c4348ba2.

Original red: Release Checks run 29076524932, installer job 86309758690 installed and swapped 2026.7.1-beta.3, then failed doctor with ERR_MODULE_NOT_FOUND for @openclaw/ai/dist/internal/runtime.mjs.

Exact proof:

  • Focused Testbox on e92771a1c2d326bf05e26d2ba0b2b9b4c4348ba2: 132/132 passed (check-openclaw-package-tarball 32, installer smoke 61, workflow guards 39).
  • Raw/no-wrapper immutable full-smoke lease: tbx_01kx5mfkm54fmynz0d6d0p79q2.
  • Trusted source and immutable harness both asserted as e92771a1c2d326bf05e26d2ba0b2b9b4c4348ba2; nested candidate and exact image asserted as 811ddd96180583bae00001f71971419182ae0520.
  • Candidate package: 6,843 files, 77.6 MiB unpacked. Required entries, Node-owned package resolution, relative-import closure, and strict tarball checks passed.
  • Fresh 2026.7.1-beta.3 install, CLI verification, and installed AI-runtime probe passed.
  • 2026.6.11 -> 2026.7.1-beta.3 global update, swap, doctor (observed exit 0), final CLI verification, and post-update AI-runtime probe passed.
  • Raw full-smoke command exited 0 in 2m9.1s.
  • Hosted exact-head CI: run 29081852388, 66 pass, 15 intentional skips, 0 pending, 0 failing.
  • Fresh branch autoreview completed. Its sole candidate-dependency finding was rejected after source tracing and exact workflow-topology proof: the packer stages the bundled AI tarball itself, and the immutable nested-candidate scenario passed. No accepted/actionable findings remain.

Commands:

CI=true corepack pnpm test \
  test/scripts/check-openclaw-package-tarball.test.ts \
  test/scripts/test-install-sh-docker.test.ts \
  test/scripts/ci-workflow-guards.test.ts
CI=true \
OPENCLAW_INSTALL_URL=file:///tmp/openclaw-install.sh \
OPENCLAW_INSTALL_CLI_URL=file:///tmp/openclaw-install-cli.sh \
OPENCLAW_NO_ONBOARD=1 \
OPENCLAW_INSTALL_SMOKE_SKIP_CLI=1 \
OPENCLAW_INSTALL_SMOKE_SKIP_NONROOT=1 \
OPENCLAW_INSTALL_SMOKE_SKIP_NPM_GLOBAL=1 \
OPENCLAW_INSTALL_SMOKE_SKIP_PREVIOUS=1 \
OPENCLAW_INSTALL_SMOKE_SKIP_FRESHNESS=1 \
OPENCLAW_INSTALL_SMOKE_UPDATE_BASELINE=2026.6.11 \
OPENCLAW_INSTALL_SMOKE_UPDATE_EXPECT_VERSION=2026.7.1-beta.3 \
OPENCLAW_INSTALL_SMOKE_UPDATE_DIST_IMAGE=ghcr.io/openclaw/openclaw-dockerfile-smoke:811ddd96180583bae00001f71971419182ae0520 \
OPENCLAW_INSTALL_SMOKE_UPDATE_SKIP_LOCAL_BUILD=1 \
OPENCLAW_INSTALL_SMOKE_SOURCE_DIR="$IMMUTABLE_HARNESS/candidate" \
bash scripts/test-install-sh-docker.sh

The full command ran through raw Crabbox --no-sync after strict harness/candidate SHA assertions. The deliberately skipped installer sublanes are unchanged and covered separately by hosted CI/release validation; frozen-target Release Checks will be rerun after landing/backport.

@vincentkoc vincentkoc closed this Jul 10, 2026
@vincentkoc vincentkoc reopened this Jul 10, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof for exact head e92771a1c2d326bf05e26d2ba0b2b9b4c4348ba2:

  • The bundled @openclaw/ai artifact contract now uses Node's own resolution for the three load-bearing entries, verifies relative-import closure, and probes the installed CLI with openclaw infer image providers --json in fresh and update lanes.
  • The final follow-up preserves the shipped recoverable doctor advisory exit 86; real doctor failures still fail through the update payload status.
  • Focused proof: 136/136 passed locally and in Blacksmith Testbox run 29081772994, lease tbx_01kx5m90atszd3c82rt747h8mp.
  • Fresh branch autoreview: no accepted/actionable findings; patch correct (0.82).
  • Exact-head hosted gates all passed: Workflow Sanity 29081852370, CI 29081852388, ARM 29081852398, Build Artifacts 29081852403, and Testbox 29081852409.
  • The immutable installer topology proof on the immediate parent passed fresh beta3 install and stable 2026.6.11 -> 2026.7.1-beta.3 update, doctor, final CLI, and installed AI-runtime probe. The exact-head follow-up only removes an invalid strict-zero assertion and is covered by the focused suite above.
  • Repo-native review artifacts validate READY with no findings, and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 103556 completed successfully.

No PR-level proof gaps remain.

@vincentkoc
vincentkoc merged commit 8755077 into main Jul 10, 2026
83 of 85 checks passed
@vincentkoc
vincentkoc deleted the fix/beta3-installer-ai-runtime branch July 10, 2026 09:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

steipete added a commit that referenced this pull request Jul 10, 2026
* fix(release): bundle AI runtime in installer smoke

* fix(release): verify bundled AI runtime loadability

* fix(release): preserve advisory doctor exits

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 11, 2026
* fix(release): bundle AI runtime in installer smoke

* fix(release): verify bundled AI runtime loadability

* fix(release): preserve advisory doctor exits

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR scripts Repository scripts size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install smoke can bundle @openclaw/ai without runtime files

2 participants