Skip to content

fix(cli): setup --non-interactive health hints point to unsupported flags - #94010

Closed
xydttsw wants to merge 1 commit into
openclaw:mainfrom
xydttsw:fix/issue-93947-setup-health-hints
Closed

xydttsw wants to merge 1 commit into
openclaw:mainfrom
xydttsw:fix/issue-93947-setup-health-hints

Conversation

@xydttsw

@xydttsw xydttsw commented Jun 17, 2026 •

Copy link
Copy Markdown

AI-assisted PR. Implemented and verified with Claude (Claude Code).

Summary

  • What: When openclaw setup --non-interactive --accept-risk fails on the gateway health check, it prints recovery hints referencing --install-daemon and --skip-health — but those flags are only registered on openclaw onboard, not on openclaw setup.
  • Root cause: The health-failure hints in the non-interactive local onboarding code were written assuming the user invoked onboard, but they are also reachable via setup --non-interactive.
  • Fix: Updated the health-failure hint to clearly reference openclaw onboard --non-interactive --accept-risk --install-daemon and openclaw onboard --non-interactive --accept-risk --skip-health so users know which command supports those flags.

Fixes #93947

Real behavior proof (required for external PRs)

Behavior addressed:
Health-failure hints now correctly reference the onboard command instead of bare flags that don't exist on setup.

Real environment tested:
macOS 26.5.1 (arm64), Node.js runtime, openclaw main branch (be4c541), unit test suite

Exact steps or command run after this patch:

node scripts/run-vitest.mjs src/commands/onboard-non-interactive.gateway.test.ts

Before-fix evidence:
After running openclaw setup --non-interactive --accept-risk with no running gateway, the hint was:

Gateway did not become reachable at ws://127.0.0.1:19099/.
Non-interactive local setup only waits for an already-running gateway unless you pass --install-daemon.
Fix: start `openclaw gateway run`, re-run with `--install-daemon`, or use `--skip-health`.

(But setup has neither --install-daemon nor --skip-health.)

After-fix evidence:

Gateway did not become reachable at ws://127.0.0.1:19099/.
Non-interactive local setup only waits for an already-running gateway unless you pass --install-daemon.
Fix: start `openclaw gateway run`, or use `openclaw onboard --non-interactive --accept-risk --install-daemon` to install the daemon, or `openclaw onboard --non-interactive --accept-risk --skip-health` to bypass the health check.

Observed result after the fix:
The health-failure hint text now correctly references the onboard command with the required --non-interactive --accept-risk flags, making it actionable for users who entered the wizard via setup --non-interactive.

What was not tested:

  • Full end-to-end gateway health failure with actual gateway daemon (Docker/production environment)
  • JSON output mode (the hints are the same, just delivered via JSON instead of stderr)

Tests and validation

✓ src/commands/onboard-non-interactive.gateway.test.ts (16 tests)
✓ src/commands/onboard-non-interactive.gateway-health-auth.test.ts (4 tests)
✓ src/commands/onboard-non-interactive/local/daemon-install.test.ts (2 tests)
✓ src/commands/setup.test.ts (5 tests)
✓ src/cli/program/register.setup.test.ts (2 tests)
  Test Files  5 passed (5)
       Tests  29 passed (29)

Risk / scope

  • User-visible behavior change: Yes — the health-failure hint now shows the correct command surface
  • Config/environment/migration change: No
  • Security/credentials/network change: No
  • Highest risk: None — purely a help text change
  • Mitigation: All existing tests pass with the updated hint text

…lags

When 'openclaw setup --non-interactive --accept-risk' fails on the
gateway health check, the recovery hint tells users to re-run with
'--install-daemon' or '--skip-health', but those flags only exist on
'openclaw onboard', not on 'openclaw setup'.

Update the hint to reference the correct command surface:
  openclaw onboard --non-interactive --accept-risk --install-daemon
  openclaw onboard --non-interactive --accept-risk --skip-health

Fixes openclaw#93947

Co-Authored-By: Claude <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 17, 2026
@clawsweeper

clawsweeper Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: this PR targets the right bug, but it only rewrites the second remediation line and leaves the first setup-reachable hint pointing at a bare unsupported --install-daemon flag. The cleaner canonical path is #93994, which updates both hint lines, updates the regression assertion, closes the canonical issue, has real CLI proof, and is live-verified as mergeable with relevant checks green.

Root-cause cluster
Relationship: superseded
Canonical: #93994
Summary: Multiple open PRs address the same setup health-hint bug; the current PR is superseded by the cleaner, proof-positive candidate that updates both hint lines and the regression assertion.

Members:

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

Canonical path: Use #93994 as the canonical landing path because it fixes both hint lines and the assertion without changing CLI flag registration.

So I’m closing this here and keeping the remaining discussion on #93994.

Review details

Best possible solution:

Use #93994 as the canonical landing path because it fixes both hint lines and the assertion without changing CLI flag registration.

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

Yes. Source inspection gives a high-confidence path: setup --non-interactive routes into non-interactive local setup, while setup does not register the bare daemon or health flags that the current failure hint mentions.

Is this the best way to solve the issue?

No. This PR is only a partial fix because it updates the second hint line but leaves the first bare-flag hint; the narrower complete solution is #93994.

Security review:

Security review cleared: Security review cleared: the diff only changes TypeScript CLI hint text and does not touch dependencies, workflows, secrets, auth, or executable supply-chain surfaces.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • steipete: Recent GitHub path history shows setup/onboarding command documentation and setup-entrypoint work in the same command surface. (role: recent adjacent contributor; confidence: medium; commits: c100ae1f36fd, 7a7ca1577676, 5c120cb36ca3; files: src/commands/onboard-non-interactive/local.ts, src/commands/onboard-non-interactive.gateway.test.ts, src/cli/program/register.setup.ts)
  • vincentkoc: Recent GitHub path history shows non-interactive onboarding config and setup wayfinding work on the affected area. (role: recent area contributor; confidence: medium; commits: c3e629cbf405, 4c7cc57a464d, c7a91f963214; files: src/commands/onboard-non-interactive/local.ts, src/commands/onboard-non-interactive.gateway.test.ts, src/cli/program/register.setup.ts)

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

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jun 17, 2026
@xydttsw

xydttsw commented Jun 19, 2026

Copy link
Copy Markdown
Author

close all pr

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

Labels

commands Command implementations P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup --non-interactive health hints point to unsupported flags

1 participant