openclaw - 💡(How to fix) Fix No tests cover the launcher (version gate, compile-cache respawn, signal forwarding, module-loading cascade) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#83897Fetched 2026-05-20 03:47:17
View on GitHub
Comments
1
Participants
2
Timeline
10
Reactions
1
Timeline (top)
mentioned ×3subscribed ×3closed ×1commented ×1

Error Message

Create openclaw.launcher.test.ts colocated with openclaw.mjs that unit-tests parseNodeVersion, isSupportedNodeVersion, sanitizeCompileCachePathSegment, and isDirectModuleNotFoundError with synthetic Error objects.

Fix Action

Fix / Workaround

Severity: medium / Confidence: high / Category: test-gap Triage: test-gap Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18) Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol


Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID: fnd_sig-feat-cli-command-134cd3621e-_30adcc1544.

Code Example

import { createCodexDynamicToolBridge } from "./dynamic-tools.js";

---

import { createGatewayTool } from "./tools/gateway-tool.js";
RAW_BUFFERClick to expand / collapse

Severity: medium / Confidence: high / Category: test-gap Triage: test-gap Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18) Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol

Evidence

  • openclaw.mjs:1-300 (None)

  • extensions/codex/src/app-server/openclaw-owned-tool-runtime-contract.test.ts:1-10 (None)

import { createCodexDynamicToolBridge } from "./dynamic-tools.js";
  • src/agents/openclaw-gateway-tool.test.ts:1-10 (None)
import { createGatewayTool } from "./tools/gateway-tool.js";

Reasoning

All five test files listed as contextFiles and tests for this feature exercise downstream runtime contracts (tool hooks, gateway config, plugin manifests, agent lists). None import or execute openclaw.mjs or its helpers. The launcher contains several non-trivial code paths with real failure modes: the Node version check, the two-branch compile-cache respawn logic (source vs packaged), the isDirectModuleNotFoundError heuristic that distinguishes direct misses from transitive failures, the signal forwarding and force-kill cascade, and the help fast-path module probe. A regression in any of these would go undetected until a user reports a broken install.

Recommendation

Add tests (can be pure unit tests that import individual helpers by re-exporting them) for: (1) isSupportedNodeVersion boundary cases, (2) sanitizeCompileCachePathSegment, (3) isDirectModuleNotFoundError distinguishing direct vs transitive errors, (4) the respawn sentinel env-var guards. Integration: a smoke test that spawns node openclaw.mjs --help in the built package and asserts exit 0.

Why existing tests miss this

No existing test file imports or exercises openclaw.mjs; the feature's listed tests are all downstream runtime-contract tests unrelated to the launcher.

Suggested regression test

Create openclaw.launcher.test.ts colocated with openclaw.mjs that unit-tests parseNodeVersion, isSupportedNodeVersion, sanitizeCompileCachePathSegment, and isDirectModuleNotFoundError with synthetic Error objects.

Minimum fix scope

New test file; no production code changes required.


Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID: fnd_sig-feat-cli-command-134cd3621e-_30adcc1544.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix No tests cover the launcher (version gate, compile-cache respawn, signal forwarding, module-loading cascade) [1 comments, 2 participants]