fix(cloud): accept 405 from remote core probe#2471
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughBootCheckGate's ModePicker now treats HTTP 405 from /rpc as a successful reachability signal (logs reachability, sets testStatus to ok, returns). Other status handling (401/403 auth, other non-OK unreachable, JSON drain) is unchanged. A test confirms the UI shows connected when /rpc returns 405. ChangesHTTP 405 Reachability Handling
German i18n additions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
667e0f6 to
6ea7471
Compare
6ea7471 to
ce2072b
Compare
|
@graycyrus @senamakel #2471 is also green and mergeable for the fresh #2467 remote-core/Cloudflare 405 issue. CodeRabbit approved/no actionable comments. This is small and likely worth merging alongside the OAuth/deep-link reliability fixes. |
|
@aqilaziz this PR has merge conflicts with main — please rebase/resolve before review. |
Summary - Treat HTTP 405 from the BootCheckGate cloud-mode
/rpcprobe as a reachable core instead of an unreachable endpoint. - Keep 401/403 classified as auth failures and other non-2xx responses as unreachable. - Add BootCheckGate coverage for a Cloudflare/self-hosted-style 405 response. ## Problem The remote-core picker used by BootCheckGate calls the sharedtestCoreRpcConnection()probe, but unlike the Welcome advanced RPC panel it treated405 Method Not Allowedas a hard connection failure. For self-hosted cores behind Cloudflare Tunnel, the request can reach/rpcand still surface 405, causing the picker to show an unreachable state even though the endpoint is present. ## Solution Align BootCheckGate with the existing Welcome-page behavior: a 405 from/rpcproves the tunnel/server path reached the core endpoint, so the test connection can showConnected. Auth errors remain distinct, and server/network failures still block the connection test. ## Submission Checklist - [x] Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy - [x] Diff coverage ≥ 80% - focused BootCheckGate test covers the new 405 branch. - [x] Coverage matrix updated - N/A: remote-core probe classification only; no feature matrix row changed. - [x] All affected feature IDs from the matrix are listed in the PR description under## Related- N/A: no matrix feature ID changed. - [x] No new external network dependencies introduced. - [x] Manual smoke checklist updated if this touches release-cut surfaces - N/A: no release-cut smoke flow changed. - [x] Linked issue closed viaCloses #NNNin the## Relatedsection. ## Validation - [x] Prettier check on changed files.n- [x] i18n coverage: German locale now has no missing keys. - [x] Focused tests:vitest run src/components/BootCheckGate/tests/BootCheckGate.test.tsx --config test/vitest.config.ts- 34 tests passed. - [x]git diff --check. ## Related - Closes #2467 --- ## AI Authored PR Metadata (required for Codex/Linear PRs) ### Linear Issue - Key: N/A - URL: N/A ### Commit & Branch - Branch:codex/2467-cloudflare-405- Commit SHA:ce2072b### Validation Run - [x]pnpm --dir app exec prettier --check app/src/components/BootCheckGate/BootCheckGate.tsx app/src/components/BootCheckGate/tests/BootCheckGate.test.tsx- passed via installed workspace dependency binary. - [x]vitest run src/components/BootCheckGate/tests/BootCheckGate.test.tsx --config test/vitest.config.ts- 1 file / 34 tests passed. - [x]git diff --check- passed.n- [x]tsx scripts/i18n-coverage.ts --locale de --no-unused- passed. ### Validation Blocked - N/A ### Behavior Changes - Intended behavior change: BootCheckGate's cloud connection test now treats HTTP 405 from/rpcas proof that the remote core endpoint is reachable. - User-visible effect: Cloudflare Tunnel/self-hosted remote-core users are no longer shown an unreachable error solely because/rpcreplies 405 during the probe. ### Parity Contract - Legacy behavior preserved: 401/403 still show auth failure; network errors and other non-2xx/non-405 responses still show unreachable. - Guard/fallback/dispatch parity checks: Welcome already accepted 405; BootCheckGate now matches that behavior. ### Duplicate / Superseded PR Handling - Duplicate PR(s): none found for #2467. - Canonical PR: this PR. - Resolution: N/A.Summary by CodeRabbit
Bug Fixes
Tests
Localization