Skip to content

fix(wizard): honor remote password auth in probes - #118134

Merged
RomneyDa merged 15 commits into
openclaw:mainfrom
IWhatsskill:fix/wizard-remote-password-probes
Aug 11, 2026
Merged

RomneyDa merged 15 commits into
openclaw:mainfrom
IWhatsskill:fix/wizard-remote-password-probes

Conversation

@IWhatsskill

@IWhatsskill IWhatsskill commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

[AI-assisted]

What Problem This Solves

A password-only remote Gateway can be healthy and reachable while both the initial setup wizard and the later configure wizard label it as unreachable. This gives users a false connection failure during onboarding and reconfiguration even though password authentication is a supported remote Gateway mode.

Why This Change Was Made

All setup and configure probes now resolve remote credentials through the shared Gateway auth-surface owner and forward its token or password to the selected target. The configure health action also runs after remote configuration instead of returning before the requested health check.

Root Cause

The wizard hint paths originally read only gateway.remote.token. The configure health action separately selected the remote URL while resolving local gateway.auth credentials, and the remote configuration branch returned before running an explicitly selected health action.

Runtime ownership

resolveGatewayProbeSurfaceAuth is the canonical owner for remote token/password precedence. The probe-auth adapter preserves explicit-auth and URL-override safety, target isolation, and unresolved-SecretRef diagnostics for wizard callers.

User Impact

Users connecting to a password-protected remote Gateway now get accurate reachability hints and a working configure health action. Local Gateway credentials are not forwarded to the remote target.

Evidence

Focused regressions, the full changed gate, the generated API contract check, and packaged real behavior proof passed on product-code head eddb8d911f3; current head ce9e437e4d8 only drops the SHA-256 baseline that current main replaced with JSONL and documents remote probe credential precedence. The final repair binds configure health and its authentication diagnostic to the selected remote Gateway even when OPENCLAW_GATEWAY_URL names an unrelated password-protected Gateway.

Inspect exact-head proof ledger

Provenance

  • Base: 260628f4fa7ce1f5a04f69b9523b95e7694aaaa0
  • Current head: ce9e437e4d8d6dab1d3ad2f15170d252040ca7a7
  • Automated proof heads: 18e2c5b29d2 (prior full GitHub CI), 3914b30af01 (125/125 ClawSweeper acceptance tests), eddb8d911f3 (158 focused tests, full changed gate, packaged live proof), ce9e437e4d8 (generated-contract conflict resolution and docs clarification)
  • Behavior proof head: eddb8d911f3d52686f84fa091a3f7e3747b7886d
  • Environment: Node 26 trusted checkout; packaged build on Blacksmith Testbox; two isolated live password-authenticated Gateways on Linux

Exact-head direct behavior

The exact-head packaged CLI started a real password-authenticated Gateway on an isolated port. A separate client config stored the matching remote password and a deliberately wrong local password. The real TTY flow then ran openclaw configure --section health, selected the configured remote Gateway, and completed its health action without an auth error. Synthetic credentials were redacted.

Redacted exact-head runtime transcript

exactHead=eddb8d911f3d52686f84fa091a3f7e3747b7886d
selectedPasswordGatewayReady=true
unrelatedPasswordGatewayReady=true
unrelatedGatewayUrlOverridePresent=true
targetBoundConfigureHealthCompleted=true
configuredRemotePasswordSelected=true
syntheticCredentialsRedacted=true

Automated verification

