Harden Cloud auth and add explicit hosted OpenCode - #50
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Heads-up on this PR's green tick: no build or test job ran on it.
Running the suite locally instead, against a tree byte-identical to this PR head ( SDK kitDownloaded the official release kit rather than using the local dist, which is still 0.20.28:
Tests
Two suites deliberately excluded, both pre-existing
SuggestionBecause CI cannot see this branch, the first real signal arrives only when #34 merges to |
PR #50 added `find_package(CURL REQUIRED)` for the Cloud console client. macOS resolves that from the Xcode SDK, but windows-2022 has no system libcurl and the RunAnywhere C++ desktop kit ships neither curl nor OpenSSL, so Configure failed: Could NOT find CURL (missing: CURL_INCLUDE_DIR) CMakeLists.txt:122 (find_package) This was not only a CI break. release.yml builds Windows through the same CMake path, so no Windows release artifact containing cloud auth could be produced at all — `rcli login` was unshippable on Windows. Windows now uses the system HTTP stack; POSIX keeps libcurl. Chosen over vendoring curl/OpenSSL through vcpkg because it adds no DLLs beside rcli.exe, needs no package manager for a source build, and keeps the release archive self-contained. Fixing it in CMake covers CI and release together, so neither workflow file needed to change. Security parity with the curl path is deliberate and audited: CURLOPT_FOLLOWLOCATION 0 -> WINHTTP_OPTION_REDIRECT_POLICY_NEVER CURLOPT_SSL_VERIFYPEER 1 -> WinHTTP default chain validation, left alone CURLOPT_SSL_VERIFYHOST 2 (WINHTTP_OPTION_SECURITY_FLAGS deliberately unset) CURLOPT_NOPROXY loopback -> WINHTTP_ACCESS_TYPE_NO_PROXY for localhost/127.0.0.1/::1 connect/total timeouts -> WinHttpSetTimeouts plus a steady_clock deadline applied to each receive 1 MiB response cap -> preserved, with overflow-safe accounting The URL is also parsed with ICU_REJECT_USERPWD and restricted to http/https. Implemented by Codex (GPT-5.6) and reviewed here; the diff was audited against the constraints above before committing. Validation on macOS: cmake configure OK ctest -E 'mlx|telemetry_live' 5/5 passed Codex saw rcli_account_cli_e2e fail under its sandbox because a loopback socket was denied; re-run outside the sandbox it passes. Still needs CI to confirm: Windows compile/link, tests, and that the packaged archive has no new runtime DLL dependency. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HEesoNSHjgjLGMhgmkHPsA
Summary
This is the single follow-up for the hosted account and coding-harness work, stacked on #34 (
siddhesh/rcli-coding-harness). The parent PR remains the source for the editor integrations, Anthropic harness, local-model routing, and command registration. This PR builds on those files instead of maintaining a competing implementation.Included
ConsoleClientfor hermetic tests.rcli opencode --cloud --model <console-model-id>routing. Localrcli opencoderemains unchanged; hosted routing is opt-in and never silently sends local models to the cloud.Review order
mainafter its parent harness/editor changes are reviewed.main.The separate distribution-hardening PR #49 is intentionally independent and can be reviewed or merged separately.
Validation
cmake -S . -B build -DRCLI_SDK_KIT=<published kit> -DRCLI_APPLE_MLX_HOST=OFF -DBUILD_TESTING=ONcmake --build build -j4ctest --test-dir build --output-on-failure(7/7 passed against the locally available v0.20.28 kit; the schema lock and source pin remain v0.20.31/IDL 1.1.0)Non-goals