Skip to content

feat: verify AI access during macOS onboarding before the first chat#100288

Merged
steipete merged 9 commits into
mainfrom
claude/intelligent-lamarr-2291e9
Jul 5, 2026
Merged

feat: verify AI access during macOS onboarding before the first chat#100288
steipete merged 9 commits into
mainfrom
claude/intelligent-lamarr-2291e9

Conversation

@steipete

@steipete steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Closes #100286

What Problem This Solves

Fixes an issue where new macOS users could finish onboarding without any working AI backend and meet their agent with a raw error ("No API key found for provider "openai"…" with an auth-store path) in the very first chat. Also fixes the Local/Remote page reading as perpetually loading (always-on discovery spinner), the install page running two step spinners at once, and the lack of any structured choice when multiple AI credentials exist on the machine.

Why This Change Was Made

Inference is the one thing onboarding must actually secure — everything else is optional. The previous flow gated on "config was authored", not "a model answers", so broken-but-present logins (expired Codex subscription, logged-out CLI, bad key) surfaced only at first chat, in the ugliest possible place. Setup now proves inference with a real completion before persisting anything, walking the documented ladder automatically and ending in a verified manual API-key step, so the first conversation can never start broken.

User Impact

  • Connect your AI page (new): detects Claude Code, Codex, Gemini CLI logins and OPENAI_API_KEY/ANTHROPIC_API_KEY; shows all of them with a Recommended badge; auto-tests the best one with a live "reply with OK" completion; on failure marks the card with a friendly reason and automatically tries the next; if nothing works, a manual API-key form (Anthropic/OpenAI/Google) is verified the same way. Config is written only after a test passes (crestodian.setup.activate is test-first; a failed candidate never mutates config). Codex selection auto-installs/enables the Codex plugin.
  • Where should your assistant live?: "On this Mac" is preselected with a Recommended badge; network discovery is a quiet status line (no spinner); remote/advanced options are collapsed until asked for; "Set up later" is a link.
  • Install page: sequential checklist (install → start background service → ready) with exactly one active spinner, a friendly error card with Retry and a docs.openclaw.ai link, and a confirmation dialog when closing while work is in flight (Cmd-W included). The gateway still installs as a LaunchAgent (login item) so it runs as a background service.
  • Meet your agent stays in the dialog (now guaranteed to have working inference) and Finish opens the main chat window.
  • Settings → Crestodian (new pane): the deterministic setup/repair chat is now always reachable, not just during onboarding.
  • Errors across the flow use one friendly error card with an "Open help…" link to docs.openclaw.ai; an older gateway that lacks the new methods gets a plain-language "update the gateway" message instead of an RPC code.
  • CLI setup ladder gains Gemini CLI (google-gemini-cli/gemini-3.1-pro-preview) after Codex; openclaw crestodian setup and the app now share the exact same detection ladder.

Gateway protocol: adds crestodian.setup.detect / crestodian.setup.activate (additive, operator.admin scope).

