Repository navigation
improve: validate built CLI with Bun 1.4 - #129192
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 6:16 AM ET / 10:16 UTC. ClawSweeper reviewWhat this changesUpdates operational Bun installations and Docker’s pinned Bun image to 1.4.0, then runs built CLI help and status commands with Bun in the artifact-build workflow. Merge readinessKeep open. Current main still pins Bun 1.3.14 and lacks the built-CLI Bun smoke; this focused PR supplies that missing coverage. The protected Priority: P3 Review scores
Verification
How this fits togetherThe artifact-build workflow compiles OpenClaw with Node and exercises the resulting CLI before distributing its artifacts. This PR adds Bun as a secondary launcher runtime check while retaining Node for builds and primary validation. flowchart LR
A[Source and dependencies] --> B[Artifact build]
B --> C[Built OpenClaw CLI]
C --> D[Node CLI smokes]
C --> E[Bun 1.4 CLI smokes]
E --> F[CI compatibility signal]
Decision needed
Why: The PR is explicitly labeled Before merge
Agent review detailsSecurityNone. PR surfaceTests +17, Config +5, Other 0. Total +22 across 13 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep Node as the build and primary runtime, retain the coherent 1.4.0 pins, and merge only after the exact resulting head proves the Bun help and status smokes in CI. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds compatibility coverage rather than reporting a current user-facing failure; current main source confirms the requested CI path is absent. Is this the best way to solve the issue? Yes. The workflow already builds with Node, so running Bun help and status immediately afterward exercises the produced launcher without turning Bun into the primary build toolchain. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c29d4f9d6a3e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready proof for exact head
Exact-head CI/Testbox:
ClawSweeper's rank-up move is satisfied by exact-head build-artifacts/full CI plus GitHub reporting the PR Known local proof gap: this orb has no local Docker daemon, so I did not build the pinned Bun image locally. The Bun 1.4.0 multi-arch manifest digest was verified against the registry, its immutable contract tests pass, and exact-head hosted checks are green. |
|
Merged via squash.
|
* ci: validate built CLI with Bun 1.4 Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2 * test: align Bun Docker image assertion Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2 * test: tolerate cold CLI startup in CI Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2 --------- Co-authored-by: Amp <[email protected]>
Closes #129164
What Problem This Solves
OpenClaw's Bun compatibility checks did not execute the built CLI under the currently supported Bun runtime. Operational setup, install-smoke, Docker, and Crabbox paths still pinned Bun 1.3.14, while the existing fixture lane and global-install smoke did not prove that the built runtime could load and run commands under Bun.
Why This Change Was Made
Update the operational Bun pins coherently to stable Bun 1.4.0, including the digest-pinned multi-arch Docker image, and add an explicit built-CLI Bun smoke to the existing artifact build job. Node/pnpm still install dependencies, build artifacts, run the primary tests, and execute the first CLI smokes; Bun remains a secondary CLI runtime verifier. Intentional old-Bun fixtures remain unchanged.
The Bun install smoke's
@openclaw/aioverride is retained as candidate-byte integrity policy rather than attributed to a Bun 1.3-only behavior.Exact-head CI also exposed an existing cold-start deadline in the first gateway-backed CLI process test: Node + TSX startup exceeded its fixed 20-second kill timer by 139 ms while every sibling case passed. The agent-turn cases now use the repository's established 45-second cold-start allowance; all other cases retain the 20-second guard.
User Impact
Users who explicitly run the OpenClaw CLI with Bun get continuous compatibility coverage against Bun 1.4. Managed services, default package-manager behavior, Node engine support, and release behavior are unchanged; Node remains the primary and recommended runtime.
Evidence
pnpm test test/scripts/ci-workflow-guards.test.ts test/scripts/docker-build-helper.test.ts test/scripts/install-smoke-no-push-workflow.test.ts test/scripts/test-install-sh-docker.test.ts test/scripts/crabbox-wrapper.test.ts— 666 tests passed on the rebased head.OPENCLAW_E2E_SKIP_BUILD=1 OPENCLAW_TEST_BUN_LAUNCHER=1 BUN_BIN=/tmp/openclaw-bun140/node_modules/.bin/bun pnpm test test/openclaw-launcher.e2e.test.ts— 40 tests passed with Bun 1.4.0.pnpm check:changed— formatting, guards, full typecheck, lint, and import-cycle checks passed.pnpm test src/cli/gateway-backed-exit.process.test.ts— all 32 CLI process tests passed; the two agent-turn regressions also passed in 3 consecutive focused runs.pnpm build— built all runtime and Control UI artifacts successfully.openclaw.mjs --helpandstatus --json --timeout 1; the same Node smoke passed first.scripts/e2e/bun-global-install-smoke.shpassed with Bun 1.4.0 against locally built candidate tarballs, including all 9 image providers.sha256:5ff609364c049b54eb0ff560ec96319729a972078ef2c755d758f0c6ef89c2d6.