Allow private HTTP core URLs#1765
Conversation
📝 WalkthroughWalkthroughThis PR adds HTTP-to-localhost URL restrictions for cloud-mode RPC picker via new validation helpers and refactors Rust truncation logic to use a shared UTF-8 character boundary utility. Changes span desktop app configuration, picker validation, and multiple backend tool/service truncation sites. ChangesCloud RPC URL validation
UTF-8 boundary helper refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
c0783b4 to
b47ce49
Compare
|
really great pr @vaddisrinivas well done |
Summary
100.x.x.x.http://core URLs rejected; publicly reachable cores must still use HTTPS.rust:checkworks on the pinned stable toolchain.Problem
http://100.116.244.64:7788failed from the desktop app withFailed to fetch.floor_char_boundary/ceil_char_boundarycalls.Solution
http://example.comremains rejected in cloud mode.http:andws:in Tauriconnect-src, with app-side validation as the guardrail.Submission Checklist
pnpm --filter openhuman-app test:coveragewas attempted but hit an unrelated, isolated-passingCoreStateProvidercache test; CI diff-cover remains source of truth.## Related: N/A — no existing matrix feature ID maps to cloud-core URL transport validation.docs/RELEASE-MANUAL-SMOKE.md): N/A — not a release-cut smoke surface; docs and automated tests updated.Closes #NNNin the## Relatedsection: N/A — no linked issue.Impact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
codex/allow-private-http-coreb47ce497facf01220ae65b68fb99030b922865a6Validation Run
pnpm --filter openhuman-app format:checkpnpm typecheck(pnpm --filter openhuman-app compilevia pre-push)pnpm exec vitest run --config test/vitest.config.ts src/utils/__tests__/configPersistence.test.ts src/components/BootCheckGate/__tests__/BootCheckGate.test.tsxcargo test --manifest-path Cargo.toml char_boundary;env -u BACKEND_URL -u VITE_BACKEND_URL cargo test -p openhuman;pnpm --filter openhuman-app rust:checkpnpm --filter openhuman-app format:checkandpnpm --filter openhuman-app rust:checkValidation Blocked
command:pnpm --filter openhuman-app test:coverageerror:one unrelated local failure:CoreStateProvider — identity-change cache clearing > preserves teams cache when identity is unchanged across refreshes; focused retry of that exact test passed.impact:coverage command did not complete locally; PR-specific focused Vitest tests passed and CI coverage gate remains authoritative.command:pnpm test:rusterror:local script exportsBACKEND_URLbeforecargo test, so Rustoption_env!("BACKEND_URL")bakes the mock URL into tests that expect default API behavior.impact:CI-likeenv -u BACKEND_URL -u VITE_BACKEND_URL cargo test -p openhumanpassed locally.Behavior Changes
100.x.x.x, while rejecting public HTTP core URLs.http://100.x.x.x:7788/rpccan be used from the desktop cloud-mode picker.Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit
New Features
Documentation