Repository navigation
feat(onboarding): require explicit AI provider selection - #139675
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 6, 2026, 10:34 AM ET / 14:34 UTC. ClawSweeper reviewWhat this changesMakes macOS and guided CLI onboarding wait for an explicit provider choice, supports managed provider installation, defaults fresh native-conversation discovery off, and makes skipping AI prepare resumable local setup. Merge readiness⛔ Blocked before merge - 3 items remain This remains useful, maintainer-sponsored work: current main still automatically attempts providers. No actionable correctness or security finding emerged, and the released contract plus the author’s follow-up resolve the previous compatibility blocker. Priority: P2 Review scores
Verification
How this fits togetherOnboarding turns detected credentials and provider metadata into a user-selected, verified AI connection. The Gateway owns installation, verification, and configuration persistence, while macOS and CLI present choices and consent. flowchart TD
A[Credentials and provider metadata] --> B[Passive detection]
B --> C[macOS or CLI picker]
C --> D[Explicit selection and consent]
D --> E[Managed installation and authentication]
E --> F[Connection verification]
F --> G[Owner and configuration checks]
G --> H[Saved route and discovery preference]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one explicit-selection flow with managed installation, owner-checked persistence, and discovery consent that preserves existing preferences and independently authorized bound conversations. Do we have a high-confidence way to reproduce the issue? Yes, from source: current-main macOS detection activates its first candidate, and guided CLI iterates candidates before explicit selection. These paths were inspected but not executed locally. Is this the best way to solve the issue? Yes. Reusing the shared picker, managed installer, configuration writer, and existing discovery preference is a coherent repair; the follow-up establishes the intended upgrade contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 37aaf073776c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
edc1f0a to
21b0925
Compare
Worked on by: - @steipete Co-authored-by: steipete <[email protected]>
Keep detection passive and route native and guided CLI setup through an explicit provider choice. Include the official install catalog and local custom endpoints in the shared setup flow, preserve selected runtimes and installer-owned facts, and initialize native conversation discovery through its configuration owner. Make skipped onboarding prepare a resumable, owner-fenced baseline. Preserve existing authored discovery preferences and the named legacy upgrade contract.
Carry approved installation facts through provider discovery, verification, and final selection without replacing the running Gateway inventory. Compare authored configuration separately from materialized runtime defaults and bind the exact provider artifact before and after its connection test. Keep preparation cancellable at client prompts, honor pending expiry, and protect credential and configuration persistence together at the final commit.
5ffc376 to
33f429b
Compare
Treat first-write native catalog preferences as privacy settings without suppressing diagnostics for explicit plugin usage. Keep the existing warning deduplication contract across subsequent writes and reads. Remove inert native fallback state and preserve explicit selection, activation receipt ownership, and unrelated config fields in the native flow fixtures.
Apply canonical formatting to the onboarding view and keep the localization inventory test anchored to visible consent copy. Pass the existing fixture model explicitly at both configured-agent response call sites.
|
Reviewed the remaining compatibility risk against the released contract and execution owners. Released documentation already says disabling the preference disables operator catalogs and paired-node catalog commands while preserving the provider/harness: released node documentation. The declaration had also included the transport used for already-bound CLI turns. That overreach is removed in the current head. The actual manifest/registry regression first failed at resume, then passed with discovery listing still denied and the dangerous-command policy intact. All 109 catalog, node-session, and conversation-binding tests passed. The final-head packaged proof now passed every phase, including 13 Meta lifecycle checks and five published-release upgrade cases through Doctor and relaunch (run). It preserves authored and omitted preferences within its stated scope: the root-package upgrade retains the released Codex plugin, uses synthetic history, and does not claim native account migration. Bound execution has separate candidate-manifest regression coverage. The full changed check and fresh independent P0/P1 review also passed. I’m retaining the documented discovery boundary. The generated declaration is package metadata using the existing preference, not a new configuration option or runtime/database store. No concrete correctness or security finding remains. Native CI is still pending; landing will use the required repository flow after the exact-head checks pass. |
|
Merged via squash.
|
…9675) * feat(onboarding): require explicit AI provider selection Worked on by: - @steipete Co-authored-by: steipete <[email protected]> * feat(onboarding): require explicit AI provider selection Keep detection passive and route native and guided CLI setup through an explicit provider choice. Include the official install catalog and local custom endpoints in the shared setup flow, preserve selected runtimes and installer-owned facts, and initialize native conversation discovery through its configuration owner. Make skipped onboarding prepare a resumable, owner-fenced baseline. Preserve existing authored discovery preferences and the named legacy upgrade contract. * fix(onboarding): complete managed provider activation Carry approved installation facts through provider discovery, verification, and final selection without replacing the running Gateway inventory. Compare authored configuration separately from materialized runtime defaults and bind the exact provider artifact before and after its connection test. Keep preparation cancellable at client prompts, honor pending expiry, and protect credential and configuration persistence together at the final commit. * fix(onboarding): honor discovery opt-outs in validation Treat first-write native catalog preferences as privacy settings without suppressing diagnostics for explicit plugin usage. Keep the existing warning deduplication contract across subsequent writes and reads. Remove inert native fallback state and preserve explicit selection, activation receipt ownership, and unrelated config fields in the native flow fixtures. * fix(onboarding): complete native validation coverage Apply canonical formatting to the onboarding view and keep the localization inventory test anchored to visible consent copy. Pass the existing fixture model explicitly at both configured-agent response call sites. * fix(onboarding): preserve bound conversations with discovery disabled --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Opening macOS AI onboarding could select and test an authenticated provider before the user clicked anything. Fresh installs omitted official provider plugins, including Meta, as reported by community members on Discord. CLI “Skip for now” could leave the Gateway baseline and named-agent workspace unfinished. Existing native conversations appeared without first-run consent.
Why This Change Was Made
Detection now reports passive availability and waits for an explicit selection in macOS and both guided CLI paths. Failure and cancellation retain the existing route and never try another provider. The shared picker includes installed manifests and the official install catalog; the existing managed installer performs capability review and continues directly to the selected provider’s authentication form. Installer records remain trusted preparation facts, separate from provider-authored configuration, and CLI authentication retains its execution runtime.
Fresh configuration creation owns the existing catalog opt-outs. Generic optional manifest metadata describes catalog capability; host-generated metadata names the legacy implicit-on upgrade contract. Neither agent IDs, setup timestamps, configuration counts nor schema defaults grant consent. Existing authored preferences remain intact, and a later Codex installation retains the fresh opt-out. Catalog readers and declared discovery commands check the current preference. Independently authorized execution for an already-bound conversation keeps its existing permissions and remains available when discovery is off.
CLI Skip uses the existing resumable onboarding receipt, revalidating its owner after awaited agent creation and before baseline writes. Local custom endpoints require server-verified client locality; remote clients receive
openclaw onboard --auth-choice custom-api-keyas the precise Gateway-host handoff.Packaged proof also exposed stale post-install provider metadata, skipped onboarding capability review, and runtime schema defaults mistaken for operator edits. Preparation now carries trusted install records into an operation-scoped lookup. Verification and persistence use the same typed candidate builder, while current configuration, execution ownership and installed artifacts are independently revalidated before commit. Cancellation and shutdown respect protected installation and final-commit boundaries without losing their original reason.
The owning repairs are in
src/commands/onboard-inference.ts,src/commands/onboard-guided.ts,src/plugins/provider-auth-choice.runtime.ts,src/config/io.write.ts,src/plugins/native-session-catalog-registration.ts,src/system-agent/setup-inference-plan.ts,src/system-agent/setup-inference-persist.ts, andsrc/wizard/session.ts.Rejected alternatives: a core provider list or parallel installer; automatic fallback; heuristic first-run detection; deriving installer authority from provider configuration; relaxing conflict, expiry or cancellation guards.
User Impact
Users explicitly choose their AI, can connect installable official providers, and can finish baseline installation without AI. Fresh native discovery defaults off. Existing routes and authored preferences are preserved. Opt-out-only entries neither request plugin installation nor widen allowlists or produce missing-plugin warnings. macOS onboarding documentation is updated; the draft’s false historical release claim is removed. Shared Control UI/Tauri parity follows in PR B after this lands.
Authorized feature growth against f66dc27:
The feature needs explicit consent, managed install continuation and ownership enforcement. Connected cleanup removes the duplicate picker restriction, credential-prompt branch, automatic attempt ladder, unused credential-store input, duplicate availability scan, active account-discovery path, and inert native fallback state/error card. No dependency, configuration option, SQLite schema, protocol version or changelog entry is added.
Evidence
Head: 81a4ed6
OPENCLAW_TESTBOX=1 pnpm check:changed: passed on the exact committed tree (Testbox run); the wrapper exited 0 and cleaned up its lease. Earlier complete checks passed all type, lint, dead-export and boundary lanes.git diff --check,pnpm native-catalogs:check,pnpm protocol:check, and native localization verification passed.Representative focused commands:
ClawSweeper’s compatibility concern was checked against the released contract and actual execution owners. Released documentation already states that false disables operator catalogs and paired-node catalog commands while leaving the provider/harness available. The new declaration originally included an existing bound-turn execution command; that overreach is removed and regression-tested. Catalog reads remain governed by the authored preference. The upgrade matrix establishes preference preservation within its stated synthetic scope. Generated manifest projections are package metadata, not a new runtime store or database schema. No concrete security finding remains; bot confidence/rating boilerplate is not used to waive review or CI.
The images render the actual native page with identical synthetic Gateway responses. Before: detection starts testing. After: choices wait with no activation request. They contain no real account data or credentials.
Draft implementation by RoboClaw, repaired and completed in this PR.
Worked on by:
Co-authored-by: steipete [email protected]