Skip to content

fix(cloud): accept 405 from remote core probe#2471

Open
aqilaziz wants to merge 1 commit into
tinyhumansai:mainfrom
aqilaziz:codex/2467-cloudflare-405
Open

fix(cloud): accept 405 from remote core probe#2471
aqilaziz wants to merge 1 commit into
tinyhumansai:mainfrom
aqilaziz:codex/2467-cloudflare-405

Conversation

@aqilaziz
Copy link
Copy Markdown
Contributor

@aqilaziz aqilaziz commented May 22, 2026

Summary - Treat HTTP 405 from the BootCheckGate cloud-mode /rpc probe 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 shared testCoreRpcConnection() probe, but unlike the Welcome advanced RPC panel it treated 405 Method Not Allowed as a hard connection failure. For self-hosted cores behind Cloudflare Tunnel, the request can reach /rpc and 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 /rpc proves the tunnel/server path reached the core endpoint, so the test connection can show Connected. 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 via Closes #NNN in the ## Related section. ## 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 /rpc as 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 /rpc replies 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

    • Cloud connection check now treats a specific server response as reachable, improving connection detection in the connection tester.
  • Tests

    • Added test coverage verifying the connection flow recognizes that response as successful.
  • Localization

    • Added German translations for provider/connection messaging and MCP-server configuration UI strings.

Review Change Stack

@aqilaziz aqilaziz requested a review from a team May 22, 2026 00:24
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b08112c3-70e8-4795-a62c-a5edc2e8b0c4

📥 Commits

Reviewing files that changed from the base of the PR and between 6ea7471 and ce2072b.

📒 Files selected for processing (4)
  • app/src/components/BootCheckGate/BootCheckGate.tsx
  • app/src/components/BootCheckGate/__tests__/BootCheckGate.test.tsx
  • app/src/lib/i18n/chunks/de-3.ts
  • app/src/lib/i18n/chunks/de-5.ts
✅ Files skipped from review due to trivial changes (2)
  • app/src/lib/i18n/chunks/de-5.ts
  • app/src/lib/i18n/chunks/de-3.ts

📝 Walkthrough

Walkthrough

BootCheckGate'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.

Changes

HTTP 405 Reachability Handling

Layer / File(s) Summary
HTTP 405 reachability handling and verification
app/src/components/BootCheckGate/BootCheckGate.tsx, app/src/components/BootCheckGate/__tests__/BootCheckGate.test.tsx
The RPC connection test now treats HTTP 405 responses as successful reachability signals, logging that the endpoint was reached despite method rejection, setting testStatus to ok, and returning early. A new test case verifies that 405 responses render the connected (test-status-ok) UI state and do not render the unreachable state.

German i18n additions

Layer / File(s) Summary
Add German translation entries for subconscious and MCP server
app/src/lib/i18n/chunks/de-3.ts, app/src/lib/i18n/chunks/de-5.ts
Adds subconscious.providerUnavailableTitle, subconscious.providerSettings and multiple settings.developerMenu.mcpServer.* / settings.mcpServer.* German translation strings for developer menu MCP-server UI text, client names, clipboard feedback, and config file guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

working

Poem

I hopped the network, sniffed the line, 🐰
A 405 answered with a curt "not mine",
I twitched my nose — it meant the route was fine,
So I thumped in cheer, the endpoint's in sight,
Little rabbit nods: connection's right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: treating HTTP 405 responses as successful reachability signals in the cloud probe logic, directly matching the core code change in BootCheckGate.tsx.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the working A PR that is being worked on by the team. label May 22, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 22, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 22, 2026
@YOMXXX
Copy link
Copy Markdown
Contributor

YOMXXX commented May 22, 2026

@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.

@M3gA-Mind
Copy link
Copy Markdown
Contributor

@aqilaziz this PR has merge conflicts with main — please rebase/resolve before review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants