Skip to content

fix(cli): start under Bun 1.4 without warning filter - #129142

Merged
steipete merged 1 commit into
mainfrom
fix/bun-1.4-launcher-import-miss
Aug 25, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/bun-1.4-launcher-import-miss

Conversation

@steipete

@steipete steipete commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #129139

What Problem This Solves

Fixes an issue where users running OpenClaw with Bun 1.4.0 would see the CLI exit before startup when the optional warning-filter bundle was absent.

Why This Change Was Made

Bun 1.4 changed direct dynamic-import diagnostics from a quoted from '<launcher>' suffix to an unquoted imported from <launcher> suffix. The launcher now recognizes that exact direct-import shape while retaining the existing specifier and launcher-path checks, so transitive module failures are still surfaced.

Node remains the primary runtime and its launcher behavior is unchanged.

User Impact

Users can run the OpenClaw CLI under Bun 1.4.0 without the launcher rejecting an absent optional warning-filter module.

Evidence

Reproduced before the fix with Bun 1.4.0:

FAIL ... gates the real Bun runtime on node:sqlite availability
AssertionError: expected 1 to be +0
error: Cannot find module './dist/warning-filter.js' from '/tmp/.../openclaw.mjs'

Passing after the fix:

  • 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
  • pnpm check:changed — passed all selected checks, typechecks, lint, and cycle guard
  • pnpm build — passed
  • bun openclaw.mjs --version — OpenClaw 2026.8.1 (4c829ed)
  • bun openclaw.mjs --help — exited 0 with root help
  • Exact-head CI run 32824702686, attempt 2 — passed; the retry cleared an unrelated Microsoft Teams ephemeral-port collision from attempt 1

Structured Codex autoreview (gpt-5.6-sol, high reasoning) reported no accepted/actionable findings and judged the patch correct at 0.99 confidence.

ClawSweeper's optional rank-up move requested a current-main refresh plus the exact-head Bun 1.4 E2E. The Bun 1.4 E2E already passed at 4c829eda6a6b44dcfbc81258a5cbff92f3beb4b4. I am not rebasing solely for review freshness because current main has no conflicting or material launcher change; the native merge guard will revalidate current main before merge.

Recognize Bun 1.4's unquoted importer diagnostic for direct optional launcher imports without masking transitive failures.

Fixes #129139.

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2
@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 self-assigned this Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 08:03
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 25, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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, 4:09 AM ET / 08:09 UTC.

ClawSweeper review

What this changes

The PR recognizes Bun 1.4’s unquoted direct-import diagnostic so an absent optional warning-filter module no longer prevents CLI startup.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. The narrow launcher change appears correct and preserves the existing direct-import safeguards, but this protected maintainer PR still needs exact-current-main validation because the local partial checkout could not materialize current main.

Priority: P2
Reviewed head: 4c829eda6a6b44dcfbc81258a5cbff92f3beb4b4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and uses an existing production-boundary test, with current-main and independent Bun-contract verification remaining unavailable locally.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix real Bun 1.4 launcher run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix real Bun 1.4 launcher run.
Evidence reviewed 6 items Changed classifier and owner boundary: The added diagnostic is conjunctive with the existing missing-specifier and exact-launcher-path checks; the same classifier governs the optional warning-filter import and CLI-entry imports.
Existing real-Bun regression seam: The launcher E2E test copies the root launcher into a fixture, invokes the configured real Bun binary, and requires the fixture entry to run when node:sqlite is available.
Documented runtime contract: Current documentation says Bun builds with node:sqlite, including 1.4.0 canary and later, can run the CLI experimentally while Node remains recommended.
Findings None None.
Security None None.

Live Verification

Command: OPENCLAW_E2E_SKIP_BUILD=1 OPENCLAW_TEST_BUN_LAUNCHER=1 BUN_BIN=/absolute/path/to/bun-1.4 pnpm test test/openclaw-launcher.e2e.test.ts

Result: PASS (completed)