node scripts/run-vitest.mjs src/commands/health.test.ts src/gateway/probe-auth.test.ts src/gateway/credentials.test.ts src/commands/configure.wizard.test.ts src/wizard/setup.test.ts
node scripts/check-changed.mjs -- docs/.generated/plugin-sdk-api-baseline.sha256 src/cli/daemon-cli/status.gather.test.ts src/cli/daemon-cli/status.gather.ts src/commands/configure.wizard-test-helpers.ts src/commands/configure.wizard.test.ts src/commands/configure.wizard.ts src/commands/gateway-status/helpers.test.ts src/gateway/credentials.ts src/gateway/probe-auth.test.ts src/gateway/probe-auth.ts src/wizard/setup.test.ts src/wizard/setup.ts
  • Focused regressions: 158/158 passed on eddb8d911f3 across health command target binding, probe-auth, credentials, configure wizard, and setup wizard.
  • Typechecks: production core and core-test type lanes passed on the automated proof head.
  • Packaged build: behavior proof head source build passed, including CLI bootstrap, public plugin SDK exports, Control UI build, and performance checks.
  • Static checks: targeted oxfmt, git diff --check, and the generated Plugin SDK API baseline check passed.
  • Live behavior: the exact-head packaged configure TTY completed health against the selected password Gateway while OPENCLAW_GATEWAY_URL pointed at a second live Gateway protected by a different password.

Preserved boundaries

  • Remote probes remove local gateway.auth values and SecretRefs before resolution.
  • Configured remote token/password is authoritative; environment auth is used only when no configured remote auth resolves.
  • A changed CLI remote URL receives no stored or ambient credentials; an explicitly supplied remote credential remains usable.
  • Local health checks preserve their existing local environment/config precedence and port override.
  • Daemon status blocks winning remote exec SecretRefs before resolution when exec refs are disabled, even with ambient auth present.
  • A lone configured remote SecretRef failure stops configure health before generic auth resolution can recover ambient credentials, while a separately resolved configured sibling credential remains usable. Remote configure health and its diagnostic re-probe ignore ambient URL overrides so the selected credential stays bound to its configured target.

CI note

Product-code head eddb8d911f3 fixes the target-binding P1 and CI max-lines failure. Current head ce9e437e4d8 only removes the retired SHA-256 manifest and documents the proven remote probe credential precedence after current main replaced it with JSONL in e37614c83f9; a synthetic merge against cd7b7f639da is clean. The exact product-code packaged live scenario passed on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/31387428924. The full changed gate passed locally after Blacksmith sync failed twice across fresh leases; all owned Testboxes were stopped.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S labels Aug 2, 2026
@IWhatsskill
IWhatsskill marked this pull request as ready for review August 2, 2026 19:02
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P2 Normal backlog priority with limited blast radius. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 10:52 AM ET / 14:52 UTC.

ClawSweeper review

What this changes

The PR makes setup and configure Gateway probes use configured remote token or password credentials and keeps configure health requests bound to the selected remote Gateway.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking patch defect found. This remains necessary because current main still omits remote-password probe handling; keep it open for the assigned owner’s merge-risk decision and exact-head CI completion.

Priority: P1
Reviewed head: 8fcf3b6960af7018437b9a1e1915da081d962a11
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has strong real behavior proof and coherent owner-boundary coverage, pending exact-head CI and the assigned owner’s precedence decision.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body supplies redacted after-fix packaged CLI evidence against live password-authenticated Gateways, including the conflicting ambient-target case this change must resist.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body supplies redacted after-fix packaged CLI evidence against live password-authenticated Gateways, including the conflicting ambient-target case this change must resist.
Evidence reviewed 6 items Current-main gap: Current main's probe resolver only strips remote credentials for local probes and routes remote secret resolution through the generic credentials path, while setup separately resolves only the remote token; a password-only configured remote target is therefore not covered by the old wizard path.
Canonical owner boundary: The PR delegates configured remote probe resolution to the existing shared probe-surface resolver, while retaining the explicit and URL-override path that must not reuse stored credentials.
Selected-target health binding: Configure health checks resolve remote probe credentials before passing them to the health command with environment URL override disabled, preventing an unrelated ambient target from receiving the selected target's credentials.
Findings None None.
Security None None.

How this fits together

Gateway setup and configure wizards turn remote connection settings into reachability probes and health requests. A shared Gateway credential layer selects credentials for the selected target before those requests are sent.

flowchart LR
A[Remote Gateway settings] --> B[Setup and configure wizards]
B --> C[Probe credential selection]
C --> D{Selected target}
D -->|Remote| E[Remote Gateway]
D -->|Local| F[Local Gateway]
E --> G[Reachability and health result]
F --> G
Loading

