Skip to content

improve: validate built CLI with Bun 1.4 - #129192

Merged
steipete merged 3 commits into
mainfrom
chore/bun-1.4-runtime-coverage
Aug 25, 2026
Merged

steipete merged 3 commits into
mainfrom
chore/bun-1.4-runtime-coverage

Conversation

@steipete

@steipete steipete commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

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/ai override 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.
  • Bun 1.4.0 directly ran the built openclaw.mjs --help and status --json --timeout 1; the same Node smoke passed first.
  • scripts/e2e/bun-global-install-smoke.sh passed with Bun 1.4.0 against locally built candidate tarballs, including all 9 image providers.
  • Docker's Bun image now uses the registry-verified multi-arch manifest digest sha256:5ff609364c049b54eb0ff560ec96319729a972078ef2c755d758f0c6ef89c2d6.
  • Structured Codex autoreview: clean, patch correct, 0.98 confidence on the final branch diff.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 25, 2026 09:24
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: S maintainer Maintainer-authored PR labels Aug 25, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 6:16 AM ET / 10:16 UTC.

ClawSweeper review

What this changes

Updates 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 readiness

⚠️ Ready for maintainer review - 3 items remain

Keep 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 maintainer label and incomplete exact-head checks require explicit maintainer handling. Likely related people: steipete (high confidence).

Priority: P3
Reviewed head: a4475be645ae7dcaa5d875c88efd262fbd8a2b0b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused, preserves Node as the primary runtime, and has a targeted workflow guard; completion of the exact-head CI run remains the merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable: the supplied repository state identifies this as a member-authored PR; its body nevertheless records direct built-CLI Bun 1.4 terminal validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable: the supplied repository state identifies this as a member-authored PR; its body nevertheless records direct built-CLI Bun 1.4 terminal validation.
Evidence reviewed 6 items Current-main gap: Current main installs Bun 1.3.14 in the shared setup action and runs only Node launcher smokes in the artifact-build job, so the requested built-CLI Bun coverage is not already implemented.
PR runtime path: The branch enables Bun for artifact builds and invokes both help and status after the Node-built artifacts are available.
Launcher contract: The launcher accepts Bun only when its node:sqlite capability probe succeeds, then imports the built dist entry; the new CI commands therefore exercise the supported secondary-runtime boundary.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Once the exact resulting head has a successful build-artifacts run, should this maintainer-owned Bun 1.4 coverage change be merged? Merge after exact-head CI: Confirm the build-artifacts job executes and passes the new Bun 1.4 CLI smokes on the final mergeable head.

Why: The PR is explicitly labeled maintainer, and the supplied check state remains incomplete; automated cleanup must not close or merge it.

Before merge

  • Resolve merge risk (P1) - The PR changes the build-artifacts workflow and its Bun runtime dependency; the supplied check state is incomplete, so the exact rebased/merge head still needs a successful artifact-build run before merge.
  • Complete next step (P2) - The remaining action is protected maintainer review of the final CI result, not an automated repair.
Agent review details

Security

None.

PR surface

Tests +17, Config +5, Other 0. Total +22 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 24 7 +17
Docs 0 0 0 0
Config 3 8 3 +5
Generated 0 0 0 0
Other 4 5 5 0
Total 13 37 15 +22

Review metrics

Metric Value Why it matters
Production versus test delta production +13/-8; tests +24/-7 The production change is a coherent version-pin update plus two CI smoke commands; tests mostly protect the workflow and operational-pin contract.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #129164
Summary: This PR is the explicitly linked candidate implementation for the open Bun 1.4 built-CLI coverage request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Complete exact-head workflow proof (recommended)
    Let the final build-artifacts workflow run the Bun 1.4 smoke before merge, since this change directly alters CI runtime behavior.
  2. Pause if the runtime smoke regresses
    Keep the PR open and diagnose any Bun image resolution or built-CLI failure rather than accepting a weaker CI contract.

Technical review

Best 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.

Labels

Label changes:

  • add merge-risk: 🚨 automation: The diff changes the artifact-build workflow and adds a required Bun-based smoke path whose exact-head execution must be confirmed.