OPENCLAW_E2E_SKIP_BUILD=1 OPENCLAW_TEST_BUN_LAUNCHER=1 BUN_BIN=/absolute/path/to/bun-1.4 pnpm test test/openclaw-launcher.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129142-nqllDE/target$ OPENCLAW_E2E_SKIP_BUILD=1 OPENCLAW_TEST_BUN_LAUNCHER=1 BUN_BIN=/absolute/path/to/bun-1.4
pnpm test test/openclaw-launcher.e2e.test.ts
$ node --import tsx scripts/test-projects.mts test/openclaw-launcher.e2e.test.ts
[test] starting test/vitest/vitest.e2e.config.ts
OPENCLAW_E2E_SKIP_BUILD=1 OPENCLAW_TEST_BUN_LAUNCHER=1 BUN_BIN=/absolute/path/to/bun-1.4 pnpm test test/openclaw-launcher.e2e.test.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129142-nqllDE/target

 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › keeps the bootstrap Node range aligned with the package engine 970ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › prints recovery guidance before legacy-incompatible modules can load 36ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › rejects Bun without node:sqlite even when its Node compatibility version is new enough 35ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › surfaces transitive entry import failures instead of masking them as missing dist 42ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › keeps the friendly launcher error for a truly missing entry build output 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › executes an entry.mjs-only compiled entry through the root launcher 2347ms
 ↓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › gates the real Bun runtime on node:sqlite availability
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed root help when plugin config does not invalidate it 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed 'browser' help before loading the runtime entry 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed 'secrets' help before loading the runtime entry 36ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed 'nodes' help before loading the runtime entry 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed config help before loading the runtime entry 39ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed doctor help before loading the runtime entry 36ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed gateway help before loading the runtime entry 39ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed models help before loading the runtime entry 37ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed plugins help before loading the runtime entry 36ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed sessions help before loading the runtime entry 36ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed tasks help before loading the runtime entry 36ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › uses precomputed subcommand help with leading root options 37ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › defers precomputed subcommand help to the runtime entry when container env is set 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › defers precomputed command help to the runtime entry with 'container env' 39ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › defers precomputed command help to the runtime entry with 'root --container flag' 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › defers precomputed command help to the runtime entry with 'root --container=value flag' 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › defers root help to the runtime entry when plugin config can change help 38ms
 ✓ test/openclaw-launcher.e2e.test.ts › openclaw launcher › defers nodes help to the runtime ent
… output truncated …

Assertions:

  • PASS expect_output: gates the real Bun runtime on node:sqlite availability

How this fits together

The root launcher imports an optional warning filter before loading the built CLI entry. Its classifier must skip only a missing file imported directly by the launcher and rethrow other module failures.

flowchart LR
A[Runtime starts launcher] --> B[Optional warning filter import]
B --> C{Direct optional miss?}
C -->|Yes| D[Load CLI entry]
C -->|No| E[Surface startup error]
D --> F[CLI command runs]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-current-main comparison is incomplete because the partial checkout could not fetch commit b5e8460; revalidate after rebasing or refreshing the review head.
  • Resolve merge risk (P1) - Production code is net +2 lines with no test-file change; the growth is narrowly justified by Bun 1.4's additional diagnostic form, while the existing real-Bun launcher test exercises the copied launcher.
  • Complete next step (P2) - Keep this protected maintainer PR open for exact-head validation; no narrow automated repair is indicated.
Agent review details

Security

None.

PR surface

Other +2. Total +2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 1 +2
Total 1 3 1 +2

Review metrics

Metric Value Why it matters
Production versus test LOC production +2, tests 0 The bug fix adds one diagnostic alternative without changing the existing real-Bun launcher test that covers this classifier through the production boundary.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #129139
Summary: This PR explicitly implements the linked Bun 1.4 launcher regression.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Refresh against current main, then retain the one additional direct-import suffix if the real Bun 1.4 launcher test and exact-head CI pass; a net-neutral rewrite would not express the additional diagnostic form more clearly.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Refresh against current main, then retain the one additional direct-import suffix if the real Bun 1.4 launcher test and exact-head CI pass; a net-neutral rewrite would not express the additional diagnostic form more clearly.