Decision needed

Question Recommendation
Does RomneyDa endorse configured remote token/password taking precedence over ambient Gateway credentials for configured-target probes once exact-head CI completes? Adopt configured-target precedence: Merge after exact-head checks are green, preserving configured remote credentials as authoritative for configured-target probes.

Why: This intentionally changes credential precedence for existing remote configurations, and the assigned reviewer previously requested that the PR not be merged while it was being revised.

Before merge

  • Resolve merge risk (P1) - This bug-fix branch adds net +138 production lines (+197/-59); the added adapter is justified by explicit-auth and URL-override isolation, but it should not grow into another independent credential-precedence owner.
  • Resolve merge risk (P1) - The exact current-head required check set is still in progress, so merge safety is not yet established despite the supplied packaged runtime proof.
Agent review details

Security

None.

PR surface

Source +249, Tests +293, Docs +5. Total +547 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 7 308 59 +249
Tests 6 413 120 +293
Docs 1 6 1 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 727 180 +547

Review metrics

Metric Value Why it matters
Production versus test delta production +197/-59 (net +138); docs +6/-1; tests +413/-120; test support +111 The positive production delta is concentrated in target-isolation and SecretRef precedence handling, so its owner-boundary justification matters before merging a bug fix.
Credential policy surface 0 config keys added; 2 remote credential types now covered by wizard and status probes The PR changes behavior for existing remote token/password and environment-credential combinations without introducing a new setting.

Merge-risk options

Maintainer options:

  1. Complete exact-head verification (recommended)
    Merge only after the pending checks pass on the current head and the assigned owner accepts the documented configured-target credential precedence.
  2. Pause the precedence change
    Keep the PR unmerged if maintainers do not want configured remote credentials to override ambient credentials for configured-target probes.

Technical review

Best possible solution:

Keep one remote-probe precedence owner in the shared credential resolver, retain the narrow adapter only for explicit-auth and URL-override isolation, and merge after exact-head checks are green.

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

Yes—source reproducible: configure a remote Gateway with only gateway.remote.password, then use setup or configure health; current main does not carry that remote password through the relevant probe paths.

Is this the best way to solve the issue?

Yes—the shared probe-surface resolver is the best owner for configured remote precedence, while the PR’s adapter preserves explicit-auth and changed-URL isolation rather than duplicating the policy in each wizard.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: Incorrect remote Gateway probe authentication can make setup or reconfiguration falsely report an otherwise reachable configured Gateway as unavailable.
  • merge-risk: 🚨 compatibility: Existing remote configurations that combine stored and environment credentials can observe changed probe precedence.
  • merge-risk: 🚨 auth-provider: The patch changes token/password selection for remote Gateway authentication.
  • merge-risk: 🚨 security-boundary: The implementation must preserve the boundary preventing local or ambient credentials from being sent to another remote target.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body supplies redacted after-fix packaged CLI evidence against live password-authenticated Gateways, including the conflicting ambient-target case this change must resist.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies redacted after-fix packaged CLI evidence against live password-authenticated Gateways, including the conflicting ambient-target case this change must resist.

Evidence

What I checked:

  • Current-main gap: Current main's probe resolver only strips remote credentials for local probes and routes remote secret resolution through the generic credentials path, while setup separately resolves only the remote token; a password-only configured remote target is therefore not covered by the old wizard path. (src/gateway/probe-auth.ts:39, 6472d22a77f4)
  • Canonical owner boundary: The PR delegates configured remote probe resolution to the existing shared probe-surface resolver, while retaining the explicit and URL-override path that must not reuse stored credentials. (src/gateway/probe-auth.ts:120, 8fcf3b6960af)
  • Selected-target health binding: Configure health checks resolve remote probe credentials before passing them to the health command with environment URL override disabled, preventing an unrelated ambient target from receiving the selected target's credentials. (src/commands/configure.wizard.ts:118, 8fcf3b6960af)
  • Regression coverage: Focused tests cover configured remote password, configured-versus-ambient precedence, unresolved SecretRef behavior, URL override isolation, configure health target binding, and disabled exec SecretRefs. (src/gateway/probe-auth.test.ts:215, 8fcf3b6960af)
  • History and ownership: Blame attributes the current shared probe-surface resolver to commit 79016b4; the PR head contains RomneyDa's successive owner-boundary repairs, including selected-target binding. (src/gateway/auth-surface-resolution.ts:52, 79016b415ad9)
  • After-fix behavior proof: The PR body records a packaged CLI run against live password-authenticated Gateways, including a conflicting ambient Gateway URL, and reports target-bound configure health completion with redacted synthetic credentials. (eddb8d911f3d)