Label justifications:

  • P3: This is a focused secondary-runtime CI and tooling improvement, not a default runtime or user-flow regression.
  • merge-risk: 🚨 automation: The diff changes the artifact-build workflow and adds a required Bun-based smoke path whose exact-head execution must be confirmed.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable: the supplied repository state identifies this as a member-authored PR; its body nevertheless records direct built-CLI Bun 1.4 terminal validation.

Evidence

What I checked:

  • Current-main gap: Current main installs Bun 1.3.14 in the shared setup action and runs only Node launcher smokes in the artifact-build job, so the requested built-CLI Bun coverage is not already implemented. (.github/actions/setup-node-env/action.yml:324, c29d4f9d6a3e)
  • PR runtime path: The branch enables Bun for artifact builds and invokes both help and status after the Node-built artifacts are available. (.github/workflows/ci.yml:1431, a4475be645ae)
  • Launcher contract: The launcher accepts Bun only when its node:sqlite capability probe succeeds, then imports the built dist entry; the new CI commands therefore exercise the supported secondary-runtime boundary. (openclaw.mjs:16, a4475be645ae)
  • Regression guard: The workflow guard asserts Bun installation, the Node smokes, and both new Bun smoke commands, preventing accidental removal of the CI contract. (test/scripts/ci-workflow-guards.test.ts:7408, a4475be645ae)
  • Feature provenance: Current-main blame attributes the existing Bun setup, Node artifact smokes, and Docker Bun-image synchronization contract to Peter Steinberger’s commit db1b8a1; the PR extends that same surface. (.github/workflows/ci.yml:1425, db1b8a12ff60)
  • Current-main comparison: The current-main comparison shows all 13 PR paths still differ, confirming the central CI and operational-pin work remains unique to this branch. (.github/workflows/ci.yml:1349, c29d4f9d6a3e)

Likely related people:

  • steipete: Current-main blame ties the existing Bun setup, build-artifact smokes, and Docker image synchronization contract to Peter Steinberger; the supplied PR metadata identifies the same person as the current author. (role: feature-history owner and recent area contributor; confidence: high; commits: db1b8a12ff60, c29d4f9d6a3e; files: .github/actions/setup-node-env/action.yml, .github/workflows/ci.yml, Dockerfile)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm the final build-artifacts job passes the Bun 1.4 help and status commands on the mergeable head.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-25T09:30:22.867Z sha 3c803a7 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Aug 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added the cli CLI command changes label Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 19dc47a0dbaefb0d3b36582c29d8f75a1d5a3f37:

  • 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 passed.
  • 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 passed with Bun 1.4.0.
  • BUN_BIN=/tmp/openclaw-bun140/node_modules/.bin/bun OPENCLAW_BUN_GLOBAL_SMOKE_TIMEOUT_MS=180000 bash scripts/e2e/bun-global-install-smoke.sh — passed against candidate tarballs, including all 9 image providers.
  • pnpm test src/dockerfile.test.ts — 37 passed.
  • pnpm test src/cli/gateway-backed-exit.process.test.ts — 32 passed; the two agent-turn cases also passed in 3 consecutive focused runs after the CI-exposed cold-start deadline repair.
  • pnpm check:changed passed the full Bun branch; pnpm check:changed -- src/cli/gateway-backed-exit.process.test.ts passed the final core-test repair.
  • pnpm build passed. The built openclaw.mjs --help and status --json --timeout 1 commands passed under Node first and Bun 1.4.0 second.
  • Final structured Codex autoreview: clean, patch correct, 0.98 confidence; TruffleHog clean.

Exact-head CI/Testbox:

ClawSweeper's rank-up move is satisfied by exact-head build-artifacts/full CI plus GitHub reporting the PR MERGEABLE. I did not rebase solely for behind-main drift; repository landing policy treats that as advisory, and native prepare validates the current merge result.

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.

@steipete
steipete merged commit 5af05ab into main Aug 25, 2026
256 checks passed
@steipete
steipete deleted the chore/bun-1.4-runtime-coverage branch August 25, 2026 10:45

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docker Docker and sandbox tooling maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Validate the built CLI with Bun 1.4

2 participants