Do we have a high-confidence way to reproduce the issue?

No locally verified reproduction: the existing real-Bun test is a clear path, but the supplied Bun 1.4 binary was unavailable in this review environment.

Is this the best way to solve the issue?

Unclear: the changed classifier is the canonical owner and keeps the direct-import guards, but the reviewer could not independently verify Bun 1.4’s exact diagnostic or current main.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b5e8460912af.

Labels

Label changes:

  • add P2: The regression blocks startup only for the experimentally supported Bun 1.4 runtime path, giving it a limited but concrete user impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix real Bun 1.4 launcher run.

Label justifications:

  • P2: The regression blocks startup only for the experimentally supported Bun 1.4 runtime path, giving it a limited but concrete user impact.
  • 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: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix real Bun 1.4 launcher run.

Evidence

What I checked:

  • Changed classifier and owner boundary: The added diagnostic is conjunctive with the existing missing-specifier and exact-launcher-path checks; the same classifier governs the optional warning-filter import and CLI-entry imports. (openclaw.mjs:294, 4c829eda6a6b)
  • Existing real-Bun regression seam: The launcher E2E test copies the root launcher into a fixture, invokes the configured real Bun binary, and requires the fixture entry to run when node:sqlite is available. (test/openclaw-launcher.e2e.test.ts:324, 4c829eda6a6b)
  • Documented runtime contract: Current documentation says Bun builds with node:sqlite, including 1.4.0 canary and later, can run the CLI experimentally while Node remains recommended. Public docs: docs/install/bun.md. (docs/install/bun.md:10, 4c829eda6a6b)
  • Base behavior and provenance: The PR base's classifier accepted only quoted from importer suffixes; the branch commit adds the Bun 1.4 suffix as the sole relevant source change. (openclaw.mjs:301, 4c829eda6a6b)
  • Current-main and dependency verification gap: The checkout's current-main object is promisor-backed and could not be fetched because GitHub DNS was unavailable; the supplied Bun 1.4 binary was also absent, so the reviewer could not independently inspect the latest main code or Bun diagnostic contract.
  • Release check: The branch commit is not contained in any locally available release tag; this is an open, unmerged PR rather than a shipped fix. (4c829eda6a6b)

Likely related people:

  • steipete: The repository context identifies steipete as the member author, self-assignee, and reporter of the linked Bun launcher regression. (role: linked regression reporter and active PR owner; confidence: medium; files: openclaw.mjs, test/openclaw-launcher.e2e.test.ts)

Rank-up moves

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

  • Refresh the branch against current main and run the supplied Bun 1.4 launcher E2E command on the exact 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.

@steipete
steipete merged commit d1134a4 into main Aug 25, 2026
448 of 450 checks passed
@steipete
steipete deleted the fix/bun-1.4-launcher-import-miss branch August 25, 2026 08:24

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
Recognize Bun 1.4's unquoted importer diagnostic for direct optional launcher imports without masking transitive failures.

Fixes openclaw#129139.

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2

Co-authored-by: Amp <[email protected]>
RomneyDa added a commit that referenced this pull request Aug 29, 2026
Recognize Bun 1.4's unquoted importer diagnostic for direct optional launcher imports without masking transitive failures.

Fixes #129139.

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2


(cherry picked from commit d1134a4)

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Amp <[email protected]>
RomneyDa added a commit that referenced this pull request Aug 30, 2026
Recognize Bun 1.4's unquoted importer diagnostic for direct optional launcher imports without masking transitive failures.

Fixes #129139.

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2

(cherry picked from commit d1134a4)

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Amp <[email protected]>
(cherry picked from commit 782a8f7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

[Bug]: Bun 1.4 launcher rejects optional module misses

2 participants