fix(config): isolate backend API URL resolution#1701
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 (21)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (16)
📝 WalkthroughWalkthroughAdd effective_backend_api_url with local-AI override heuristic, migrate server and OpenHuman backend callers to use it, add unit tests, and add a CI git-grep guard to block regressions. ChangesHosted Backend URL Resolver Migration
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 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. Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/test.yml:
- Around line 93-107: The CI file's changed-files guard list is missing the
migrated memory package; add the memory module to the list so backend callers
under src/openhuman/memory (specifically
src/openhuman/memory/tree/score/embed/cloud.rs) are covered by the CI
gate—update the block that enumerates paths (the list containing
src/openhuman/embeddings, src/openhuman/integrations, etc.) to include
src/openhuman/memory so regressions in the memory/cloud embedding code are
caught.
In `@src/api/config.rs`:
- Around line 184-193: The warning currently logs the full user-provided URL in
warn_backend_url_fallback_once (static WARNED), which can leak credentials or
tokens; modify warn_backend_url_fallback_once to redact sensitive parts of
local_url before logging by parsing with url::Url (or equivalent), stripping or
masking userinfo (username/password) and sensitive query parameters (or dropping
the query) and then pass the sanitized string into the tracing::warn call
instead of the raw local_url so no secrets are emitted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 19be91ae-e24e-43cd-8553-ac84e24e15f2
📒 Files selected for processing (21)
.github/workflows/test.ymlsrc/api/config.rssrc/api/mod.rssrc/core/jsonrpc.rssrc/openhuman/app_state/ops.rssrc/openhuman/billing/ops.rssrc/openhuman/channels/bus.rssrc/openhuman/channels/controllers/ops.rssrc/openhuman/config/ops.rssrc/openhuman/credentials/ops.rssrc/openhuman/embeddings/cloud.rssrc/openhuman/integrations/client.rssrc/openhuman/local_ai/gif_decision.rssrc/openhuman/meet_agent/brain.rssrc/openhuman/memory/tree/score/embed/cloud.rssrc/openhuman/referral/ops.rssrc/openhuman/socket/schemas.rssrc/openhuman/team/ops.rssrc/openhuman/voice/cloud_transcribe.rssrc/openhuman/voice/reply_speech.rssrc/openhuman/webhooks/ops.rs
6d72f1e to
090f2ae
Compare
090f2ae to
1a0514a
Compare
|
has been merged in #1630 but thanks for the pr |
Summary
effective_backend_api_urlso hosted backend calls ignore local-AIapi_urloverrideseffective_api_urlFixes #1663
Testing
Summary by CodeRabbit
Refactor
Tests