Evidence

  • Unit: node scripts/run-vitest.mjs src/crestodian/setup-inference.test.ts src/commands/onboard-inference.test.ts src/crestodian/onboarding-welcome.test.ts — 15 passed; src/crestodian/ + gateway crestodian + server-methods-list — 26 passed; packages/gateway-protocol — 232 passed.
  • Types/lint/build: pnpm tsgo clean, scripts/run-oxlint.mjs clean on touched files, pnpm build clean (no INEFFECTIVE_DYNAMIC_IMPORT), swift build + scripts/package-mac-app.sh clean, pnpm format:swift clean.
  • Live (clean macOS 26 Parallels VM, branch dist grafted into the managed install): openclaw gateway call crestodian.setup.detect{"candidates":[],"workspace":"/Users/steipete/.openclaw/workspace","setupComplete":false}; crestodian.setup.activate {"kind":"claude-cli"} on a machine without Claude → {"ok":false,"status":"unknown","error":"spawn claude ENOENT"} with zero config diff (verified).
  • Live success path (host, isolated OPENCLAW_STATE_DIR): detect returned claude-cli (recommended) + codex-cli + gemini-cli in ladder order; activate {kind:"claude-cli"} ran a real Claude Code completion (turn 8.4s, output "OK") and only then authored config: default model claude-cli/claude-opus-4-8, workspace + bootstrap files, gateway.auth.mode: token, wizard metadata.
  • VM UI: fresh-install walkthrough on macOS 26 — welcome/connection/install pages render as designed; the AI page's error card + "Open help…" verified against an old gateway (unknown-method case). New welcome: https://github.com/steipete/openclaw-pr-assets/releases/download/onboarding-ai-setup-2291e9/onboarding-welcome-redesign.png
    Connect-your-AI page (error card + manual key form, captured live in the VM): https://github.com/steipete/openclaw-pr-assets/releases/download/onboarding-ai-setup-2291e9/onboarding-connect-your-ai-error-state.png
  • Autoreview (Codex, gpt-5.5): clean — "no actionable defects introduced by the provided change bundle."
  • Known proof gaps: full click-through screenshot set of every page state is pending better VM input automation (prlctl key/mouse injection does not reach Apple-Virtualization guests; follow-up filed for a local npm bundle path so the app's own installer can consume unreleased builds).

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime commands Command implementations size: XL maintainer Maintainer-authored PR labels Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9833cc070a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

var isAISetupBlocking: Bool {
self.activePageIndex == self.aiPageIndex &&
self.state.connectionMode != .unconfigured &&
!self.aiSetup.connected

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset AI verification when the gateway target changes

When a user successfully verifies AI for one target, then goes Back and changes from remote to local (or to another remote gateway), this gate still trusts the same aiSetup.connected flag. Since OnboardingAISetupModel is a single unkeyed state object and startIfNeeded() will no-op after the first run, the new target can skip its own live inference check and reach the first chat with an unverified/broken backend. Reset or key the AI setup state whenever the connection mode/preferred gateway changes.

Useful? React with 👍 / 👎.

Comment on lines +370 to +372
await updateConfig((current) =>
applyAuthProfileConfig(current, { profileId, provider, mode: "api_key" }),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Roll back staged manual keys if persistence fails

For manual API keys, the profile is staged before the live test and only restored when the test itself returns ok: false; once this config update succeeds or any following applySetup call throws (for example due to an invalid config, base-hash conflict, or disk error), the RPC fails while the newly staged ${provider}:manual key remains and may have overwritten a previous working manual profile. Wrap the post-test persistence phase in a catch/finally that restores stagedProfile on failure.

Useful? React with 👍 / 👎.

{ name: "plugins.sessionAction", scope: "dynamic" },
{ name: "crestodian.chat", scope: "operator.admin" },
{ name: "crestodian.setup.detect", scope: "operator.admin" },
{ name: "crestodian.setup.activate", scope: "operator.admin" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark setup activation as a control-plane write

crestodian.setup.activate can run a long live model test and then mutate gateway-wide config/auth state via activateSetupInference, but this descriptor is not marked controlPlaneWrite. handleGatewayRequest only applies the shared write budget to methods with that flag (src/gateway/server-methods.ts:709), so an admin client can fire unthrottled activation attempts instead of being limited like config.patch/config.apply; add controlPlaneWrite: true to the activate method.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed July 5, 2026, 9:57 AM ET / 13:57 UTC.

Summary
Adds a macOS Connect your AI onboarding step, Crestodian setup detect/activate gateway RPCs, Gemini CLI detection, a Crestodian settings pane, docs/protocol updates, and additional Watch, voice-call, WhatsApp, Control UI, i18n, and changelog changes.

Reproducibility: yes. for the review blockers: source inspection shows the stale setup state, manual auth staging, Codex ensure discard, and missing control-plane write flag paths. I did not run live reproduction because this review was read-only.

Review metrics: 3 noteworthy metrics.

  • Gateway setup RPCs: 2 added. The new detect/activate methods are admin-scoped protocol surface and one of them writes auth/config state.
  • Config/auth persistence surface: 1 new activation path writes model, workspace, auth profile, and plugin enablement. This makes upgrade and rollback behavior merge-critical even with green CI.
  • Extra product surfaces: 5 unrelated surfaces present. Watch, voice-call, WhatsApp, Control UI, and release-note changes need owner/scope review separate from macOS onboarding.

Stored data model
Persistent data-model change detected: migration/backfill/repair: apps/macos/Sources/OpenClaw/CrestodianSettings.swift, persistent cache schema: ui/src/i18n/.i18n/ru.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/th.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/tr.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/uk.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/vi.tm.jsonl, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #100286
Summary: This PR is the open candidate implementation for the linked macOS onboarding issue, but it is not merge-ready.

Members:

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

Merge readiness
Overall: 🧂 unranked krab
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🧂 unranked krab
Result: blocked by patch quality or review findings.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Fix manual auth staging, rollback, and same-store verification before another review.
  • Preserve Codex install metadata and mark setup activation as a control-plane write.
  • Split or remove the unrelated Watch, voice-call, WhatsApp, Control UI, i18n, and CHANGELOG changes.

Mantis proof suggestion
A native macOS onboarding flow is best supplemented with visible first-run proof once the blockers are fixed. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify macOS onboarding Connect your AI blocks Finish until a live AI check passes, and shows retry/manual-key error states.

Risk before merge

  • [P1] Manual API-key activation can overwrite a live provider:manual profile before verification and lacks rollback if later config/setup persistence fails.
  • [P1] Codex selection can persist openai/gpt-5.5 without the durable @openclaw/codex install metadata returned by the ensure helper.
  • [P1] The new setup activation RPC mutates auth/config state but bypasses the shared control-plane write budget.
  • [P1] The current branch includes unrelated Watch, voice-call, WhatsApp, Control UI, i18n, and CHANGELOG changes beyond the onboarding proof.

Maintainer options:

  1. Fix auth/config atomicity first (recommended)
    Stage manual keys under temporary profiles, test using the same auth store, preserve Codex install records, and roll back all post-test persistence failures before merge.
  2. Throttle setup activation
    Mark crestodian.setup.activate as a control-plane write so repeated admin activation attempts share the existing gateway write budget.
  3. Pause for branch narrowing
    If maintainers do not want the unrelated feature surfaces in this onboarding PR, split them out before continuing review.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Fix setup activation so manual keys are staged under a temporary profile, the verification run reads the same staged auth store, post-test persistence failures roll back staged auth, Codex ensure returns are preserved in config, and regression coverage proves those upgrade paths.

Next step before merge

  • [P2] Maintainer/author handling is needed to decide branch scope and repair the auth/config blockers before any merge or automated repair lane.

Maintainer decision needed

  • Question: Should this broad branch land as one onboarding/setup package, or should it be narrowed to verified macOS AI onboarding after the auth/config safety blockers are fixed?
  • Rationale: The PR adds new onboarding/product RPC behavior and now includes unrelated feature surfaces, so maintainer intent is needed after the concrete blockers are repaired.
  • Likely owner: steipete — @steipete is the current branch author and the visible recent owner for the central macOS onboarding and setup paths.
  • Options:
    • Narrow and repair before merge (recommended): Keep the verified AI onboarding work, fix the auth/config blockers, and split unrelated Watch, voice-call, WhatsApp, Control UI, i18n, and changelog changes into their own PRs.
    • Accept the broad branch: Merge all included surfaces only after the relevant owners explicitly sign off and the auth/config blockers are fixed.
    • Pause for a fresh PR: Close or supersede this branch if maintainers want a smaller contributor branch rebuilt around the core onboarding issue.

Security
Needs attention: The diff has concrete auth/config control-plane concerns around setup activation and manual key staging.

Review findings

  • [P1] Preserve Codex install records from setup ensure — src/crestodian/setup-inference.ts:361
  • [P2] Reset AI setup when the gateway target changes — apps/macos/Sources/OpenClaw/OnboardingAISetup.swift:141-143
  • [P2] Roll back manual keys on persistence failures — src/crestodian/setup-inference.ts:370-372
Review details

Best possible solution:

Land a narrowed PR that keeps the verified AI onboarding gate/RPCs, preserves auth and plugin install records atomically, marks activation as a throttled control-plane write, and splits unrelated feature and release-note changes.

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

Yes for the review blockers: source inspection shows the stale setup state, manual auth staging, Codex ensure discard, and missing control-plane write flag paths. I did not run live reproduction because this review was read-only.

Is this the best way to solve the issue?

No: the verified AI gate is the right end state, but this branch is not the best mergeable shape until auth/profile persistence is atomic, setup activation is throttled, and unrelated changes are split or explicitly approved.

Full review comments:

  • [P1] Preserve Codex install records from setup ensure — src/crestodian/setup-inference.ts:361
    When Codex is the first working candidate, ensureCodexRuntimePluginForModelSelection may return a config containing the install record/load metadata, but this branch discards it and only enables plugins.entries.codex. That can leave the persisted default model routed through Codex without a durable plugin install record, so the first post-onboarding run can fail to load the harness.
    Confidence: 0.9
  • [P2] Reset AI setup when the gateway target changes — apps/macos/Sources/OpenClaw/OnboardingAISetup.swift:141-143
    startIfNeeded() permanently no-ops after the first successful target, while the same OnboardingAISetupModel instance is reused if the user goes Back and switches local/remote gateways. That lets a new target skip its own live inference check and reach chat with an unverified backend.
    Confidence: 0.9
  • [P2] Roll back manual keys on persistence failures — src/crestodian/setup-inference.ts:370-372
    After a manual key passes the live test, later updateConfig or applySetup failures can still reject the RPC while leaving the newly staged manual profile in place. Wrap the post-test persistence phase so staged credentials are restored or removed on every failure before reporting the activation as failed.
    Confidence: 0.9
  • [P2] Mark setup activation as a control-plane write — src/gateway/methods/core-descriptors.ts:71
    crestodian.setup.activate can run a long live model test and then mutate gateway-wide config/auth state, but this descriptor is not marked controlPlaneWrite. Add the flag so admin clients cannot fire unbudgeted activation attempts around the shared config-write throttle.
    Confidence: 0.92
  • [P2] Gate manual activation on all busy states — apps/macos/Sources/OpenClaw/OnboardingAISetup.swift:261-263
    The manual submit guard only checks manualTesting, so the form can start a manual activation while an automatic candidate activation is still in .testing. That races two config/auth-writing RPCs; block manual submit whenever isBusy or phase == .testing is true.
    Confidence: 0.88
  • [P2] Use the staged auth store for manual tests — src/crestodian/setup-inference.ts:313-325
    The manual key is staged under the configured default agent directory, but the verification run is launched as the Crestodian agent without passing that same agentDir. In non-main default-agent setups, the just-pasted key is invisible to the test and a valid key can fail verification.
    Confidence: 0.87
  • [P2] Stage manual keys under a temporary profile — src/crestodian/setup-inference.ts:411-415
    Staging directly into ${provider}:manual replaces the live profile before verification completes. During the test window, unrelated sessions using that profile can read the unverified pasted key, so stage under a unique temporary profile and promote only after success.
    Confidence: 0.88
  • [P3] Remove release-owned changelog edits — CHANGELOG.md:31-32
    This PR inserts unrelated release-note entries into CHANGELOG.md, but the repository policy keeps the changelog release-owned for normal PRs. Move the user-visible context to the PR body or squash message and leave release generation to own this file.
    Confidence: 0.86

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦞 diamond lobster and patch quality is 🧂 unranked krab.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P0: The PR targets a first-run macOS onboarding/auth path where non-technical users can reach first chat with no working AI backend.
  • merge-risk: 🚨 compatibility: The setup path changes persisted model, workspace, plugin, and auth profile state for existing configurations.
  • merge-risk: 🚨 auth-provider: Manual key and Codex activation affect provider routing, auth profile selection, and plugin-backed OpenAI model loading.
  • merge-risk: 🚨 availability: Unthrottled setup activation and bad staged credentials can make first chat or unrelated live sessions fail at runtime.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦞 diamond lobster and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (linked_artifact): The PR body includes after-fix live gateway output, zero-config-diff failure proof, a successful live Claude completion before config persistence, and linked macOS VM screenshots.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix live gateway output, zero-config-diff failure proof, a successful live Claude completion before config persistence, and linked macOS VM screenshots.
Evidence reviewed

Security concerns:

  • [medium] Setup activation is an unthrottled config/auth write — src/gateway/methods/core-descriptors.ts:71
    The new activate method mutates gateway-wide auth/config state but is not marked as a control-plane write, so it bypasses the shared write budget.
    Confidence: 0.9
  • [medium] Manual keys are staged into a live profile before verification — src/crestodian/setup-inference.ts:411
    A pasted key replaces ${provider}:manual before the live test succeeds, which can expose unverified credentials to unrelated sessions using that profile.
    Confidence: 0.88

What I checked:

  • Current main does not contain the new setup RPC/UI surface: A current-main search for crestodian.setup.detect, crestodian.setup.activate, and OnboardingAISetup returned no matches, so this PR is still the active implementation path rather than obsolete work. (8a698108e096)
  • PR adds two admin setup RPCs: The PR adds crestodian.setup.detect and crestodian.setup.activate to the core gateway method table, but activate is not marked as a control-plane write. (src/gateway/methods/core-descriptors.ts:70, 0a7bbbcf32d1)
  • Activation mutates auth/config after live test: After a passing test, setup activation may ensure Codex, update auth profile config, and apply workspace/model setup, so failures in this phase need atomic rollback semantics. (src/crestodian/setup-inference.ts:343, 0a7bbbcf32d1)
  • Manual key staging still targets the live profile id: Manual activation stages directly into the provider:manual profile before verification, which can affect unrelated sessions using the same profile. (src/crestodian/setup-inference.ts:411, 0a7bbbcf32d1)
  • Codex dependency contract checked: Codex app-server documents model/list and auth/account APIs, and OpenClaw's Codex install helper returns an updated cfg that this PR currently discards on the setup path. (../codex/codex-rs/app-server/README.md:202)
  • Repository policy affected the review: Root and scoped AGENTS guidance was read and applied for compatibility-sensitive config/auth changes, Codex source inspection, release-owned CHANGELOG handling, and generated i18n review context. (AGENTS.md:23, 8a698108e096)

Likely related people:

  • steipete: Current-main blame and live PR metadata both point to @steipete around the macOS onboarding, Crestodian setup, and gateway descriptor surfaces involved in this PR. (role: recent area contributor and merger; confidence: high; commits: 0720b322fedd, 0a7bbbcf32d1; files: apps/macos/Sources/OpenClaw/Onboarding.swift, src/commands/onboard-inference.ts, src/gateway/methods/core-descriptors.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (3 earlier review cycles)
  • reviewed 2026-07-05T11:03:50.239Z sha 85fd61e :: found issues before merge. :: [P2] Reset AI setup when the gateway target changes | [P2] Roll back manual keys on persistence failures | [P2] Mark setup activation as a control-plane write
  • reviewed 2026-07-05T12:16:47.760Z sha eddc84f :: needs changes before merge. :: [P2] Reset AI setup when the gateway target changes | [P2] Roll back manual keys on persistence failures | [P2] Mark setup activation as a control-plane write | [P2] Gate manual activation on all busy states
  • reviewed 2026-07-05T13:29:19.848Z sha 5095bf9 :: needs changes before merge. :: [P1] Preserve Codex install records from setup ensure | [P2] Reset AI setup when the gateway target changes | [P2] Roll back manual keys on persistence failures | [P2] Mark setup activation as a control-plane write | [P2] Gate manual activation on all busy states | [P2] Use the staged auth store for manual tests

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 5, 2026
@blacksmith-sh

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6b475dde6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +260 to +263
let key = self.manualKey.trimmingCharacters(in: .whitespacesAndNewlines)
guard !key.isEmpty, !self.manualTesting else { return }
self.manualError = nil
self.manualTesting = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate manual activation on all busy states

When the manual API-key path is used, this guard only blocks another manual submit and leaves the setup model in .ready while manualTesting runs. If no candidates were found, the window can be closed without the busy confirmation while crestodian.setup.activate is still staging/auth-writing; if the manual form is visible after failed candidates, the user can start a candidate retry and then press Connect because the manual button/guard do not honor phase == .testing, causing two activation RPCs to race and whichever finishes last can overwrite the persisted model/auth state. Treat manual activation as the same busy phase/gate as candidate activation before sending the RPC.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eddc84f6ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const updateConfig =
deps.updateConfig ?? (await import("../commands/models/shared.js")).updateConfig;
const { enablePluginInConfig } = await import("../plugins/enable.js");
await updateConfig((current) => enablePluginInConfig(current, "codex").config);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve Codex install records from setup ensure

When the Codex option is the first working candidate on a packaged install where the Codex plugin is not already recorded, ensureCodexRuntimePluginForModelSelection returns a config containing the install record/load metadata that other callers persist via codexInstall.cfg, but this branch discards it and only writes plugins.entries.codex.enabled. That leaves the setup default model routed through Codex while the gateway has no durable record for where the newly installed @openclaw/codex plugin lives, so the first post-onboarding run can fail to load the harness after this promised auto-install path.

Useful? React with 👍 / 👎.

return { ok: false, status: "unavailable", error: plan.error };
}

const agentDir = resolveAgentDir(cfg, resolveDefaultAgentId(cfg));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the staged auth store for manual tests

When an existing config has a non-main default agent, the manual API key is staged under that default agent's auth store here, but the live test later runs as agentId: "crestodian" without passing the same agentDir; Crestodian's auth loading inherits the main store, not an arbitrary default-agent store. In that setup, a valid pasted key is invisible to the verification run, so manual activation fails even though the key was just staged.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 5, 2026
@steipete
steipete force-pushed the claude/intelligent-lamarr-2291e9 branch from eddc84f to 5095bf9 Compare July 5, 2026 13:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5095bf943b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +411 to +414
const upserted = await upsertAuthProfileWithLock({
profileId: params.profileId,
credential: { type: "api_key", provider: params.provider, key: params.apiKey },
agentDir: params.agentDir,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stage manual keys under a temporary profile

When a user already has a <provider>:manual profile selected, this upsert replaces that live profile before the manual key has passed crestodian.setup.activate verification. While the test is running, any existing or new agent run that resolves the same profile reads the unverified pasted key, so a bad key can break unrelated sessions even if rollback later restores the prior value; stage the candidate under a unique temporary profile and only promote it after success.

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web app: ios App: ios scripts Repository scripts labels Jul 5, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 5, 2026
@steipete
steipete merged commit 2bc50d0 into main Jul 5, 2026
135 of 139 checks passed
@steipete
steipete deleted the claude/intelligent-lamarr-2291e9 branch July 5, 2026 13:59
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Jul 5, 2026
…l restart (#100488)

* fix(macos): follow gateway endpoint changes in the open Dashboard window

In remote SSH mode the Dashboard window baked the forwarded tunnel's
local port into the WebView URL and injected auth at open time; when
RemoteTunnelManager recreated the tunnel on a new ephemeral port the
open window reconnected to the dead port forever. DashboardManager now
subscribes to GatewayEndpointStore and, while the window is open,
re-injects auth for the new origin and reloads the WebView without
stealing focus. Dashboard log lines now strip the #token= fragment so
endpoint changes never write credentials to unified logs.

Fixes #100476

* test(macos): drop stale hasCrestodianSetupAuth assertions

OnboardingView.hasCrestodianSetupAuth was removed with the replaced
OnboardingView+CrestodianSetup source in #100288, leaving the macOS
test target failing to compile on main. Delete the test for the
removed internal helper.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
…penclaw#100288)

* feat(crestodian): add live-tested structured inference setup (detect/activate gateway RPCs)

* feat(macos): redesign onboarding around a verified Connect-your-AI step

* docs: describe the verified AI onboarding step and gemini setup ladder entry

* chore(macos): drop replaced OnboardingView+CrestodianSetup source

* fix(macos): keep the AI-detect error card from pairing with an unproven empty-state claim

* chore(protocol): regenerate Swift gateway models for crestodian.setup methods

* test(crestodian): give setup-inference mocks explicit params for test-types lane

* chore(i18n): sync native app string inventory for onboarding redesign

* chore(i18n): sync native app string inventory for onboarding redesign
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
…l restart (openclaw#100488)

* fix(macos): follow gateway endpoint changes in the open Dashboard window

In remote SSH mode the Dashboard window baked the forwarded tunnel's
local port into the WebView URL and injected auth at open time; when
RemoteTunnelManager recreated the tunnel on a new ephemeral port the
open window reconnected to the dead port forever. DashboardManager now
subscribes to GatewayEndpointStore and, while the window is open,
re-injects auth for the new origin and reloads the WebView without
stealing focus. Dashboard log lines now strip the #token= fragment so
endpoint changes never write credentials to unified logs.

Fixes openclaw#100476

* test(macos): drop stale hasCrestodianSetupAuth assertions

OnboardingView.hasCrestodianSetupAuth was removed with the replaced
OnboardingView+CrestodianSetup source in openclaw#100288, leaving the macOS
test target failing to compile on main. Delete the test for the
removed internal helper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios app: macos App: macos app: web-ui App: web-ui channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS onboarding can finish without working inference and greets new users with a raw auth error

1 participant