Likely related people:

  • Ayaan Zaidi: Current-main blame attributes the shared probe-surface credential resolver to this author. (role: introduced shared credential owner; confidence: high; commits: 79016b415ad9; files: src/gateway/auth-surface-resolution.ts, src/gateway/credentials.ts)
  • RomneyDa: The timeline assigns this reviewer, and the current PR head includes the target-binding and credential-boundary repairs authored by them. (role: assigned reviewer and recent area contributor; confidence: high; commits: 87ee026186f8, 0d8132896cc5, 8fcf3b6960af; files: src/gateway/probe-auth.ts, src/commands/configure.wizard.ts, docs/gateway/remote.md)

Rank-up moves

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

  • Let the current-head required checks complete successfully.
  • Have the assigned owner confirm the intended configured-target precedence before merging.

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 (18 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-09T11:44:04.251Z sha 1d5fa7530e41a9c443a1f53fabcaf4be23e791fb :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-09T13:44:09.416Z sha b08449241868d470d6dfbd8bb10b6517e9ac2803 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-09T14:46:34.816Z sha 5455bbae5a58c3d5530e982713d0dcf21d9bfde9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-10T08:50:16.603Z sha f7b5f102a09486d76ed2c779c56b4ad1a488c510 :: needs real behavior proof before merge. :: [P1] Carry rejected probe auth into the health call
  • reviewed 2026-08-10T09:59:10.315Z sha 598aded6d7ea1cdd96cb0946d6f28eae5cc579d4 :: needs real behavior proof before merge. :: [P1] Preserve valid remote password after token-ref failure
  • reviewed 2026-08-10T10:51:02.169Z sha 296029028fcefdaed99cc8fa4a2fbcc685890222 :: needs real behavior proof before merge. :: [P1] Bind the health RPC to the selected remote target
  • reviewed 2026-08-10T12:55:53.753Z sha dc863e709c4b296046d00920b59900c623edacc7 :: found issues before merge. :: [P3] Document remote probe password precedence
  • reviewed 2026-08-10T13:09:15.285Z sha ce9e437e4d8d6dab1d3ad2f15170d252040ca7a7 :: needs maintainer review before merge. :: none

@IWhatsskill

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 5, 2026
@RomneyDa RomneyDa self-assigned this Aug 6, 2026
@RomneyDa

RomneyDa commented Aug 6, 2026

Copy link
Copy Markdown
Member

I am tweaking this, pls don't merge

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 6, 2026
@RomneyDa
RomneyDa requested a review from a team as a code owner August 7, 2026 09:14
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M and removed size: S labels Aug 7, 2026
@RomneyDa

RomneyDa commented Aug 7, 2026

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P2 Normal backlog priority with limited blast radius. labels Aug 7, 2026
@RomneyDa
RomneyDa force-pushed the fix/wizard-remote-password-probes branch 2 times, most recently from 5455bba to f7b5f10 Compare August 10, 2026 08:43
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 10, 2026
@RomneyDa
RomneyDa force-pushed the fix/wizard-remote-password-probes branch 2 times, most recently from 18e2c5b to 4d37ca8 Compare August 10, 2026 09:32
@RomneyDa

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the fix/wizard-remote-password-probes branch from 3914b30 to 2960290 Compare August 10, 2026 10:05
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

2 participants